@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Poppins:wght@400;600;800&display=swap');

.online-dot {
    color: #4ade80;
    animation: pulse 2s infinite;
    display: inline-block;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

:root {
    --primary-bg: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    /* "203a43" theme */
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(255, 255, 255, 0.25);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --accent-color: #f0c419;
    /* Gold */
    --header-bg: rgba(0, 0, 0, 0.4);
    --modal-bg: rgba(0, 0, 0, 0.9);
    --font-main: 'Poppins', sans-serif;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

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

body {
    background: var(--primary-bg);
    color: var(--text-color);
    font-family: var(--font-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Allow growth */
    height: auto;
    overflow-y: auto;
    /* Enable scrolling */
    padding: 1vh 1vw;
}

/* Add a subtle pattern overlay */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

header {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(5px, 1vh, 10px) clamp(10px, 2vw, 30px);
    margin-bottom: 1vh;
    background: var(--header-bg);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    height: auto;
    min-height: 8vh;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

h1 {
    color: var(--accent-color);
    text-shadow: 0 2px 10px rgba(240, 196, 25, 0.3);
    font-size: clamp(1.5rem, 4vh, 3rem);
    font-weight: 800;
    letter-spacing: 1px;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    white-space: nowrap;
    z-index: 10;
}

.timer {
    font-size: clamp(1.2rem, 3vh, 2.5rem);
    color: #ff4757;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 20px;
    border-radius: 50px;
    border: 2px solid #ff4757;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.2);
    min-width: clamp(80px, 15vw, 120px);
    text-align: center;
    /* Position timer absolutely */
    position: absolute;
    right: 20px;
}

.game-container {
    flex: 0 0 auto;
    /* Don't force grow */
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: auto repeat(5, 1fr);
    gap: clamp(5px, 1vh, 15px);
    width: 100%;
    /* Remove fixed height: 100% or flex growth */
    height: auto;
    margin-bottom: 2rem;
}

.school-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.category-header {
    background: linear-gradient(to bottom, rgba(6, 12, 233, 0.7), rgba(0, 0, 150, 0.7));
    color: var(--text-color);
    padding: clamp(2px, 0.5vh, 5px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    font-size: clamp(0.7rem, 1.8vh, 1.2rem);
    border-radius: 8px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(5px);
    box-shadow: var(--shadow);
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    word-break: break-word;
    line-height: 1.2;
}

.card {
    background: var(--card-bg);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Responsive Font Size:
       - Minimum: 1rem (for very small screens)
       - Preferred: 5% of the card's viewport width equivalent (or vh if landscape)
       - Maximum: 5rem
       Using clamp ensures it scales but has limits.
       Using a mix of vw and vh helps.
    */
    font-size: clamp(1.5rem, 4vw, 5vh);
    font-weight: 800;
    cursor: pointer;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    background: var(--card-hover);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.card:hover::after {
    opacity: 1;
}

.card.disabled {
    background: rgba(0, 0, 0, 0.3);
    color: transparent;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(15px);
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.9), rgba(20, 20, 30, 0.95));
    padding: clamp(20px, 4vh, 40px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    text-align: center;
    width: clamp(300px, 90%, 900px);
    max-height: 90vh;
    /* Prevent overflow on small screens */
    overflow-y: auto;
    /* Allow scrolling if content is too tall */
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: clamp(40px, 6vh, 60px);
    height: clamp(40px, 6vh, 60px);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: clamp(1.5rem, 3vh, 2.5rem);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    line-height: 1;
    padding: 0;
    /* Reset default button padding */
}

.close-btn:hover,
.close-btn:focus {
    background: rgba(255, 71, 87, 0.8);
    border-color: rgba(255, 71, 87, 1);
    transform: rotate(90deg) scale(1.1);
    outline: none;
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.5);
}

.question-text {
    font-size: clamp(1.5rem, 5vh, 4rem);
    margin-bottom: clamp(10px, 3vh, 30px);
    color: var(--text-color);
    min-height: 15vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.answer-text {
    font-size: clamp(1.2rem, 4vh, 3rem);
    color: var(--accent-color);
    margin-top: clamp(10px, 2vh, 20px);
    display: none;
    padding: clamp(10px, 2vh, 20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.5s ease;
    font-weight: 700;
    line-height: 1.3;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.modal-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

.action-btn {
    background: var(--accent-color);
    color: #1a1a2e;
    border: none;
    padding: clamp(10px, 1.5vh, 15px) clamp(20px, 3vh, 30px);
    font-size: clamp(1rem, 2vh, 1.5rem);
    font-weight: 700;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(240, 196, 25, 0.4);
}

.action-btn.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.action-btn.success:hover {
    box-shadow: 0 7px 20px rgba(46, 204, 113, 0.5);
}

.action-btn.danger {
    background: linear-gradient(135deg, #ff4757, #e74c3c);
    color: white;
}

.action-btn.danger:hover {
    box-shadow: 0 7px 20px rgba(255, 71, 87, 0.5);
}

/* Modal Word Section (Question/Answer with Audio) */
.modal-word-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
}

.audio-btn {
    background: rgba(240, 196, 25, 0.2);
    border: 2px solid rgba(240, 196, 25, 0.5);
    border-radius: 50%;
    width: clamp(45px, 6vh, 60px);
    height: clamp(45px, 6vh, 60px);
    font-size: clamp(1.5rem, 3vh, 2.5rem);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.audio-btn:hover {
    background: rgba(240, 196, 25, 0.4);
    border-color: var(--accent-color);
    transform: scale(1.1);
}

.audio-btn.small {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

/* Example Sentences Section */
.modal-example-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.example-sentence {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.example-label {
    font-size: clamp(1rem, 2vh, 1.3rem);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    min-width: 90px;
    text-align: right;
}

/* Score Board */
.score-board {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-around;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    padding: 1vh;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    height: auto;
    min-height: 14vh;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: nowrap;
    /* Keep teams on one line if possible */
    overflow-x: auto;
    /* Scroll if too squeezed */
}

.team-score {
    text-align: center;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    padding: 5px 10px;
    border-radius: 15px;
    min-width: unset;
    /* Remove fixed min-width */
    flex: 1;
    /* Allow flexible growth */
    margin: 0 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s;
}

.team-score:hover {
    background: rgba(255, 255, 255, 0.08);
}

.team-name {
    color: var(--accent-color);
    font-size: clamp(0.6rem, 2vh, 1.2rem);
    /* Scalable font */
    margin-bottom: 5px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.score-value {
    font-size: clamp(1.5rem, 4vh, 3rem);
    color: #fff;
    margin-bottom: 5px;
    font-weight: 800;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.score-controls {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.score-controls button {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    width: clamp(25px, 3.5vh, 40px);
    height: clamp(25px, 3.5vh, 40px);
    font-size: clamp(1rem, 2vh, 1.5rem);
    cursor: pointer;
    margin: 0 2px;
    border-radius: 50%;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.score-controls button:hover {
    background: #fff;
    transform: scale(1.1);
}

.score-controls button.add:hover {
    color: #2ecc71;
}

.score-controls button.subtract:hover {
    color: #ff4757;
}

@media (max-width: 1024px) {
    .game-container {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto repeat(10, 1fr);
    }

    .category-header {
        font-size: 1.5vh;
    }

    .card {
        font-size: 3vh;
    }
}

.pronunciation-text {
    font-size: clamp(1rem, 2.5vh, 2rem);
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin-top: 1vh;
    display: none;
    font-weight: 400;
    animation: fadeIn 0.5s ease;
}

.header-controls {
    position: static;
    display: flex;
    align-items: center;
    gap: clamp(5px, 1vw, 15px);
    flex: 1;
    justify-content: flex-end;
}

.timer {
    position: static;
    /* Reset absolute positioning */
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.2);
    font-variant-numeric: tabular-nums;
    min-width: clamp(80px, 12vw, 140px);
    /* Increased slightly to accommodate width changes */
    display: inline-flex;
    justify-content: center;
    /* Ensure width is respected */
}

/* Common Header Left Container */
.header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid var(--accent-color);
    padding: clamp(3px, 0.5vh, 5px) clamp(8px, 1.5vw, 15px);
    font-size: clamp(0.8rem, 2vh, 1.2rem);
    font-weight: 800;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: clamp(40px, 5vw, 60px);
}

.lang-btn:hover {
    background: var(--accent-color);
    color: #000;
}

/* Confetti */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
}

.header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.header-controls {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: static;
    /* Reset absolute */
}

#game-title {
    flex: 2;
    text-align: center;
    margin: 0;
    display: none;
    /* Already removed from DOM, but just in case */
}

/* Landing Page Styles */
.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('school_bg.png') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
    padding: env(safe-area-inset-top, 20px) 20px env(safe-area-inset-bottom, 20px) 20px;
    box-sizing: border-box;
}

.landing-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(15, 32, 39, 0.2) 0%, rgba(15, 32, 39, 0.5) 100%);
    backdrop-filter: blur(2px);
    /* Reduced blur to see image better */
    transition: opacity 1s ease;
    pointer-events: none;
    /* Fix: prevent blocking clicks */
}

.landing-content {
    position: relative;
    text-align: center;
    color: white;
    z-index: 1001;
    padding: clamp(20px, 5vh, 60px) clamp(20px, 4vw, 40px);
    /* Darker glass effect to match app theme */
    background: rgba(15, 32, 39, 0.65);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    max-width: 650px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(20px);
    /* Stronger glass effect */
    -webkit-backdrop-filter: blur(20px);
    animation: contentEntrance 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: auto;
}

@keyframes contentEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.school-name {
    font-size: clamp(1rem, 2.5vh, 1.8rem);
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Outfit', sans-serif;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game-title {
    font-size: clamp(2rem, 6vh, 4rem);
    font-weight: 800;
    margin-bottom: clamp(30px, 6vh, 60px);
    background: linear-gradient(135deg, #ffffff 0%, #e0eaff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
    font-family: 'Outfit', sans-serif;
    letter-spacing: -2px;
    line-height: 1.1;
    position: relative;
    display: block;
    /* Ensure it is visible on landing page */
}

/* Add a subtle underline decoration */
.game-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    box-shadow: 0 0 15px var(--accent-color);
}

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
    perspective: 1000px;
}

.mode-btn {
    padding: clamp(15px, 2.5vh, 22px) 0;
    width: 100%;
    font-size: clamp(1rem, 2vh, 1.5rem);
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.3s ease;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.mode-btn:hover::before {
    width: 100%;
}

.mode-btn:active {
    transform: translateY(-1px);
}

.landing-footer {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.teacher-name {
    font-size: clamp(0.8rem, 1.8vh, 1.2rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.app-info {
    font-size: clamp(0.7rem, 1.4vh, 0.9rem);
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Poppins', sans-serif;
}

.name-input-container {
    width: 100%;
    margin-bottom: 20px;
}

#player-name-input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1.2rem;
    font-family: 'Outfit', sans-serif;
    text-align: center;
    transition: all 0.3s;
}

#player-name-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.5);
}

.online-user-list {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 10px;
    max-height: 150px;
    overflow-y: auto;
    width: 100%;
    font-size: 0.9rem;
    text-align: left;
}

.online-user-item {
    color: #e0e0e0;
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.online-user-item:last-child {
    border-bottom: none;
}

.back-to-landing-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-landing-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-50%) translateY(-2px);
}

.back-to-modes-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.back-to-modes-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.contact-btn {
    margin-top: 10px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1.4vh;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.telegram-id {
    margin-top: 5px;
    font-size: 1.4vh;
    color: var(--accent-color);
    font-weight: bold;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    height: 0;
}

.telegram-id.visible {
    opacity: 1;
    transform: translateY(0);
    height: auto;
}

.global-timer {
    font-family: 'Poppins', sans-serif;
    font-variant-numeric: tabular-nums;
    /* Fix jitter */
    font-size: 2.2vh;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    width: auto;
    /* Fixed width to prevent any movement */
    justify-content: center;
}

.icon-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: clamp(1.5rem, 2.5vh, 2.5rem);
    cursor: pointer;
    margin-left: 15px;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.modal-timer {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.4);
}

.modern-listen-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    margin-right: 15px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    box-shadow: 0 0 15px rgba(240, 196, 25, 0.2);
}

.modern-listen-btn:hover {
    background: var(--accent-color);
    color: #000;
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 0 25px rgba(240, 196, 25, 0.6);
}

/* Ensure text containers align items correctly */
.question-text,
.answer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-teams {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
    animation: fadeIn 0.5s ease;
}

/* ===== NEW FLASHCARD DESIGN ===== */
.modal-content.new-flashcard {
    background: linear-gradient(145deg, #1a1d2e, #0f1119);
    padding: 40px 50px;
    max-width: 900px;
    border-radius: 20px;
}

/* Header */
.flashcard-header {
    text-align: center;
    margin-bottom: 30px;
}

.flashcard-category {
    font-size: clamp(1.2rem, 2.5vh, 1.8rem);
    color: #9ba3af;
    font-weight: 600;
    text-transform: capitalize;
    margin-bottom: 5px;
}

.flashcard-number {
    font-size: clamp(1.5rem, 3vh, 2.5rem);
    color: #f39c12;
    font-weight: 800;
}

/* Word Section */
.flashcard-word-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0 10px 0;
}

.flashcard-audio-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.flashcard-audio-btn:hover {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.15);
    transform: scale(1.1);
}

.flashcard-audio-btn.small {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.flashcard-word {
    font-size: clamp(2.5rem, 6vh, 4.5rem);
    font-weight: 700;
    color: white;
}

.flashcard-pronunciation {
    font-size: clamp(1rem, 2vh, 1.5rem);
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    text-align: center;
    margin-bottom: 20px;
}

/* Separator */
.flashcard-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 20px 0;
}

/* Example Section */
.flashcard-example-section {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    margin: 15px 0;
}

.flashcard-example-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.flashcard-example {
    font-size: clamp(1rem, 2.2vh, 1.6rem);
    color: white;
    font-weight: 400;
}

.flashcard-example-tr {
    font-size: clamp(0.9rem, 1.8vh, 1.3rem);
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}


/* Show Answer Button */
.flashcard-show-answer {
    display: block;
    margin: 30px auto;
    background: #f39c12;
    color: #1a1d2e;
    border: none;
    padding: 15px 50px;
    font-size: clamp(1rem, 2vh, 1.4rem);
    font-weight: 800;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flashcard-show-answer:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

/* Answer Section */
.flashcard-answer-section {
    animation: slideUp 0.4s ease;
}

.flashcard-answer {
    font-size: clamp(1.8rem, 4vh, 3rem);
    color: #f39c12;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
}

.flashcard-answer-pronunciation {
    font-size: clamp(0.9rem, 1.8vh, 1.3rem);
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    text-align: center;
    margin-bottom: 15px;
}

/* Example Translation Section */
.flashcard-example-tr-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.flashcard-label {
    font-size: clamp(0.9rem, 1.8vh, 1.2rem);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    min-width: 80px;
}

.flashcard-example-tr {
    font-size: clamp(0.9rem, 1.8vh, 1.2rem);
    color: rgba(255, 255, 255, 0.8);
}

/* Team Buttons */
.flashcard-teams {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.team-select-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 25px;
    border-radius: 8px;
    font-size: clamp(0.9rem, 1.8vh, 1.2rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.team-select-btn:hover {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.15);
    transform: translateY(-2px);
}

.flying-points {
    position: fixed;
    font-size: 3vh;
    font-weight: 800;
    color: #f0c419;
    pointer-events: none;
    z-index: 10000;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.level-container {
    display: flex;
    gap: 10px;
    margin-left: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    /* Horizontal scroll */
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.level-container::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.level-btn {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.8vh;
    transition: all 0.3s;
}

.level-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.level-btn.active {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 10px rgba(240, 196, 25, 0.3);
}

/* Example Sentence Styles */
.example-container {
    margin-top: 3vh;
    padding-top: 2vh;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
}

.example-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0;
}

.example-text {
    font-size: 3.5vh;
    /* Increased to be closer to word size (which is 5-6vh) */
    font-style: normal;
    /* Removed italic for better readability at large size */
    color: #fff;
    /* Brighter white */
    font-weight: 600;
    line-height: 1.3;
}

.example-translation {
    font-size: 3vh;
    /* Large translation */
    color: var(--accent-color);
    /* Use accent color for translation to distinguish */
    font-weight: 500;
    margin-top: 5px;
}

.small-listen-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 3vh;
    /* Larger icon */
    padding: 5px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.small-listen-btn:hover {
    transform: scale(1.2);
}

/* Adjust modal content to fit larger text */
.modal-content {
    width: 95%;
    /* Use more width */
    max-width: 1200px;
    /* Larger max width */
    padding: 5vh 3vw;
}

.question-text {
    font-size: 7vh;
    /* Slightly larger main word */
    margin-bottom: 2vh;
    min-height: auto;
    /* Allow it to shrink if needed */
    flex: 0 0 auto;
}

.word-count {
    font-size: 2vh;
    color: rgba(255, 255, 255, 0.7);
    margin-right: 15px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 1025px) and (min-height: 800px) {
    body {
        height: 100vh;
        overflow: hidden;
        /* Prevent scrolling on TV */
        justify-content: center;
        /* Center content vertically */
    }

    header {
        margin-bottom: 2vh;
    }

    .game-container {
        gap: 1.5vh;
        margin-bottom: 2vh;
        max-height: 70vh;
        /* Limit height */
    }

    /* Adjust Card Size for TV Grid */
    .card {
        font-size: 5vh;
        border-width: 2px;
        /* Thicker border for visibility */
    }

    /* Make focus state very obvious for remote navigation */
    button:focus,
    .card:focus,
    .level-btn:focus {
        outline: 5px solid #fff;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
        transform: scale(1.05);
        z-index: 10;
    }

    /* Scoreboard Adjustment */
    .score-board {
        min-height: 12vh;
        margin-top: auto;
        /* Push to bottom if needed, but flex handles it */
        padding: 1.5vh;
    }
}

/* Floating User List Bubble */
.floating-user-list {
    position: fixed;
    bottom: 20px;
    left: 20px;
    /* User asked for "chat bubble", putting it left based on typical game UI or right? Let's go Left bottom to avoid blocking game controls usually on right or center. Or right. Standard chat is bottom right. Let's stick to Right as per my plan or maybe Left? User image showed empty bottom. Let's go Bottom Left to separate from "Contact" button usually on right or center. Wait, contact is in footer. Let's go LEFT. */
    width: 200px;
    background: rgba(20, 20, 20, 0.8);
    /* Darker for better contrast */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(74, 222, 128, 0.2);
    /* Greenish border */
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
    color: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.floating-header {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4ade80;
    /* Green text */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.floating-header:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 3px 5px;
    margin: -3px -5px 5px -5px;
}

.toggle-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.toggle-arrow.collapsed {
    transform: rotate(-90deg);
}

.floating-list-content {
    max-height: 25vh;
    /* Responsive height */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 2px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.floating-list-content.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

/* Scrollbar styling */
.floating-list-content::-webkit-scrollbar {
    width: 3px;
}

.floating-list-content::-webkit-scrollbar-thumb {
    background: rgba(74, 222, 128, 0.3);
    border-radius: 4px;
}

.online-user-item {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 6px;
}

.online-user-item::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #4ade80;
    border-radius: 50%;
}

@media (max-width: 600px) {
    .floating-user-list {
        bottom: 10px;
        left: 10px;
        width: 160px;
        font-size: 0.7rem;
    }
}

/* HOMEWORK CONTROL SYSTEM STYLES */
.homework-btn {
    background: rgba(255, 71, 87, 0.2);
    border: 1px solid #ff4757;
}

.homework-btn:hover {
    background: #ff4757;
    color: white;
}

.report-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ccc;
    width: auto;
    display: inline-block;
}

.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.class-selector-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.2s;
}

.class-selector-btn:hover {
    background: var(--accent-color);
    color: black;
    transform: scale(1.05);
}

.hw-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hw-input {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #444;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1rem;
    flex: 1;
}

.student-list-header {
    display: grid;
    grid-template-columns: 50px 2fr 3fr;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    font-weight: bold;
    color: var(--accent-color);
    border-radius: 8px 8px 0 0;
}

.student-list-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 8px 8px;
}

.student-row {
    display: grid;
    grid-template-columns: 50px 2fr 3fr;
    /* No Name Buttons */
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.student-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.student-row.row-done {
    background: rgba(46, 204, 113, 0.15);
}

.student-row.row-half {
    background: rgba(245, 158, 11, 0.15);
}

.status-actions {
    display: flex;
    gap: 5px;
}

.status-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    background: #333;
    color: #888;
    transition: all 0.2s;
}

.status-btn.selected {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    color: white;
}

.status-btn.btn-done.selected {
    background: #2ecc71;
}

.status-btn.btn-missing.selected {
    background: #ff4757;
}

.status-btn.btn-done.selected {
    background: #26de81;
    transform: scale(1.05);
}

.status-btn.btn-half {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.status-btn.btn-half.selected {
    background: #f59e0b;
    color: white;
    transform: scale(1.05);
}

.status-btn.btn-pending.selected {
    background: #f1c40f;
    color: black;
}

.student-row.row-done {
    border-left: 4px solid #2ecc71;
}

.student-row.row-half {
    border-left: 4px solid #f59e0b;
}

.student-row.row-missing {
    border-left: 4px solid #ff4757;
}

.student-row.row-pending {
    border-left: 4px solid #f1c40f;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    color: white;
    font-size: 0.9rem;
}

.report-table th {
    background: rgba(0, 0, 0, 0.5);
    padding: 12px;
    text-align: left;
    color: var(--accent-color);
}

.report-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.report-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.prev-hw-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

/* Navigation Button */
.nav-btn {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Edit/Delete Actions */
.hw-action-btn {
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

.edit-btn {
    background: #f1c40f;
    color: #333;
}

.del-btn {
    background: #e74c3c;
    color: white;
}

/* Flash Animation for Success */
@keyframes flash-success {
    0% {
        background-color: rgba(46, 204, 113, 0.5);
    }

    100% {
        background-color: transparent;
    }
}

.flash-item {
    animation: flash-success 2s ease-out;
}

/* Password Modal specific */
#teacher-password:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* Report Filter Buttons */
.filter-btn {
    margin-left: 5px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: var(--accent-color);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .modal-content {
        padding: 15px;
        width: 95%;
        margin: 10px auto;
    }

    .student-list-header,
    .student-row {
        grid-template-columns: 35px 1.2fr 2fr;
        /* Tighter logic */
        font-size: 0.85rem;
        gap: 5px;
    }

    .status-btn {
        padding: 6px 4px;
        font-size: 0.7rem;
    }

    .prev-hw-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .prev-hw-item span:last-child {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .hw-action-btn {
        padding: 8px 12px;
        /* Larger touch area */
        font-size: 0.9rem;
    }

    .nav-btn {
        padding: 8px 12px;
    }
}

/* ========================================
   GAME MODE SELECTION SCREEN
   ======================================== */
.game-mode-selection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    padding: 20px;
}

.game-mode-content {
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.mode-selection-title {
    font-size: clamp(1.8rem, 5vh, 3.5rem);
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 40px;
    text-shadow: 0 4px 15px rgba(240, 196, 25, 0.4);
    font-family: 'Outfit', sans-serif;
}

.game-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.game-mode-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.game-mode-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(240, 196, 25, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.game-mode-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 20px 50px rgba(240, 196, 25, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.game-mode-card:hover::before {
    opacity: 1;
}

.mode-icon {
    font-size: clamp(3rem, 8vh, 5rem);
    margin-bottom: 20px;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.game-mode-card:hover .mode-icon {
    animation: none;
    transform: scale(1.2) rotate(5deg);
}

.game-mode-card h3 {
    font-size: clamp(1.2rem, 2.5vh, 1.8rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    font-family: 'Outfit', sans-serif;
}

.game-mode-card p {
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Poppins', sans-serif;
}

.back-to-landing-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.back-to-landing-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

/* ========================================
   PLAY TYPE SELECTION (Team vs Individual)
   ======================================== */
.play-type-selection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    padding: 20px;
}

.play-type-content {
    text-align: center;
    max-width: 700px;
    width: 100%;
}

.play-type-title {
    font-size: clamp(1.8rem, 5vh, 3rem);
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 40px;
    text-shadow: 0 4px 15px rgba(240, 196, 25, 0.4);
    font-family: 'Outfit', sans-serif;
}

.play-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.play-type-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 50px 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.play-type-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(240, 196, 25, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.play-type-card.team-card:hover {
    border-color: #3498db;
    box-shadow: 0 20px 50px rgba(52, 152, 219, 0.4);
}

.play-type-card.individual-card:hover {
    border-color: #2ecc71;
    box-shadow: 0 20px 50px rgba(46, 204, 113, 0.4);
}

.play-type-icon {
    font-size: clamp(3.5rem, 10vh, 6rem);
    margin-bottom: 20px;
}

.play-type-card h3 {
    font-size: clamp(1.3rem, 3vh, 2rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    font-family: 'Outfit', sans-serif;
}

.play-type-card p {
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Poppins', sans-serif;
}

/* Individual Mode Scoreboard */
.individual-scoreboard {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.individual-score-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(46, 204, 113, 0.5);
    border-radius: 15px;
    padding: 20px 50px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.individual-score-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.individual-score-value {
    color: #2ecc71;
    font-size: clamp(2rem, 5vh, 3rem);
    font-weight: 800;
}

/* Single Add Points Button */
.add-points-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 18px 50px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.add-points-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.5);
}

@media (max-width: 600px) {
    .play-type-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   WHEEL OF FORTUNE STYLES - MODERN DESIGN
   ======================================== */
.wheel-game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 40%, #0d1a2e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1500;
    padding: 20px;
    overflow: hidden;
}

/* Animated background glow */
.wheel-game-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(240, 196, 25, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulseGlow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Navigation Container */
.top-right-nav {
    position: absolute;
    top: 25px;
    right: 25px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 100;
}

/* Reset absolute positioning when inside nav container */
.top-right-nav .wheel-back-btn,
.top-right-nav .back-to-modes-btn,
.top-right-nav .top-right-home-btn {
    position: static;
    /* Let flexbox handle layout */
    margin: 0;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
}

.wheel-back-btn {
    /* Keeping default styles for fallback/legacy if needed, but primary use is now inside container */
    /* z-index: 20; removed as container handles z-index */
    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);

    /* Shape & Typography */
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;

    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-width: auto;

    display: flex;
    align-items: center;
    gap: 8px;
}

.wheel-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(240, 196, 25, 0.25);
    transform: translateY(-2px);
    color: #fff;
    padding-right: 28px;
    /* Subtle text expansion check */
}

.wheel-back-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Two-Column Layout */
.wheel-layout {
    display: flex;
    width: 100%;
    max-width: 1300px;
    height: calc(100vh - 80px);
    gap: 40px;
    align-items: center;
    justify-content: center;
}

/* Left Info Panel */
.wheel-info-panel {
    flex: 0 0 320px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-height: 90vh;
    overflow-y: auto;
}

.wheel-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--accent-color);
    text-align: center;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 4px 15px rgba(240, 196, 25, 0.4);
    margin: 0;
}

/* Stats Cards */
.wheel-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wheel-stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 18px 20px;
    transition: all 0.3s ease;
}

.wheel-stat-card:hover {
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.wheel-stat-card .stat-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.wheel-stat-card .stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wheel-stat-card .stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wheel-stat-card .stat-value {
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.points-card .stat-value {
    color: #f0c419;
}

.words-card .stat-value {
    color: #3498db;
}

/* Team Scoreboard */
.wheel-scoreboard-wrapper {
    margin-top: auto;
}

.scoreboard-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.wheel-scoreboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.wheel-team-score {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 15px 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.wheel-team-score:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.wheel-team-score:nth-child(1) {
    border-color: rgba(231, 76, 60, 0.5);
}

.wheel-team-score:nth-child(2) {
    border-color: rgba(52, 152, 219, 0.5);
}

.wheel-team-score:nth-child(3) {
    border-color: rgba(46, 204, 113, 0.5);
}

.wheel-team-score:nth-child(4) {
    border-color: rgba(155, 89, 182, 0.5);
}

.wheel-team-score:nth-child(1):hover {
    border-color: #e74c3c;
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.wheel-team-score:nth-child(2):hover {
    border-color: #3498db;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.wheel-team-score:nth-child(3):hover {
    border-color: #2ecc71;
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
}

.wheel-team-score:nth-child(4):hover {
    border-color: #9b59b6;
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.4);
}

.wheel-team-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.wheel-team-score:nth-child(1) .wheel-team-name {
    color: #e74c3c;
}

.wheel-team-score:nth-child(2) .wheel-team-name {
    color: #3498db;
}

.wheel-team-score:nth-child(3) .wheel-team-name {
    color: #2ecc71;
}

.wheel-team-score:nth-child(4) .wheel-team-name {
    color: #9b59b6;
}

.wheel-team-points {
    color: #fff;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

/* Right Panel: Wheel Area */
.wheel-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
}

.wheel-wrapper {
    position: relative;
    width: clamp(300px, 50vw, 550px);
    height: clamp(300px, 50vw, 550px);
}

/* Pointer Indicator */
.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    color: var(--accent-color);
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    animation: pointerBounce 1s ease-in-out infinite;
}

@keyframes pointerBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(5px);
    }
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.6));
    border-radius: 50%;
}

.wheel-center-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(80px, 18%, 110px);
    height: clamp(80px, 18%, 110px);
    background: linear-gradient(145deg, #f0c419, #d4a817);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 5px 25px rgba(240, 196, 25, 0.5),
        inset 0 -4px 10px rgba(0, 0, 0, 0.2);
    border: 4px solid #fff;
}

.wheel-center-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow:
        0 10px 35px rgba(240, 196, 25, 0.7),
        inset 0 -4px 10px rgba(0, 0, 0, 0.2);
}

.wheel-center-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.spin-text {
    font-size: clamp(0.9rem, 2.5vw, 1.4rem);
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Wheel Spinning Animation */
@keyframes wheelSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(var(--spin-degrees));
    }
}

.spinning {
    animation: wheelSpin var(--spin-duration) cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .wheel-layout {
        flex-direction: column;
        gap: 20px;
        height: auto;
        padding-top: 60px;
    }

    .wheel-info-panel {
        flex: none;
        width: 100%;
        max-width: 500px;
        padding: 20px;
        gap: 15px;
    }

    .wheel-stats {
        flex-direction: row;
        justify-content: center;
    }

    .wheel-stat-card {
        flex: 1;
        max-width: 180px;
    }

    .wheel-scoreboard {
        grid-template-columns: repeat(4, 1fr);
    }

    .wheel-team-score {
        padding: 10px 8px;
    }

    .wheel-team-name {
        font-size: 0.75rem;
    }

    .wheel-team-points {
        font-size: 1.2rem;
    }

    .wheel-main {
        max-width: 100%;
    }

    .wheel-wrapper {
        width: clamp(250px, 70vw, 400px);
        height: clamp(250px, 70vw, 400px);
    }
}

@media (max-width: 480px) {
    .wheel-info-panel {
        padding: 15px;
    }

    .wheel-title {
        font-size: 1.3rem;
    }

    .wheel-stats {
        flex-direction: column;
    }

    .wheel-stat-card {
        max-width: 100%;
    }

    .wheel-scoreboard {
        grid-template-columns: repeat(2, 1fr);
    }
}



/* ========================================
   MILLIONAIRE QUIZ STYLES
   ======================================== */
.millionaire-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a1f 0%, #1a1a3e 50%, #0f0f2e 100%);
    display: flex;
    z-index: 1500;
    padding: 20px;
    gap: 20px;
}

.millionaire-ladder {
    flex: 0 0 200px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    overflow-y: auto;
}

.ladder-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffd700;
    text-align: center;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.prize-step {
    padding: 12px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
}

.prize-step.current {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
    font-size: 1.1rem;
}

.prize-step.completed {
    background: rgba(46, 204, 113, 0.2);
    border-color: rgba(46, 204, 113, 0.5);
    color: #2ecc71;
}

.millionaire-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
}

.millionaire-question-area {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mill-question {
    font-size: clamp(1.5rem, 4vh, 3rem);
    color: #fff;
    font-weight: 700;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.mill-timer {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: clamp(1.5rem, 3vh, 2.5rem);
    font-weight: 800;
    color: #ff4757;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 50px;
    border: 2px solid #ff4757;
    min-width: 80px;
    text-align: center;
}

.mill-answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.mill-answer-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    font-size: clamp(1rem, 2vh, 1.5rem);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    text-align: left;
    position: relative;
    backdrop-filter: blur(5px);
}

.mill-answer-btn::before {
    content: attr(data-letter);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #ffd700;
}

.mill-answer-btn .answer-text {
    margin-left: 60px;
    display: block;
}

.mill-answer-btn:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: #ffd700;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.mill-answer-btn.correct {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.5), rgba(39, 174, 96, 0.5));
    border-color: #2ecc71;
    animation: correctPulse 0.5s;
}

.mill-answer-btn.wrong {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.5), rgba(231, 76, 60, 0.5));
    border-color: #ff4757;
    animation: wrongShake 0.5s;
}

.mill-answer-btn.hidden {
    opacity: 0.3;
    pointer-events: none;
}

@keyframes correctPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes wrongShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.mill-lifelines {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.lifeline-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    padding: 15px 25px;
    font-size: clamp(1rem, 2vh, 1.3rem);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
    backdrop-filter: blur(5px);
}

.lifeline-btn:hover:not(.used) {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.lifeline-btn.used {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Mobile Responsive for Millionaire */
@media (max-width: 768px) {
    .millionaire-container {
        flex-direction: column;
    }

    .millionaire-ladder {
        flex: 0 0 auto;
        max-height: 150px;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
    }

    .ladder-title {
        display: none;
    }

    .prize-step {
        min-width: 80px;
        margin: 0 5px;
        padding: 8px;
        font-size: 0.9rem;
    }

    .mill-answers {
        grid-template-columns: 1fr;
    }

    .mill-lifelines {
        flex-wrap: wrap;
    }
}

/* ========================================
   UNIT SELECTION SCREEN
   ======================================== */
.unit-selection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    padding: 20px;
}

.unit-selection-content {
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.unit-selection-title {
    font-size: clamp(2rem, 5vh, 3rem);
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 40px;
    text-shadow: 0 4px 15px rgba(240, 196, 25, 0.4);
    font-family: 'Outfit', sans-serif;
}

.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.unit-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: clamp(1.1rem, 2vh, 1.5rem);
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.unit-card:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--accent-color);
    box-shadow: 0 15px 40px rgba(240, 196, 25, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

/* ========================================
   HANGMAN GAME STYLES
   ======================================== */
.hangman-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    display: flex;
    flex-direction: column;
    z-index: 1500;
    padding: 20px;
}

/* Top Bar with Stats */
.hangman-top-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.hangman-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.1rem, 2.5vh, 1.5rem);
    font-weight: 700;
}

.hangman-stat .stat-label {
    color: rgba(255, 255, 255, 0.7);
}

.hangman-stat .stat-value {
    color: var(--accent-color);
    font-size: clamp(1.5rem, 3vh, 2rem);
    min-width: 50px;
    text-align: center;
}

/* Main Game Area */
.hangman-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.hangman-main-area {
    display: flex;
    gap: 60px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#hangman-canvas {
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.hangman-word-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    max-width: 500px;
}

.hangman-word {
    font-size: clamp(2.5rem, 6vh, 4rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: 1rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 30px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.hangman-hint {
    font-size: clamp(1.3rem, 3vh, 2rem);
    color: var(--accent-color);
    font-style: italic;
    text-align: center;
    font-weight: 600;
    min-height: 50px;
    background: rgba(240, 196, 25, 0.1);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid rgba(240, 196, 25, 0.3);
}

/* Keyboard */
.hangman-keyboard {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 12px;
    max-width: 900px;
    width: 100%;
    padding: 20px;
}

.hangman-key {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 18px 10px;
    font-size: clamp(1.2rem, 2.5vh, 1.8rem);
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: 'Outfit', sans-serif;
    text-align: center;
}

.hangman-key:hover:not(.used):not(.correct):not(.wrong) {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(240, 196, 25, 0.4);
}

.hangman-key.used {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.3);
}

.hangman-key.correct {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.4), rgba(39, 174, 96, 0.4));
    border-color: #2ecc71;
    animation: correctPulse 0.4s;
}

