* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', 'メイリオ', Meiryo, 'ＭＳ Ｐゴシック', sans-serif;
}

body {
    background-color: #0a0a14;  /* より濃いダークブルー系の背景 */
    color: #e0e0ff;  /* 白を少し青みがかった色に変更して目に優しく */
    overflow: hidden;
    background-image: linear-gradient(to bottom, rgba(15, 15, 35, 0.9), rgba(5, 5, 20, 1));
}

#game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

.screen {
    width: 100%;
    max-width: 1000px;
    height: 100%;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    overflow-y: auto;
}

.hidden {
    display: none;
}

h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #00eeff;  /* ネオンブルー */
    text-shadow: 0 0 10px rgba(0, 238, 255, 0.7), 0 0 20px rgba(0, 238, 255, 0.4), 0 0 30px rgba(0, 238, 255, 0.2);
    animation: pulsate 1.5s infinite alternate;
    letter-spacing: 2px;
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff2a6d;  /* ピンク系のネオンカラー */
    text-shadow: 0 0 10px rgba(255, 42, 109, 0.7), 0 0 15px rgba(255, 42, 109, 0.4);
    letter-spacing: 1px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    button {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

button {
    background-color: rgba(0, 198, 255, 0.8);  /* 透明感のあるネオンブルー */
    color: #ffffff;
    border: 2px solid #05d9ff;
    padding: 12px 24px;
    margin: 10px;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 10px rgba(0, 218, 255, 0.5), inset 0 0 5px rgba(255, 255, 255, 0.3);
    font-weight: bold;
    letter-spacing: 1px;
}

button:hover {
    background-color: rgba(0, 218, 255, 0.9);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 218, 255, 0.8), inset 0 0 8px rgba(255, 255, 255, 0.5);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

button:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 238, 255, 0.5), 0 0 15px rgba(0, 218, 255, 0.8);
}

.back-button {
    background-color: rgba(80, 80, 100, 0.8);
    border-color: #7a7a9d;
    margin-top: 20px;
    box-shadow: 0 0 10px rgba(80, 80, 100, 0.5);
}

.back-button:hover {
    background-color: rgba(100, 100, 140, 0.9);
    box-shadow: 0 0 15px rgba(100, 100, 140, 0.8);
}

/* 曲選択画面 */
#song-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

@media (max-width: 768px) {
    #song-list {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        max-height: 50vh;
        gap: 15px;
    }
    
    .song-title {
        font-size: 1.1rem;
    }
    
    .song-genre, .song-description {
        font-size: 0.85rem;
    }
    
    .difficulty-button {
        width: 160px;
        font-size: 1.2rem;
    }
}

.song-item {
    background-color: rgba(20, 20, 40, 0.7);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(0, 200, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.song-item:hover {
    background-color: rgba(30, 30, 60, 0.8);
    transform: translateY(-5px);
    border-color: rgba(0, 210, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}

.song-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(5, 217, 255, 0.7);
    font-weight: bold;
}

.song-genre {
    font-size: 1rem;
    color: #e0e0ff;
    margin-bottom: 8px;
}

.song-bpm {
    font-size: 0.85rem;
    color: #b0b0ff;
    opacity: 0.9;
    font-style: italic;
}

.song-description {
    font-size: 0.9rem;
    color: #ccccff;
    line-height: 1.4;
}

/* 難易度選択画面 */
.difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.difficulty-button {
    width: 200px;
    font-size: 1.5rem;
}

#easy-button {
    background-color: rgba(20, 200, 120, 0.8);
    border-color: rgba(20, 220, 120, 0.5);
    box-shadow: 0 0 10px rgba(20, 200, 120, 0.5);
}

#easy-button:hover {
    background-color: rgba(20, 220, 120, 0.9);
    box-shadow: 0 0 15px rgba(20, 220, 120, 0.8);
}

#normal-button {
    background-color: rgba(0, 150, 255, 0.8);
    border-color: rgba(0, 170, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.5);
}

#normal-button:hover {
    background-color: rgba(0, 170, 255, 0.9);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.8);
}

#hard-button {
    background-color: rgba(255, 42, 109, 0.8);
    border-color: rgba(255, 62, 129, 0.5);
    box-shadow: 0 0 10px rgba(255, 42, 109, 0.5);
}

#hard-button:hover {
    background-color: rgba(255, 62, 129, 0.9);
    box-shadow: 0 0 15px rgba(255, 62, 129, 0.8);
}

#difficulty-description {
    height: 60px;
    width: 80%;
    padding: 10px;
    font-style: italic;
    color: #b0b0ff;
    background-color: rgba(20, 20, 40, 0.4);
    border-radius: 5px;
    border: 1px solid rgba(0, 200, 255, 0.2);
}

/* ゲームプレイ画面 */
#game-play-screen {
    justify-content: flex-start;
    padding-top: 20px;
}

#game-info {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin-bottom: 10px;
    background-color: rgba(10, 10, 30, 0.7);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.3);
    border: 1px solid rgba(0, 200, 255, 0.2);
    padding: 10px 20px;
}

