    body {
            margin: 0;
            padding: 0;
            background: radial-gradient(circle at center, #0c0c1e 0%, #030308 100%);
            color: #00ffff;
            font-family: 'Courier New', Courier, monospace;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            overflow-y: auto;
            letter-spacing: 1px;
        }

        body::before {
            content: " ";
            display: block;
            position: absolute;
            top: 0; left: 0; bottom: 0; right: 0;
            background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
                        linear-gradient(90deg, rgba(255, 0, 0, 0.06),
                        rgba(0, 255, 0, 0.02),
                        rgba(0, 0, 255, 0.06));
            z-index: 0;
            pointer-events: none;
        }

        h1 {
            margin: 0 0 15px 0;
            font-size: 1.8rem;
            text-align: center;
            letter-spacing: 1px;
            color: #fff;
            text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 40px #00ffff;
            animation: glitch 3s infinite;
        }

        @keyframes glitch {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.95; transform: scale(0.99); }
            93% { opacity: 0.8; }
            95% { opacity: 1; }
        }
        

        #game-wrapper {
            width: 90vw;
            max-width: 500px;
            height: 90vw;
            max-height: 500px;
            position: relative;
            border: 3px solid #00ffff;
            border-radius: 8px;
            box-shadow: 0 0 30px rgba(0, 255, 255, 0.2), inset 0 0 20px rgba(0, 255, 255, 0.2);
            background-color: #050510;
        }

        canvas {
            width: 100%;
            height: 100%;
            background-color: #020208;
            display: block;
        }

        .overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            background: rgba(4, 4, 12, 0.92);
            backdrop-filter: blur(4px);
            text-align: center;
            padding: 10px;
            box-sizing: border-box;
            border-radius: 5px;
            user-select: none;
            z-index: 1000;
        }
        #name-input-screen input,
        #name-input-screen button {
            position: relative;
            z-index: 1001;
        }

        .overlay p {
            margin: 8px 0;
            line-height: 1.5;
            font-size: 0.9rem;
            text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
        }
        .ranking {
            background: rgba(255, 0, 127, 0.03);
            border: 1px solid #ff007f;
            color: #ff007f;
            border-radius: 4px;
            padding: 9px 24px;
            font-size: 0.95rem;
            cursor: pointer;
            font-weight: bold;
            letter-spacing: 2px;
            transition: all 0.2s ease;
            box-shadow: 0 0 6px rgba(255, 0, 127, 0.2);
            touch-action: manipulation;
            user-select: none;
        }

        .ranking:hover {
            background: rgba(255, 0, 127, 0.12);
            box-shadow: 0 0 14px rgba(255, 0, 127, 0.5);
        }
        .btn {
            background: rgba(255, 0, 127, 0.05);
            border: 2px solid #ff007f;
            color: #ff007f;
            border-radius: 4px;
            padding: 12px 30px;
            font-size: 1.1rem;
            cursor: pointer;
            margin-top: 7px;
            font-weight: bold;
            letter-spacing: 2px;
            transition: all 0.2s ease;
            box-shadow: 0 0 10px rgba(255, 0, 127, 0.3);
            touch-action: manipulation;
            user-select: none;
        }
        .btn:hover {
            background: #ff007f;
            color: #000;
            box-shadow: 0 0 25px #ff007f;
            transform: translateY(-2px);
        }
        .btn:active {
            transform: translateY(1px);
        }
        .button-row{
            display: flex;
            justify-content: center;
            gap:10px;
        }
        .bgm {
            display: flex;
            justify-content: center;
            border: none;
            border-radius: 20px;
            padding: 10px 20px;
            color: rgb(231, 225, 63);
            background: skyblue;
            cursor: pointer;
        }
        #name-input-screen {
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 15px;
            text-align: center;
        }

        #name-input-screen input {
            width: 220px;
            padding: 12px;
            box-sizing: border-box;

            background: rgba(0, 0, 0, 0.7);
            border: 2px solid #00ffff;
            border-radius: 4px;

            color: #00ffff;
            font-size: 1rem;
            text-align: center;

            outline: none;
        }

        #name-input-screen input::placeholder {
            color: #777;
        }

        #name-input-screen input:focus {
            box-shadow: 0 0 12px rgba(0, 255, 255, 0.5);
        }

        #confirmNameBtn {
            margin-top: 5px;
        }
        #ranking-screen {
            position: fixed;
            inset: 0;
            z-index: 1000;

            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;

            background: rgba(5, 5, 16, 0.97);
            color: white;
        }

        #ranking-screen .ranking-title {
            margin-bottom: 20px;
        }

        #global-ranking-list {
            width: min(90%, 600px);
            max-height: 70vh;
            overflow-y: auto;
        }
        .global-ranking-list {
            max-height: 70vh;
            
        }
        #secretModeButton {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 18px;
    height: 18px;

    padding: 0;
    margin: 0;

    background: transparent;
    border: 1px solid transparent;

    cursor: pointer;
    z-index: 10;
    background: rgba(255, 0, 255, 0.015);
    border: 1px solid rgba(255, 0, 255, 0.08);
    border-radius: 20px;
}
        #ranking-screen #ranking-back-btn {
            margin-top: 20px;
        }

        #mode-text {
            color: #ffcc00;
            font-weight: bold;
            font-size: 1.05rem;
            text-shadow: 0 0 10px #ff9900;
            display: inline-block;
            white-space: nowrap;
        }
        .my-global-score {
            width: min(90%, 600px);
            text-align: center;
            margin-bottom: 20px;
        }

        .my-global-title {
            font-size: 1.2rem;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .my-global-ranking {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 15px;
            border: 1px solid #33ff33;
            background: rgba(51, 255, 51, 0.08);
        }

        .ranking-box {
            margin: 15px 0;
            background: rgba(0, 255, 255, 0.03);
            border: 1px solid rgba(0, 255, 255, 0.3);
            border-radius: 4px;
            padding: 12px 20px;
            width: 85%;
            text-align: left;
            font-size: 0.9rem;
            box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.1);
        }
        .ranking-title {
            color: #ffcc00;
            text-align: center;
            margin: 0 0 8px 0;
            font-weight: bold;
            font-size: 1rem;
            letter-spacing: 3px;
            text-shadow: 0 0 8px rgba(255, 204, 0, 0.6);
        }
        .ranking-item {
            display: flex;
            justify-content: space-between;
            margin: 5px 0;
            color: #00ffff;
            text-shadow: 0 0 4px rgba(0, 255, 255, 0.4);
        }
