@font-face {
    font-family: 'Chalk';
    src: url('https://fonts.googleapis.com/css2?family=Architects+Daughter&display=swap');
}

body {
    background-color: #234;
    min-height: 100vh;
    display: flex;
    align-items: center;
    font-family: 'Chalk', cursive;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 1.5rem auto;
}

.ad-container {
    width: 100%;
    max-width: 728px;
    margin: 1rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.ad-container.top-ad {
    min-width: 320px;
    min-height: 100px;
    margin-bottom: 1.5rem;
}

.ad-container.bottom-ad {
    min-width: 300px;
    min-height: 250px;
    margin-top: 1.5rem;
}

.ad-loading {
    color: #fff;
    font-size: 0.9rem;
    padding: 1rem;
    text-align: center;
    opacity: 0.7;
    font-family: 'Chalk', cursive;
}

.ad-error {
    color: #ff7f7f;
    font-size: 0.9rem;
    padding: 1rem;
    text-align: center;
}

.adsbygoogle {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
}

.game-board {
    background-color: #2c3e50;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.game-instructions {
    color: rgba(255, 255, 255, 0.9);
    margin: 0.5rem 0 1.5rem 0;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem 1rem;
    text-align: center;
}

.main-instruction {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.sub-instruction {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.numbers-container {
    margin: 1.5rem 0;
}

.number {
    font-size: 2.5rem;
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.number:hover {
    transform: scale(1.1);
}

.operators {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.operator-group {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.operator-btn {
    font-size: 2rem;
    color: #fff;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    padding: 0;
}

.operator-btn:hover {
    background: rgba(255,255,255,0.25);
}

.backspace-btn {
    background: rgba(255,100,100,0.15);
}

.backspace-btn:hover {
    background: rgba(255,100,100,0.25);
}

.equation-display {
    font-size: 2rem;
    margin: 1.5rem 0;
    min-height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
}

.controls {
    margin-top: 1.5rem;
}

.primary-action {
    margin-bottom: 1rem;
}

.secondary-actions {
    padding-top: 1rem;
}

.game-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin: 0 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.game-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.answer-btn {
    font-size: 1.2em;
    padding: 0.7rem 2rem;
    background: rgba(100,200,255,0.2);
    border-color: rgba(100,200,255,0.3);
}

.answer-btn:hover {
    background: rgba(100,200,255,0.3);
}

#message {
    min-height: 2rem;
    font-size: 1.2rem;
    margin-top: 1rem;
    color: #ffffff;
}

@media (max-width: 728px) {
    .container {
        margin: 1rem;
    }

    .game-board {
        margin: 0.5rem;
        padding: 1rem;
    }

    .number {
        font-size: 2rem;
    }

    .operator-btn {
        width: 48px;
        height: 48px;
        font-size: 1.6rem;
    }

    .operator-group {
        gap: 0.25rem;
    }

    .game-instructions {
        margin: 0.25rem 0 1rem 0;
    }

    .numbers-container {
        margin: 1rem 0;
    }

    .operators {
        margin: 1rem 0;
    }

    .equation-display {
        margin: 1rem 0;
    }

    .controls {
        margin-top: 1rem;
    }

    /* Mobile first approach */
    .ad-container {
        margin: 0.5rem auto;
    }
    
    .ad-container.top-ad {
        min-width: 320px;
        min-height: 50px;
    }

    /* Tablet sizes */
    @media (min-width: 468px) {
        .ad-container.top-ad {
            min-width: 468px;
            min-height: 60px;
        }
    }

    /* Desktop sizes */
    @media (min-width: 728px) {
        .ad-container.top-ad {
            min-width: 728px;
            min-height: 90px;
        }
    }
}