.hangman-key.wrong {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.4), rgba(231, 76, 60, 0.4));
    border-color: #ff4757;
    animation: wrongShake 0.4s;
}

@keyframes correctPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes wrongShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

/* Mobile Responsive for Hangman */
@media (max-width: 1024px) {
    .hangman-main-area {
        flex-direction: column;
        gap: 30px;
    }

    #hangman-canvas {
        max-width: 280px;
        max-height: 380px;
    }

    .hangman-word-section {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hangman-top-bar {
        gap: 20px;
        flex-wrap: wrap;
        padding: 15px;
    }

    .hangman-stat {
        font-size: 1rem;
    }

    .hangman-keyboard {
        grid-template-columns: repeat(7, 1fr);
        gap: 8px;
        padding: 15px;
    }

    .hangman-key {
        padding: 15px 8px;
        font-size: 1.1rem;
    }

    .hangman-word {
        letter-spacing: 0.5rem;
        font-size: 2rem;
        padding: 20px;
    }

    .hangman-hint {
        font-size: 1.1rem;
        padding: 15px;
    }

    #hangman-canvas {
        max-width: 240px;
        max-height: 320px;
    }
}

/* Millionaire Game Over Overlay */
.millionaire-game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fadeIn 0.5s ease;
}

.millionaire-game-over h2 {
    color: #ff3333;
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    font-family: 'Poppins', sans-serif;
}

