@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Serif 4', serif;
    background: linear-gradient(180deg, #faf9f6 0%, #f5f4f1 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    color: #2a2a2a;
}

.game-container {
    background: #fffffe;
    border: 1px solid #e8e6e1;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    max-width: 700px;
    width: 100%;
    position: relative;
}

.game-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8e6e1;
}

.game-title {
    font-family: 'Fraunces', serif;
    font-size: 2.2em;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    font-optical-sizing: auto;
}

.game-instructions {
    font-size: 0.9em;
    color: #666666;
    font-weight: 400;
    text-align: left;
    margin: 0 auto 16px;
    max-width: 520px;
    line-height: 1.4;
    padding-left: 0;
    font-family: 'Source Serif 4', serif;
}

.game-instructions li {
    margin-bottom: 3px;
    letter-spacing: 0.01em;
    padding-left: 4px;
}

.game-instructions li:last-child {
    margin-top: 8px;
    margin-bottom: 0;
    font-weight: 500;
}

.vowels-display {
    background: #f5f4f1;
    color: #2a2a2a;
    padding: 8px 16px;
    border: 1px solid #e8e6e1;
    border-radius: 6px;
    font-family: 'Crimson Text', serif;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 6px;
    text-align: center;
    transition: all 0.3s ease;
    margin-top: 6px;
}

.vowels-display:hover {
    background: #f0efec;
    border-color: #d4d2cd;
}

.score-display {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: #fffffe;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 14px;
    font-family: 'Crimson Text', serif;
    transition: all 0.4s ease;
    box-shadow: 0 4px 16px rgba(42, 42, 42, 0.2);
    position: relative;
    overflow: hidden;
}

.score-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.score-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-number {
    font-size: 1.8em;
    font-weight: 600;
    letter-spacing: 1px;
}

.score-label {
    font-size: 1em;
    opacity: 0.9;
    font-weight: 400;
}

.progress-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-gauge {
    position: relative;
    width: 120px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #8bc34a 50%, #d4af37 100%);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    font-size: 1.1em;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

.progress-percentage::after {
    content: " of optimal max score";
    font-size: 0.7em;
    font-weight: 400;
    opacity: 0.8;
    display: block;
    line-height: 1.2;
}

.progress-percentage.excellent {
    color: #d4af37;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.progress-percentage.good {
    color: #8bc34a;
}

.progress-percentage.poor {
    color: #ff9800;
}

/* Mobile sticky positioning */
@media (max-width: 640px) {
    .score-display {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 16px 16px 0 0;
        z-index: 1000;
        box-shadow: 0 -4px 20px rgba(42, 42, 42, 0.3);
        padding: 12px 16px;
    }
    
    .score-content {
        gap: 8px;
    }
    
    .score-main {
        gap: 8px;
    }
    
    .score-number {
        font-size: 1.5em;
    }
    
    .score-label {
        font-size: 0.9em;
    }
    
    .progress-gauge {
        width: 100px;
        height: 16px;
    }
    
    .progress-percentage {
        font-size: 1em;
        min-width: 35px;
    }
    
    .progress-percentage::after {
        content: " of optimal";
        font-size: 0.65em;
        font-weight: 400;
        opacity: 0.8;
        display: block;
        line-height: 1.2;
    }
    
    /* Add bottom padding to game container so content doesn't hide behind fixed score */
    .game-container {
        padding-bottom: 140px;
    }
    
    /* Hide score display on results page */
    .results-page .score-display {
        display: none;
    }
}

/* Top score bar for mobile when visible */
@media (max-width: 640px) {
    body.score-visible .score-display {
        /* Override the bottom positioning */
        position: fixed;
        top: 10px;
        bottom: auto;
        left: 10px;
        right: 10px;
        width: auto;
        border-radius: 12px;
        /* Keep compact size */
        padding: 8px 12px;
        /* Ensure it's small and doesn't cover everything */
        max-height: 60px;
        overflow: hidden;
    }
    
    /* Add small top margin to game content when score is visible */
    body.score-visible .game-container {
        margin-top: 80px;
    }
}

.word-row {
    margin-bottom: 12px;
    padding: 14px;
    background: #fffffe;
    border: 1px solid #e8e6e1;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.word-row:hover {
    border-color: #d4d2cd;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.word-row.bonus-active {
    border-color: #d4af37;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4), 0 2px 12px rgba(0, 0, 0, 0.06);
}

.word-row.double-bonus {
    border-color: #d4af37;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.6), 0 2px 12px rgba(0, 0, 0, 0.06);
}

.row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.row-title {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    color: #2a2a2a;
    font-size: 1em;
    letter-spacing: 0.01em;
    font-optical-sizing: auto;
}

.letter-count {
    background: #f5f4f1;
    color: #666666;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 400;
    border: 1px solid #e8e6e1;
    font-family: 'Crimson Text', serif;
}

.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.available-letters {
    background: #f5f4f1;
    padding: 10px 14px;
    text-align: center;
    border: 1px solid #e8e6e1;
    border-radius: 6px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 110px;
    cursor: pointer;
    user-select: none;
}

.available-letters:hover {
    background: #f0efec;
    border-color: #d4d2cd;
    transform: translateY(-1px);
}

.available-letters:active {
    transform: translateY(0);
}

.letters-display {
    font-family: 'Crimson Text', serif;
    font-size: 1.3em;
    font-weight: 600;
    color: #2a2a2a;
    letter-spacing: 4px;
    text-transform: uppercase;
    transition: all 0.4s ease;
}

.letters-display .placeholder {
    color: #999999;
    font-weight: 400;
}

.letters-shuffling {
    animation: shuffleLetters 0.4s ease-in-out;
}

@keyframes shuffleLetters {
    0% { 
        transform: scale(1) rotateX(0deg);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05) rotateX(90deg);
        opacity: 0.7;
    }
    100% { 
        transform: scale(1) rotateX(0deg);
        opacity: 1;
    }
}