.ranking-item:nth-child(1) {
    color: #ffbf00;
    font-weight: bold;
    text-shadow:
        0 0 4px #ff8c00,
        0 0 8px rgba(255, 191, 0, 0.8),
        0 0 14px rgba(255, 165, 0, 0.5);
}

.ranking-item:nth-child(2) {
    color: #d9d9d9;
    font-weight: bold;
    text-shadow:
        0 0 4px #999,
        0 0 8px rgba(217, 217, 217, 0.8),
        0 0 14px rgba(192, 192, 192, 0.5);
}

.ranking-item:nth-child(3) {
    color: #cd7f32;
    font-weight: bold;
    text-shadow:
        0 0 4px #8b4513,
        0 0 8px rgba(205, 127, 50, 0.8),
        0 0 14px rgba(184, 115, 51, 0.5);
}

        @media (max-width: 768px) {
            h1 { font-size: 1.3rem; letter-spacing: 2px; white-space: nowrap; }
            .overlay { padding: 12px; }
            .overlay p { font-size: 0.8rem; }
            #mode-text { font-size: 0.9rem; white-space: normal; }
            .ranking-box { width: 95%; padding: 8px; }
        }
        .mission-title {
            color: #00ffff;
            font-weight: bold;
            font-size: 1.1rem;
            border-bottom: 1px solid #00ffff;
            padding-bottom: 5px;
            width: 100%;
        }
        @media (max-width: 768px) {
            .mission-title { font-size: 0.9rem; }
        }

        /* 💡 自動カウントダウン用追加スタイル */
        #countdown-screen {
            background: rgba(2, 2, 8, 0.95);
            color: #33ff33;
            font-weight: bold;
        }
        .count-num {
            font-size: 3rem;
            color: #fff;
            text-shadow: 0 0 15px #33ff33;
            margin: 15px 0;
        }
@media (max-width: 768px) {
    .overlay {
        padding: 8px;
    }

    .overlay p {
        font-size: 0.75rem;
        margin: 2px 0;
    }

    .ranking-box {
        width: 92%;
        padding: 7px;
        margin: 5px 0;
    }

    .ranking-item {
        margin:4px 0;
        font-size: 0.8rem;
    }

    .button-row {
        gap: 6px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
    #game-wrapper {
    width: 94vw;
    height: 115vw;
    }
}