body {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

#start-screen {
    background-color: #34495e;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

h1 {
    font-size: 3em;
    margin-bottom: 20px;
    color: #ecf0f1;
}

.instructions {
    margin-bottom: 30px;
    background-color: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 10px;
}

#start-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#start-button:hover {
    background-color: #c0392b;
}

.hidden {
    display: none;
}

#game-container {
    width: 100%;
    max-width: 600px; /* 게임 화면의 최대 너비 */
    margin: auto;
}

#game-info {
    display: flex;
    justify-content: space-between;
    font-size: 1.5em;
    padding: 10px;
    background-color: rgba(0,0,0,0.3);
    border-radius: 5px;
    margin-bottom: 10px;
}

#play-area {
    display: flex;
    height: 80vh; /* 화면 높이의 80% */
    background-color: #222;
    border: 2px solid #fff;
    border-radius: 10px;
    position: relative; /* 노트를 위치시키기 위해 필요 */
    overflow: hidden; /* 노트가 밖으로 나가지 않도록 */
}

.lane {
    flex: 1;
    border-left: 1px solid #555;
    position: relative; /* 리셉터를 위치시키기 위해 */
}

.lane:first-child {
    border-left: none;
}

.receptor {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 50px;
    background-color: rgba(255,255,255,0.1);
    border: 2px solid #fff;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    transition: background-color 0.05s; /* 빠르게 반응하도록 설정 */
}

/* 키를 눌렀을 때 리셉터가 빛나는 효과 */
.receptor.active {
    background-color: #e74c3c;
    box-shadow: 0 0 15px #e74c3c;
}

#judgment-text {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4em;
    font-weight: bold;
    color: white;
    text-shadow: 3px 3px 5px rgba(0,0,0,0.5);
    opacity: 0;
    animation-duration: 0.5s;
    animation-timing-function: ease-out;
    pointer-events: none; /* 텍스트가 클릭을 방해하지 않도록 */
}

@keyframes judgment-animation {
    0% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.judged {
    animation-name: judgment-animation;
    animation-fill-mode: forwards;
}

#result-screen {
    display: none; /* JS로 제어하기 전까지 숨김 */
    background-color: #34495e;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    text-align: center;
}

#result-screen h2 {
    font-size: 2.5em;
    color: #ecf0f1;
}

#result-screen p {
    font-size: 1.5em;
}

#restart-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

#restart-button:hover {
    background-color: #2980b9;
}

/* 노트의 기본 스타일 (나중에 JS로 생성) */
.note {
    position: absolute;
    width: 80%;
    height: 25px;
    background-color: #3498db;
    border-radius: 3px;
    left: 50%;
    transform: translateX(-50%);
    top: -30px; /* 화면 위에서 시작 */
}

.note.long {
    background: linear-gradient(to top, #9b59b6, #c389d7);
    border: 2px solid #fff;
}
