/* player.html から分離したスタイル */
/* 表示を変えないため、元の <style> ブロックの順番を維持しています。 */

/* ===== Style block 1 ===== */
/* 曲変更時の発光 */
.song-change-glow{

    animation: songChangeFlash 0.5s ease;
}

@keyframes songChangeFlash{

    0%{
        transform: scale(1);

        box-shadow:
            0 0 0px rgba(0,255,204,0);
    }

    50%{
        transform: scale(1.03);

        box-shadow:
            0 0 20px rgba(0,255,204,0.7),
            0 0 40px rgba(0,255,204,0.45),
            0 0 70px rgba(0,255,204,0.3);

        border-color: #00ffcc;
    }

    100%{
        transform: scale(1);

        box-shadow:
            0 0 15px rgba(0,255,204,0.08);
    }
}


    .home-btn {
        display: inline-block;
        color: #00ffcc;
        text-decoration: none;
        border: 1px solid #00ffcc;
        padding: 8px 16px;
        border-radius: 6px;
        font-size: 0.9em;
        font-weight: bold;
        background: rgba(0, 255, 204, 0.05);
        transition: 0.3s;
    }
    .home-btn:hover {
        background: rgba(0, 255, 204, 0.15);
        box-shadow: 0 0 10px rgba(0, 255, 204, 0.4);
        transform: translateY(-1px);
    }

.top-news{
    /* position: sticky; と top: 0; を削除、または static に変更 */
    position: static; 
    z-index: 999;

    background:
        linear-gradient(
            90deg,
            rgba(0,255,204,0.12),
            rgba(0,255,204,0.04)
        );

    border-bottom:
        1px solid rgba(0,255,204,0.25);

    color: var(--accent);

    padding: 12px 20px;

    text-align: center;

    font-size: 0.9em;

    backdrop-filter: blur(8px);

    box-shadow:
        0 0 20px rgba(0,255,204,0.05);

    animation: newsGlow 3s infinite alternate;
}

.top-news a{
    color: white;
    margin-left: 10px;
    text-decoration: none;
    font-weight: bold;
}

.top-news a:hover{
    color: var(--accent);
}

@keyframes newsGlow{

    from{
        box-shadow:
            0 0 10px rgba(0,255,204,0.05);
    }

    to{
        box-shadow:
            0 0 20px rgba(0,255,204,0.15);
    }

}

/* ローディング画面 */
#loadingScreen{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background: rgba(0,0,0,0.85);

    display: none;

    justify-content: center;
    align-items: center;
    flex-direction: column;

    z-index: 99999;

    backdrop-filter: blur(6px);
}

/* クルクル */
.loader{
    width: 70px;
    height: 70px;

    border: 6px solid rgba(255,255,255,0.15);
    border-top: 6px solid #00ffcc;

    border-radius: 50%;

    animation: spin 1s linear infinite;

    margin-bottom: 20px;

    box-shadow: 0 0 20px rgba(0,255,204,0.4);
}

@keyframes spin{
    0%{
        transform: rotate(0deg);
    }
    100%{
        transform: rotate(360deg);
    }
}

#loadingText{
    color: white;
    font-size: 1.1em;
    letter-spacing: 1px;
}

/* 曲選択 */
#songList{

    width: 320px;

    padding: 14px 18px;

    margin: 15px 0;

    border-radius: 14px;

    border: 2px solid rgba(0,255,204,0.35);

    background:
        linear-gradient(
            145deg,
            rgba(20,20,20,0.95),
            rgba(35,35,35,0.95)
        );

    color: white;

    font-size: 1rem;

    font-weight: bold;

    outline: none;

    transition: 0.25s;

    box-shadow:
        0 0 15px rgba(0,255,204,0.08);

    cursor: pointer;

    backdrop-filter: blur(6px);
}

/* ホバー */
#songList:hover{

    border-color: #00ffcc;

    box-shadow:
        0 0 20px rgba(0,255,204,0.25);

    transform: translateY(-2px);
}

/* 押した時 */
#songList:focus{

    border-color: #00ffcc;

    box-shadow:
        0 0 25px rgba(0,255,204,0.4);
}

/* option */
#songList option{

    background: #222;

    color: white;
}

/* 対戦相手のMiss通知 */
#multiplayerStatusArea {
    position: relative;
}

