/* Genel Ayarlar */
body {
    margin: 0;
    padding: 0;
    font-family: 'Fredoka', sans-serif;
    color: white;
    overflow: hidden;
    /* Sayfa kaydırmayı engelle */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, #2b32b2, #1488cc);
    /* Yedek */
}

/* Gün Batımı Arka Planı (Güneşsiz) */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(180deg,
            #0f2027 0%,
            #203a43 40%,
            #2c5364 70%,
            #ff7e5f 100%);
    /* Daha sıcak ve sakin bir gün batımı paleti */
    background: linear-gradient(180deg, #4b6cb7 0%, #182848 100%);
    /* Geceye yakın */
    background: linear-gradient(to bottom, #636FA4, #E8CBC0);
    /* Yumuşak pastel gün batımı */
    background: linear-gradient(180deg, #355C7D, #6C5B7B, #C06C84);
    /* Şık, modern gün batımı */
}

.container {
    width: 90%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    text-align: center;
    position: relative;
    z-index: 10;
    max-height: 95vh;
    overflow-y: auto;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

.hidden {
    display: none !important;
}

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

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

/* Butonlar */
button {
    cursor: pointer;
    font-family: 'Fredoka', sans-serif;
    border: none;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:active {
    transform: scale(0.95);
}

/* Sınıf Seçimi Izgarası */
.grade-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 2rem;
}

.grade-btn {
    background: linear-gradient(45deg, #FF512F, #DD2476);
    color: white;
    font-size: 1.5rem;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(221, 36, 118, 0.4);
}

.grade-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(221, 36, 118, 0.6);
}

.extra-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Çarpım Tablosu Grid */
.multiplication-grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 5px;
    margin: 20px auto;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
}

.mt-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.1rem;
}

.mt-header {
    background: rgba(0, 0, 0, 0.3);
    color: #ffd700;
}

.mt-input {
    width: 80%;
    height: 80%;
    text-align: center;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.mt-input.correct {
    background: #2ecc71;
    color: white;
}

.mt-input.wrong {
    background: #e74c3c;
    color: white;
}


/* Zorluk Seviyesi */
.difficulty-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 2rem 0;
}

.diff-btn {
    font-size: 1.2rem;
    padding: 15px 30px;
    color: white;
}

.diff-btn[data-diff="easy"] {
    background: #00b09b;
    background: linear-gradient(to right, #00b09b, #96c93d);
}

.diff-btn[data-diff="medium"] {
    background: #ff9966;
    background: linear-gradient(to right, #ff5e62, #ff9966);
}

.diff-btn[data-diff="hard"] {
    background: #8e44ad;
    background: linear-gradient(to right, #c33764, #1d2671);
}

/* Oyun Alanı */
header {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.question-card {
    background: white;
    color: #333;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#question-text {
    font-size: 3rem;
    margin: 0 0 1.5rem 0;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.option-btn {
    background: #f0f0f0;
    color: #333;
    font-size: 1.5rem;
    padding: 15px;
    border: 2px solid #ddd;
}

.option-btn:hover {
    background: #e0e0e0;
    border-color: #bbb;
}

.option-btn.correct {
    background: #2ecc71;
    color: white;
    border-color: #27ae60;
}

.option-btn.wrong {
    background: #e74c3c;
    color: white;
    border-color: #c0392b;
}

/* Öğrenci Bölümü */
.student-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

#current-student {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
    margin-bottom: 1rem;
    color: #ffd700;
}

.student-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.action-btn {
    padding: 10px 20px;
    font-size: 1rem;
    color: white;
    background: #333;
}

.action-btn.success {
    background: #2ecc71;
}

.action-btn.danger {
    background: #e74c3c;
}

/* Canvas (Çizim Tahtası) */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#drawing-board {
    background: white;
    border-radius: 10px;
    cursor: crosshair;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.palette {
    margin-top: 15px;
    background: white;
    padding: 10px;
    border-radius: 50px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.colors {
    display: flex;
    gap: 10px;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.color-swatch:hover {
    transform: scale(1.2);
}

.color-swatch.active {
    border-color: #333;
    transform: scale(1.1);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.2);
    margin: 0.5rem;
    padding: 10px 20px;
    color: white;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Cevap animasyonu için */
@keyframes shake {
    0% {
        transform: translateX(0);
    }

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

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

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

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

.shake {
    animation: shake 0.3s;
}

.controls {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 10px;
}