.millionaire-game-over p {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-family: 'Poppins', sans-serif;
}

.millionaire-restart-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Poppins', sans-serif;
}

.millionaire-restart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.5);
}

.millionaire-home-btn {
    margin-top: 15px;
    padding: 12px 30px;
    font-size: 1rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
}

.millionaire-home-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.top-right-home-btn {
    /* Default absolute position if used standalone */
    position: absolute;
    top: 20px;
    right: 20px;

    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.top-right-home-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================
   TABOO GAME MODE STYLES (RESPONSIVE)
   ========================================= */

.taboo-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    padding: 2vh 2vw;
    box-sizing: border-box;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    color: white;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    overflow: hidden;
    /* Prevent scrolling */
}

/* Top Panel: Timer */
.taboo-top-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    margin-bottom: 2vh;
}

.taboo-timer {
    font-size: 8vh;
    /* Scale with height */
    font-weight: 800;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.4);
    padding: 1vh 3vw;
    border-radius: 15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    line-height: 1;
}

/* Main Area: Card and Controls */
.taboo-main-area {
    display: flex;
    justify-content: center;
    align-items: stretch;
    /* Stretch to fill height */
    gap: 4vw;
    flex: 1;
    min-height: 0;
    /* Important for flex overflow prevention */
    margin-bottom: 2vh;
}