.enemy-miss-notice {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    padding: 5px 9px;
    border: 1px solid rgba(255, 80, 100, 0.75);
    border-radius: 6px;
    background: rgba(70, 0, 10, 0.92);
    color: #ffb3bd;
    font-size: 0.78rem;
    font-weight: bold;
    pointer-events: none;
    opacity: 0;
}

.enemy-miss-notice.is-active {
    animation: enemyMissNotice 0.9s ease-out;
}

#multiplayerStatusArea.enemy-miss-highlight {
    animation: enemyMissHighlight 0.9s ease-out;
}

#enemyComboText.enemy-miss-shake {
    animation: enemyMissShake 0.35s ease-out;
}

@keyframes enemyMissNotice {
    0% { opacity: 0; transform: translateY(-50%) scale(0.94); }
    18% { opacity: 1; transform: translateY(-50%) scale(1); }
    72% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-56%) scale(1); }
}

@keyframes enemyMissHighlight {
    0%, 100% { border-color: #ff007f; }
    35% { border-color: #ff5064; box-shadow: 0 0 12px rgba(255, 80, 100, 0.45); }
}

@keyframes enemyMissShake {
    0%, 100% { transform: translateX(0); color: #00ffcc; }
    30% { transform: translateX(-4px); color: #ff7385; }
    60% { transform: translateX(4px); color: #ff7385; }
}

@media (prefers-reduced-motion: reduce) {
    .enemy-miss-notice.is-active,
    #multiplayerStatusArea.enemy-miss-highlight,
    #enemyComboText.enemy-miss-shake {
        animation-duration: 0.2s;
    }

    #enemyComboText.enemy-miss-shake {
        transform: none;
    }
}

.player-title-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: bold;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255,255,255,0.18);
}

.title-beginner {
    background: rgba(180, 180, 180, 0.12);
    color: #dddddd;
    border-color: rgba(180, 180, 180, 0.35);
}

.title-active {
    background: rgba(0, 255, 204, 0.12);
    color: #00ffcc;
    border-color: rgba(0, 255, 204, 0.35);
}

.title-advanced {
    background: rgba(80, 160, 255, 0.14);
    color: #8cc6ff;
    border-color: rgba(80, 160, 255, 0.42);
}

.title-master {
    background: rgba(255, 204, 0, 0.16);
    color: #ffdd55;
    border-color: rgba(255, 204, 0, 0.45);
}

.rank-item.title-active,
.rank-item.title-advanced,
.rank-item.title-master {
    border-left-width: 4px;
}

/* ===== Style block 2 ===== */
/* モーダル背景 */
.tutorial-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
}

/* チュートリアルウィンドウ */
.tutorial-box {
    width: 90%;
    max-width: 500px;
    background: #0d0d0d;
    color: white;
    padding: 35px 30px;
    border-radius: 16px;
    text-align: center;
    border: 2px solid #00ffcc;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
    font-family: sans-serif;
}

.tutorial-box h2 {
    color: #00ffcc;
    margin-bottom: 25px;
    font-size: 22px;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.4);
}

/* コンテンツエリア */
.tutorial-step {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tutorial-step h3 {
    color: #00ffcc;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.tutorial-step p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* ハイライトテキスト用 */
.tutorial-step strong {
    color: #ffff00;
}

/* ボタンエリア */
.tutorial-buttons {
    margin-top: 25px;
}

.tutorial-buttons button {
    background: #00ffcc;
    color: #0d0d0d;
    border: none;
    padding: 12px 26px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    margin: 5px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.tutorial-buttons button:hover {
    background: #ffffff;
    box-shadow: 0 0 15px #00ffcc, 0 0 30px #00ffcc;
    transform: scale(1.05);
}

/* ゲームを始めるボタン */
#closeBtn {
    background: #ff007f;
    color: white;
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.3);
}

#closeBtn:hover {
    background: #ffffff;
    color: #ff007f;
    box-shadow: 0 0 15px #ff007f, 0 0 30px #ff007f;
}

/* クラス「searching」がついている時だけドットを動かす */
#matchStatusText.searching::after {
    content: "";
    animation: dotAnimation 2s infinite;
}

@keyframes dotAnimation {
    0%   { content: ""; }
    25%  { content: "."; }
    50%  { content: ".."; }
    75%  { content: "..."; }
    100% { content: ""; }
}
