/* Google'dan Nunito fontunu projeye dahil ediyoruz */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');

/* Sayfadaki tüm elemanların kenar ve iç boşluklarını sıfırlıyoruz */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Sayfanın genel görünümü */
body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #2c3e50, #4ca1af); /* Modern bir arkaplan */
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ekranın tamamını kaplamasını sağlar */
    text-align: center;
    padding: 20px;
}

/* Oyunun ana kutusunun stili */
#game-container {
    background-color: rgba(44, 62, 80, 0.8);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px; /* Piyanonun rahat sığması için */
}

/* Ana başlık stili */
h1 {
    margin-bottom: 10px;
    font-size: 2.5rem;
}

/* Skor tablosunun stili */
#score-container {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px 15px;
    margin: 0 auto 15px auto;
    display: inline-flex;
    gap: 25px; /* "Doğru" ve "Yanlış" arası boşluk */
    font-size: 1.1rem;
    font-weight: 600;
}

#correct-score {
    color: #2ecc71; /* Doğru sayısı için yeşil renk */
}

#incorrect-score {
    color: #e74c3c; /* Yanlış sayısı için kırmızı renk */
}

/* Açıklama metni stili */
p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #bdc3c7;
}

/* Piyano taşıyıcısının stili */
#piano-container {
    display: flex;
    justify-content: center;
    margin: 30px auto;
    height: 180px;
}

/* Tüm piyano tuşları için ortak stiller */
.key {
    border: 1px solid #333;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,0.2);
}

/* Beyaz tuşların stili */
.key.white {
    position: relative; /* Siyah tuşların konumlanması için referans noktası */
    width: 50px;
    height: 180px;
    background-color: white;
    border-radius: 0 0 5px 5px;
}

/* Siyah tuşların stili */
.key.black {
    position: absolute;
    left: 100%; /* İçinde bulunduğu beyaz tuşun sağına hizalanır */
    transform: translateX(-50%); /* Kendi genişliğinin yarısı kadar sola kayar */
    top: 0;
    width: 30px;
    height: 110px;
    background-color: #2c3e50;
    border-color: #222;
    border-radius: 0 0 4px 4px;
    z-index: 2; /* Beyaz tuşların üzerinde görünmesini sağlar */
}

/* Aktif (seçili) tuşların stili */
.key.active {
    background-color: #f1c40f;
    border-color: #f39c12;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

/* Genel düğme stilleri */
button {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

/* Cevap seçeneklerinin olduğu alan */
#options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Cevap düğmelerinin stili */
.option-btn {
    background-color: #95a5a6;
    color: #2c3e50;
}

.option-btn:hover {
    background-color: #7f8c8d;
}

/* Cevap verildikten sonra pasif olan düğmelerin stili */
.option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Doğru/Yanlış geri bildirim mesajının alanı */
#feedback {
    font-size: 1.5rem;
    font-weight: 700;
    height: 30px; /* İçerik yokken bile yer kaplayarak zıplamayı önler */
    margin-bottom: 15px;
}

.correct {
    color: #2ecc71; /* Doğru mesajı için yeşil renk */
}

.incorrect {
    color: #e74c3c; /* Yanlış mesajı için kırmızı renk */
}

/* "Sonraki Soru" düğmesi */
#next-question-btn {
    background-color: #f1c40f;
    color: #2c3e50;
    width: 80%;
}

#next-question-btn:hover {
    background-color: #f39c12;
}

/* Bir elemanı gizlemek için kullanılan yardımcı sınıf */
.hidden {
    display: none;
}

/* Sayfanın en altındaki bilgi bölümü */
footer {
    position: absolute;
    bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #bdc3c7;
}

footer a {
    color: #ecf0f1;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}