/* Card Styling */
.taboo-card-wrapper {
    flex: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.taboo-card {
    width: 100%;
    height: 100%;
    background: white;
    color: #333;
    border-radius: 20px;
    padding: 3vh 2vw;
    box-shadow: 0 1vh 3vh rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Center content vertically */
    border: 0.8vh solid #ff9f43;
    position: relative;
    overflow-y: auto;
    /* Allow scrolling inside card if absolutely necessary */
}

.taboo-main-word {
    font-size: 5vh;
    font-weight: 900;
    text-transform: uppercase;
    color: #2e86de;
    margin-bottom: 2vh;
    text-align: center;
    border-bottom: 0.4vh solid #eee;
    padding-bottom: 2vh;
    width: 100%;
    line-height: 1.2;
}

.taboo-separator {
    width: 80%;
    height: 0.4vh;
    background: #ff6b6b;
    margin-bottom: 2vh;
    border-radius: 2px;
}

.taboo-forbidden-list {
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
    width: 100%;
    align-items: center;
}

.taboo-forbidden-item {
    font-size: 3vh;
    color: #555;
    font-weight: 600;
    background: #f1f2f6;
    width: 90%;
    text-align: center;
    padding: 1vh;
    border-radius: 10px;
}

/* Right Controls */
.taboo-right-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3vh;
    flex: 0 0 auto;
}

