/* Global Styles */
body {
    font-family: 'Mitr', sans-serif;
    background-color: #FFF5EE;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

/* Game Header Styles */
.game-header {
    display: flex;
    justify-content: center;
    padding: 0;
    background-color: transparent;
    gap: 5px;
    max-width: 800px;
    margin: 0 auto;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-group {
    display: flex;
    align-items: stretch;
    position: relative;
    border-radius: 0 0 15px 15px;
    width: 50%;
}

.mode-label {
    color: #333333;
    padding: 20px 25px;
    font-size: 18px;
    line-height: 1.3;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 15px 15px;
    position: absolute;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    left: 0;
    height: 100%;
}

.time-display {
    color: #333333;
    padding: 30px 30px 15px 30px;
    font-size: 32px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-radius: 0 0 15px 15px;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.time-label {
    position: absolute;
    padding-right: 10px;
    top: 15px;
    right: 25px;
    font-size: 15px;
    z-index: 1;
}

.score-control-group {
    display: flex;
    align-items: stretch;
    position: relative;
    border-radius: 0 0 15px 15px;
    width: 50%;
}

.score-display {
    background-color: #ff925b;
    color: #333333;
    padding: 30px 30px 15px 30px;
    font-size: 32px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-radius: 0 0 15px 15px;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 998;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.control-buttons {
    background-color: transparent;
    color: white;
    padding: 0;
    font-size: 16px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: absolute;
    z-index: 1005;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
}

.score-label {
    position: absolute;
    padding-left: 10px;
    top: 15px;
    left: 25px;
    font-size: 15px;
    z-index: 1;
}

.control-btn {
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    background-color: #6C4A1F;
    width: 50%;
    height: 100%;
    text-align: center;
    flex: 1;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: height 0.3s ease;
    align-self: flex-start;
    /* Important to anchor top */
    z-index: 1006;
}

.control-btn.restart {
    border-radius: 0 0 15px 15px;
    z-index: 1006;
}

.control-btn.pause {
    background-color: #8B5E34;
    border-radius: 0 0 15px 15px;
    z-index: 1006;
}

.control-btn.back {
    border-radius: 0 0 15px 15px;
    z-index: 1006;
}

.control-btn:hover {
    height: 110%;
    /* Grow slightly downward */
}

/* Game Content Styles */
.game-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    position: relative;
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom);
}

.game-board {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 80px);
}

/* Card Container Styles */
.card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-top: 100px;
}

.character-card {
    width: 180px;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.character-card.spy {
    background-color: #ffbc9f;
}

.character-card.player {
    background-color: #B6E0FE;
}

.character-card.spy-noey {
    background-color: #ffb7e7;
}

.number-box {
    background-color: white;
    border-radius: 10px;
    padding: 8px 15px;
    width: 100%;
    margin-bottom: 15px;
}

.char-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    text-align: center;
}

.char-number {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    line-height: 1;
    text-align: center;
}

.char-image {
    margin: 15px 0;
}

.char-image img {
    width: 100%;
    height: auto;
}

/*Health Bar*/
.health-bar {
    width: 100%;
    height: 2rem;
    background-color: #e1ffb2;
    border-radius: 25px;
    overflow: hidden;
    margin: 0.8rem 0;
    border: none;
}

.health-bar::-webkit-progress-bar {
    background-color: #d8ffb2;
    border-radius: 25px;
}

/*Health Bar*/
.health-bar {
    width: 100%;
    height: 2rem;
    border-radius: 25px;
    overflow: hidden;
    margin: 0.8rem 0;
    border: none;
}

.health-bar::-webkit-progress-bar {
    border-radius: 25px;
}

/* Player Health Bar */
#playerHealthBar {
    background-color: #90caf9;
}

#playerHealthBar::-webkit-progress-bar {
    background-color: #90caf9;
}

#playerHealthBar::-webkit-progress-value {
    background: #3699fb;
    border-radius: 25px;
    transition: width 0.3s ease-in-out;
}

/* Spy Health Bar */
#spyHealthBar {
    background-color: #ffab91;
}

#spyHealthBar::-webkit-progress-bar {
    background-color: #ffab91;
}

#spyHealthBar::-webkit-progress-value {
    background: #ff6e41;
    border-radius: 25px;
    transition: width 0.3s ease-in-out;
}

