* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

/* Header Styles */
header {
    margin-bottom: 30px;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 400;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Game Area */
.game-area {
    margin: 40px 0;
}

/* Navigation Menu */
.main-nav {
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}
.main-nav li {
    margin: 0 20px;
}
.main-nav .nav-link {
    display: block;
    padding: 18px 0 14px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-bottom 0.2s;
}
.main-nav .nav-link.active,
.main-nav .nav-link:hover {
    color: #764ba2;
    border-bottom: 3px solid #764ba2;
}

/* Make alphabet grid boxes square and bigger */
.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.letter {
    font-size: 5rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 4px #000;
    text-stroke: 4px #000;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    padding: 0;
    transition: all 0.5s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 260px;
}

.letter.filled {
    animation: fillLetter 0.8s ease-in-out;
    -webkit-text-stroke: 0;
    text-stroke: 0;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.3);
}

.letter.filled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--fill-color), var(--fill-color-light));
    z-index: -1;
    border-radius: 20px;
}

@keyframes fillLetter {
    0% {
        transform: scale(1);
        -webkit-text-stroke: 4px #000;
        text-stroke: 4px #000;
        color: transparent;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1.05);
        -webkit-text-stroke: 0;
        text-stroke: 0;
        color: white;
    }
}

/* Controls */
.controls {
    margin: 30px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Fredoka', sans-serif;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn.secondary {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
}

.btn.info {
    background: linear-gradient(45deg, #a29bfe, #6c5ce7);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Status */
.status {
    margin: 20px 0;
}

.status-text {
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
    margin-bottom: 10px;
}

.confidence {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    font-weight: 400;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #000;
}

.modal h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.help-content {
    text-align: left;
    line-height: 1.6;
}

.help-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.help-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.help-content li {
    margin-bottom: 8px;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    .alphabet-grid {
        gap: 18px;
        max-width: 100vw;
    }
    .letter {
        font-size: 3.2rem;
        max-width: 160px;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .alphabet-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .letter {
        font-size: 2.2rem;
        max-width: 120px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .letter {
        font-size: 1.5rem;
        max-width: 80px;
    }
}

/* Listening Animation */
.listening .letter {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    }
    50% {
        box-shadow: 0 8px 25px rgba(255,255,255,0.4);
    }
    100% {
        box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    }
}

/* Success Animation */
.letter.success {
    animation: success 0.6s ease-in-out;
}

@keyframes success {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1.05);
    }
}

.words-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.word-box {
    font-size: 2.5rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 4px #000;
    text-stroke: 4px #000;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    transition: all 0.5s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 260px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.word-box.filled {
    animation: fillLetter 0.8s ease-in-out;
    -webkit-text-stroke: 0;
    text-stroke: 0;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.3);
}

.word-box.filled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--fill-color), var(--fill-color-light));
    z-index: -1;
    border-radius: 20px;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.number-box {
    font-size: 4rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 4px #000;
    text-stroke: 4px #000;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    transition: all 0.5s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 260px;
}

.number-box.filled {
    animation: fillLetter 0.8s ease-in-out;
    -webkit-text-stroke: 0;
    text-stroke: 0;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.3);
}

.number-box.filled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--fill-color), var(--fill-color-light));
    z-index: -1;
    border-radius: 20px;
}

@media (max-width: 900px) {
    .words-grid, .numbers-grid {
        gap: 18px;
        max-width: 100vw;
    }
    .word-box, .number-box {
        font-size: 2rem;
        max-width: 160px;
    }
}
@media (max-width: 768px) {
    .words-grid, .numbers-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .word-box, .number-box {
        font-size: 1.2rem;
        max-width: 120px;
    }
}
@media (max-width: 480px) {
    .word-box, .number-box {
        font-size: 1rem;
        max-width: 80px;
    }
} 