.available-letters.bonus-active {
    background: #d4af37;
    border-color: #d4af37;
    animation: subtleGlow 0.4s ease;
}

.available-letters.bonus-active .letters-display {
    color: #fffffe;
}

.available-letters.double-bonus {
    background: #d4af37;
    animation: doubleGlow 0.6s ease;
}

@keyframes subtleGlow {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

@keyframes doubleGlow {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.word-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e8e6e1;
    border-radius: 6px;
    background: #fffffe;
    font-family: 'Crimson Text', serif;
    font-size: 1.2em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    color: #2a2a2a;
    transition: all 0.3s ease;
    outline: none;
}

.word-input:focus {
    border-color: #2a2a2a;
    box-shadow: 0 0 0 2px rgba(42, 42, 42, 0.1);
}

.word-input.valid {
    border-color: #666666;
    background: #fafafa;
}

.word-input.invalid {
    border-color: #999999;
    background: #fafafa;
}

.validation-message {
    margin-top: 6px;
    font-size: 0.85em;
    min-height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 400;
    letter-spacing: 0.01em;
    font-family: 'Source Serif 4', serif;
    font-style: italic;
}

.valid-message {
    color: #2a2a2a;
}

.invalid-message {
    color: #666666;
}

.checkmark {
    color: #2a2a2a;
    font-size: 1.1em;
    font-weight: 600;
    font-style: normal;
}

.submit-btn {
    background: #2a2a2a;
    color: #fffffe;
    border: 1px solid #2a2a2a;
    padding: 12px 20px;
    border-radius: 6px;
    font-family: 'Fraunces', serif;
    font-size: 0.95em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 16px;
    letter-spacing: 0.5px;
    opacity: 0.4;
    pointer-events: none;
    font-optical-sizing: auto;
}

.submit-btn.enabled {
    opacity: 1;
    pointer-events: auto;
}

.submit-btn.enabled:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.results-page {
    display: none;
    text-align: center;
    padding: 32px 20px;
}

.results-title {
    font-family: 'Fraunces', serif;
    font-size: 2em;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    font-optical-sizing: auto;
}

.results-score {
    font-family: 'Crimson Text', serif;
    font-size: 3.2em;
    font-weight: 600;
    color: #2a2a2a;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.results-message {
    font-size: 1.1em;
    color: #666666;
    margin-bottom: 28px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.01em;
    font-family: 'Source Serif 4', serif;
    font-style: italic;
}

.results-breakdown {
    background: #fffffe;
    border: 1px solid #e8e6e1;
    border-radius: 8px;
    padding: 24px;
    margin: 28px 0;
    text-align: left;
}

/* Enhanced Results Styling */
.grade-explanation {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f1f3 100%);
    border: 2px solid #e8e6e1;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.grade-header {
    margin-bottom: 15px;
}

.grade-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.grade-letter {
    font-family: 'Fraunces', serif;
    font-size: 3em;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.grade-percentile {
    font-family: 'Source Serif 4', serif;
    font-size: 1.2em;
    color: #666;
    font-weight: 500;
}

.grade-description {
    font-family: 'Source Serif 4', serif;
    font-size: 1.1em;
    color: #2a2a2a;
    font-weight: 500;
    line-height: 1.4;
}

.grade-note {
    background: rgba(42, 42, 42, 0.05);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-top: 15px;
}

.detailed-score-breakdown {
    background: #fffffe;
    border: 1px solid #e8e6e1;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.score-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.score-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.score-metric:last-child {
    border-bottom: none;
}

.metric-label {
    font-family: 'Source Serif 4', serif;
    font-weight: 500;
    color: #2a2a2a;
}

.metric-value {
    font-family: 'Crimson Text', serif;
    font-size: 1.2em;
    font-weight: 600;
    color: #2a2a2a;
}

.word-result-section {
    background: #fffffe;
    border: 1px solid #e8e6e1;
    border-radius: 8px;
    padding: 16px;
    margin: 15px 0;
}

.word-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e8e6e1;
    margin-bottom: 12px;
}