/* Health bar container */
.health-container {
    position: relative;
    width: 100%;

    padding: 0 0.5rem;
}

/* Health percentage text */
.health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    text-align: center;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 1;
    letter-spacing: 0.5px;
}

.operator,
.equals {
    font-size: 48px;
    font-weight: bold;
    color: #4A3728;
    margin: 0 10px;
}

.result {
    font-size: 72px;
    font-weight: bold;
    color: #4A3728;
    margin-left: 10px;
}

/* Answer Buttons Styles */
.answer-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    padding: 0 20px;
}

.answer-btn {
    flex: 1;
    height: 180px;
    border: none;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    font-size: 64px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    max-width: 200px;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.answer-btn:active {
    transform: scale(0.97);
}

/* Disable hover effects on mobile devices */
@media (hover: none) and (pointer: coarse) {
    .control-btn:hover {
        height: 100%;
    }
}

/* Enable hover effects only on devices that support hover */
@media (hover: hover) and (pointer: fine) {
    .control-btn:hover {
        height: 110%;
    }
}

.answer-btn.blue {
    background-color: #37ace2;
}

.answer-btn.blue:hover {
    background-color: #2d8ab4;
}

.answer-btn.yellow {
    background-color: #FAC05E;
}

.answer-btn.yellow:hover {
    background-color: #e5a93f;
}

.answer-btn.green {
    background-color: #8EC26E;
}

.answer-btn.green:hover {
    background-color: #75a356;
}

.answer-btn.orange {
    background-color: #ff9059;
}

.answer-btn.orange:hover {
    background-color: #e57a47;
}

/* Timer Bar Styles */
.timer-container {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 999;
}

.timer-label {
    font-family: 'Mitr', sans-serif;
    color: #333333;
    font-size: 16px;
    margin-bottom: 5px;
    text-align: center;
}

.timer-bar {
    position: relative;
    width: 800px;
    max-width: 100%;
    height: 8px;
    background-color: #FF5722;
    transform-origin: center;
    transition: transform 0.1s linear;
    margin: 0 auto;
}

/* Timer Bar Container for centering */
.timer-container {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 999;
}

/* Pause Overlay Styles */
.pause-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.pause-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.pause-content h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.pause-content button {
    padding: 0.5rem 2rem;
    font-size: 1.2rem;
}

.answer-btn {
    position: relative;
    z-index: 1;
}

.correct-answer-box {
    position: fixed;
    width: 200px;
    height: 180px;
    background-color: #8EC26E;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Mitr', sans-serif;
    color: #333333;
    z-index: 1000;
    animation: slideAndFade 1s ease-out forwards;
}

.correct-answer-box .label {
    font-size: 20px;
    margin-bottom: 5px;
}

.correct-answer-box .score {
    font-size: 48px;
}

.incorrect-answer-box {
    position: fixed;
    width: 200px;
    height: 180px;
    background-color: #ff617b;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Mitr', sans-serif;
    color: #333333;
    z-index: 1000;
    animation: slideAndFade 1s ease-out forwards;
}

.incorrect-answer-box .label {
    font-size: 20px;
    margin-bottom: 5px;
}

.incorrect-answer-box .number {
    font-size: 48px;
}

.timeout-score-box {
    position: fixed;
    width: 50%;
    height: 85px;
    max-width: 200px;
    max-height: 85px;
    background-color: #ff617b;
    border-radius: 0 0 15px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Mitr', sans-serif;
    color: #333333;
    z-index: 1000;
    animation: slideRightAndFade 1.5s ease-out forwards;
    padding: 15px 30px;
}

.timeout-score-box .label {
    position: absolute;
    padding-left: 10px;
    top: 15px;
    left: 25px;
    font-size: 15px;
}

.timeout-score-box .number {
    font-size: 32px;
    font-weight: 500;
}

@keyframes slideAndFade {
    0% {
        transform: translateY(-20px);
        opacity: 1;
    }

    25% {
        transform: translateY(-25vh);
        opacity: 1;
    }

    50% {
        transform: translateY(-25vh);
        opacity: 1;
    }

    100% {
        transform: translateY(-25vh);
        opacity: 0;
    }
}

@keyframes slideRightAndFade {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }

    60% {
        transform: translate(12vw, 0);
        opacity: 1;
    }

    100% {
        transform: translate(12vw, -25vh);
        opacity: 0;
    }
}