#score-display, #combo-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #05d9ff;
    text-shadow: 0 0 5px rgba(5, 217, 255, 0.7);
}

#health-bar-container {
    width: 300px;
    height: 20px;
    background-color: rgba(40, 40, 60, 0.7);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 200, 255, 0.3);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

#health-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #ff2a6d, #05d9ff);
    transition: width 0.3s;
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
}

#game-area {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    background-color: rgba(10, 10, 25, 0.8);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 200, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.2), inset 0 0 50px rgba(0, 0, 30, 0.5);
}

@media (max-width: 768px) {
    #game-info {
        flex-direction: column;
        gap: 5px;
        align-items: stretch;
    }
    
    #score-display, #combo-display {
        font-size: 1.2rem;
        text-align: center;
    }
    
    #health-bar-container {
        width: 100%;
        max-width: 300px;
        margin: 5px auto;
    }
    
    #game-area {
        height: 50vh;
        min-height: 300px;
    }
    
    .key-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    #judgment-display {
        font-size: 2rem;
    }
    
    #hit-line {
        bottom: 80px;
    }
    
    #key-area {
        bottom: 15px;
    }
}

#note-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.note {
    position: absolute;
    width: 60px;
    height: 20px;
    background: linear-gradient(to right, #ff2a6d, #05d9ff);
    border-radius: 10px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.7), 0 0 20px rgba(255, 42, 109, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

#hit-line {
    position: absolute;
    bottom: 100px;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #ff2a6d, #05d9ff, #ff2a6d);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.8), 0 0 20px rgba(255, 42, 109, 0.5);
}

#key-area {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    height: 60px;
}

.key-button {
    width: 60px;
    height: 60px;
    background-color: rgba(20, 20, 40, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: #fff;
    border: 2px solid rgba(0, 200, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
    font-weight: bold;
    transition: all 0.2s;
}

.key-active {
    background-color: rgba(0, 210, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.8), 0 0 25px rgba(0, 210, 255, 0.4);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: #000;
}

#judgment-display {
    height: 60px;
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.judgment {
    animation: fadeOut 0.5s forwards;
}

.perfect {
    color: #05d9ff;
    text-shadow: 0 0 10px rgba(5, 217, 255, 0.8), 0 0 20px rgba(5, 217, 255, 0.4);
}

.great {
    color: #14f5b3;
    text-shadow: 0 0 10px rgba(20, 245, 179, 0.8), 0 0 20px rgba(20, 245, 179, 0.4);
}

.good {
    color: #ffec44;
    text-shadow: 0 0 10px rgba(255, 236, 68, 0.8), 0 0 20px rgba(255, 236, 68, 0.4);
}

.miss {
    color: #ff2a6d;
    text-shadow: 0 0 10px rgba(255, 42, 109, 0.8), 0 0 20px rgba(255, 42, 109, 0.4);
}

/* リザルト画面 */
#result-screen {
    justify-content: flex-start;
    padding-top: 50px;
}

#result-details {
    background-color: rgba(20, 20, 40, 0.8);
    border-radius: 10px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    margin-bottom: 30px;
    text-align: left;
    border: 1px solid rgba(0, 200, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.2), inset 0 0 50px rgba(10, 10, 30, 0.5);
}

@media (max-width: 768px) {
    #result-screen {
        padding-top: 20px;
    }
    
    #result-details {
        padding: 20px;
        width: 95%;
    }
    
    #result-details p {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    #result-rank {
        font-size: 2.5rem;
    }
}

#result-details p {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #e0e0ff;
    text-shadow: 0 0 5px rgba(0, 200, 255, 0.3);
}

#result-details ul {
    margin-left: 20px;
    margin-bottom: 15px;
    list-style-type: none;
}

#result-details li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

#result-details li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #05d9ff;
    text-shadow: 0 0 5px rgba(5, 217, 255, 0.7);
}

#result-rank {
    font-size: 3rem;
    font-weight: bold;
    color: #05d9ff;
    text-shadow: 0 0 10px rgba(5, 217, 255, 0.8), 0 0 20px rgba(5, 217, 255, 0.4);
    letter-spacing: 2px;
}

/* アニメーション */
@keyframes pulsate {
    0% {
        opacity: 0.7;
        text-shadow: 0 0 10px rgba(0, 238, 255, 0.7), 0 0 20px rgba(0, 238, 255, 0.4);
    }
    100% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(0, 238, 255, 1), 0 0 30px rgba(0, 238, 255, 0.7), 0 0 40px rgba(0, 238, 255, 0.4);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes noteHit {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        box-shadow: 0 0 20px rgba(0, 210, 255, 1), 0 0 40px rgba(0, 210, 255, 0.8);
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
        box-shadow: 0 0 40px rgba(0, 210, 255, 0), 0 0 80px rgba(0, 210, 255, 0);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 10px rgba(0, 210, 255, 0.8), 0 0 20px rgba(255, 42, 109, 0.4);
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 210, 255, 1), 0 0 40px rgba(255, 42, 109, 0.7);
    }
}

.note-hit {
    animation: noteHit 0.3s forwards;
}