.word-consonants {
    font-family: 'Crimson Text', serif;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.longest-words-section {
    margin-top: 12px;
}

.longest-words-title {
    font-family: 'Source Serif 4', serif;
    font-size: 0.9em;
    font-weight: 600;
    color: #2a2a2a;
    margin-bottom: 8px;
}

.longest-words-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-behavior: smooth;
}

.longest-words-scroll::-webkit-scrollbar {
    height: 6px;
}

.longest-words-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.longest-words-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.longest-words-scroll::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.longest-word-item {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Crimson Text', serif;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
    transition: transform 0.2s ease;
}

.longest-word-item:hover {
    transform: translateY(-1px);
}

.no-words-found {
    color: #999;
    font-style: italic;
    padding: 6px 12px;
    font-size: 0.9em;
}

/* Performance GIF Styles */
.performance-gif-container {
    text-align: center;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e8e6e1;
}

.performance-gif {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.performance-gif img {
    max-width: 250px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.performance-gif img:hover {
    transform: scale(1.02);
}

.gif-fallback {
    text-align: center;
    padding: 20px;
    background: #f5f4f1;
    border-radius: 8px;
    border: 2px dashed #d4d2cd;
}

.gif-fallback-emoji {
    font-size: 3em;
    margin-bottom: 8px;
}

.gif-fallback-text {
    font-family: 'Source Serif 4', serif;
    font-size: 1.1em;
    color: #666666;
    font-weight: 500;
}

.gif-message {
    font-family: 'Source Serif 4', serif;
    font-size: 1.1em;
    color: #2a2a2a;
    font-weight: 500;
    font-style: italic;
    margin-top: 8px;
}

.word-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e8e6e1;
    font-family: 'Source Serif 4', serif;
}

.word-result:last-child {
    border-bottom: none;
    border-top: 1px solid #2a2a2a;
    padding-top: 12px;
    margin-top: 12px;
    font-weight: 500;
}

.word-text {
    font-weight: 500;
    color: #2a2a2a;
    letter-spacing: 0.01em;
    font-size: 1em;
}

.word-score {
    color: #666666;
    font-weight: 400;
    font-family: 'Crimson Text', serif;
    font-size: 1em;
}

.new-game-btn {
    background: #2a2a2a;
    color: #fffffe;
    border: 1px solid #2a2a2a;
    padding: 14px 24px;
    border-radius: 6px;
    font-family: 'Fraunces', serif;
    font-size: 1em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    font-optical-sizing: auto;
}

.new-game-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.inheritance-selection {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e8e6e1;
    border-radius: 6px;
    text-align: center;
}

.inheritance-prompt {
    font-family: 'Source Serif 4', serif;
    font-size: 0.9em;
    color: #666666;
    margin-bottom: 8px;
    font-weight: 500;
}

.consonant-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.consonant-choice-btn {
    background: #2a2a2a;
    color: #fffffe;
    border: 1px solid #2a2a2a;
    padding: 8px 16px;
    border-radius: 4px;
    font-family: 'Crimson Text', serif;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    letter-spacing: 1px;
}

.consonant-choice-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.consonant-choice-btn:active {
    transform: translateY(0);
}

.consonant-choice-btn.disabled {
    background: #e8e6e1;
    color: #999999;
    border-color: #e8e6e1;
    cursor: not-allowed;
    opacity: 0.6;
    text-decoration: line-through;
    transform: none;
    box-shadow: none;
}

.consonant-choice-btn.disabled:hover {
    background: #e8e6e1;
    color: #999999;
    transform: none;
    box-shadow: none;
}

.low-score-gif {
    text-align: center;
    margin: 20px 0;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #e8e6e1;
}

.low-score-gif img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.low-score-message {
    margin-top: 12px;
    font-family: 'Source Serif 4', serif;
    font-size: 0.95em;
    color: #666666;
    font-style: italic;
}

@media (max-width: 640px) {
    .game-container {
        padding: 16px;
        margin: 6px;
    }
    
    .game-title {
        font-size: 1.7em;
        margin-bottom: 10px;
    }
    
    /* Cleaner, more compact instructions on mobile */
    .game-instructions {
        font-size: 0.85em;
        line-height: 1.4;
        margin: 0 auto 14px;
        background: #faf9f8;
        padding: 12px 16px 12px 32px;
        border-radius: 6px;
        border: 1px solid #e8e6e1;
        color: #2a2a2a;
    }
    
    .game-instructions li {
        margin-bottom: 4px;
        padding-left: 6px;
        list-style-position: outside;
        font-weight: 500;
        color: #2a2a2a;
    }
    
    .game-instructions li:last-child {
        margin-top: 8px;
        margin-bottom: 0;
        font-weight: 600;
        color: #2a2a2a;
    }
    
    .vowels-display {
        font-size: 0.95em;
        letter-spacing: 3px;
        padding: 6px 12px;
        margin-top: 6px;
    }
    
    .score-display {
        padding: 8px 12px;
        margin-bottom: 12px;
        font-size: 1em;
    }
    
    .letters-display {
        font-size: 1.1em;
        letter-spacing: 3px;
    }
    
    .word-input {
        font-size: 1.05em;
        letter-spacing: 1px;
        padding: 10px 14px;
    }
    
    .results-score {
        font-size: 2.4em;
    }
    
    /* More compact word rows */
    .word-row {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    /* Keep input row horizontal on mobile */
    .input-row {
        display: flex;
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    /* Smaller, more compact consonant box */
    .available-letters {
        padding: 8px 10px;
        min-width: 90px;
        flex-shrink: 0;
    }
    
    /* More compact row header */
    .row-header {
        margin-bottom: 6px;
    }
    
    .row-title {
        font-size: 0.95em;
    }
    
    .letter-count {
        font-size: 0.8em;
        padding: 3px 8px;
    }
    
    /* Compact validation message */
    .validation-message {
        margin-top: 4px;
        font-size: 0.82em;
        min-height: 14px;
    }
    
    /* Much more compact consonant selection */
    .inheritance-selection {
        margin-top: 10px;
        padding: 12px;
        background: linear-gradient(135deg, #f8f9fa 0%, #f0f1f3 100%);
        border: 2px solid #d4d2cd;
        border-radius: 8px;
        text-align: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    
    .inheritance-prompt {
        font-family: 'Fraunces', serif;
        font-size: 0.9em;
        color: #2a2a2a;
        margin-bottom: 8px;
        font-weight: 500;
        line-height: 1.2;
    }
    
    .consonant-buttons {
        display: flex;
        gap: 8px;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 2px;
    }
    
    /* Slightly smaller but still bold consonant buttons */
    .consonant-choice-btn {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
        color: #fffffe;
        border: 2px solid #2a2a2a;
        padding: 10px 16px;
        border-radius: 8px;
        font-family: 'Fraunces', serif;
        font-size: 1.2em;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        min-width: 44px;
        min-height: 44px;
        letter-spacing: 1px;
        box-shadow: 0 3px 10px rgba(42, 42, 42, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateZ(0);
    }
    
    .consonant-choice-btn:hover {
        background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
        transform: translateY(-2px) scale(1.03);
        box-shadow: 0 6px 16px rgba(42, 42, 42, 0.3);
        border-color: #1a1a1a;
    }
    
    .consonant-choice-btn:active {
        transform: translateY(-1px) scale(1.01);
        box-shadow: 0 3px 10px rgba(42, 42, 42, 0.35);
    }
    
    .consonant-choice-btn.disabled {
        background: linear-gradient(135deg, #e8e6e1 0%, #d4d2cd 100%);
        color: #999999;
        border-color: #d4d2cd;
        cursor: not-allowed;
        opacity: 0.7;
        text-decoration: line-through;
        transform: none;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
    
    .consonant-choice-btn.disabled:hover {
        background: linear-gradient(135deg, #e8e6e1 0%, #d4d2cd 100%);
        color: #999999;
        transform: none;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
    
    /* Compact submit button */
    .submit-btn {
        margin-top: 12px;
        margin-bottom: 20px;
        padding: 10px 18px;
        font-size: 0.9em;
    }
    
    /* Mobile GIF adjustments - more compact */
    .performance-gif img {
        max-width: 180px;
        max-height: 135px;
    }
    
    .performance-gif-container {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .gif-message {
        font-size: 0.95em;
    }
    
    /* Compact results */
    .results-page {
        padding: 24px 16px;
    }
    
    .results-title {
        font-size: 1.7em;
        margin-bottom: 12px;
    }
    
    .results-message {
        font-size: 1em;
        margin-bottom: 20px;
    }
    
    .results-breakdown {
        padding: 16px;
        margin: 20px 0;
    }
    
    /* Mobile adjustments for new elements */
    .grade-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .grade-letter {
        font-size: 2.5em;
    }
    
    .grade-percentile {
        font-size: 1.1em;
    }
    
    .word-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .longest-words-scroll {
        gap: 6px;
    }
    
    .longest-word-item {
        font-size: 0.85em;
        padding: 5px 10px;
    }
    
    .score-metrics {
        gap: 8px;
    }
    
    .score-metric {
        padding: 8px 0;
    }
}