.remaining-questions {
    font-family: 'Mitr', sans-serif;
    color: #333333;
    font-size: 16px;
    text-align: center;

}

/* Responsive Styles from multiplayer */
@media (max-width: 1200px) {
    .game-header {
        transform: scale(0.9);
        min-width: 100%;
        top: -10px; /* Wider on smaller screens */
    }
    
    .timer-container {
        top: 85px;
    }
    
    .card-container {
        margin-top: 120px;
    }
}

@media (max-width: 1000px) {
    .game-header {
        transform: scale(0.85);
        max-width: 98%; /* Almost full width */
    }
    .timer-container {
        scale: 0.8;
    }

    .header-group {
        width: 50%;
    }
    
    #timer, #score-header{
        font-size: 28px;
    }
    .card-container {
        justify-content: center;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        margin-top: 110px;
    }
    
    .card-container::-webkit-scrollbar {
        height: 8px;
    }
    
    .card-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .card-container::-webkit-scrollbar-thumb {
        background: #36b0e9;
        border-radius: 4px;
    }
    
    .card-container::-webkit-scrollbar-thumb:hover {
        background: #2d8ab4;
    }
    
    .character-card, .operator, .equals, .result {
        flex-shrink: 0;
        scroll-snap-align: center;
    }
    
    .answer-container {
        gap: 10px;
        padding: 0 5px;
    }
    
    .answer-btn {
        height: 150px;
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .game-header {
        transform: scale(0.8);
        top: -10px;
        max-width: 100%; 
        min-width: 1rem;/* Full width */
    }
    
    .mode-label {
        width: 40%;
        display: none;
    }
    
    .timer-container {
        top: 75px;
        scale: 0.9;
    }
    
    .timer-bar {
        max-width: 90%;
    }
    
    .card-container {
        margin-top: 100px;
        transform: scale(0.9);
    }
    
    .character-card {
        min-width: 160px;
    }
    
    .answer-btn {
        height: 140px;
        font-size: 42px;
    }
}

@media(max-width: 750px) {
    @media(max-height: 400px) {
        .card-container {
            top: -30px;
        }


    }

    @media(max-height:380px) {
        .card-container {
            margin-top: -20px;
            transform: scale(0.5);
        }

    }
}

@media(max-width: 700px) {
    @media(max-height: 450px) {
        .game-header {
            top: -15px;
            transform: scale(0.7);
        }

        .timer-label {
            font-size: 12px;
        }

        .timer-container {
            top: 65px;
        }

        .timer-bar {
            height: 5px;
        }

        .timeout-score-box {

            width: 50%;
            max-width: 100px;
            max-height: 50px;

        }

        .timeout-score-box .label {
            display: none;
        }

        .timeout-score-box .number {
            font-size: 20px;

        }

        .card-container {
            margin-top: -5px;
            width: 100%;
            transform: scale(0.5);

        }

        .character-card {
            width: 175px;
        }


        .answer-container {
            transform: scale(0.7);
            bottom: -30px;
        }

        .answer-btn {
            height: 120px;
            font-size: 40px;
        }
    }
}

@media screen and (max-width: 767px) {
    /* Mobile header adjustments */
    .game-header {
        width: 100%;
        padding: 0 5px;
        position: absolute; /* Change from fixed to absolute for better mobile layout */
        top: -5px;
        left: 0;
        right: 0;
        transform: scale(0.95);
    }
    
    /* Better mode label for mobile */
    .mode-label {
        font-size: 14px;
        padding: 10px;
    }
    
    #room-code, #score-header, #timer{
        font-size: 20px;
    }

    /* Adjust timer container */
    .timer-container {
        top: 90px;
        width: 90%;
        margin: 0 auto;
    }
    
    .timer-label {
        font-size: 14px;
    }
    
    .timer-bar {
        height: 6px;
    }
    
    /* Better card display for mobile */
    .card-container {
        margin-top: 120px;
        padding: 10px;
        display: flex;
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 20px;
        width: 100%;
        gap: 15px;
    }
    
    /* Better scrolling on mobile */
    .card-container::-webkit-scrollbar {
        height: 4px;
    }
    
    .card-container::-webkit-scrollbar-thumb {
        background-color: #37ace2;
        border-radius: 4px;
    }
    
    /* Make cards non-shrinkable and snap to center */
    .character-card, .operator, .equals, .result {
        flex: 0 0 auto;
        scroll-snap-align: center;
    }
    
    /* Smaller cards for mobile */
    .character-card {
        width: 150px;
        padding: 10px;
    }
    
    /* Smaller fonts for mobile */
    .char-name {
        font-size: 14px;
    }
    
    .char-number {
        font-size: 36px;
    }
    
    .operator, .equals {
        font-size: 36px;
    }
    
    .result {
        font-size: 48px;
    }
    
    /* Thinner health bars */
    .health-bar {
        height: 1.5rem;
    }
    
    .health-text {
        font-size: 0.9rem;
    }
    
    /* Space for answer buttons */
    .game-content {
        padding-bottom: 120px;
    }
}

