body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(to right, #ece9e6, #ffffff);
    margin: 0;
    color: #333;
}

.container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* align-items: center; satırını buradan kaldırdık! */
    
    background-color: #fcfcfc;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    text-align: center; /* Bu hala metinleri ortalamaya devam eder */
    max-width: 650px;
    width: 100%;
    border: 1px solid #e0e0e0;
    margin: 20px auto; /* Container'ı yatayda ortala ve üst/alttan boşluk ver */
}

h1 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 2.2em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.instructions {
    font-size: 1.15em;
    margin-bottom: 25px;
    color: #555;
}

.question-area {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#question {
    font-size: 1.8em;
    font-weight: bold;
    color: #3f51b5;
    letter-spacing: 0.5px;
}

#current-note-display {
    color: #FF5722;
    font-size: 1.1em;
}

#check-answer-button {
    padding: 12px 30px;
    font-size: 1.2em;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
}

#check-answer-button:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(33, 150, 243, 0.4);
}

#check-answer-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(33, 150, 243, 0.2);
}

#piano {
    display: flex;
    position: relative;
    height: 220px;
    background-color: #3f51b5;
    border-radius: 10px;
    padding: 12px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4), 0 5px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    /* Piyano kutusunu container içinde ortalamak için ekledik */
    margin: 0 auto; 
}

.key {
    height: 100%;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    transition: background-color 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
    border-radius: 0 0 7px 7px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 5px;
    font-size: 0.8em;
    user-select: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.white-key {
    width: 50px;
    background: linear-gradient(to bottom, #ffffff, #f0f0f0);
    border: 1px solid #c0c0c0;
    border-right: none;
    z-index: 1;
}

.white-key:last-of-type {
    border-right: 1px solid #c0c0c0;
}

.black-key {
    width: 30px;
    height: 65%;
    background: linear-gradient(to bottom, #222, #000);
    position: absolute;
    border-radius: 0 0 5px 5px;
    border: 1px solid #111;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* Siyah tuşların beyaz tuşlara göre senin belirlediğin konumlandırması */
.black-key[data-note="C#4"] { left: calc(60px - 15px); } 
.black-key[data-note="D#4"] { left: calc(55px * 2 - 15px); } 
.black-key[data-note="F#4"] { left: calc(53px * 4 - 15px); } 
.black-key[data-note="G#4"] { left: calc(52px * 5 - 15px); } 
.black-key[data-note="A#4"] { left: calc(52px * 6 - 15px); } 

.key:active, .key.selected {
    transform: translateY(3px);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.white-key:active, .white-key.selected {
    background: linear-gradient(to bottom, #e8e8e8, #d0d0d0);
}

.black-key:active, .black-key.selected {
    background: linear-gradient(to bottom, #333, #111);
}

.feedback {
    margin-top: 25px;
    font-size: 1.3em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.feedback.correct {
    color: #4CAF50;
}

.feedback.wrong {
    color: #F44336;
}

/* FOOTER KISMI İÇİN CSS */
.footer {
    margin-top: 40px;
    font-size: 0.9em;
    color: #777;
    text-align: center;
    padding-bottom: 20px;
    width: 100%;
}

.footer a {
    color: #2196F3;
    text-decoration: none;
    font-weight: bold;
}

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

/* Küçük ekranlar için düzenleme */
@media (max-width: 768px) {
    #piano {
        height: 160px;
        padding: 8px;
        margin: 0 auto; /* Mobil ekranda da piyano ortalansın */
    }
    .white-key {
        width: 40px;
    }
    .black-key {
        width: 25px;
    }
    /* Siyah tuşların mobil konumlandırması */
    .black-key[data-note="C#4"] { left: calc(40px - 12.5px); } 
    .black-key[data-note="D#4"] { left: calc(40px * 2 - 12.5px); } 
    .black-key[data-note="F#4"] { left: calc(40px * 4 - 12.5px); } 
    .black-key[data-note="G#4"] { left: calc(40px * 5 - 12.5px); } 
    .black-key[data-note="A#4"] { left: calc(40px * 6 - 12.5px); }

    .container {
        padding: 25px;
        margin: 15px auto; /* Mobil için de container'ı ortala ve boşluk ver */
    }
    h1 {
        font-size: 2em;
    }
    .instructions {
        font-size: 1.05em;
    }
    #question {
        font-size: 1.5em;
    }
    #check-answer-button {
        padding: 10px 25px;
        font-size: 1.1em;
    }
    .footer {
        margin-top: 20px;
        padding-bottom: 10px;
    }
}