.taboo-control-btn {
    padding: 3vh 2vw;
    font-size: 2.5vh;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s;
    text-transform: uppercase;
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.pass-btn {
    background: linear-gradient(to bottom, #ff9f43, #ee5253);
    color: white;
    box-shadow: 0 0.8vh 0 #b33939;
}

.pass-btn:active {
    transform: translateY(0.4vh);
    box-shadow: 0 0.4vh 0 #b33939;
}

.correct-btn {
    background: linear-gradient(to bottom, #1dd1a1, #10ac84);
    color: white;
    box-shadow: 0 0.8vh 0 #07795d;
}

.correct-btn:active {
    transform: translateY(0.4vh);
    box-shadow: 0 0.4vh 0 #07795d;
}

/* Bottom Panel: Team Scores */
.taboo-bottom-panel {
    display: flex;
    justify-content: center;
    gap: 2vw;
    flex: 0 0 15vh;
    /* Fixed height for bottom panel */
}

.team-score-btn {
    flex: 1;
    max-width: 200px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0.5vh 1vh rgba(0, 0, 0, 0.3);
    padding: 1vh;
}

.team-score-btn:active {
    transform: scale(0.95);
}

.team-a {
    background: #ff6b6b;
    border-bottom: 0.6vh solid #c0392b;
}

.team-b {
    background: #48dbfb;
    border-bottom: 0.6vh solid #0abde3;
}

.team-c {
    background: #1dd1a1;
    border-bottom: 0.6vh solid #10ac84;
}

.team-d {
    background: #feca57;
    border-bottom: 0.6vh solid #ff9f43;
}

.team-label {
    font-size: 2vh;
    font-weight: bold;
    margin-bottom: 0.5vh;
}

.team-score {
    font-size: 4vh;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5vh 2vw;
    border-radius: 10px;
    min-width: 60px;
    text-align: center;
}

/* Game Over Overlay */
.taboo-game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    color: white;
}

.taboo-game-over h2 {
    font-size: 8vh;
    color: #ff6b6b;
    margin-bottom: 4vh;
    text-transform: uppercase;
}

#taboo-final-scores {
    display: flex;
    gap: 3vw;
    margin-bottom: 5vh;
}

.final-score-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 2vh 2vw;
    border-radius: 10px;
    text-align: center;
}