@media(max-width: 600px) {
    .mode-label {
        font-size: 12px;
    }


}

@media(max-width: 545px) {
    .mode-label {
        display: none;
    }
}

@media (max-width: 500px) {

    .card-container {
        margin-top: 30%;
    }

    .answer-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 5px;
        padding: 0px;
        
        height: auto;
        bottom: -12px;
        background-color: rgba(255, 245, 238, 0.9);
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .answer-btn {
        height: 120px;
        max-width: none;
        border-radius: 10px;
        font-size: 50px;
    }

    .card-container {
        margin-top: 65px;
    }


    @media (max-height: 600px) {
        .answer-btn {
            height: min(120px, 18vh);
            font-size: clamp(28px, 5vw, 42px);
        }


    }

    @media (max-height: 500px) {
        .answer-btn {
            height: min(100px, 16vh);
            font-size: clamp(24px, 4vw, 36px);
        }
    }
}

@media (max-width: 400px) {
    @media (max-height: 700px) {


        /* .answer-btn {
            height: 80px;
            font-size: clamp(28px, 5vw, 42px);
        } */

        /* .answer-btn:hover {
            height: min(130px, 18vh);
        } */
    }


}

@media(max-height: 750px) {
    @media(max-width: 500px) {
        .game-header {
            transform: scale(1);
            top: 0;
        }

        .timer-container {
            top: 100px;
        }
        
        .card-container{
            margin-top: 75px;
        }

        .answer-container {
            transform: scale(1);
            bottom: 0;
            width: 100%;
    
            
        }

        .answer-btn{
            height: 80px;
            font-size: 32px;
        }
        /* .answer-container {
            display: flex;
            justify-content: center;
            align-items: flex-end;
            gap: 20px;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: transparent;
            padding: 0 20px;
        } */
    }
}

/* Extra small devices (phones) */
@media screen and (max-width: 480px) {
    .game-header {
        transform: scale(0.85);
        top: -10px;
    }
    
    /* Push timer down a bit */
    .timer-container {
        top: 85px;
    }
    
    #timer, #score-header{
        font-size: 20px;
    }
    
    /* Adjust card container for the smaller screen */
    .card-container {
        margin-top: 110px;
        padding-left: 20px; /* Add padding to ensure first card is visible */
    }
    
    /* Better answer button layout for small phones */
    .answer-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 5px;
        padding: 0 5px 5px 5px;
        width: 100%;
        bottom: 0;
        background-color: rgba(255, 245, 238, 0.8);
    }
    
    .answer-btn {
        height: 90px;
        max-width: none;
        border-radius: 10px;
        font-size: 36px;
        margin: 0;
    }
    
    .answer-btn:hover {
        height: 90px;
    }
}

/* Very small phones */
@media screen and (max-width: 375px) {
    .card-container {
        margin-top: 100px;
        padding-left: 25px; /* More padding for very small screens */
    }
    
    .character-card {
        width: 130px;
    }   
    
    .char-number {
        font-size: 32px;
    }
    
    #timer, #score-header {
        font-size: 24px;
    }
    
    .operator, .equals {
        font-size: 32px;
    }
    
    .result {
        font-size: 42px;
    }
    
    .answer-btn {
        height: 80px;
        font-size: 30px;
    }
}

