        body {
            font-family: 'Orbitron', sans-serif;
            margin: 0;
            padding: 0;
            overflow: hidden;
            background: #000;
        }

        html {
            background: #000;
        }

        @keyframes pulse-glow {

            0%,
            100% {
                box-shadow: 0 0 2px #67e8f9, 0 0 5px #67e8f9, 0 0 10px #67e8f9;
            }

            50% {
                box-shadow: 0 0 5px #0891b2, 0 0 15px #0891b2, 0 0 25px #0891b2;
            }
        }

        .animated-avatar {
            animation: pulse-glow 3s infinite ease-in-out;
        }

        /* 背景圖片容器 - 16:9 比例 */
        .background-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            overflow: hidden;
            z-index: 0;
        }

        .background-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            display: block;
            min-width: 100%;
            min-height: 100%;
        }

        .background-overlay {
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.3);
            z-index: 1;
        }

        /* 暗角效果 (Vignette) */
        .background-overlay::after {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
            z-index: 2;
            pointer-events: none;
        }

        /* CRT 掃描線效果 */
        .crt-scanlines {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: repeating-linear-gradient(0deg,
                    transparent,
                    transparent 2px,
                    rgba(0, 255, 255, 0.03) 2px,
                    rgba(0, 255, 255, 0.03) 4px);
            z-index: 2110;
            pointer-events: none;
            animation: scanlineMove 8s linear infinite;
        }

        @keyframes scanlineMove {
            0% {
                transform: translateY(0);
            }

            100% {
                transform: translateY(100vh);
            }
        }

        /* 藍/紫色調覆蓋層 */
        .cyberpunk-tint {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg,
                    rgba(103, 232, 249, 0.15) 0%,
                    rgba(139, 92, 246, 0.15) 50%,
                    rgba(59, 130, 246, 0.15) 100%);
            mix-blend-mode: overlay;
            z-index: 2100;
            pointer-events: none;
        }

        /* 粒子系統 Canvas */
        .particle-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 2105;
            pointer-events: none;
        }

        /* 確保背景保持 16:9 比例 */
        @media (aspect-ratio: 16/9) {
            .background-image {
                width: 100%;
                height: 100%;
            }
        }

        @media (min-aspect-ratio: 16/9) {
            .background-image {
                width: 100%;
                height: auto;
            }
        }

        @media (max-aspect-ratio: 16/9) {
            .background-image {
                width: auto;
                height: 100%;
            }
        }

        /* 使用者資訊欄 - 遊戲風格 UI */
        .user-info-bar {
            position: fixed;
            top: 20px;
            left: 0;
            right: 0;
            padding: 10px 64px;
            z-index: 1000;
            background: rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .user-info-bar .container {
            max-width: 100%;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        @media (max-width: 1024px) {
            .user-info-bar {
                padding: 10px 48px;
            }
        }

        /* 手機橫式 (Landscape) */
        @media (max-width: 896px) and (orientation: landscape) {
            .user-info-bar {
                padding: 8px 20px;
                top: 10px;
            }

            .user-info-bar .container {
                gap: 12px;
            }

            .user-info-left {
                gap: 10px;
            }

            .user-avatar {
                width: 40px;
                height: 40px;
            }

            .user-name {
                font-size: 14px;
            }

            .user-title {
                font-size: 0.7rem;
            }

            .user-email,
            .user-avatar-code {
                font-size: 0.6rem;
            }

            .exp-container {
                width: 120px;
                height: 14px;
            }

            .level-badge {
                font-size: 9px;
            }

            .level-badge .material-icons {
                font-size: 10px;
            }

            .level-badge-text {
                font-size: 9px;
            }

            .user-info-right {
                gap: 8px;
            }

            .currency-container {
                gap: 6px;
                padding: 4px 10px;
            }

            .currency-icon {
                width: 18px;
                height: 18px;
            }

            .currency-amount {
                font-size: 12px;
            }

            .action-icon {
                width: 32px;
                height: 32px;
                min-width: 32px;
                min-height: 32px;
            }

            .user-secondary-info {
                gap: 6px;
            }
        }

        /* 手機直式 (Portrait) */
        @media (max-width: 768px) and (orientation: portrait) {
            .user-info-bar {
                padding: 8px 16px;
                top: 10px;
            }

            .user-info-bar .container {
                flex-wrap: nowrap;
                gap: 8px;
                justify-content: center;
            }

            .user-info-left {
                gap: 8px;
                flex: 0 0 auto;
                min-width: 0;
                justify-content: center;
            }

            .user-details {
                align-items: flex-start;
                text-align: left;
            }

            .user-avatar {
                width: 40px;
                height: 40px;
            }

            .user-name {
                font-size: 14px;
            }

            .user-title {
                font-size: 0.7rem;
            }

            .user-email,
            .user-avatar-code {
                font-size: 0.6rem;
            }

            .exp-container {
                width: 120px;
                height: 14px;
            }

            .level-badge {
                font-size: 9px;
            }

            .level-badge .material-icons {
                font-size: 10px;
            }

            .level-badge-text {
                font-size: 9px;
            }

            /* 收折按鈕顯示 */
            .toggle-right-btn {
                display: flex;
                position: absolute;
                right: 16px;
                top: 50%;
                transform: translateY(-50%);
            }

            /* user-info-right 預設隱藏 */
            .user-info-right {
                position: absolute;
                top: 100%;
                left: 50%;
                transform: translateX(-50%) translateY(-10px);
                right: auto;
                margin-top: 8px;
                background: rgba(0, 0, 0, 0.9);
                backdrop-filter: blur(10px);
                border: 1px solid rgba(96, 165, 250, 0.3);
                border-radius: 12px;
                padding: 12px;
                flex-direction: column;
                gap: 12px;
                min-width: 200px;
                box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
                opacity: 0;
                visibility: hidden;
                transition: all 0.3s ease;
                z-index: 1001;
            }

            .user-info-right.expanded {
                opacity: 1;
                visibility: visible;
                transform: translateX(-50%) translateY(0);
            }

            .currency-container {
                gap: 8px;
                padding: 6px 12px;
                width: 100%;
                justify-content: space-between;
            }

            .currency-icon {
                width: 20px;
                height: 20px;
            }

            .currency-amount {
                font-size: 14px;
            }

            .action-icons {
                width: 100%;
                justify-content: space-around;
                gap: 8px;
            }

            .action-icon {
                width: 36px;
                height: 36px;
                min-width: 36px;
                min-height: 36px;
                flex: 1;
            }

            .user-secondary-info {
                flex-direction: column;
                gap: 4px;
                align-items: flex-start;
                text-align: left;
            }

            .user-email,
            .user-avatar-code {
                text-align: left;
            }
        }

        /* 小手機直式 */
        @media (max-width: 480px) and (orientation: portrait) {
            .user-info-bar {
                padding: 6px 12px;
                top: 5px;
            }

            .user-info-bar .container {
                justify-content: center;
            }

            .user-info-left {
                gap: 6px;
                justify-content: center;
            }

            .user-details {
                align-items: flex-start;
                text-align: left;
            }

            .user-avatar {
                width: 36px;
                height: 36px;
            }

            .user-name {
                font-size: 12px;
            }

            .user-title {
                font-size: 0.65rem;
            }

            .user-email,
            .user-avatar-code {
                font-size: 0.55rem;
            }

            .exp-container {
                width: 100px;
                height: 12px;
            }

            .currency-container {
                gap: 6px;
                padding: 4px 8px;
            }

            .currency-icon {
                width: 18px;
                height: 18px;
            }

            .currency-amount {
                font-size: 12px;
            }

            .action-icon {
                width: 32px;
                height: 32px;
                min-width: 32px;
                min-height: 32px;
            }

            .user-info-right {
                left: 50%;
                transform: translateX(-50%) translateY(-10px);
                right: auto;
                min-width: 180px;
            }

            .user-info-right.expanded {
                transform: translateX(-50%) translateY(0);
            }

            .user-secondary-info {
                flex-direction: column;
                gap: 2px;
            }
        }

        /* 小手機橫式 */
        @media (max-width: 640px) and (orientation: landscape) {
            .user-info-bar {
                padding: 6px 16px;
                top: 5px;
            }

            .user-avatar {
                width: 32px;
                height: 32px;
            }

            .user-name {
                font-size: 12px;
            }

            .user-title {
                font-size: 0.65rem;
            }

            .user-email,
            .user-avatar-code {
                font-size: 0.55rem;
            }

            .exp-container {
                width: 100px;
                height: 12px;
            }

            .currency-container {
                gap: 4px;
                padding: 3px 8px;
            }

            .currency-icon {
                width: 16px;
                height: 16px;
            }

            .currency-amount {
                font-size: 11px;
            }

            .action-icon {
                width: 28px;
                height: 28px;
                min-width: 28px;
                min-height: 28px;
            }
        }

        /* 左側：使用者資訊 */
        .user-info-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        /* 頭像容器 - 圓形，青色邊框，脈衝動畫 */
        .avatar-container {
            position: relative;
            flex-shrink: 0;
        }

        .user-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            border: 2px solid #67e8f9;
            object-fit: cover;
            display: block;
            background: linear-gradient(135deg,
                    rgba(30, 41, 59, 0.9) 0%,
                    rgba(15, 23, 42, 0.9) 100%);
        }

        .user-avatar.animated-avatar {
            animation: pulse-glow 3s infinite ease-in-out;
        }

        .user-details {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
            /* 允許內容收縮 */
        }

        .user-name {
            font-size: 16px;
            font-weight: 700;
            color: #fff;
            margin: 0;
            text-shadow: 0 0 5px #00d4ff;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .user-title {
            font-size: 0.75rem;
            color: #67e8f9;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .user-email {
            font-size: 0.65rem;
            color: rgba(255, 255, 255, 0.5);
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .user-avatar-code {
            font-size: 0.65rem;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            position: relative;
            padding: 2px 6px;
            border-radius: 4px;
            background: linear-gradient(135deg,
                    rgba(103, 232, 249, 0.15) 0%,
                    rgba(139, 92, 246, 0.15) 100%);
            border: 1px solid rgba(103, 232, 249, 0.3);
            color: #67e8f9;
            font-weight: 500;
            font-family: 'Orbitron', monospace;
            text-shadow:
                0 0 5px rgba(103, 232, 249, 0.8),
                0 0 10px rgba(103, 232, 249, 0.5),
                0 0 15px rgba(139, 92, 246, 0.3);
            animation: avatarCodeGlow 2s ease-in-out infinite;
            box-shadow:
                0 0 5px rgba(103, 232, 249, 0.3),
                inset 0 0 5px rgba(103, 232, 249, 0.1);
        }

        @keyframes avatarCodeGlow {

            0%,
            100% {
                border-color: rgba(103, 232, 249, 0.3);
                box-shadow:
                    0 0 5px rgba(103, 232, 249, 0.3),
                    inset 0 0 5px rgba(103, 232, 249, 0.1);
                text-shadow:
                    0 0 5px rgba(103, 232, 249, 0.8),
                    0 0 10px rgba(103, 232, 249, 0.5),
                    0 0 15px rgba(139, 92, 246, 0.3);
            }

            50% {
                border-color: rgba(103, 232, 249, 0.6);
                box-shadow:
                    0 0 10px rgba(103, 232, 249, 0.5),
                    0 0 15px rgba(139, 92, 246, 0.4),
                    inset 0 0 8px rgba(103, 232, 249, 0.2);
                text-shadow:
                    0 0 8px rgba(103, 232, 249, 1),
                    0 0 15px rgba(103, 232, 249, 0.7),
                    0 0 20px rgba(139, 92, 246, 0.5);
            }
        }

        .user-avatar-code:hover {
            animation: avatarCodeGlow 1s ease-in-out infinite;
            transform: scale(1.05);
            border-color: rgba(103, 232, 249, 0.8);
        }

        .user-avatar-code .avatar-code-value {
            color: #67e8f9;
            font-weight: 600;
            text-shadow:
                0 0 8px rgba(103, 232, 249, 1),
                0 0 12px rgba(103, 232, 249, 0.8),
                0 0 18px rgba(139, 92, 246, 0.6);
            letter-spacing: 1px;
        }

        /* 次要資訊容器 - 將 email 和 avatar_code 放在同一行 */
        .user-secondary-info {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .user-secondary-info>div {
            flex-shrink: 0;
        }

        /* 等級條容器 */
        .exp-container {
            width: 140px;
            height: 16px;
            background: rgba(17, 24, 39, 0.5);
            border-radius: 9999px;
            border: 1px solid rgba(6, 182, 212, 0.5);
            padding: 1px;
            position: relative;
            overflow: hidden;
            margin-top: 4px;
        }

        /* 等級條內部（金色漸層） */
        .exp-bar {
            height: 100%;
            background: linear-gradient(to right,
                    rgba(251, 191, 36, 1) 0%,
                    rgba(217, 119, 6, 1) 100%);
            border-radius: 9999px;
            transition: width 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 6px;
            min-width: fit-content;
        }

        .level-badge {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        }

        .level-badge .material-icons {
            font-size: 12px;
            color: #78350f;
        }

        .level-badge-text {
            color: #fff;
            font-size: 10px;
        }

        /* 右側：貨幣和功能 */
        .user-info-right {
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all 0.3s ease;
        }

        /* 收折按鈕 */
        .toggle-right-btn {
            display: none;
            width: 36px;
            height: 36px;
            background: rgba(15, 23, 42, 0.7);
            border: 1px solid rgba(96, 165, 250, 0.3);
            border-radius: 8px;
            color: #67e8f9;
            cursor: pointer;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            margin-left: 8px;
        }

        .toggle-right-btn:hover {
            background: rgba(103, 232, 249, 0.2);
            border-color: #67e8f9;
        }

        .toggle-right-btn .material-icons {
            font-size: 20px;
            transition: transform 0.3s ease;
        }

        .toggle-right-btn.active .material-icons {
            transform: rotate(180deg);
        }

        /* 貨幣容器 */
        .currency-container {
            display: flex;
            align-items: center;
            gap: 16px;
            background: rgba(15, 23, 42, 0.5);
            backdrop-filter: blur(4px);
            border: 1px solid rgba(96, 165, 250, 0.3);
            border-radius: 8px;
            padding: 8px 16px;
        }

        .currency-group {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .currency-icon {
            width: 24px;
            height: 24px;
            object-fit: contain;
            animation: pulse 2s ease-in-out infinite;
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.7;
            }
        }

        .currency-amount {
            font-size: 16px;
            font-weight: 600;
            color: #fcd34d;
        }

        .currency-amount.diamonds {
            color: #67e8f9;
        }

        .currency-divider {
            width: 1px;
            height: 24px;
            background: rgba(96, 165, 250, 0.3);
        }

        /* 功能按鈕組 */
        .action-icons {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .action-icon {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(15, 23, 42, 0.5);
            backdrop-filter: blur(4px);
            border: 1px solid rgba(96, 165, 250, 0.3);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            color: #fff;
        }

        .action-icon .material-icons {
            font-size: 20px;
        }

        .action-icon:hover {
            background: rgba(59, 130, 246, 0.5);
            border-color: rgba(96, 165, 250, 0.6);
        }

        /* 登入提示容器 */
        /* HUD 裝飾線條 */
        .hud-lines {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 2115;
            pointer-events: none;
        }

        .hud-corner {
            position: absolute;
            width: 80px;
            height: 80px;
            border: 2px solid rgba(103, 232, 249, 0.5);
        }

        .hud-corner::before,
        .hud-corner::after {
            content: '';
            position: absolute;
            background: rgba(103, 232, 249, 0.5);
        }

        .hud-corner.top-left {
            top: 20px;
            left: 20px;
            border-right: none;
            border-bottom: none;
        }

        .hud-corner.top-left::before {
            width: 30px;
            height: 2px;
            top: 0;
            left: 0;
        }

        .hud-corner.top-left::after {
            width: 2px;
            height: 30px;
            top: 0;
            left: 0;
        }

        .hud-corner.top-right {
            top: 20px;
            right: 20px;
            border-left: none;
            border-bottom: none;
        }

        .hud-corner.top-right::before {
            width: 30px;
            height: 2px;
            top: 0;
            right: 0;
        }

        .hud-corner.top-right::after {
            width: 2px;
            height: 30px;
            top: 0;
            right: 0;
        }

        .hud-corner.bottom-left {
            bottom: 20px;
            left: 20px;
            border-right: none;
            border-top: none;
        }

        .hud-corner.bottom-left::before {
            width: 30px;
            height: 2px;
            bottom: 0;
            left: 0;
        }

        .hud-corner.bottom-left::after {
            width: 2px;
            height: 30px;
            bottom: 0;
            left: 0;
        }

        .hud-corner.bottom-right {
            bottom: 20px;
            right: 20px;
            border-left: none;
            border-top: none;
        }

        .hud-corner.bottom-right::before {
            width: 30px;
            height: 2px;
            bottom: 0;
            right: 0;
        }

        .hud-corner.bottom-right::after {
            width: 2px;
            height: 30px;
            bottom: 0;
            right: 0;
        }

        /* 系統標題 - Glitch 效果 */
        .system-title {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-family: 'Orbitron', monospace;
            font-size: 3rem;
            font-weight: 700;
            color: #67e8f9;
            text-align: center;
            text-shadow:
                0 0 10px rgba(103, 232, 249, 0.8),
                0 0 20px rgba(103, 232, 249, 0.6),
                0 0 30px rgba(139, 92, 246, 0.4);
            z-index: 300;
            pointer-events: none;
            animation: glitch 3s infinite;
        }

        @keyframes glitch {

            0%,
            100% {
                transform: translate(-50%, -50%);
                text-shadow:
                    0 0 10px rgba(103, 232, 249, 0.8),
                    0 0 20px rgba(103, 232, 249, 0.6),
                    0 0 30px rgba(139, 92, 246, 0.4);
            }

            20% {
                transform: translate(calc(-50% + 2px), calc(-50% + 2px));
                text-shadow:
                    2px 0 0 rgba(255, 0, 0, 0.5),
                    -2px 0 0 rgba(0, 255, 255, 0.5),
                    0 0 10px rgba(103, 232, 249, 0.8);
            }

            40% {
                transform: translate(calc(-50% - 2px), calc(-50% - 2px));
                text-shadow:
                    -2px 0 0 rgba(255, 0, 0, 0.5),
                    2px 0 0 rgba(0, 255, 255, 0.5),
                    0 0 10px rgba(103, 232, 249, 0.8);
            }

            60% {
                transform: translate(-50%, -50%);
                text-shadow:
                    0 0 10px rgba(103, 232, 249, 0.8),
                    0 0 20px rgba(103, 232, 249, 0.6),
                    0 0 30px rgba(139, 92, 246, 0.4);
            }
        }

        /* 系統子標題 */
        .system-subtitle {
            position: fixed;
            top: calc(50% + 80px);
            left: 50%;
            transform: translateX(-50%);
            font-family: 'Orbitron', monospace;
            font-size: 1rem;
            color: rgba(103, 232, 249, 0.8);
            text-align: center;
            text-shadow:
                0 0 5px rgba(103, 232, 249, 0.6),
                0 0 10px rgba(103, 232, 249, 0.4);
            z-index: 300;
            pointer-events: none;
        }

        /* 登入按鈕增強 */
        .cyber-login-button {
            position: fixed;
            top: calc(50% + 140px);
            left: 50%;
            transform: translateX(-50%);
            padding: 16px 32px;
            font-family: 'Orbitron', monospace;
            font-size: 1.125rem;
            font-weight: 600;
            color: #67e8f9;
            background: rgba(15, 23, 42, 0.8);
            border: 2px solid #67e8f9;
            border-radius: 8px;
            cursor: pointer;
            z-index: 400;
            text-shadow: 0 0 10px rgba(103, 232, 249, 0.8);
            box-shadow:
                0 0 20px rgba(103, 232, 249, 0.4),
                inset 0 0 20px rgba(103, 232, 249, 0.1);
            transition: all 0.3s ease;
        }

        .cyber-login-button:hover {
            background: rgba(103, 232, 249, 0.2);
            box-shadow:
                0 0 40px rgba(103, 232, 249, 0.8),
                0 0 60px rgba(139, 92, 246, 0.6),
                inset 0 0 30px rgba(103, 232, 249, 0.2);
            transform: translateX(-50%) scale(1.05);
        }

        .cyber-login-button:active {
            transform: translateX(-50%) scale(0.98);
        }

        .login-prompt {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1001;
            padding: 16px;
        }

        .login-prompt-overlay {
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.3);
        }

        .login-prompt-content {
            position: relative;
            width: 100%;
            max-width: 1024px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        /* 劇情顯示區域 */
        .story-box {
            background: rgba(15, 23, 42, 0.8);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(59, 130, 246, 0.4);
            border-radius: 12px;
            padding: 24px 32px;
            padding-right: 200px;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.2);
            position: relative;
            overflow: visible;
        }

        .story-box-tree {
            position: absolute;
            right: -40px;
            top: 50%;
            transform: translateY(-50%);
            height: 140%;
            width: auto;
            min-width: 250px;
            max-width: 300px;
            object-fit: contain;
            object-position: right center;
            filter: drop-shadow(0 0 20px rgba(103, 232, 249, 0.6)) drop-shadow(0 0 40px rgba(139, 92, 246, 0.4));
            opacity: 0.9;
            z-index: 1;
            pointer-events: none;
            animation: treeFloat 4s ease-in-out infinite;
        }

        @keyframes treeFloat {

            0%,
            100% {
                transform: translateY(-50%) scale(1);
            }

            50% {
                transform: translateY(-52%) scale(1.02);
            }
        }

        .story-title,
        .story-text {
            position: relative;
            z-index: 2;
        }

        @media (max-width: 768px) {
            .story-box {
                padding-right: 120px;
            }

            .story-box-tree {
                right: -30px;
                height: 130%;
                min-width: 180px;
                max-width: 220px;
            }
        }

        .story-box::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg,
                    transparent 0%,
                    rgba(59, 130, 246, 0.6) 50%,
                    transparent 100%);
            animation: storyGlow 3s ease-in-out infinite;
        }

        @keyframes storyGlow {

            0%,
            100% {
                opacity: 0.5;
            }

            50% {
                opacity: 1;
            }
        }

        .story-title {
            font-family: 'Orbitron', sans-serif;
            font-size: 1.25rem;
            font-weight: 700;
            color: #67e8f9;
            margin: 0 0 12px 0;
            text-shadow: 0 0 10px rgba(103, 232, 249, 0.5);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .story-title::before {
            content: '⚡';
            font-size: 1.5rem;
        }

        .story-text {
            font-family: 'Orbitron', sans-serif;
            font-size: 1rem;
            line-height: 2;
            color: rgba(255, 255, 255, 0.9);
            margin: 0;
            text-align: justify;
            min-height: 200px;
        }

        .story-text .paragraph {
            margin-bottom: 1.5em;
        }

        .story-text .paragraph:last-child {
            margin-bottom: 0;
        }

        .story-text .highlight {
            color: #67e8f9;
            font-weight: 600;
            text-shadow: 0 0 8px rgba(103, 232, 249, 0.4);
        }

        /* 打字機光標 */
        .typing-cursor {
            display: inline-block;
            width: 2px;
            height: 1.2em;
            background: #67e8f9;
            margin-left: 2px;
            vertical-align: baseline;
            animation: blink 1s infinite;
            box-shadow: 0 0 8px rgba(103, 232, 249, 0.8);
        }

        @keyframes blink {

            0%,
            50% {
                opacity: 1;
            }

            51%,
            100% {
                opacity: 0;
            }
        }

        .story-text.typing {
            white-space: pre-wrap;
        }

        @media (min-width: 768px) {
            .story-box {
                padding: 32px 40px;
            }

            .story-title {
                font-size: 1.5rem;
            }

            .story-text {
                font-size: 1.125rem;
            }
        }

        .login-prompt-box {
            background: rgba(15, 23, 42, 0.7);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(51, 65, 85, 0.5);
            border-radius: 12px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(59, 130, 246, 0.1);
            padding: 32px 48px;
            position: relative;
            overflow: visible;
        }

        @media (min-width: 768px) {
            .login-prompt-box {
                padding: 48px;
            }
        }

        .login-prompt-inner {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            gap: 32px;
        }

        @media (min-width: 768px) {
            .login-prompt-inner {
                flex-direction: row;
                gap: 64px;
            }
        }

        .login-prompt-text {
            text-align: center;
            color: #fff;
        }

        @media (min-width: 768px) {
            .login-prompt-text {
                text-align: left;
            }
        }

        .login-prompt-text h1 {
            font-family: 'Orbitron', sans-serif;
            font-size: 2rem;
            font-weight: 700;
            color: #fff;
            margin: 0;
        }

        @media (min-width: 768px) {
            .login-prompt-text h1 {
                font-size: 3rem;
            }
        }

        .login-prompt-text p {
            margin-top: 16px;
            font-size: 1rem;
            color: rgba(203, 213, 225, 1);
        }

        @media (min-width: 768px) {
            .login-prompt-text p {
                font-size: 1.125rem;
            }
        }

        .login-btn-container {
            flex-shrink: 0;
            width: 100%;
        }

        @media (min-width: 768px) {
            .login-btn-container {
                width: auto;
            }
        }

        .login-btn {
            width: 100%;
            background: #3b82f6;
            color: #fff;
            border: none;
            font-family: 'Orbitron', sans-serif;
            font-weight: 700;
            font-size: 1.125rem;
            padding: 16px 40px;
            border-radius: 12px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3), 0 4px 6px -2px rgba(59, 130, 246, 0.2);
        }

        @media (min-width: 768px) {
            .login-btn {
                width: auto;
            }
        }

        .login-btn:hover {
            background: #3b82f6;
            background-color: #2563eb;
        }

        .login-btn svg {
            width: 24px;
            height: 24px;
        }

        .beginner-link {
            margin-top: 16px;
            text-align: center;
        }

        .beginner-link a {
            color: rgba(203, 213, 225, 0.9);
            font-size: 0.875rem;
            text-decoration: none;
            transition: color 0.3s ease;
            font-family: 'Orbitron', sans-serif;
        }

        .beginner-link a:hover {
            color: #67e8f9;
            text-decoration: underline;
        }

        /* 遊戲啟動畫面 */
        .game-start-screen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            background: linear-gradient(180deg,
                    rgba(0, 0, 0, 0.7) 0%,
                    rgba(15, 23, 42, 0.7) 50%,
                    rgba(0, 0, 0, 0.7) 100%);
            backdrop-filter: blur(8px);
            transition: opacity 0.5s ease, visibility 0.5s ease;
            overflow: hidden;
        }

        /* 確保 play 畫面的內容在最上層 */
        .game-start-screen .play-button-container {
            position: relative;
            z-index: 2200;
        }

        /* 星空粒子容器 */
        .stars-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
        }

        .star {
            position: absolute;
            width: 2px;
            height: 2px;
            background: #fff;
            border-radius: 50%;
            opacity: 0.6;
            animation: twinkle 3s ease-in-out infinite;
        }

        .star.bright {
            width: 3px;
            height: 3px;
            opacity: 1;
            box-shadow: 0 0 6px rgba(103, 232, 249, 0.8);
        }

        @keyframes twinkle {

            0%,
            100% {
                opacity: 0.3;
                transform: scale(1);
            }

            50% {
                opacity: 1;
                transform: scale(1.2);
            }
        }

        /* 藍色光效 */
        .blue-light {
            position: absolute;
            width: 200px;
            height: 200px;
            border-radius: 50%;
            background: radial-gradient(circle,
                    rgba(59, 130, 246, 0.6) 0%,
                    rgba(103, 232, 249, 0.4) 40%,
                    transparent 70%);
            filter: blur(40px);
            pointer-events: none;
            z-index: 2;
            animation: lightPulse 2s ease-in-out infinite;
        }

        @keyframes lightPulse {

            0%,
            100% {
                opacity: 0.4;
                transform: scale(1);
            }

            50% {
                opacity: 0.8;
                transform: scale(1.2);
            }
        }

        /* 點擊光效 */
        .click-light {
            position: absolute;
            width: 300px;
            height: 300px;
            border-radius: 50%;
            background: radial-gradient(circle,
                    rgba(59, 130, 246, 0.8) 0%,
                    rgba(103, 232, 249, 0.6) 30%,
                    rgba(139, 92, 246, 0.4) 50%,
                    transparent 70%);
            filter: blur(50px);
            pointer-events: none;
            z-index: 3;
            animation: clickLightExpand 1s ease-out forwards;
        }

        @keyframes clickLightExpand {
            0% {
                opacity: 1;
                transform: scale(0.5);
            }

            100% {
                opacity: 0;
                transform: scale(2);
            }
        }

        /* 粒子爆發效果 */
        .particle {
            position: absolute;
            width: 4px;
            height: 4px;
            background: #67e8f9;
            border-radius: 50%;
            pointer-events: none;
            z-index: 4;
            box-shadow: 0 0 10px rgba(103, 232, 249, 0.8);
        }

        .game-start-screen::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background:
                radial-gradient(ellipse at center top, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at center bottom, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
            pointer-events: none;
        }

        .game-start-screen.hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        .play-button-container {
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 32px;
            position: relative;
            z-index: 1;
        }

        .tree-image {
            max-width: 250px;
            max-height: 400px;
            object-fit: contain;
            filter: drop-shadow(0 0 30px rgba(103, 232, 249, 0.6));
            animation: treeGlow 3s ease-in-out infinite;
            opacity: 0.95;
            position: relative;
            z-index: 1;
        }

        @keyframes treeGlow {

            0%,
            100% {
                filter: drop-shadow(0 0 30px rgba(103, 232, 249, 0.6)) drop-shadow(0 0 60px rgba(139, 92, 246, 0.3));
                opacity: 0.95;
                transform: translateY(0);
            }

            50% {
                filter: drop-shadow(0 0 40px rgba(103, 232, 249, 0.9)) drop-shadow(0 0 80px rgba(139, 92, 246, 0.5));
                opacity: 1;
                transform: translateY(-5px);
            }
        }

        @media (max-width: 768px) {
            .tree-image {
                max-width: 180px;
                max-height: 280px;
            }
        }

        .play-button {
            width: 140px;
            height: 140px;
            border-radius: 50%;
            background: linear-gradient(135deg,
                    rgba(37, 99, 235, 1) 0%,
                    rgba(59, 130, 246, 0.9) 30%,
                    rgba(139, 92, 246, 0.9) 70%,
                    rgba(168, 85, 247, 1) 100%);
            border: none;
            color: #fff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow:
                0 0 40px rgba(59, 130, 246, 0.8),
                0 0 80px rgba(103, 232, 249, 0.6),
                0 0 120px rgba(139, 92, 246, 0.4),
                inset 0 0 30px rgba(255, 255, 255, 0.15);
            transition: all 0.3s ease;
            position: relative;
            animation: playButtonPulse 2.5s ease-in-out infinite;
            overflow: visible;
        }

        .play-icon {
            width: 80px;
            height: 80px;
            filter: drop-shadow(0 0 10px rgba(103, 232, 249, 0.8));
        }

        .play-icon .energy-ring {
            animation: energyRotate 3s linear infinite;
            transform-origin: 50px 50px;
        }

        .play-icon .energy-ring:nth-child(2) {
            animation: energyRotate 4s linear infinite reverse;
        }

        .play-icon .play-triangle {
            filter: drop-shadow(0 0 8px rgba(103, 232, 249, 0.9));
            animation: playGlow 2s ease-in-out infinite;
        }

        .play-icon .energy-line {
            animation: energyPulse 1.5s ease-in-out infinite;
            stroke-dasharray: 5, 5;
        }

        .play-icon .energy-line:nth-child(4) {
            animation-delay: 0.2s;
        }

        .play-icon .energy-line:nth-child(5) {
            animation-delay: 0.4s;
        }

        .play-icon .energy-line:nth-child(6) {
            animation-delay: 0.6s;
        }

        @keyframes energyRotate {
            0% {
                transform: rotate(0deg);
                opacity: 0.6;
            }

            50% {
                opacity: 1;
            }

            100% {
                transform: rotate(360deg);
                opacity: 0.6;
            }
        }

        @keyframes playGlow {

            0%,
            100% {
                opacity: 1;
                filter: drop-shadow(0 0 8px rgba(103, 232, 249, 0.9));
            }

            50% {
                opacity: 0.9;
                filter: drop-shadow(0 0 15px rgba(103, 232, 249, 1));
            }
        }

        @keyframes energyPulse {

            0%,
            100% {
                opacity: 0.4;
                stroke-dashoffset: 0;
            }

            50% {
                opacity: 1;
                stroke-dashoffset: 10;
            }
        }

        .play-button::before {
            content: '';
            position: absolute;
            inset: -10px;
            border-radius: 50%;
            background: linear-gradient(135deg,
                    rgba(59, 130, 246, 0.4) 0%,
                    rgba(139, 92, 246, 0.4) 100%);
            filter: blur(20px);
            z-index: -1;
            animation: playButtonAura 2.5s ease-in-out infinite;
        }

        @keyframes playButtonPulse {

            0%,
            100% {
                transform: scale(1);
                box-shadow:
                    0 0 40px rgba(59, 130, 246, 0.8),
                    0 0 80px rgba(103, 232, 249, 0.6),
                    0 0 120px rgba(139, 92, 246, 0.4),
                    inset 0 0 30px rgba(255, 255, 255, 0.15);
            }

            50% {
                transform: scale(1.08);
                box-shadow:
                    0 0 50px rgba(59, 130, 246, 1),
                    0 0 100px rgba(103, 232, 249, 0.8),
                    0 0 150px rgba(139, 92, 246, 0.6),
                    inset 0 0 30px rgba(255, 255, 255, 0.2);
            }
        }

        @keyframes playButtonAura {

            0%,
            100% {
                opacity: 0.6;
                transform: scale(1);
            }

            50% {
                opacity: 1;
                transform: scale(1.1);
            }
        }

        .play-button:hover {
            transform: scale(1.15);
            box-shadow:
                0 0 60px rgba(59, 130, 246, 1),
                0 0 120px rgba(103, 232, 249, 0.9),
                0 0 180px rgba(139, 92, 246, 0.7),
                inset 0 0 40px rgba(255, 255, 255, 0.25);
        }

        .play-button:hover .play-icon {
            filter: drop-shadow(0 0 20px rgba(103, 232, 249, 1));
            transform: scale(1.1);
        }

        .play-button:hover .play-icon .energy-ring {
            animation-duration: 2s;
        }

        .play-button:active {
            transform: scale(1.0);
        }

        .play-button:active .play-icon {
            transform: scale(0.95);
        }

        .play-main-title {
            font-family: 'Orbitron', sans-serif;
            font-size: 1rem;
            font-weight: 400;
            color: #ffffff;
            text-align: center;
            text-shadow:
                0 0 15px rgba(103, 232, 249, 0.8),
                0 0 30px rgba(139, 92, 246, 0.6),
                0 0 45px rgba(59, 130, 246, 0.4);
            letter-spacing: 0;
            margin-bottom: 16px;
            animation: mainTitleGlow 3s ease-in-out infinite;
        }

        @keyframes mainTitleGlow {

            0%,
            100% {
                text-shadow:
                    0 0 15px rgba(103, 232, 249, 0.8),
                    0 0 30px rgba(139, 92, 246, 0.6),
                    0 0 45px rgba(59, 130, 246, 0.4);
            }

            50% {
                text-shadow:
                    0 0 20px rgba(103, 232, 249, 1),
                    0 0 40px rgba(139, 92, 246, 0.8),
                    0 0 60px rgba(59, 130, 246, 0.6);
            }
        }

        @media (min-width: 768px) {
            .play-main-title {
                font-size: 1.125rem;
            }
        }

        .play-title-text {
            font-family: 'Orbitron', sans-serif;
            font-size: 1.5rem;
            font-weight: 600;
            color: #ffffff;
            text-align: center;
            text-shadow:
                0 0 10px rgba(103, 232, 249, 0.6),
                0 0 20px rgba(139, 92, 246, 0.4);
            letter-spacing: 2px;
            margin-bottom: 8px;
            animation: titleGlow 3s ease-in-out infinite;
        }

        @keyframes titleGlow {

            0%,
            100% {
                text-shadow:
                    0 0 10px rgba(103, 232, 249, 0.6),
                    0 0 20px rgba(139, 92, 246, 0.4);
            }

            50% {
                text-shadow:
                    0 0 15px rgba(103, 232, 249, 0.9),
                    0 0 30px rgba(139, 92, 246, 0.6);
            }
        }

        @media (max-width: 768px) {
            .play-title-text {
                font-size: 1.125rem;
                letter-spacing: 1px;
            }
        }

        .play-button-text {
            font-size: 1.75rem;
            margin-top: 8px;
            color: #fff;
            font-family: 'Orbitron', sans-serif;
            font-weight: 600;
            text-shadow:
                0 0 10px rgba(103, 232, 249, 0.6),
                0 0 20px rgba(139, 92, 246, 0.4);
            letter-spacing: 2px;
        }

        /* 底部版權資訊 */
        .footer-credit {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            font-family: 'Orbitron', sans-serif;
            font-size: 0.875rem;
            color: rgba(255, 255, 255, 0.6);
            text-align: center;
            z-index: 2200;
            text-shadow:
                0 0 5px rgba(103, 232, 249, 0.4),
                0 0 10px rgba(139, 92, 246, 0.3);
            pointer-events: none;
        }

        @media (max-width: 768px) {
            .footer-credit {
                font-size: 0.75rem;
                bottom: 15px;
                padding: 0 20px;
            }
        }

        /* 音頻控制 */
        .audio-control {
            display: none;
        }

        /* ==================== 關卡系統樣式 ==================== */

        /* 主選單 */
        .main-menu {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: transparent;
            z-index: 500;
            display: none;
            overflow-y: auto;
            padding: 20px;
            padding-top: 100px;
            /* 為用戶資訊欄留出空間 */
        }

        .main-menu.active {
            display: block;
        }

        .week-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 24px;
            max-width: 1200px;
            margin: 40px auto;
        }

        .week-card {
            background: rgba(15, 23, 42, 0.7);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 2px solid rgba(59, 130, 246, 0.4);
            border-radius: 12px;
            padding: 24px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .week-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, rgba(59, 130, 246, 0.6), rgba(139, 92, 246, 0.6));
        }

        .week-card:hover {
            border-color: rgba(103, 232, 249, 0.6);
            transform: translateY(-4px);
            box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
        }

        .week-card.locked {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .week-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: #67e8f9;
            margin-bottom: 8px;
        }

        .week-subtitle {
            font-size: 1rem;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 16px;
        }

        .week-progress {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 16px;
        }

        .progress-bar {
            flex: 1;
            height: 8px;
            background: rgba(17, 24, 39, 0.5);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #3b82f6, #8b5cf6);
            transition: width 0.3s ease;
        }

        .sp-display {
            font-size: 0.875rem;
            color: #fcd34d;
            transition: all 0.3s ease;
        }

        /* SP 獲得動畫 */
        .sp-gain-animation {
            animation: spGainPulse 0.6s ease-out;
        }

        @keyframes spGainPulse {
            0% {
                transform: scale(1);
                text-shadow: 0 0 0 rgba(252, 211, 77, 0);
            }

            50% {
                transform: scale(1.2);
                text-shadow: 0 0 20px rgba(252, 211, 77, 0.8), 0 0 40px rgba(252, 211, 77, 0.5);
            }

            100% {
                transform: scale(1);
                text-shadow: 0 0 0 rgba(252, 211, 77, 0);
            }
        }

        /* SP 浮動文字動畫 */
        .sp-float-text {
            animation: spFloatUp 1s ease-out forwards;
        }

        @keyframes spFloatUp {
            0% {
                opacity: 1;
                transform: translate(-50%, 0) scale(1);
            }

            100% {
                opacity: 0;
                transform: translate(-50%, -60px) scale(1.2);
            }
        }

        /* 關卡內容區域 */
        .week-content {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
            z-index: 1600;
            display: none;
            overflow: hidden;
            padding: 0;
        }

        .week-content.active {
            display: flex;
            flex-direction: column;
        }

        .week-content.active {
            display: block;
        }

        /* 第一週容器 */
        .week1-container {
            width: 100%;
            height: calc(100vh - 160px);
            margin: 0;
            padding: 12px;
            display: flex;
            flex-direction: column;
            box-sizing: border-box;
            position: relative;
        }

        /* 階段提示欄 */
        .zone-progress-bar {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            padding: 4px 8px;
            position: absolute;
            top: 12px;
            left: 12px;
            right: 12px;
            z-index: 10;
        }

        .zone-step {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            border-radius: 8px;
            background: rgba(107, 114, 128, 0.2);
            border: 2px solid rgba(107, 114, 128, 0.5);
            min-width: 140px;
            flex: 1;
            max-width: 300px;
            position: relative;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .zone-step.active {
            background: rgba(59, 130, 246, 0.3);
            border-color: rgba(59, 130, 246, 0.8);
            box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
        }

        .zone-step.completed {
            background: rgba(34, 197, 94, 0.2);
            border-color: rgba(34, 197, 94, 0.6);
        }

        .zone-step.locked {
            opacity: 0.5;
            cursor: not-allowed;
            background: rgba(17, 24, 39, 0.5);
        }

        .zone-step:hover:not(.locked) {
            transform: translateY(-4px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
        }

        .step-number {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: rgba(59, 130, 246, 0.3);
            border: 2px solid rgba(59, 130, 246, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.75rem;
            color: #67e8f9;
            flex-shrink: 0;
        }

        .zone-step.completed .step-number {
            background: rgba(34, 197, 94, 0.3);
            border-color: rgba(34, 197, 94, 0.6);
            color: #4ade80;
        }

        .zone-step.active .step-number {
            background: rgba(59, 130, 246, 0.5);
            border-color: #3b82f6;
            box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
        }

        .step-title {
            font-size: 0.75rem;
            font-weight: 600;
            color: #67e8f9;
            text-align: left;
            line-height: 1.2;
        }

        .step-period {
            font-size: 0.625rem;
            color: rgba(255, 255, 255, 0.6);
            text-align: left;
            line-height: 1.2;
        }

        .step-text-container {
            display: flex;
            flex-direction: column;
            gap: 2px;
            flex: 1;
            min-width: 0;
        }

        .step-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: rgba(34, 197, 94, 0.9);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.875rem;
            font-weight: 700;
        }

        .zone-connector {
            width: 40px;
            height: 2px;
            background: rgba(107, 114, 128, 0.5);
            position: relative;
            flex-shrink: 0;
        }

        .zone-connector.completed {
            background: rgba(34, 197, 94, 0.6);
        }

        .zone-connector::after {
            content: '';
            position: absolute;
            right: -6px;
            top: 50%;
            transform: translateY(-50%);
            width: 0;
            height: 0;
            border-left: 6px solid rgba(107, 114, 128, 0.5);
            border-top: 4px solid transparent;
            border-bottom: 4px solid transparent;
        }

        .zone-connector.completed::after {
            border-left-color: rgba(34, 197, 94, 0.6);
        }

        /* 16:9 遊戲內容區域 */
        .game-content-area {
            width: 100%;
            flex: 1;
            min-height: 0;
            height: calc(100vh - 160px);
            max-height: calc(100vh - 160px);
            background: rgba(0, 0, 0, 0.6);
            border-radius: 12px;
            border: 2px solid rgba(103, 232, 249, 0.3);
            padding: 16px;
            padding-top: 50px;
            /* 為 zone-progress-bar 留出空間（高度減少後調整） */
            overflow-y: auto;
            position: relative;
            display: flex;
            flex-direction: column;
            box-sizing: border-box;
        }

        @media (max-width: 768px) {
            .zone-progress-bar {
                flex-direction: column;
                gap: 8px;
                padding: 8px;
                top: 8px;
                left: 8px;
                right: 8px;
            }

            .zone-connector {
                width: 2px;
                height: 20px;
            }

            .zone-connector::after {
                right: 50%;
                top: auto;
                bottom: -6px;
                transform: translateX(50%);
                border-left: 6px solid transparent;
                border-right: 6px solid transparent;
                border-top: 8px solid rgba(107, 114, 128, 0.5);
                border-bottom: none;
            }

            .zone-connector.completed::after {
                border-top-color: rgba(34, 197, 94, 0.6);
            }

            .week1-container {
                padding: 8px;
            }

            .game-content-area {
                padding: 12px;
                padding-top: 140px;
                /* 手機版垂直排列，調整為更小的空間 */
                height: calc(100vh - 180px);
                max-height: calc(100vh - 180px);
            }
        }

        .week-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            padding: 12px 16px;
            padding-bottom: 12px;
            border-bottom: 2px solid rgba(59, 130, 246, 0.3);
            flex-shrink: 0;
        }

        #week-activity-container {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 0;
        }

        .back-button {
            background: rgba(59, 130, 246, 0.2);
            border: 1px solid rgba(59, 130, 246, 0.5);
            color: #67e8f9;
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-family: 'Orbitron', sans-serif;
            transition: all 0.3s ease;
        }

        .back-button:hover {
            background: rgba(59, 130, 246, 0.4);
        }

        /* 載入進度畫面 */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(10px);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: loadingFadeIn 0.3s ease-out;
        }

        @keyframes loadingFadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .loading-container {
            text-align: center;
            color: #fff;
        }

        .loading-spinner {
            width: 60px;
            height: 60px;
            border: 4px solid rgba(103, 232, 249, 0.3);
            border-top-color: #67e8f9;
            border-radius: 50%;
            margin: 0 auto 24px;
            animation: loadingSpin 1s linear infinite;
        }

        @keyframes loadingSpin {
            to {
                transform: rotate(360deg);
            }
        }

        .loading-text {
            font-size: 1.1rem;
            color: #67e8f9;
            font-family: 'Orbitron', sans-serif;
            margin-bottom: 20px;
            text-shadow: 0 0 10px rgba(103, 232, 249, 0.6);
        }

        .loading-progress-bar {
            width: 300px;
            height: 6px;
            background: rgba(103, 232, 249, 0.2);
            border-radius: 3px;
            overflow: hidden;
            margin: 0 auto;
        }

        .loading-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #67e8f9, #8b5cf6, #3b82f6);
            border-radius: 3px;
            width: 0%;
            transition: width 0.3s ease;
            box-shadow: 0 0 10px rgba(103, 232, 249, 0.6);
        }

        /* A.I.R.A. 對話框 - 居中劇情引導模式 */
        .aira-container {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 420px;
            max-height: 400px;
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
            border: 2px solid rgba(103, 232, 249, 0.6);
            border-radius: 20px;
            padding: 0;
            z-index: 2000;
            overflow: visible;
            display: none;
            box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7),
                0 0 40px rgba(103, 232, 249, 0.4);
            backdrop-filter: blur(15px);
            animation: airaCenterAppear 0.5s ease-out;
        }

        @keyframes airaCenterAppear {
            from {
                transform: translate(-50%, -50%) scale(0.8);
                opacity: 0;
            }

            to {
                transform: translate(-50%, -50%) scale(1);
                opacity: 1;
            }
        }

        .aira-container.active {
            display: flex;
            flex-direction: column;
        }

        .aira-header {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(139, 92, 246, 0.4) 100%);
            padding: 20px 24px;
            padding-top: 100px;
            border-bottom: 1px solid rgba(103, 232, 249, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .aira-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: #67e8f9;
            font-family: 'Orbitron', sans-serif;
            letter-spacing: 2px;
            text-shadow: 0 0 15px rgba(103, 232, 249, 0.6);
        }

        .aira-avatar {
            position: absolute;
            top: -60px;
            left: 50%;
            transform: translateX(-50%);
            width: 140px;
            height: 140px;
            object-fit: contain;
            border-radius: 50%;
            border: 4px solid rgba(103, 232, 249, 0.9);
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
            padding: 8px;
            z-index: 2001;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(103, 232, 249, 0.5),
                inset 0 0 20px rgba(103, 232, 249, 0.2);
            animation: airaAvatarPulse 3s ease-in-out infinite, airaAvatarFloat 3s ease-in-out infinite;
            transition: transform 0.3s ease;
        }

        .aira-avatar:hover {
            transform: translateX(-50%) scale(1.05);
            box-shadow: 0 8px 40px rgba(0, 0, 0, 0.9),
                0 0 50px rgba(103, 232, 249, 0.7),
                inset 0 0 25px rgba(103, 232, 249, 0.3);
        }

        @keyframes airaAvatarPulse {

            0%,
            100% {
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8),
                    0 0 40px rgba(103, 232, 249, 0.5),
                    inset 0 0 20px rgba(103, 232, 249, 0.2);
            }

            50% {
                box-shadow: 0 8px 40px rgba(0, 0, 0, 0.9),
                    0 0 50px rgba(103, 232, 249, 0.7),
                    inset 0 0 25px rgba(103, 232, 249, 0.3);
            }
        }

        @keyframes airaAvatarFloat {

            0%,
            100% {
                transform: translateX(-50%) translateY(0);
            }

            50% {
                transform: translateX(-50%) translateY(-8px);
            }
        }

        .aira-messages {
            padding: 12px 16px;
            padding-top: 16px;
            overflow-y: auto;
            flex: 1;
            max-height: 220px;
            scrollbar-width: thin;
            scrollbar-color: rgba(103, 232, 249, 0.5) transparent;
        }

        .aira-messages::-webkit-scrollbar {
            width: 6px;
        }

        .aira-messages::-webkit-scrollbar-track {
            background: transparent;
        }

        .aira-messages::-webkit-scrollbar-thumb {
            background: rgba(103, 232, 249, 0.5);
            border-radius: 3px;
        }

        .aira-messages::-webkit-scrollbar-thumb:hover {
            background: rgba(103, 232, 249, 0.7);
        }

        .aira-message {
            padding: 10px 12px;
            margin-bottom: 10px;
            border-radius: 8px;
            font-size: 0.875rem;
            line-height: 1.6;
            position: relative;
            animation: airaMessageSlideIn 0.3s ease-out;
            word-wrap: break-word;
            border-left: 3px solid transparent;
        }

        @keyframes airaMessageSlideIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .aira-message.aira-info {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.15) 100%);
            color: #67e8f9;
            border-left-color: #3b82f6;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
        }

        .aira-message.aira-success {
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(34, 197, 94, 0.15) 100%);
            color: #4ade80;
            border-left-color: #22c55e;
            box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
        }

        .aira-message.aira-warning {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.25) 0%, rgba(251, 191, 36, 0.15) 100%);
            color: #fbbf24;
            border-left-color: #fbbf24;
            box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
        }

        .aira-footer {
            padding: 16px 24px;
            border-top: 1px solid rgba(103, 232, 249, 0.3);
            display: flex;
            justify-content: center;
            background: rgba(15, 23, 42, 0.5);
        }

        .aira-close-btn,
        .aira-next-btn {
            background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
            border: none;
            color: #fff;
            padding: 10px 32px;
            border-radius: 8px;
            cursor: pointer;
            font-family: 'Orbitron', sans-serif;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
        }

        .aira-close-btn:hover,
        .aira-next-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(59, 130, 246, 0.6);
            background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
        }

        .aira-close-btn:active,
        .aira-next-btn:active {
            transform: translateY(0);
        }

        .aira-next-btn {
            background: linear-gradient(135deg, #67e8f9 0%, #3b82f6 100%);
        }

        .aira-next-btn:hover {
            background: linear-gradient(135deg, #22d3ee 0%, #2563eb 100%);
        }

        /* 劇情引導遮罩 */
        .aira-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            z-index: 1999;
            display: none;
            animation: overlayFadeIn 0.3s ease-out;
        }

        .aira-overlay.active {
            display: block;
        }

        @keyframes overlayFadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes overlayFadeOut {
            from {
                opacity: 1;
            }

            to {
                opacity: 0;
            }
        }

        @keyframes airaCenterDisappear {
            from {
                transform: translate(-50%, -50%) scale(1);
                opacity: 1;
            }

            to {
                transform: translate(-50%, -50%) scale(0.8);
                opacity: 0;
            }
        }

        /* 響應式設計 */
        @media (max-width: 768px) {
            .aira-container {
                width: calc(100% - 40px);
                max-width: 380px;
            }

            .aira-avatar {
                width: 100px;
                height: 100px;
                top: -50px;
            }

            .aira-header {
                padding-top: 80px;
            }
        }

        /* 活動卡片 */
        .activity-card {
            background: rgba(15, 23, 42, 0.8);
            border: 1px solid rgba(59, 130, 246, 0.3);
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 24px;
        }

        .activity-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: #67e8f9;
            margin-bottom: 12px;
        }

        .activity-desc {
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 16px;
            line-height: 1.6;
        }

        .activity-button {
            background: linear-gradient(135deg, #3b82f6, #8b5cf6);
            border: none;
            color: #fff;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            font-family: 'Orbitron', sans-serif;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .activity-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
        }

        /* 第一週：數據碎片蒐集 */
        .expo-container {
            position: relative;
            width: 100%;
            height: 600px;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 12px;
            overflow: hidden;
        }

        .hotspot {
            position: absolute;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(103, 232, 249, 0.3);
            border: 2px solid #67e8f9;
            cursor: pointer;
            animation: pulse 2s infinite;
        }

        .hotspot.repaired {
            background: rgba(34, 197, 94, 0.5);
            border-color: #4ade80;
            animation: none;
        }

        .hotspot-info {
            position: absolute;
            bottom: 50px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(15, 23, 42, 0.95);
            border: 2px solid rgba(103, 232, 249, 0.5);
            border-radius: 8px;
            padding: 16px;
            max-width: 400px;
            display: none;
        }

        .hotspot-info.active {
            display: block;
        }

        /* ==================== 時光迴廊樣式 ==================== */

        .time-corridor-menu {
            background: rgba(15, 23, 42, 0.9);
            border: 2px solid rgba(103, 232, 249, 0.3);
            border-radius: 12px;
            padding: 24px;
        }

        .corridor-zones {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 24px;
            margin-top: 24px;
        }

        .zone-card {
            background: rgba(0, 0, 0, 0.5);
            border: 2px solid rgba(59, 130, 246, 0.3);
            border-radius: 12px;
            padding: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
        }

        .zone-card:hover:not(.locked) {
            border-color: #67e8f9;
            transform: translateY(-4px);
            box-shadow: 0 8px 16px rgba(103, 232, 249, 0.3);
        }

        .zone-card.completed {
            border-color: #4ade80;
            background: rgba(34, 197, 94, 0.1);
        }

        .zone-card.locked {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .zone-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: #67e8f9;
            margin-bottom: 8px;
        }

        .zone-period {
            font-size: 0.875rem;
            color: #fbbf24;
            margin-bottom: 12px;
        }

        .zone-desc {
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.9rem;
            line-height: 1.5;
        }

        .zone-badge {
            position: absolute;
            top: 12px;
            right: 12px;
            background: rgba(34, 197, 94, 0.3);
            color: #4ade80;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
        }

        .zone-badge.locked {
            background: rgba(107, 114, 128, 0.3);
            color: #9ca3af;
        }

        /* ==================== 區域一：網咖時代樣式 ==================== */

        .netcafe-scene {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            background: transparent;
            border: none;
            padding: 0;
            margin: 0;
        }

        .scene-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: #67e8f9;
            margin-bottom: 6px;
            flex-shrink: 0;
        }

        .scene-desc {
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 10px;
            line-height: 1.4;
            font-size: 0.85rem;
            flex-shrink: 0;
        }

        .systemization-scene .scene-title {
            margin-top: 0;
        }

        .systemization-scene .scene-desc {
            margin-bottom: 10px;
        }

        .fragment-collection-area {
            position: relative;
            width: 100%;
            flex: 1;
            min-height: 0;
            background: linear-gradient(135deg, rgba(17, 24, 39, 0.8), rgba(0, 0, 0, 0.9));
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid rgba(103, 232, 249, 0.2);
        }

        .fragment-instruction {
            position: absolute;
            top: 12px;
            left: 50%;
            transform: translateX(-50%);
            color: #fbbf24;
            font-weight: 600;
            font-size: 0.9rem;
            z-index: 10;
            background: rgba(0, 0, 0, 0.6);
            padding: 6px 16px;
            border-radius: 20px;
            border: 1px solid rgba(251, 191, 36, 0.3);
            white-space: nowrap;
        }

        .fragments-container {
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        .newspaper-fragment {
            position: absolute;
            width: 80px;
            height: 80px;
            background: rgba(251, 191, 36, 0.3);
            border: 2px dashed rgba(251, 191, 36, 0.6);
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            animation: fragmentPulse 2s infinite;
        }

        .newspaper-fragment:hover {
            background: rgba(251, 191, 36, 0.5);
            transform: scale(1.1);
        }

        .newspaper-fragment.collected {
            opacity: 0.3;
            animation: none;
            cursor: default;
        }

        .newspaper-fragment::before {
            content: '📰';
            font-size: 2rem;
        }

        /* 圖片拼圖碎片樣式 */
        .newspaper-fragment-image {
            position: absolute;
            border: 2px solid rgba(251, 191, 36, 0.6);
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s ease;
            animation: fragmentPulse 2s infinite;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            background-color: rgba(0, 0, 0, 0.3);
        }

        .newspaper-fragment-image:hover {
            transform: scale(1.1);
            border-color: rgba(251, 191, 36, 1);
            box-shadow: 0 6px 16px rgba(251, 191, 36, 0.6);
            z-index: 10;
        }

        .newspaper-fragment-image.collected {
            opacity: 0.3;
            animation: none;
            cursor: default;
            pointer-events: none;
        }

        @keyframes fragmentPulse {

            0%,
            100% {
                opacity: 0.7;
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            }

            50% {
                opacity: 1;
                box-shadow: 0 6px 16px rgba(251, 191, 36, 0.6);
            }
        }

        .puzzle-area {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(0, 0, 0, 0.9));
            border: 2px solid rgba(103, 232, 249, 0.3);
            border-radius: 12px;
            padding: 16px;
            overflow: hidden;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        }

        .puzzle-content-wrapper {
            display: flex;
            flex-direction: row;
            gap: 16px;
            flex: 1;
            min-height: 0;
            overflow: hidden;
        }

        .puzzle-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 10px;
            border-bottom: 2px solid rgba(103, 232, 249, 0.2);
            flex-shrink: 0;
        }

        .puzzle-title {
            font-size: 1rem;
            font-weight: 700;
            color: #67e8f9;
            display: flex;
            align-items: center;
            gap: 6px;
            text-shadow: 0 0 10px rgba(103, 232, 249, 0.5);
        }

        .puzzle-icon {
            font-size: 1.2rem;
            animation: float 3s ease-in-out infinite;
        }

        .puzzle-progress {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .progress-text {
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.8rem;
            font-weight: 600;
        }

        .progress-bar-mini {
            width: 100px;
            height: 6px;
            background: rgba(107, 114, 128, 0.3);
            border-radius: 3px;
            overflow: hidden;
        }

        .progress-fill-mini {
            height: 100%;
            background: linear-gradient(90deg, rgba(59, 130, 246, 0.8), rgba(103, 232, 249, 0.8));
            border-radius: 3px;
            transition: width 0.3s ease;
            width: 0%;
        }

        @keyframes float {

            0%,
            100% {
                transform: translateY(0px);
            }

            50% {
                transform: translateY(-5px);
            }
        }

        .puzzle-board-wrapper {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 12px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 8px;
            border: 1px solid rgba(103, 232, 249, 0.2);
            flex: 1;
            min-width: 0;
            min-height: 0;
            overflow: auto;
        }

        /* 圖片拼圖板 */
        .puzzle-board {
            display: grid;
            gap: 0;
            background: rgba(107, 114, 128, 0.2);
            border: 3px solid rgba(103, 232, 249, 0.4);
            border-radius: 8px;
            padding: 4px;
            position: relative;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(103, 232, 249, 0.1);
            width: 100%;
            height: 100%;
            max-width: 100%;
            max-height: 100%;
        }

        .puzzle-slot-image {
            background: rgba(107, 114, 128, 0.15);
            border: 2px dashed rgba(107, 114, 128, 0.4);
            aspect-ratio: 16 / 9;
            position: relative;
            transition: all 0.3s ease;
            border-radius: 6px;
        }

        .puzzle-slot-image:hover {
            background: rgba(103, 232, 249, 0.1);
            border-color: rgba(103, 232, 249, 0.6);
            transform: scale(1.02);
        }

        .puzzle-slot-image:has(.puzzle-piece-image) {
            border-color: rgba(34, 197, 94, 0.6);
            border-style: solid;
            background: rgba(34, 197, 94, 0.15);
            box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
        }

        .puzzle-slot-image:has(.puzzle-piece-image):hover {
            transform: scale(1);
        }

        /* 拼圖碎片容器 */
        .puzzle-pieces-container {
            flex: 0 0 300px;
            min-width: 250px;
            max-width: 350px;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        .puzzle-pieces-label {
            color: #67e8f9;
            font-weight: 600;
            margin-bottom: 10px;
            text-align: center;
            font-size: 0.85rem;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 6px 12px;
            background: rgba(103, 232, 249, 0.1);
            border-radius: 6px;
            border: 1px solid rgba(103, 232, 249, 0.2);
        }

        .label-icon {
            font-size: 1rem;
        }

        .puzzle-pieces {
            display: flex;
            gap: 10px;
            justify-content: center;
            align-items: flex-start;
            flex-wrap: wrap;
            padding: 12px;
            background: rgba(15, 23, 42, 0.4);
            border-radius: 8px;
            border: 1px solid rgba(103, 232, 249, 0.2);
            overflow-y: auto;
            flex: 1;
            min-height: 0;
        }

        .puzzle-piece-image {
            border: 2px solid rgba(59, 130, 246, 0.6);
            border-radius: 6px;
            cursor: grab;
            user-select: none;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 15px rgba(59, 130, 246, 0.2);
            background-color: rgba(0, 0, 0, 0.3);
            position: relative;
            aspect-ratio: 16 / 9;
            background-repeat: no-repeat;
            background-position: center;
            /* 尺寸由 JS 依據拼圖板縮放動態設定，避免破壞比例 */
        }

        .puzzle-piece-image::before {
            content: '';
            position: absolute;
            top: -3px;
            left: -3px;
            right: -3px;
            bottom: -3px;
            border-radius: 6px;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(103, 232, 249, 0.3));
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: -1;
        }

        .puzzle-piece-image:hover {
            transform: scale(1.08) translateY(-4px);
            border-color: rgba(59, 130, 246, 1);
            box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5), 0 0 30px rgba(59, 130, 246, 0.3);
        }

        .puzzle-piece-image:hover::before {
            opacity: 1;
        }

        .puzzle-piece-image:active {
            cursor: grabbing;
            transform: scale(1.05) translateY(-2px);
        }

        /* 舊的文字拼圖樣式（保留以備用） */
        .puzzle-piece {
            background: rgba(59, 130, 246, 0.3);
            border: 2px solid rgba(59, 130, 246, 0.5);
            color: #fff;
            padding: 12px 20px;
            border-radius: 8px;
            cursor: move;
            user-select: none;
            transition: all 0.3s ease;
        }

        .puzzle-piece:hover {
            background: rgba(59, 130, 246, 0.5);
            transform: translateY(-2px);
        }

        .puzzle-slot {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .slot-item {
            width: 120px;
            height: 60px;
            background: rgba(107, 114, 128, 0.2);
            border: 2px dashed rgba(107, 114, 128, 0.5);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: rgba(255, 255, 255, 0.5);
            transition: all 0.3s ease;
        }

        .slot-item.filled {
            background: rgba(34, 197, 94, 0.3);
            border-color: #4ade80;
            color: #fff;
        }

        .puzzle-result {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            padding: 40px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 100;
            animation: fadeIn 0.5s ease;
        }

        .result-icon {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(16, 185, 129, 0.9));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
            color: #fff;
            margin-bottom: 24px;
            box-shadow: 0 8px 32px rgba(34, 197, 94, 0.4);
            animation: scaleIn 0.5s ease;
        }

        .news-headline {
            font-size: 2rem;
            font-weight: 700;
            color: #4ade80;
            margin-bottom: 12px;
            text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
        }

        .result-desc {
            color: rgba(255, 255, 255, 0.8);
            font-size: 1rem;
            margin-bottom: 24px;
            line-height: 1.6;
            max-width: 500px;
        }

        .youtube-video-container {
            width: 100%;
            max-width: 560px;
            margin: 24px 0;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        .youtube-video-container iframe {
            width: 100%;
            height: 315px;
            border-radius: 8px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
        }

        @media (max-width: 768px) {
            .youtube-video-container {
                max-width: 100%;
            }

            .youtube-video-container iframe {
                height: 200px;
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes scaleIn {
            from {
                transform: scale(0);
            }

            to {
                transform: scale(1);
            }
        }

        .choice-scene {
            background: rgba(15, 23, 42, 0.8);
            border: 2px solid rgba(103, 232, 249, 0.3);
            border-radius: 12px;
            padding: 24px;
        }

        .choice-title {
            font-size: 1.125rem;
            color: #67e8f9;
            margin-bottom: 20px;
            text-align: center;
        }

        .choice-options {
            display: grid;
            gap: 12px;
        }

        .choice-option {
            background: rgba(59, 130, 246, 0.2);
            border: 2px solid rgba(59, 130, 246, 0.5);
            color: #fff;
            padding: 16px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .choice-option:hover {
            background: rgba(59, 130, 246, 0.4);
            transform: translateX(4px);
        }

        .choice-option.correct-choice {
            border-color: rgba(34, 197, 94, 0.5);
        }

        .choice-feedback {
            margin-top: 20px;
            padding: 16px;
            border-radius: 8px;
        }

        .feedback-correct {
            background: rgba(34, 197, 94, 0.2);
            color: #4ade80;
            border: 1px solid rgba(34, 197, 94, 0.5);
        }

        .feedback-wrong {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
            border: 1px solid rgba(239, 68, 68, 0.5);
        }

        /* ==================== 區域二：TPA爆發樣式 ==================== */

        .tpa-intro {
            position: relative;
            width: 100%;
            height: 500px;
            background: #000;
            border-radius: 12px;
            overflow: hidden;
        }

        .youtube-container {
            width: 100%;
            height: 100%;
            position: relative;
        }

        .youtube-container iframe {
            width: 100%;
            height: 100%;
        }

        .intro-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            color: #fff;
            z-index: 10;
        }

        .intro-text h2 {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            color: #fbbf24;
            text-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
        }

        .intro-text p {
            font-size: 1.5rem;
            color: #fff;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.9);
            }

            to {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }

        .tpa-scene {
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid rgba(239, 68, 68, 0.5);
            border-radius: 12px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            height: 100%;
            min-height: 0;
        }

        .tpa-scene .scene-title {
            margin-bottom: 6px;
        }

        .tpa-scene .scene-desc {
            margin-bottom: 10px;
        }

        .rhythm-game {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 9;
            background: url('../images/lv1/tpa0.jpg') center/cover no-repeat;
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 12px;
            transition: background-image 0.5s ease-in-out;
            flex: 1;
            min-height: 0;
        }

        .rhythm-game .game-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.4);
            z-index: 0;
            pointer-events: none;
        }

        .rhythm-stats {
            display: flex;
            justify-content: space-around;
            padding: 10px;
            background: rgba(0, 0, 0, 0.7);
            border-bottom: 2px solid rgba(239, 68, 68, 0.3);
            backdrop-filter: blur(10px);
            position: relative;
            z-index: 2;
        }

        .stat-item {
            color: #fff;
            font-weight: 600;
            font-size: 0.9rem;
        }

        .stat-item span {
            color: #fbbf24;
            font-size: 1.1rem;
        }

        .rhythm-catch-area {
            position: relative;
            width: 100%;
            height: calc(100% - 60px);
            z-index: 1;
        }

        .catch-line {
            position: absolute;
            bottom: 20%;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, transparent, #67e8f9, transparent);
            box-shadow: 0 0 10px rgba(103, 232, 249, 0.8);
            z-index: 1;
        }

        .rhythm-instruction {
            position: absolute;
            bottom: 8px;
            left: 50%;
            transform: translateX(-50%);
            color: #fbbf24;
            font-weight: 600;
            z-index: 2;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
            text-align: center;
            font-size: 0.85rem;
        }

        .rhythm-instruction::after {
            content: '（點擊或按對應字母鍵收集）';
            display: block;
            font-size: 0.75rem;
            color: rgba(251, 191, 36, 0.7);
            margin-top: 2px;
            font-weight: 400;
        }

        .falling-resource {
            position: absolute;
            top: 0;
            width: 80px;
            height: 100px;
            background: rgba(255, 255, 255, 0.9);
            border: 3px solid #fbbf24;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            opacity: 0;
            animation: fallDown 3s linear;
            box-shadow: 0 4px 15px rgba(251, 191, 36, 0.5);
            padding: 4px;
            overflow: hidden;
        }

        .falling-resource:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 20px rgba(251, 191, 36, 0.8);
        }

        .falling-resource img {
            width: 60px;
            height: 60px;
            object-fit: contain;
            flex-shrink: 0;
        }

        .resource-key {
            position: absolute;
            top: 2px;
            right: 2px;
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.9), rgba(251, 191, 36, 0.7));
            border: 2px solid #fbbf24;
            border-radius: 6px;
            padding: 2px 8px;
            color: #000;
            font-weight: 700;
            font-size: 0.875rem;
            letter-spacing: 1px;
            box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
            z-index: 10;
            min-width: 24px;
            text-align: center;
        }

        .resource-timer {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 0 0 9px 9px;
            overflow: hidden;
        }

        .resource-timer .timer-bar {
            height: 100%;
            width: 100%;
            background: #4ade80;
            border-radius: 0 0 9px 9px;
            transition: none;
            position: absolute;
            top: 0;
            left: 0;
        }

        .resource-timer .timer-text {
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 0.75rem;
            font-weight: 600;
            color: #4ade80;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
            white-space: nowrap;
            z-index: 5;
        }

        .falling-resource.caught {
            animation: caughtAnimation 0.2s ease-out;
        }

        .falling-resource.missed {
            opacity: 0.3;
            animation: missedAnimation 0.3s ease-out;
        }

        @keyframes fallDown {
            from {
                top: 0;
                opacity: 1;
            }

            to {
                top: 90%;
                opacity: 1;
            }
        }

        @keyframes caughtAnimation {
            0% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.5);
            }

            100% {
                transform: scale(0);
                opacity: 0;
            }
        }

        @keyframes missedAnimation {
            to {
                opacity: 0.3;
                transform: translateY(20px);
            }
        }

        .tpa-result {
            text-align: center;
            padding: 24px;
            background: rgba(0, 0, 0, 0.8);
            border-radius: 12px;
            margin-top: 24px;
        }

        .result-title {
            font-size: 1.8rem;
            font-weight: 700;
            color: #fbbf24;
            margin-bottom: 12px;
            text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
        }

        .result-desc {
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 20px;
            font-size: 1.1rem;
        }

        .result-story {
            background: rgba(15, 23, 42, 0.6);
            border-left: 4px solid #67e8f9;
            padding: 20px;
            border-radius: 8px;
            margin: 24px 0;
            text-align: left;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.8;
            font-size: 1rem;
            min-height: 80px;
        }

        .result-achievement {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(251, 191, 36, 0.1));
            border: 2px solid rgba(251, 191, 36, 0.5);
            padding: 16px;
            border-radius: 8px;
            margin: 20px 0;
            color: #fbbf24;
            font-size: 1.2rem;
            font-weight: 700;
            text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
            animation: achievementGlow 2s ease-in-out infinite;
        }

        @keyframes achievementGlow {

            0%,
            100% {
                box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
            }

            50% {
                box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
            }
        }

        .stage-display {
            margin: 24px 0;
        }

        .stage-name {
            font-size: 1.5rem;
            font-weight: 700;
            color: #67e8f9;
            margin-bottom: 16px;
            text-shadow: 0 0 10px rgba(103, 232, 249, 0.5);
        }

        .stage-image {
            width: 100%;
            aspect-ratio: 16 / 9;
            object-fit: cover;
            border-radius: 12px;
            border: 3px solid rgba(251, 191, 36, 0.5);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
            margin: 0 auto;
            display: block;
        }

        /* ==================== 區域三：體制化樣式 ==================== */

        .systemization-scene {
            position: absolute;
            top: -16px;
            left: -16px;
            right: -16px;
            bottom: -16px;
            padding: 16px;
            padding-top: 60px;
            /* 為進度條留出空間，避免標題被擋到 */
            overflow-y: auto;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
        }

        /* 16:9 背景圖片容器 */
        .systemization-scene::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            aspect-ratio: 16 / 9;
            background: url('../images/lv1/labs.jpg') center center / contain no-repeat;
            z-index: 0;
            pointer-events: none;
        }

        /* 遮罩層 */
        .systemization-scene::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            aspect-ratio: 16 / 9;
            background: rgba(0, 0, 0, 0.5);
            z-index: 0;
            pointer-events: none;
        }

        .systemization-scene>* {
            position: relative;
            z-index: 1;
        }

        .drag-drop-pairing {
            margin-bottom: 12px;
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        .pairing-instruction {
            text-align: center;
            color: #67e8f9;
            font-weight: 600;
            margin-bottom: 12px;
            font-size: 0.9rem;
            flex-shrink: 0;
        }

        .pairing-targets {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-bottom: 12px;
            flex: 1;
            min-height: 0;
        }

        .pairing-target {
            background: rgba(15, 23, 42, 0.8);
            border: 2px solid rgba(59, 130, 246, 0.3);
            border-radius: 8px;
            padding: 12px;
            min-height: 0;
            display: flex;
            flex-direction: column;
        }

        .target-name {
            font-size: 1rem;
            font-weight: 700;
            color: #67e8f9;
            margin-bottom: 4px;
            flex-shrink: 0;
        }

        .target-desc {
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.75rem;
            margin-bottom: 8px;
            flex-shrink: 0;
        }

        .target-slot {
            min-height: 60px;
            flex: 1;
            background: rgba(107, 114, 128, 0.1);
            border: 2px dashed rgba(107, 114, 128, 0.5);
            border-radius: 6px;
            padding: 8px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .target-slot.correct {
            background: rgba(34, 197, 94, 0.2);
            border-color: #4ade80;
        }

        .paired-card {
            background: rgba(34, 197, 94, 0.3);
            border: 1px solid #4ade80;
            color: #fff;
            padding: 8px;
            border-radius: 6px;
            text-align: center;
            font-size: 0.8rem;
            line-height: 1.3;
        }

        .pairing-cards {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
            flex-shrink: 0;
        }

        .pairing-card {
            background: rgba(59, 130, 246, 0.3);
            border: 2px solid rgba(59, 130, 246, 0.5);
            color: #fff;
            padding: 10px 16px;
            border-radius: 6px;
            cursor: move;
            user-select: none;
            transition: all 0.3s ease;
            min-width: 150px;
            text-align: center;
            font-size: 0.85rem;
            line-height: 1.3;
        }

        .pairing-card:hover {
            background: rgba(59, 130, 246, 0.5);
            transform: translateY(-2px);
        }

        .pairing-result {
            text-align: center;
            padding: 16px;
        }

        @media (max-width: 1024px) {
            .pairing-targets {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .pairing-target {
                min-height: 120px;
            }

            .target-slot {
                min-height: 50px;
            }
        }

        /* ==================== 觀念防火牆樣式 ==================== */

        .stigma-firewall-scene {
            background: rgba(0, 0, 0, 0.9);
            border: 2px solid rgba(239, 68, 68, 0.5);
            border-radius: 12px;
            padding: 24px;
        }

        .firewall-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 32px;
            padding-bottom: 16px;
            border-bottom: 2px solid rgba(239, 68, 68, 0.3);
        }

        .boss-hp-bar {
            flex: 1;
            margin-right: 24px;
        }

        .hp-label {
            color: #ef4444;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .hp-bar {
            position: relative;
            width: 100%;
            height: 30px;
            background: rgba(17, 24, 39, 0.8);
            border: 2px solid rgba(239, 68, 68, 0.5);
            border-radius: 8px;
            overflow: hidden;
        }

        .hp-fill {
            height: 100%;
            background: linear-gradient(90deg, #ef4444, #dc2626);
            transition: width 0.5s ease;
            box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
        }

        .hp-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #fff;
            font-weight: 700;
            font-size: 0.875rem;
        }

        .stigma-bullet {
            background: rgba(239, 68, 68, 0.2);
            border: 2px solid rgba(239, 68, 68, 0.5);
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 32px;
            text-align: center;
            animation: bulletPulse 2s infinite;
        }

        .stigma-bullet.destroyed {
            animation: bulletDestroy 0.5s ease-out;
            opacity: 0.3;
        }

        .bullet-text {
            font-size: 1.25rem;
            font-weight: 700;
            color: #ef4444;
            line-height: 1.6;
        }

        @keyframes bulletPulse {

            0%,
            100% {
                box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
            }

            50% {
                box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
            }
        }

        @keyframes bulletDestroy {
            0% {
                transform: scale(1);
                opacity: 1;
            }

            50% {
                transform: scale(1.1);
            }

            100% {
                transform: scale(0.8);
                opacity: 0.3;
            }
        }

        .response-options {
            margin-top: 24px;
        }

        .response-title {
            color: #67e8f9;
            font-weight: 600;
            margin-bottom: 16px;
            text-align: center;
        }

        .response-list {
            display: grid;
            gap: 12px;
        }

        .response-option {
            background: rgba(59, 130, 246, 0.2);
            border: 2px solid rgba(59, 130, 246, 0.5);
            color: #fff;
            padding: 16px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            line-height: 1.6;
        }

        .response-option:hover {
            background: rgba(59, 130, 246, 0.4);
            transform: translateX(4px);
        }

        .response-option.correct {
            background: rgba(34, 197, 94, 0.3);
            border-color: #4ade80;
        }

        .response-option.wrong {
            background: rgba(239, 68, 68, 0.3);
            border-color: #ef4444;
        }

        .response-option.correct-response {
            border-color: rgba(34, 197, 94, 0.5);
        }

        /* 問答系統 */
        .quiz-container {
            background: rgba(0, 0, 0, 0.8);
            border: 2px solid rgba(59, 130, 246, 0.5);
            border-radius: 12px;
            padding: 24px;
        }

        .quiz-question {
            font-size: 1.25rem;
            color: #fff;
            margin-bottom: 24px;
        }

        .quiz-options {
            display: grid;
            gap: 12px;
        }

        .quiz-option {
            background: rgba(59, 130, 246, 0.2);
            border: 2px solid rgba(59, 130, 246, 0.5);
            color: #fff;
            padding: 16px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: 'Orbitron', sans-serif;
        }

        .quiz-option:hover {
            background: rgba(59, 130, 246, 0.4);
            border-color: #67e8f9;
        }

        .quiz-option.correct {
            background: rgba(34, 197, 94, 0.3);
            border-color: #4ade80;
        }

        .quiz-option.wrong {
            background: rgba(239, 68, 68, 0.3);
            border-color: #ef4444;
        }

        .quiz-timer {
            position: absolute;
            top: 20px;
            right: 20px;
            font-size: 2rem;
            color: #fbbf24;
            font-weight: 700;
        }

        .combo-display {
            position: absolute;
            top: 20px;
            left: 20px;
            font-size: 1.5rem;
            color: #67e8f9;
            font-weight: 700;
        }

        /* 反應力遊戲 */
        .reaction-game {
            position: relative;
            width: 100%;
            height: 500px;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 12px;
            overflow: hidden;
        }

        .target {
            position: absolute;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: radial-gradient(circle, #ef4444, #dc2626);
            border: 3px solid #fff;
            cursor: pointer;
            transition: transform 0.1s ease;
        }

        .target:hover {
            transform: scale(1.1);
        }

        .target.hit {
            animation: explode 0.3s ease-out;
        }

        @keyframes explode {
            0% {
                transform: scale(1);
                opacity: 1;
            }

            100% {
                transform: scale(2);
                opacity: 0;
            }
        }

        /* 雷達圖 */
        .radar-chart {
            width: 100%;
            max-width: 500px;
            margin: 0 auto;
        }

        /* 拖放區域 */
        .drag-drop-area {
            min-height: 200px;
            background: rgba(15, 23, 42, 0.5);
            border: 2px dashed rgba(59, 130, 246, 0.5);
            border-radius: 8px;
            padding: 16px;
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
        }

        .draggable-item {
            background: rgba(59, 130, 246, 0.3);
            border: 2px solid rgba(59, 130, 246, 0.5);
            padding: 12px;
            border-radius: 8px;
            cursor: move;
            user-select: none;
        }

        .draggable-item.dragging {
            opacity: 0.5;
        }

        /* 網格編輯器 */
        .grid-editor {
            display: grid;
            grid-template-columns: repeat(20, 1fr);
            gap: 2px;
            background: rgba(15, 23, 42, 0.5);
            padding: 8px;
            border-radius: 8px;
        }

        .grid-cell {
            aspect-ratio: 1;
            background: rgba(59, 130, 246, 0.1);
            border: 1px solid rgba(59, 130, 246, 0.2);
            cursor: pointer;
        }

        .grid-cell.occupied {
            background: rgba(103, 232, 249, 0.3);
        }

        /* 紙娃娃系統 */
        .avatar-editor {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 24px;
        }

        .avatar-preview {
            background: rgba(15, 23, 42, 0.5);
            border-radius: 12px;
            padding: 24px;
            text-align: center;
        }

        .avatar-options {
            display: grid;
            gap: 12px;
        }

        .option-group {
            background: rgba(15, 23, 42, 0.5);
            padding: 16px;
            border-radius: 8px;
        }

        .option-group-title {
            font-size: 1rem;
            font-weight: 600;
            color: #67e8f9;
            margin-bottom: 12px;
        }

        .option-items {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .option-item {
            width: 60px;
            height: 60px;
            background: rgba(59, 130, 246, 0.2);
            border: 2px solid rgba(59, 130, 246, 0.5);
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .option-item:hover {
            border-color: #67e8f9;
            transform: scale(1.1);
        }

        .option-item.selected {
            border-color: #4ade80;
            background: rgba(34, 197, 94, 0.3);
        }

        /* 設定面板 */
        /* 成就面板樣式 */
        .achievements-panel {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            z-index: 3000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .achievements-panel.active {
            display: flex;
        }

        .achievements-content {
            background: rgba(15, 23, 42, 0.95);
            border: 2px solid rgba(251, 191, 36, 0.5);
            border-radius: 16px;
            padding: 32px;
            max-width: 800px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }

        .achievements-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 2px solid rgba(251, 191, 36, 0.3);
        }

        .achievements-title {
            font-size: 1.75rem;
            font-weight: 700;
            color: #fbbf24;
            margin: 0;
            text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
        }

        .achievements-close {
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.7);
            font-size: 2rem;
            cursor: pointer;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .achievements-close:hover {
            background: rgba(251, 191, 36, 0.2);
            color: #fbbf24;
        }

        .achievements-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 24px;
        }

        .achievement-stat-item {
            background: rgba(251, 191, 36, 0.1);
            border: 1px solid rgba(251, 191, 36, 0.3);
            border-radius: 8px;
            padding: 16px;
            text-align: center;
        }

        .stat-label {
            font-size: 0.875rem;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 8px;
        }

        .stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: #fbbf24;
        }

        .achievements-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 16px;
        }

        .achievement-item {
            background: rgba(15, 23, 42, 0.8);
            border: 2px solid rgba(59, 130, 246, 0.3);
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .achievement-item.unlocked {
            border-color: rgba(251, 191, 36, 0.6);
            background: rgba(251, 191, 36, 0.1);
            box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
        }

        .achievement-item.locked {
            opacity: 0.5;
            filter: grayscale(100%);
        }

        .achievement-item:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 24px rgba(251, 191, 36, 0.3);
        }

        .achievement-icon {
            font-size: 3rem;
            margin-bottom: 12px;
            display: block;
        }

        .achievement-item.unlocked .achievement-icon {
            color: #fbbf24;
            text-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
        }

        .achievement-item.locked .achievement-icon {
            color: rgba(255, 255, 255, 0.3);
        }

        .achievement-name {
            font-size: 1rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 8px;
        }

        .achievement-desc {
            font-size: 0.875rem;
            color: rgba(255, 255, 255, 0.7);
            line-height: 1.4;
        }

        .achievement-item.unlocked::before {
            content: '✓';
            position: absolute;
            top: 8px;
            right: 8px;
            width: 24px;
            height: 24px;
            background: rgba(34, 197, 94, 0.8);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 0.875rem;
            font-weight: 700;
        }

        .settings-panel {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            z-index: 3000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .settings-panel.active {
            display: flex;
        }

        .settings-content {
            background: rgba(15, 23, 42, 0.95);
            border: 2px solid rgba(103, 232, 249, 0.5);
            border-radius: 16px;
            padding: 32px;
            max-width: 500px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }

        .settings-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 2px solid rgba(59, 130, 246, 0.3);
        }

        .settings-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: #67e8f9;
        }

        .settings-close {
            background: transparent;
            border: none;
            color: #67e8f9;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 4px;
            transition: background 0.3s ease;
            font-family: 'Orbitron', sans-serif;
        }

        .settings-close:hover {
            background: rgba(103, 232, 249, 0.2);
        }

        .settings-group {
            margin-bottom: 24px;
        }

        .settings-group-title {
            font-size: 1rem;
            font-weight: 600;
            color: #67e8f9;
            margin-bottom: 12px;
        }

        .settings-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid rgba(59, 130, 246, 0.2);
        }

        .settings-item:last-child {
            border-bottom: none;
        }

        .settings-label {
            color: rgba(255, 255, 255, 0.9);
            font-size: 0.875rem;
        }

        .settings-control {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .settings-slider {
            width: 150px;
            height: 6px;
            background: rgba(59, 130, 246, 0.3);
            border-radius: 3px;
            outline: none;
            -webkit-appearance: none;
            appearance: none;
        }

        .settings-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            background: #67e8f9;
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 0 10px rgba(103, 232, 249, 0.5);
        }

        .settings-slider::-moz-range-thumb {
            width: 18px;
            height: 18px;
            background: #67e8f9;
            border-radius: 50%;
            cursor: pointer;
            border: none;
            box-shadow: 0 0 10px rgba(103, 232, 249, 0.5);
        }

        .settings-value {
            color: #fcd34d;
            font-size: 0.875rem;
            min-width: 40px;
            text-align: right;
        }

        .settings-toggle {
            position: relative;
            width: 50px;
            height: 26px;
            background: rgba(59, 130, 246, 0.3);
            border-radius: 13px;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .settings-toggle.active {
            background: rgba(103, 232, 249, 0.6);
        }

        .settings-toggle::after {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 20px;
            height: 20px;
            background: #fff;
            border-radius: 50%;
            transition: transform 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .settings-toggle.active::after {
            transform: translateX(24px);
        }

        .settings-actions {
            display: flex;
            gap: 12px;
            margin-top: 32px;
        }

        .settings-button {
            flex: 1;
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-family: 'Orbitron', sans-serif;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .settings-button.primary {
            background: linear-gradient(135deg, #3b82f6, #8b5cf6);
            color: #fff;
        }

        .settings-button.primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
        }

        .settings-button.secondary {
            background: rgba(59, 130, 246, 0.2);
            color: #67e8f9;
            border: 1px solid rgba(59, 130, 246, 0.5);
        }

        .settings-button.secondary:hover {
            background: rgba(59, 130, 246, 0.4);
        }

        /* 個人資訊輸入框樣式 */
        .settings-input,
        .settings-select,
        .settings-textarea {
            width: 220px;
            background: rgba(15, 23, 42, 0.5);
            border: 1px solid rgba(59, 130, 246, 0.3);
            border-radius: 4px;
            padding: 8px 12px;
            color: #fff;
            font-family: 'Noto Sans TC', sans-serif;
            font-size: 0.9rem;
            outline: none;
            transition: all 0.3s ease;
        }

        .settings-input::placeholder,
        .settings-textarea::placeholder {
            color: rgba(255, 255, 255, 0.4);
        }

        .settings-input:focus,
        .settings-select:focus,
        .settings-textarea:focus {
            border-color: #67e8f9;
            background: rgba(15, 23, 42, 0.8);
            box-shadow: 0 0 10px rgba(103, 232, 249, 0.2);
        }

        .settings-select {
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2367e8f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 8px center;
            background-size: 16px;
            padding-right: 30px;
        }

        .settings-select option {
            background: #0f172a;
            color: #fff;
            padding: 8px;
        }

        .settings-textarea {
            width: 100%;
            resize: vertical;
            min-height: 80px;
            line-height: 1.5;
        }

        /* 調整輸入框標籤對齊 */
        .settings-item {
            flex-wrap: wrap;
        }

        /* 針對 Textarea 的佈局調整 */
        .settings-textarea-container {
            width: 100%;
            margin-top: 8px;
        }

        /* 手機轉向提示 Overlay */
        .orientation-warning {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: #000;
            z-index: 9999;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 20px;
        }

        .orientation-content {
            border: 2px solid #ef4444;
            background: rgba(239, 68, 68, 0.1);
            padding: 40px;
            border-radius: 16px;
            box-shadow: 0 0 50px rgba(239, 68, 68, 0.3);
            animation: pulse-alert 2s infinite;
        }

        @keyframes pulse-alert {

            0%,
            100% {
                box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
            }

            50% {
                box-shadow: 0 0 50px rgba(239, 68, 68, 0.6);
            }
        }

        .orientation-icon {
            font-size: 64px;
            color: #ef4444;
            margin-bottom: 20px;
            animation: rotate-icon 2s infinite ease-in-out;
        }

        @keyframes rotate-icon {
            0% {
                transform: rotate(0deg);
            }

            50% {
                transform: rotate(-90deg);
            }

            100% {
                transform: rotate(0deg);
            }
        }

        .orientation-title {
            color: #ef4444;
            font-size: 1.5rem;
            margin-bottom: 10px;
            font-family: 'Orbitron', sans-serif;
            letter-spacing: 2px;
        }

        .orientation-text {
            color: #fff;
            line-height: 1.6;
            font-size: 1rem;
        }

        /* 僅在手機直向模式且寬度小於 900px 時顯示 */
        @media screen and (max-width: 900px) and (orientation: portrait) {
            .orientation-warning {
                display: flex;
            }
        }
/* ==================== Ѩt ==================== */

/* ѫs */
.guidebook-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(103, 232, 249, 0.3);
    border-radius: 8px;
    color: #67e8f9;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.guidebook-btn:hover {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: #67e8f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103, 232, 249, 0.3);
}

.guidebook-btn .material-icons {
    font-size: 1.2rem;
}

/* ѼҺA */
.guidebook-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.guidebook-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border: 2px solid rgba(103, 232, 249, 0.3);
    border-radius: 16px;
    max-width: 900px;
    max-height: 85vh;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guidebook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(103, 232, 249, 0.2);
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.guidebook-header h2 {
    color: #67e8f9;
    font-size: 1.5rem;
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px rgba(103, 232, 249, 0.5);
}

.close-btn {
    background: none;
    border: none;
    color: #67e8f9;
    cursor: pointer;
    padding: 4px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #fff;
    transform: rotate(90deg);
}

.guidebook-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

/* Ѥe˦ */
.guidebook-body h1 {
    color: #67e8f9;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1rem;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px rgba(103, 232, 249, 0.5);
}

.guidebook-body h2 {
    color: #67e8f9;
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-family: 'Orbitron', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guidebook-body h3 {
    color: #8b5cf6;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

.guidebook-body ul, .guidebook-body ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.guidebook-body li {
    margin-bottom: 0.5em;
}

.guidebook-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    background: rgba(103, 232, 249, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.guidebook-body th {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    color: #67e8f9;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.guidebook-body td {
    padding: 10px 12px;
    border-top: 1px solid rgba(103, 232, 249, 0.1);
}

.guidebook-body .highlight-box {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-left: 4px solid #67e8f9;
    padding: 16px;
    margin: 1.5em 0;
    border-radius: 8px;
}

.guidebook-body .tip-box {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-left: 4px solid #fbbf24;
    padding: 16px;
    margin: 1.5em 0;
    border-radius: 8px;
}

.guidebook-body .achievement-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
    border: 1px solid rgba(251, 191, 36, 0.5);
    border-radius: 6px;
    color: #fbbf24;
    font-size: 0.9rem;
    margin: 4px;
}

/* ==================== Week Card Badges ==================== */

/* e */
.week-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

/*  */
.week-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
    border: 1px solid rgba(251, 191, 36, 0.5);
    border-radius: 12px;
    color: #fbbf24;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: help;
}

.week-badge:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(217, 119, 6, 0.3) 100%);
    border-color: #fbbf24;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.week-badge .material-icons {
    font-size: 0.9rem;
}

/* ==================== Week Card Activities ==================== */

/* ʦCe */
.week-activities {
    margin: 12px 0;
    padding: 8px;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(103, 232, 249, 0.1);
}

/* Ӭʶ */
.activity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin: 4px 0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: rgba(103, 232, 249, 0.05);
}

/* ʹϥ */
.activity-icon {
    flex-shrink: 0;
}

.activity-icon .material-icons {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.3);
}

.activity-item.completed .activity-icon .material-icons {
    color: #4ade80;
}

/* ʸT */
.activity-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.activity-name {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.activity-item.completed .activity-name {
    color: rgba(255, 255, 255, 0.9);
}

.activity-score {
    font-size: 0.75rem;
    color: #67e8f9;
    font-weight: 600;
    white-space: nowrap;
}

/* Fix for Week Card Content Overflow */
.week-card {
    height: auto !important;
    min-height: 450px;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
}

.week-activities {
    flex: 1;
    margin-bottom: 20px;
}
