body {
    margin: 0;
    background-color: #f0f0f0;
    font-family: sans-serif;
}

/* --- Game Start Menu Styles --- */
#gameStartMenu {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(240, 240, 240, 0.9);
    z-index: 10;
}

#gameStartMenu h1 {
    font-size: 5rem;
    margin-bottom: 2rem;
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: bold;
    color: #333;
}

#gameStartButton {
    font-size: 1.5rem;
    padding: 1rem 2.5rem;
    cursor: pointer;
    border: 2px solid #333;
    background-color: white;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 1px;
}

#gameStartButton:hover {
    background-color: #333;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.back-button {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: #555;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.back-button:hover {
    background-color: #ddd;
}

/* --- Main Layout Styles --- */
#gameItselfContainer {
    width: 100%;
    height: 100vh;
    display: block;
}

.page-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.game-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center game elements vertically */
    height: 100%;
    margin: 0 40px; /* Add margin to both sides of the game column */
}

.info-column {
    margin-right: 40px;
    width: 250px;
    min-width: 250px;
    padding: 20px;
    border: 2px solid #333;
    background-color: #fff;
    border-radius: 8px;
    align-self: center; /* Center vertically in the flex container */
}

.info-column h2 {
    text-align: center;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

#info-content p {
    font-size: 0.9em;
    padding: 6px 5px;
    border-bottom: 1px solid #eee;
    margin: 0;
}

#info-content p:last-child {
    border-bottom: none;
}

.ranking-column {
    margin-left: 40px;
    width: 250px;
    min-width: 250px;
    padding: 20px;
    border: 2px solid #333;
    background-color: #fff;
    border-radius: 8px;
    align-self: center; /* Center vertically in the flex container */
}

.ranking-column h2 {
    text-align: center;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

#ranking-list {
    list-style-type: decimal;
    padding-left: 20px;
    margin: 0;
}

#ranking-list li {
    font-size: 1.1em;
    padding: 8px 5px;
    border-bottom: 1px solid #eee;
}

#ranking-list li:first-child {
    font-weight: bold;
    color: #d9534f;
}


/* --- Game Header Styles --- */
#game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 560px; /* Match piano width */
    margin-bottom: 20px; /* Space between header and piano */
}

#stageDisplay, #scoreDisplay {
    margin: 0; /* Remove default h2 margin */
    font-size: 1.5rem;
    color: #333;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between "Volume" and the slider */
}

.volume-container span {
    font-size: 1rem;
    color: #555;
    font-weight: 500;
}

#volumeSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 8px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
    border-radius: 4px;
}

#volumeSlider:hover {
    opacity: 1;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #555;
    cursor: pointer;
    border-radius: 50%;
}

#volumeSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #555;
    cursor: pointer;
    border-radius: 50%;
}

/* --- Piano Styles --- */
#piano {
    display: flex;
    height: 300px;
}

.key {
    border: 1px solid #333;
    box-sizing: border-box;
    cursor: pointer;
}

.key.white {
    width: 80px;
    height: 100%;
    background-color: white;
    position: relative;
}

.key.white.key-active {
    background-color: #eee;
}

.key.black {
    width: 50px;
    height: 60%;
    background-color: #222;
    position: absolute;
    top: 0;
    left: 55px; /* 흰 건반 너비(80px) - (검은 건반 너비(50px)/2) = 55px 근처 */
    z-index: 2;
}

.key.black.key-active {
    background-color: #444;
}
.replay-button {
    margin-top: 40px;
    padding: 15px 35px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #444;
    background-color: #f0f0f0;
    color: #333;
    border-radius: 40px;
    transition: all 0.2s ease;
}

.replay-button:hover {
    background-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.home-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #888;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.home-button:hover {
    background-color: #555;
}
