/* Genel Sayfa Ayarları */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Daha modern bir font */
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(to right, #ece9e6, #ffffff); /* Hafif gradyan arka plan */
    margin: 0; /* Kenar boşluğunu sıfırla */
    padding: 20px;
    min-height: 100vh;
    box-sizing: border-box; /* Padding ve border'ın genişliğe dahil edilmesini sağlar */
}

h1 {
    color: #2c3e50; /* Koyu lacivert başlık rengi */
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 2.8em; /* Başlık boyutunu büyüt */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* Hafif gölge */
}

h2 {
    color: #34495e; /* Daha koyu gri başlık rengi */
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 3px solid #7f8c8d; /* Kalın alt çizgi */
    padding-bottom: 12px;
    font-size: 2em;
    font-weight: 600; /* Kalınlık */
}

/* Enstrüman Bölümleri */
.instrument-section {
    background-color: #ffffff;
    border-radius: 15px; /* Köşeleri daha fazla yuvarla */
    padding: 30px;
    margin-bottom: 35px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); /* Daha belirgin gölge */
    width: 90%; /* Genişliği biraz artır */
    max-width: 1000px; /* Maksimum genişliği artır */
    text-align: center;
    transition: all 0.3s ease-in-out; /* Geçiş efekti */
}

.instrument-section:hover {
    transform: translateY(-5px); /* Üzerine gelince hafifçe yukarı kaydır */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); /* Gölgeyi daha belirgin yap */
}

.instrument-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px; /* Düğmeler arası boşluğu artır */
    padding: 10px 0;
}

/* Enstrüman Düğmeleri (Padler) */
.pad {
    width: 160px; /* Genişlik */
    height: 160px; /* Yükseklik */
    border: none;
    border-radius: 20px; /* Köşeleri daha fazla yuvarla */
    font-size: 2em; /* Yazı boyutunu büyüt */
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; /* Animasyon geçişi hızını ayarla */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    user-select: none;
    outline: none; /* Odaklandığında çıkan çerçeveyi kaldır */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Düğme gölgesi */
}

.pad:active {
    transform: scale(0.92); /* Tıklandığında daha belirgin küçülme */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Animasyon Sınıfı */
.pad.playing {
    animation: pulse 0.4s ease-out forwards; /* Animasyon süresini ayarla */
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.9), 0 0 40px rgba(255, 255, 255, 0.7), 0 0 60px rgba(255, 255, 255, 0.5); /* Daha yoğun parlama */
}

/* Animasyon Tanımı */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08); /* Daha fazla büyüme */
        opacity: 0.95;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Klavye Düğmelerinin Renkleri */
