﻿/* --- VIBRANT COSMIC THEME OVERLAYS --- */
#blueboard {
    background: #1e272e !important;
    border: 10px solid #8b5a2b; /* Wood Blackboard Frame */
    border-radius: 16px;
    min-height: 230px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 8px 16px rgba(0,0,0,0.3);
    padding: 1rem;
}

#spnum {
    color: #51e2f5;
    font-size: 3.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(81,226,245,0.5);
    display: inline-block;
}

/* --- MAIN RESPONSIVE CONTAINER --- */
#spnumword {
    display: flex;
    flex-direction: column; /* Stacks words vertically (Row 1: SEVENTY, Row 2: FIVE) */
    align-items: center;
    gap: 15px; /* ↕️ Vertical space between Row 1 and Row 2 */
    width: 100%;
    padding: 0 10px;
}

.word-group {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 8px; /* Horizontal space between blocks */
    max-width: 100%;
}

/* --- THE LETTER BOX --- */
.letter-box {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255,255,255,0.3);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-transform: uppercase;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

    .letter-box.reveal {
        opacity: 1;
        transform: scale(1);
        background: rgba(255, 255, 255, 0.2);
        border-style: solid;
        border-color: #2ed573;
        color: #2ed573;
        text-shadow: 0 0 8px rgba(46,213,115,0.6);
        animation: pop 0.3s ease-out forwards;
    }

    .letter-box.active-speaking {
        background: #ff4757 !important;
        color: white !important;
        border-color: white !important;
        transform: scale(1.1);
    }

@media only screen and (max-width: 394px) {
    #spnum {
        font-size: 2.1rem !important;
    }

    .word-group {
        gap: 5px;
    }

    .letter-box {
        width: 44px;
        height: 44px;
        font-size: 1.9rem !important;
    }
}

@media only screen and (min-width: 395px) and (max-width: 744px) and (max-height: 935px) {
    #spnum {
        font-size: 2.8rem !important;
    }

    .word-group {
        gap: 5px;
    }

    .letter-box {
        width: 42px;
        height: 42px;
        font-size: 1.9rem !important;
    }
}

@media (min-width: 745px) and (max-width: 1024px) {
    #spnum {
        font-size: 2.8rem !important;
    }

    .word-group {
        gap: 5px;
    }

    .letter-box {
        width: 42px;
        height: 42px;
        font-size: 1.9rem !important;
    }
}

@media (min-width: 1024px) and (max-width: 1365px) {
    #spnum {
        font-size: 2.8rem !important;
    }

    .word-group {
        gap: 5px;
    }

    .letter-box {
        width: 42px;
        height: 42px;
        font-size: 1.9rem !important;
    }
}

@media (min-width: 1366px) and (max-width: 1440px) {
    #spnum {
        font-size: 2.8rem !important;
    }

    .word-group {
        gap: 5px;
    }

    .letter-box {
        width: 42px;
        height: 42px;
        font-size: 1.9rem !important;
    }
}

@media (min-width: 1440px) {
    #spnum {
        font-size: 2.8rem !important;
    }

    .word-group {
        gap: 5px;
    }

    .letter-box {
        width: 42px;
        height: 42px;
        font-size: 1.9rem !important;
    }

    
}


@keyframes pop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

    70% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}