.final-score-box div:first-child {
    font-size: 2.5vh;
    margin-bottom: 1vh;
}

.final-score-box div:last-child {
    font-size: 5vh;
    font-weight: bold;
    color: #feca57;
}

/* Buttons inside Overlay */
.taboo-restart-btn,
.taboo-home-btn {
    font-family: 'Poppins', sans-serif;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin: 1vh;
    transition: transform 0.2s;
}

.taboo-restart-btn {
    background: #1dd1a1;
    color: white;
    font-size: 3vh;
    padding: 2vh 4vw;
}

.taboo-home-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 2vh;
    padding: 1.5vh 3vw;
}

.taboo-restart-btn:hover,
.taboo-home-btn:hover {
    transform: scale(1.05);
}

/* =========================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ========================================= */

/* Mobile: 768px and below */
@media (max-width: 768px) {

    /* Landing Page */
    .landing-page {
        padding: 10px;
    }

    .landing-content {
        padding: 15px;
        max-width: 100%;
    }

    .landing-content h1 {
        font-size: 1.6rem;
    }

    .landing-content p {
        font-size: 0.95rem;
    }

    .landing-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .landing-btn {
        width: 100%;
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    /* Game Mode Selection - ENHANCED */
    .game-mode-content {
        padding: 10px;
        max-width: 100%;
    }

    .mode-selection-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .game-mode-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 5px;
        margin-bottom: 20px;
    }

    .game-mode-card {
        padding: 18px 12px;
        min-height: auto;
    }

    .game-mode-card h3 {
        font-size: 1.1rem;
        margin: 10px 0 5px 0;
    }

    .game-mode-card p {
        font-size: 0.8rem;
        margin: 0;
    }

    .mode-icon {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }

    .back-to-landing-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Play Type Selection */
    .play-type-grid {
        flex-direction: column;
        gap: 12px;
    }

    .play-type-card {
        width: 100%;
        max-width: 100%;
        padding: 20px;
        min-height: auto;
    }

    .play-type-icon {
        font-size: 2.5rem;
    }

    .play-type-card h3 {
        font-size: 1.2rem;
    }

    .play-type-card p {
        font-size: 0.85rem;
    }

    /* Unit Selection */
    .unit-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 8px;
    }

    .unit-card {
        padding: 12px 8px;
        font-size: 0.85rem;
    }

    /* Millionaire - HEAVILY ENHANCED */
    .millionaire-container {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
    }

    .millionaire-ladder {
        flex: 0 0 auto;
        width: 100%;
        max-height: 150px;
        padding: 10px;
        order: 2;
    }

    .ladder-title {
        font-size: 0.9rem;
        margin-bottom: 8px;
        letter-spacing: 1px;
    }

    .prize-step {
        padding: 6px 8px;
        margin: 4px 0;
        font-size: 0.75rem;
    }

    .prize-step.current {
        font-size: 0.85rem;
    }

    .millionaire-main {
        flex: 1;
        gap: 15px;
        order: 1;
    }

    .millionaire-question-area {
        padding: 15px;
    }

    .mill-question {
        font-size: 1.1rem;
        min-height: auto;
        padding: 10px;
    }

    .mill-timer {
        top: 8px;
        right: 8px;
        font-size: 1.1rem;
        padding: 6px 12px;
        min-width: 60px;
    }

    .mill-answers {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mill-answer-btn {
        padding: 15px 15px 15px 60px;
        font-size: 0.9rem;
    }

    .mill-answer-btn::before {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        left: 12px;
    }

    .lifeline-container {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .lifeline-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
        min-width: 80px;
    }

    .lifeline-btn .lifeline-icon {
        font-size: 1.2rem;
    }

    /* Wheel - HEAVILY ENHANCED */
    .wheel-container {
        padding: 8px;
    }

    #wheel-canvas {
        max-width: 75vw;
        max-height: 35vh;
        width: 300px !important;
        height: 300px !important;
    }

    .wheel-spin-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .wheel-team-modal .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .wheel-team-btn {
        padding: 15px 10px;
        font-size: 0.9rem;
    }

    /* Hangman - HEAVILY ENHANCED */
    .hangman-container {
        padding: 10px;
    }

    .hangman-top-bar {
        gap: 20px;
        padding: 12px;
        margin-bottom: 15px;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    .hangman-stat {
        gap: 6px;
        font-size: 0.9rem;
        flex: 0 0 auto;
    }

    .hangman-stat .stat-value {
        font-size: 1.2rem;
        min-width: 35px;
    }

    .hangman-game {
        gap: 20px;
    }

    .hangman-main-area {
        flex-direction: column;
        gap: 20px;
    }

    #hangman-canvas {
        max-width: 200px;
        max-height: 200px;
        width: 200px !important;
        height: 200px !important;
    }

    .hangman-word-section {
        max-width: 100%;
        width: 100%;
    }

    .hangman-word {
        font-size: 1.8rem;
        letter-spacing: 0.5rem;
        min-height: 60px;
        padding: 15px;
    }

    .hangman-hint {
        font-size: 1rem;
        min-height: 40px;
        padding: 12px;
    }

    .keyboard {
        gap: 4px;
        padding: 10px;
    }

    .key-btn {
        min-width: 26px;
        height: 36px;
        padding: 6px 4px;
        font-size: 0.85rem;
    }

    /* Taboo Game - Mobile Layout */
    .taboo-container {
        padding: 1vh 2vw;
    }

    .taboo-top-panel {
        margin-bottom: 1vh;
    }

    .taboo-timer {
        font-size: 6vh;
        padding: 0.5vh 3vw;
    }

    .taboo-main-area {
        flex-direction: column;
        gap: 2vh;
    }

    .taboo-card-wrapper {
        max-width: 100%;
        flex: 0 0 auto;
    }

    .taboo-card {
        padding: 2vh 3vw;
        min-height: auto;
    }

    .taboo-main-word {
        font-size: 4vh;
        margin-bottom: 1.5vh;
        padding-bottom: 1.5vh;
    }

    .taboo-forbidden-list {
        gap: 1vh;
    }

    .taboo-forbidden-item {
        font-size: 2.5vh;
        padding: 0.8vh;
    }

    .taboo-right-controls {
        flex-direction: row;
        justify-content: center;
        gap: 3vw;
    }

    .taboo-control-btn {
        width: auto;
        flex: 1;
        max-width: 180px;
        padding: 2vh 2vw;
        font-size: 1.8vh;
    }

    .taboo-bottom-panel {
        flex: 0 0 12vh;
        gap: 1.5vw;
        flex-wrap: wrap;
    }

    .team-score-btn {
        flex: 1 1 48%;
        max-width: 48%;
        min-width: 70px;
    }

    .team-label {
        font-size: 1.5vh;
    }

    .team-score {
        font-size: 2.8vh;
        padding: 0.3vh 1.5vw;
    }

    .taboo-game-over h2 {
        font-size: 5vh;
        margin-bottom: 2vh;
    }

    #taboo-final-scores {
        flex-wrap: wrap;
        gap: 2vw;
    }

    .final-score-box {
        flex: 1 1 45%;
        padding: 1.5vh 2vw;
    }

    /* Back/Home Navigation Buttons */
    .top-right-nav {
        top: 5px;
        right: 5px;
        gap: 4px;
    }

    .back-to-modes-btn,
    .top-right-home-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* Modal Windows */
    .modal-content {
        width: 95%;
        max-width: 95vw;
        max-height: 90vh;
        padding: 12px;
        margin: 5px;
    }

    .modal-content h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    /* Homework System */
    .student-row {
        flex-wrap: wrap;
        padding: 8px;
        gap: 6px;
        font-size: 0.85rem;
    }

    .status-buttons {
        flex-wrap: wrap;
        gap: 4px;
    }

    .status-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* Score Board */
    .score-board {
        flex-wrap: wrap;
        gap: 6px;
        padding: 6px;
    }

    .team-score-display {
        min-width: 60px;
        padding: 6px;
        font-size: 0.85rem;
    }
}