.keyboard-key:nth-child(1) { background-color: #e74c3c; } /* Kırmızı */
.keyboard-key:nth-child(2) { background-color: #e67e22; } /* Turuncu */
.keyboard-key:nth-child(3) { background-color: #2ecc71; } /* Zümrüt Yeşili */
.keyboard-key:nth-child(4) { background-color: #3498db; } /* Mavi */
.keyboard-key:nth-child(5) { background-color: #9b59b6; } /* Mor */

/* Davul Düğmelerinin Renkleri */
.drum-pad:nth-child(1) { background-color: #c0392b; } /* Daha koyu kırmızı */
.drum-pad:nth-child(2) { background-color: #1abc9c; } /* Turkuaz */
.drum-pad:nth-child(3) { background-color: #f1c40f; } /* Sarı */

/* Perküsyon Düğmelerinin Renkleri */
.percussion-pad:nth-child(1) { background-color: #27ae60; } /* Koyu yeşil */
.percussion-pad:nth-child(2) { background-color: #e84393; } /* Pembe */
.percussion-pad:nth-child(3) { background-color: #0984e3; } /* Koyu mavi */

/* Hayvan ve Doğa Sesleri Düğmelerinin Renkleri */
.nature-animal-pad:nth-child(1) { background-color: #fdcb6e; } /* Hardal sarısı */
.nature-animal-pad:nth-child(2) { background-color: #74b9ff; } /* Bebek mavisi */
.nature-animal-pad:nth-child(3) { background-color: #a29bfe; } /* Açık mor */
.nature-animal-pad:nth-child(4) { background-color: #00b894; } /* Deniz yeşili */
.nature-animal-pad:nth-child(5) { background-color: #ff7675; } /* Mercan kırmızısı */

/* Ayırıcı Çizgi */
hr {
    border: 0;
    height: 3px; /* Daha kalın çizgi */
    background: linear-gradient(to right, rgba(0, 0, 0, 0), #bdc3c7, rgba(0, 0, 0, 0)); /* Daha belirgin gradyan */
    width: 80%;
    margin: 50px auto; /* Boşluğu artır */
}

/* Alt Bilgi (Footer) Bölümü */
.footer-info {
    margin-top: 50px;
    margin-bottom: 30px; /* Alttan boşluğu artır */
    text-align: center;
    font-size: 1.1em;
    color: #555; /* Daha koyu metin rengi */
    padding: 15px; /* İç boşluğu artır */
    background-color: #f5f6fa; /* Çok açık gri arka plan */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 900px;
    line-height: 1.6; /* Satır aralığını artır */
}

.footer-info p {
    margin: 8px 0;
}

.footer-info a {
    color: #2980b9; /* Daha koyu mavi link */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease-in-out; /* Renk geçiş efekti */
}

.footer-info a:hover {
    color: #3498db; /* Üzerine gelince daha açık mavi */
    text-decoration: underline;
}

/* Eşleştirme Oyunu Stilleri */
.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#current-image {
    border: 5px solid #bdc3c7; /* Resme kenarlık ekle */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s ease-in-out;
}

#current-image.correct-answer {
    border-color: #2ecc71; /* Doğru cevapta yeşil kenarlık */
    transform: scale(1.02); /* Hafif büyüme */
}
#current-image.wrong-answer {
    border-color: #e74c3c; /* Yanlış cevapta kırmızı kenarlık */
    transform: translateX(5px) rotate(2deg); /* Hafif sallanma efekti */
}

#game-instruction {
    font-size: 1.4em;
    color: #34495e;
    margin: 25px 0;
    font-weight: 600;
}

.matching-options-container .pad {
    width: 140px; /* Eşleştirme oyunu düğmelerini biraz küçült */
    height: 140px;
    font-size: 1.6em;
}

/* Eşleştirme Oyunu Düğmeleri Renkleri */
.matching-pad:nth-child(1) { background-color: #FF5733; } /* Kırmızımsı Turuncu */
.matching-pad:nth-child(2) { background-color: #33FF57; } /* Parlak Yeşil */
.matching-pad:nth-child(3) { background-color: #3357FF; } /* Mavi */
/* .matching-pad için özel renkler, JavaScript ile değiştirilecek */

.action-button {
    margin-top: 30px;
    padding: 12px 25px;
    font-size: 1.3em;
    background-color: #28a745; /* Yeşil */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: none; /* Başlangıçta gizli */
}

.action-button:hover {
    background-color: #218838; /* Koyu yeşil */
    transform: translateY(-2px);
}
.action-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}


/* Duyarlı Tasarım (Responsive Design) */
@media (max-width: 992px) {
    h1 {
        font-size: 2.4em;
    }
    h2 {
        font-size: 1.8em;
    }
    .instrument-section, .footer-info {
        width: 95%;
        padding: 25px;
    }
    .pad {
        width: 140px;
        height: 140px;
        font-size: 1.7em;
    }
    .matching-options-container .pad {
        width: 120px;
        height: 120px;
        font-size: 1.4em;
    }
    #current-image {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2em;
        letter-spacing: 2px;
    }
    h2 {
        font-size: 1.6em;
        padding-bottom: 8px;
    }
    .instrument-section {
        padding: 20px;
    }
    .instrument-container {
        gap: 15px;
    }
    .pad {
        width: 120px;
        height: 120px;
        font-size: 1.5em;
        border-radius: 15px;
    }
    .matching-options-container .pad {
        width: 100px;
        height: 100px;
        font-size: 1.2em;
    }
    #current-image {
        width: 150px;
        height: 150px;
    }
    .footer-info {
        font-size: 1em;
        padding: 12px;
    }
    .action-button {
        font-size: 1.1em;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }
    h2 {
        font-size: 1.4em;
        margin-top: 30px;
    }
    .instrument-section {
        padding: 15px;
        margin-bottom: 25px;
    }
    .instrument-container {
        gap: 10px;
    }
    .pad {
        width: 100px;
        height: 100px;
        font-size: 1.2em;
        border-radius: 12px;
    }
    .matching-options-container .pad {
        width: 80px;
        height: 80px;
        font-size: 1em;
    }
    #current-image {
        width: 120px;
        height: 120px;
    }
    .footer-info {
        font-size: 0.9em;
        padding: 10px;
    }
    hr {
        margin: 30px auto;
        width: 90%;
    }
}