/* Landscape mode for mobile - Comprehensive improvements */
@media screen and (max-height: 500px) and (orientation: landscape) {
    /* Header improvements */
    .game-header {
        transform: scale(0.7);
        top: -9px;
        padding: 0;
        display: flex;
        justify-content: space-between;
        width: 98%;
        max-height: 100px;
        margin: 0 auto;
    }
    
    /* Smaller header elements */
    .time-display, .score-display {
        padding: 10px 15px 5px 15px;
        font-size: 22px;
    }
    
    .time-label, .score-label {
        font-size: 10px;
        top: 5px;
    }
    
    .mode-label{
        font-size: 12px;
    }

    #timer, #score-header{
        font-size: 24px;
    }
    /* Better timer positioning */
    .timer-container {
        margin-left: auto;
        margin-right: auto;
        top: 50px;
        transform: scale(0.8);
        width: 80%;
    }
    
    .timer-label {
        font-size: 12px;
        margin-bottom: 2px;
    }
    
    .timer-bar {
        height: 5px;
    }
    
    /* Better card layout for landscape */
    .card-container {
        margin-top: 70px;
        transform: scale(0.75);
        padding: 0;
        display: flex;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }
    
    /* Slim down cards for landscape view */
    .character-card {
        width: 140px;
        padding: 8px;
    }
    
    .number-box {
        padding: 5px 8px;
        margin-bottom: 8px;
    }
    
    .char-image {
        margin: 5px 0;
    }
    
    .char-image img {
        max-width: 100px;
        height: auto;
    }
    
    .char-name {
        font-size: 12px;
        margin-bottom: 2px;
    }
    
    .char-number {
        font-size: 30px;
    }
    
    /* Smaller operators */
    .operator, .equals {
        font-size: 30px;
        margin: 0 8px;
    }
    
    .result {
        font-size: 38px;
    }
    
    /* Better health bars */
    .health-bar {
        height: 1rem;
        margin: 0.4rem 0;
    }
    
    .health-text {
        font-size: 0.8rem;
    }
    
    .remaining-questions {
        font-size: 11px;
    }
    
    /* Better answer buttons layout for landscape */
    .answer-container {
        padding: 0 5px;
        gap: 5px;
        position: fixed;
        bottom: 0;
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        width: 98%;
        margin: 0 auto;
        left: 0;
        right: 0;
        background-color: rgba(255, 245, 238, 0.8);
        padding-bottom: 5px;
    }
    
    .answer-btn {
        flex: 1;
        height: 60px;
        max-width: 24%;
        font-size: 30px;
        border-radius: 10px;
        margin: 0;
    }
    
    .answer-btn:hover {
        height: 60px;
    }
    
    /* Game content spacing */
    .game-content {
        padding-bottom: 70px;
    }
}

/* Even smaller landscape devices */
@media screen and (max-height: 400px) and (orientation: landscape) {
    .game-header {
        transform: scale(0.6);
        top: -10px;
    }
    
    .timer-container {
        top: 40px;
        transform: scale(0.7);
    }
    
    .card-container {
        margin-top: 60px;
        transform: scale(0.65);
    }
    
    .answer-container {
        padding-bottom: 3px;
    }
    
    .answer-btn {
        height: 50px;
        font-size: 26px;
    }
    
    .answer-btn:hover {
        height: 50px;
    }
}

/* Large desktop screens */
@media (min-width: 1440px) {
    .game-header {
        max-width: 75%;
    }
    
    .card-container {
        margin-top: 100px;
        gap: 40px;
    }
    
    .character-card {
        width: 180px;
    }
}

/* Adjustments for medium desktop screens */
@media (min-width: 1024px) and (max-width: 1439px) {
    .game-header {
        max-width: 75%;
    }
    
    .card-container {
        gap: 25px;
    }
    
    .answer-btn {
        height: 140px;
        font-size: 50px;
    }
    
    .answer-btn:hover {
        height: 160px;
    }
}

/* Adjustments for smaller desktop screens */
@media (min-width: 768px) and (max-width: 1023px) {
    .game-header {
        max-width: 60%;
    }
    
    .card-container {
        gap: 20px;
        margin-top: 85px;
    }
    
    .character-card {
        width: 150px;
    }
    
    .char-number {
        font-size: 38px;
    }
    
    .operator, .equals {
        font-size: 38px;
        margin: 0 10px;
    }
    
    .result {
        font-size: 56px;
    }
    
    .answer-btn {
        height: 130px;
        font-size: 46px;
        max-width: 160px;
    }
    
    .answer-btn:hover {
        height: 150px;
    }
}

/* Disable hover effects on mobile devices */
@media (hover: none) and (pointer: coarse) {
    .control-btn:hover, .answer-btn:hover {
        height: 100%;
    }
}