/* Small Mobile: 480px and below */
@media (max-width: 480px) {

    /* Landing Page */
    .landing-content h1 {
        font-size: 1.4rem;
    }

    .landing-content p {
        font-size: 0.9rem;
    }

    .landing-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    /* Game Mode */
    .mode-icon {
        font-size: 2rem;
    }

    .game-mode-card h3 {
        font-size: 1rem;
    }

    /* Taboo - Extra Small Screens */
    .taboo-timer {
        font-size: 5vh;
    }

    .taboo-main-word {
        font-size: 3.5vh;
    }

    .taboo-forbidden-item {
        font-size: 2vh;
    }

    .taboo-control-btn {
        font-size: 1.8vh;
        padding: 1.5vh 2vw;
    }

    .team-score-btn {
        flex: 1 1 48%;
    }

    .taboo-game-over h2 {
        font-size: 4vh;
    }

    .taboo-restart-btn {
        font-size: 2.5vh;
        padding: 1.5vh 3vw;
    }

    /* Unit Selection */
    .unit-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .unit-card {
        font-size: 0.8rem;
        padding: 12px 8px;
    }

    /* Modals */
    .modal-content h2 {
        font-size: 1.2rem;
    }

    /* Keyboard */
    .key-btn {
        min-width: 24px;
        padding: 6px 4px;
        font-size: 0.8rem;
    }

    /* Homework */
    .student-row {
        font-size: 0.85rem;
    }

    .hw-input {
        font-size: 1rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .taboo-container {
        padding: 0.5vh 2vw;
    }

    .taboo-timer {
        font-size: 5vh;
    }

    .taboo-main-area {
        flex-direction: row;
    }

    .taboo-card {
        max-height: 70vh;
        overflow-y: auto;
    }

    .taboo-bottom-panel {
        flex: 0 0 10vh;
    }

    .landing-content {
        padding: 10px;
    }

    .landing-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
}