﻿* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --safe-top: env(safe-area-inset-top, 0px);
            --safe-bottom: env(safe-area-inset-bottom, 0px);
            --safe-left: env(safe-area-inset-left, 0px);
            --safe-right: env(safe-area-inset-right, 0px);
            color-scheme: dark;
        }

        body {
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
            background: #0a0a0a;
            min-height: 100vh;
            overflow: hidden;
            cursor: default;
        }

        /* 环境噪点纹理 */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
            opacity: 0.03;
            pointer-events: none;
            z-index: 0;
        }

        .page-enter {
            animation: pageEnter 2s ease-out forwards;
        }

        @keyframes pageEnter {
            0% {
                opacity: 0;
                transform: scale(0.95);
            }
            100% {
                opacity: 1;
                transform: none;
            }
        }

        /* 主容器 */
        .container {
            width: 100vw;
            height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        @supports (height: 100dvh) {
            body {
                min-height: 100dvh;
            }
            .container {
                height: 100dvh;
            }
        }

        @supports (height: 100svh) {
            body {
                min-height: 100svh;
            }
            .container {
                height: 100svh;
            }
        }

        /* 光晕背景 */
        .glow-bg {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -30%);
            width: 600px;
            height: 600px;
            background: radial-gradient(circle, rgba(255, 147, 41, 0.15) 0%, rgba(255, 147, 41, 0) 70%);
            pointer-events: none;
            opacity: 0;
            transition: opacity 1s ease;
        }

        .glow-bg.lit {
            opacity: 1;
        }

        /* 蜡烛容器 */
        .candle-wrapper {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            z-index: 20;
            background: transparent;
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
            touch-action: manipulation;
            outline: none;
        }

        .candle-wrapper * {
            -webkit-tap-highlight-color: transparent;
        }

        /* 火焰容器 */
        .flame-container {
            position: relative;
            width: 60px;
            height: 120px;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        .flame-container.lit {
            opacity: 1;
        }

        .flame-container.smoking {
            opacity: 1;
        }

        .flame-container.lit.extinguishing {
            opacity: 1;
        }

        .flame-container.smoking .flame,
        .flame-container.smoking .flame-glow {
            opacity: 0;
        }

        .flame-container.extinguishing .flame {
            animation: flicker 0.5s ease-in-out infinite alternate, flame-out 3s ease-out forwards;
        }

        .flame-container.extinguishing .flame-glow {
            animation: glow-breathe 2s ease-in-out infinite, glow-out 3s ease-out forwards;
        }

        @keyframes flame-out {
            0% { opacity: 1; }
            100% { opacity: 0; }
        }

        @keyframes glow-out {
            0% { opacity: 1; }
            100% { opacity: 0; }
        }

        /* 火焰 - 增强版 */
        .flame {
            position: absolute;
            bottom: 0;
            width: 30px;
            height: 80px;
            background: linear-gradient(to top, 
                #1a0a00 0%,      /* 蓝黑色根部 */
                #ff4500 15%,     /* 深橙 */
                #ff6b35 30%,     /* 橙色 */
                #ffa500 50%,     /* 金橙 */
                #ffdd00 70%,     /* 黄色 */
                #fff7e0 90%,     /* 淡黄 */
                rgba(255,255,255,0.9) 100%  /* 白色尖端 */
            );
            border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
            animation: flicker 0.5s ease-in-out infinite alternate;
            filter: blur(1px);
            transform-origin: bottom center;
            box-shadow: 
                0 0 20px rgba(255, 147, 41, 0.6),
                0 0 40px rgba(255, 100, 0, 0.4),
                0 0 60px rgba(255, 50, 0, 0.2);
        }

        /* 内层火焰 */
        .flame::before {
            content: '';
            position: absolute;
            bottom: 5px;
            left: 50%;
            transform: translateX(-50%);
            width: 20px;
            height: 60px;
            background: linear-gradient(to top, 
                #1a0a00 0%,      /* 蓝色根部 - 最热 */
                #ff8c00 20%, 
                #ffcc00 50%, 
                #fff 100%
            );
            border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
            animation: flicker-inner 0.3s ease-in-out infinite alternate;
            filter: blur(0.5px);
        }

        /* 火焰核心 */
        .flame::after {
            content: '';
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            width: 8px;
            height: 30px;
            background: linear-gradient(to top, #fff, rgba(255,255,255,0.9));
            border-radius: 50%;
            filter: blur(2px);
            animation: core-pulse 0.4s ease-in-out infinite alternate;
        }

        /* 火焰外发光层 */
        .flame-glow {
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 100px;
            background: radial-gradient(ellipse at center bottom, 
                rgba(255, 147, 41, 0.4) 0%, 
                rgba(255, 100, 0, 0.2) 40%, 
                transparent 70%
            );
            pointer-events: none;
            animation: glow-breathe 2s ease-in-out infinite;
        }

        @keyframes flicker {
            0% { transform: scaleY(1) scaleX(1) rotate(-1deg); }
            25% { transform: scaleY(1.03) scaleX(0.97) rotate(0.5deg); }
            50% { transform: scaleY(1.05) scaleX(0.95) rotate(1deg); }
            75% { transform: scaleY(0.98) scaleX(1.02) rotate(-0.5deg); }
            100% { transform: scaleY(0.95) scaleX(1.05) rotate(-1deg); }
        }

        @keyframes flicker-inner {
            0% { transform: translateX(-50%) scaleY(1) scaleX(1); }
            50% { transform: translateX(-48%) scaleY(1.08) scaleX(0.95); }
            100% { transform: translateX(-52%) scaleY(1.1) scaleX(1.02); }
        }

        @keyframes core-pulse {
            0% { opacity: 0.8; transform: translateX(-50%) scaleY(1); }
            100% { opacity: 1; transform: translateX(-50%) scaleY(1.1); }
        }

        @keyframes glow-breathe {
            0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
            50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
        }

        /* 火星粒子容器 */
        .spark-container {
            position: absolute;
            bottom: 60px;
            left: 50%;
            transform: translateX(-50%);
            width: 40px;
            height: 40px;
            pointer-events: none;
        }

        /* 点燃动画 */
        .flame.igniting {
            animation: ignite 0.8s ease-out forwards;
        }

        @keyframes ignite {
            0% {
                height: 10px;
                opacity: 0.3;
                filter: blur(3px);
            }
            30% {
                height: 50px;
                opacity: 0.7;
            }
            60% {
                height: 90px;
                opacity: 1;
            }
            100% {
                height: 80px;
                opacity: 1;
                filter: blur(1px);
            }
        }

        /* 火星飞舞动画 */
        @keyframes spark-fly {
            0% {
                opacity: 1;
                transform: translate(0, 0) scale(1);
            }
            100% {
                opacity: 0;
                transform: translate(var(--tx, 20px), -80px) scale(0);
            }
        }

        .flame-spark {
            --tx: 0px;
        }

        /* 蜡烛本体 */
        .candle {
            width: 40px;
            height: 150px;
            background-color: #fffef0;
            background-image: linear-gradient(to right, #f5f5dc 0%, #fffef0 50%, #f5f5dc 100%);
            border-radius: 5px 5px 3px 3px;
            position: relative;
            box-shadow: 
                inset -5px 0 10px rgba(0,0,0,0.1),
                0 5px 20px rgba(0,0,0,0.3);
        }

        /* 烛芯 */
        .wick {
            position: absolute;
            top: -15px;
            left: 50%;
            transform: translateX(-50%);
            width: 3px;
            height: 20px;
            background: linear-gradient(to top, #2a2a2a, #4a4a4a);
            border-radius: 50% 50% 0 0;
            display: none;
        }

        /* 蜡油滴 */
        .candle::before {
            content: '';
            position: absolute;
            top: -5px;
            left: 50%;
            transform: translateX(-50%);
            width: 44px;
            height: 15px;
            background-color: #fffef0;
            background-image: linear-gradient(to bottom, #fffef0, #f5f5dc);
            border-radius: 50%;
        }

        /* 烛台 */
        .holder {
            width: 80px;
            height: 20px;
            background: linear-gradient(to bottom, #8b7355, #6b5344);
            border-radius: 5px;
            margin-top: -2px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.4);
        }

        .holder::after {
            content: '';
            display: block;
            width: 100px;
            height: 10px;
            background: linear-gradient(to bottom, #6b5344, #5a4535);
            border-radius: 3px;
            margin: 0 auto;
            margin-top: 2px;
        }

        /* 点击提示 */
        .click-hint {
            position: absolute;
            bottom: -60px;
            color: rgba(255, 255, 255, 0.5);
            font-size: 14px;
            letter-spacing: 2px;
            animation: pulse 2s ease-in-out infinite;
            white-space: nowrap;
            text-align: center;
            width: 150px;
            left: 50%;
            transform: translateX(-50%);
        }

        .click-hint.hidden {
            display: none;
        }

        @keyframes pulse {
            0%, 100% { opacity: 0.5; }
            50% { opacity: 1; }
        }

        /* 灵修短语 */
        .mantra {
            position: absolute;
            top: 15%;
            color: rgba(255, 255, 255, 0.7);
            font-size: 18px;
            letter-spacing: 3px;
            opacity: 0;
            transition: opacity 1s ease;
            text-align: center;
            max-width: 80%;
        }

        .mantra.show {
            opacity: 1;
        }

        /* 呼吸引导 */
        .breath-guide {
            position: absolute;
            bottom: 15%;
            color: rgba(255, 255, 255, 0.6);
            font-size: 16px;
            letter-spacing: 2px;
            opacity: 0;
            transition: opacity 0.9s ease, transform 0.9s ease, filter 0.9s ease;
            transform: translateY(10px);
            filter: blur(0.2px);
            padding: 10px 16px;
            border-radius: 999px;
            background: rgba(0, 0, 0, 0.22);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            text-shadow: 0 0 18px rgba(255, 200, 120, 0.12);
            z-index: 120;
        }

        .breath-guide.show {
            opacity: 1;
            filter: blur(0);
        }

        .breath-guide.show:not(.countdown) {
            transform: translateY(0);
        }

        .fire-gaze-mode .breath-guide.show:not(.countdown) {
            color: rgba(255, 255, 255, 0.98);
            background: rgba(0, 0, 0, 0.26);
            font-size: 14px;
            font-weight: 400;
            letter-spacing: 1px;
            text-shadow: 0 0 12px rgba(255, 200, 120, 0.08);
        }

        .fire-gaze-mode .breath-guide {
            position: fixed;
            z-index: 10060;
            transition: opacity 0.15s ease, transform 0.15s ease, filter 0.15s ease;
        }

        .breath-guide.countdown {
            position: fixed;
            left: 50%;
            bottom: auto;
            font-size: 34px;
            letter-spacing: 8px;
            padding: 14px 24px;
            color: rgba(255, 255, 255, 0.82);
            background: rgba(0, 0, 0, 0.28);
            transform: translate(-50%, 0);
            transition: opacity 0.55s ease, transform 0.55s ease, filter 0.55s ease;
            animation: none;
        }

        .breath-guide.countdown:not(.show) {
            transform: translate(-50%, 0);
        }

        @keyframes fire-gaze-countdown-pop {
            0% { opacity: 0; transform: translate(-50%, 0) scale(0.985); }
            35% { opacity: 1; transform: translate(-50%, 0) scale(1); }
            100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
        }

        .fire-gaze-entry-ring {
            position: fixed;
            border-radius: 999px;
            border: 1.5px solid rgba(255, 200, 120, 0.35);
            box-shadow: 0 0 26px rgba(255, 180, 90, 0.22), 0 0 70px rgba(255, 180, 90, 0.12);
            pointer-events: none;
            z-index: 10020;
            opacity: 0;
            animation: fire-gaze-ring 1s ease-out;
        }

        @keyframes fire-gaze-ring {
            0% { opacity: 0; transform: scale(0.98); }
            25% { opacity: 1; }
            100% { opacity: 0; transform: scale(1.06); }
        }

        .fire-gaze-curtain {
            position: fixed;
            inset: 0;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.6s ease;
            z-index: 10;
        }

        .fire-gaze-mode .fire-gaze-curtain {
            opacity: 1;
        }

        .fire-gaze-mode .toolbar,
        .fire-gaze-mode .contact-fab,
        .fire-gaze-mode .stats,
        .fire-gaze-mode .mantra,
        .fire-gaze-mode .click-hint,
        .fire-gaze-mode .sound-hint,
        .fire-gaze-mode .volume-popover {
            opacity: 0 !important;
            pointer-events: none !important;
        }

        .fire-gaze-tap-layer {
            position: fixed;
            inset: 0;
            background: transparent;
            z-index: 10030;
            cursor: default;
            -webkit-tap-highlight-color: transparent;
        }

        /* 工具栏 */
        .toolbar {
            position: fixed;
            bottom: calc(18px + var(--safe-bottom));
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 20px;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        .toolbar.show {
            opacity: 1;
        }

        .tool-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: rgba(255, 255, 255, 0.7);
            font-size: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            user-select: none;
        }

        .tool-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.1);
        }

        .tool-btn.active {
            background: rgba(255, 147, 41, 0.3);
            border-color: rgba(255, 147, 41, 0.5);
        }

        .contact-fab {
            position: fixed;
            top: calc(18px + var(--safe-top));
            right: calc(18px + var(--safe-right));
            width: 46px;
            height: 46px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.18);
            color: rgba(255, 255, 255, 0.75);
            font-size: 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 120;
            opacity: 0;
            transform: scale(0.98);
            transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
            pointer-events: none;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            user-select: none;
        }

        .contact-fab.show {
            opacity: 1;
            transform: scale(1);
            pointer-events: auto;
        }

        .contact-fab:hover {
            background: rgba(255, 255, 255, 0.14);
            transform: scale(1.05);
        }

        .volume-popover {
            position: fixed;
            z-index: 9999;
            background: rgba(0, 0, 0, 0.55);
            border: 1px solid rgba(255, 255, 255, 0.18);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-radius: 14px;
            padding: 10px 12px 12px;
            width: 230px;
            opacity: 0;
            transform: translate(-50%, -100%) scale(0.98);
            transition: opacity 0.18s ease, transform 0.18s ease;
            pointer-events: none;
        }

        .volume-popover.show {
            opacity: 1;
            transform: translate(-50%, -100%) scale(1);
            pointer-events: auto;
        }

        .volume-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .volume-label {
            color: rgba(255, 255, 255, 0.7);
            font-size: 12px;
            letter-spacing: 2px;
        }

        .volume-value {
            color: rgba(255, 255, 255, 0.5);
            font-size: 12px;
        }

        .volume-range {
            width: 100%;
            accent-color: rgba(255, 147, 41, 0.85);
        }

        /* 心愿面板 */
        .wish-panel {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.5s ease;
            z-index: 100;
        }

        .wish-panel.show {
            opacity: 1;
            pointer-events: all;
        }

        .contact-panel {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.5s ease;
            z-index: 100;
        }

        .contact-panel.show {
            opacity: 1;
            pointer-events: all;
        }

        .contact-box {
            width: 360px;
            max-width: calc(100vw - 40px);
            background: rgba(0, 0, 0, 0.55);
            border: 1px solid rgba(255, 255, 255, 0.14);
            box-shadow: 0 16px 70px rgba(0, 0, 0, 0.55);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border-radius: 18px;
            padding: 18px 18px 16px;
        }

        .contact-title {
            color: rgba(255, 255, 255, 0.86);
            font-size: 18px;
            letter-spacing: 3px;
            text-align: center;
        }

        .contact-desc {
            margin-top: 10px;
            color: rgba(255, 255, 255, 0.55);
            font-size: 13px;
            line-height: 1.7;
            text-align: center;
        }

        .contact-wechat {
            margin-top: 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(255, 255, 255, 0.05);
        }

        .contact-wechat-label {
            color: rgba(255, 255, 255, 0.55);
            font-size: 12px;
            letter-spacing: 2px;
            white-space: nowrap;
        }

        .contact-wechat-id {
            color: rgba(255, 255, 255, 0.86);
            font-size: 14px;
            letter-spacing: 1px;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .contact-textarea {
            margin-top: 14px;
            width: 100%;
            height: 120px;
            resize: none;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.86);
            padding: 12px 12px;
            outline: none;
            line-height: 1.7;
            font-size: 14px;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }

        .contact-textarea::placeholder {
            color: rgba(255, 255, 255, 0.35);
        }

        .contact-actions {
            margin-top: 14px;
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .contact-line {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 12px 12px;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.82);
            font-size: 14px;
            letter-spacing: 1px;
            cursor: pointer;
            transition: background 0.25s ease, transform 0.25s ease;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            user-select: none;
        }

        .contact-line + .contact-line {
            margin-top: 10px;
        }

        .contact-line:hover {
            background: rgba(255, 255, 255, 0.08);
            transform: scale(1.01);
        }

        .contact-line.static {
            cursor: default;
        }

        .contact-line.static:hover {
            background: rgba(255, 255, 255, 0.05);
            transform: none;
        }

        .wish-title {
            color: rgba(255, 255, 255, 0.8);
            font-size: 20px;
            margin-bottom: 30px;
            letter-spacing: 3px;
            transition: opacity 0.5s ease;
        }
        
        .wish-panel.burning .wish-title {
            opacity: 0;
        }

        .wish-paper {
            width: 300px;
            height: 200px;
            background: linear-gradient(to bottom, #f5f0e1, #e8e0d0);
            border-radius: 5px;
            padding: 20px;
            position: relative;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            transition: all 1s ease;
        }

        .wish-paper.burning {
            animation: burn 2.5s forwards;
        }

        @keyframes burn {
            0% { 
                transform: scale(1) rotate(0deg); 
                opacity: 1;
                filter: brightness(1);
                clip-path: inset(0 0 0 0);
            }
            15% {
                filter: brightness(1.2) sepia(0.3);
                clip-path: inset(0 0 0 0);
            }
            30% {
                filter: brightness(1.5) sepia(0.8);
                clip-path: inset(5% 3% 5% 3%);
            }
            50% {
                transform: scale(0.9) rotate(2deg);
                filter: brightness(1.8) sepia(1) saturate(1.5);
                clip-path: inset(15% 10% 15% 10%);
            }
            70% {
                transform: scale(0.7) rotate(-3deg);
                filter: brightness(2) sepia(1) saturate(2);
                clip-path: inset(30% 25% 30% 25%);
            }
            85% {
                transform: scale(0.4) rotate(5deg);
                opacity: 0.6;
                filter: brightness(2.5) sepia(1);
                clip-path: inset(50% 45% 50% 45%);
            }
            100% { 
                transform: scale(0) rotate(10deg); 
                opacity: 0;
                filter: brightness(3);
                clip-path: inset(50% 50% 50% 50%);
            }
        }
        
        /* 纸张边缘燃烧发光 */
        .wish-paper.burning::before {
            content: '';
            position: absolute;
            top: -5px;
            left: -5px;
            right: -5px;
            bottom: -5px;
            background: linear-gradient(45deg, 
                transparent 40%, 
                rgba(255, 100, 0, 0.8) 45%, 
                rgba(255, 200, 0, 1) 50%, 
                rgba(255, 100, 0, 0.8) 55%, 
                transparent 60%);
            background-size: 400% 400%;
            animation: burn-edge 1s ease-in-out infinite;
            border-radius: 8px;
            z-index: -1;
            filter: blur(3px);
        }
        
        @keyframes burn-edge {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        .wish-textarea {
            width: 100%;
            height: 100%;
            border: none;
            background: transparent;
            font-size: 16px;
            font-family: 'KaiTi', 'STKaiti', serif;
            color: #4a4a4a;
            resize: none;
            outline: none;
            line-height: 1.8;
        }

        .wish-textarea::placeholder {
            color: #999;
        }

        .wish-actions {
            margin-top: 30px;
            display: flex;
            gap: 20px;
        }

        .wish-btn {
            padding: 12px 30px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            background: transparent;
            color: rgba(255, 255, 255, 0.8);
            font-size: 14px;
            letter-spacing: 2px;
            cursor: pointer;
            transition: all 0.3s ease;
            border-radius: 25px;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            user-select: none;
        }

        .wish-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .wish-btn.burn {
            border-color: rgba(255, 147, 41, 0.5);
            color: #ffa500;
        }

        .wish-btn.burn:hover {
            background: rgba(255, 147, 41, 0.2);
        }

        /* 燃烧后的提示 */
        .burn-complete {
            color: rgba(255, 255, 255, 0.7);
            font-size: 16px;
            letter-spacing: 2px;
            opacity: 0;
            transition: opacity 0.6s ease, transform 0.6s ease;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -40%);
            text-align: center;
            width: 320px;
            max-width: calc(100vw - 40px);
            pointer-events: none;
        }

        .burn-complete.show {
            opacity: 1;
            transform: translate(-50%, -50%);
        }

        .burn-complete-main,
        .burn-complete-reply,
        .burn-complete-guide {
            opacity: 0;
            transform: translateY(8px);
            transition: opacity 0.6s ease, transform 0.6s ease;
        }

        .burn-complete.show .burn-complete-main {
            opacity: 1;
            transform: translateY(0);
            transition-delay: 0s;
            color: rgba(255, 255, 255, 0.85);
            font-size: 18px;
            letter-spacing: 3px;
            text-shadow: 0 0 16px rgba(255, 200, 120, 0.25);
        }

        .burn-complete.show .burn-complete-reply {
            opacity: 1;
            transform: translateY(0);
            transition-delay: 0.25s;
            margin-top: 14px;
            color: rgba(255, 255, 255, 0.8);
            line-height: 1.8;
        }

        .burn-complete.show .burn-complete-guide {
            opacity: 1;
            transform: translateY(0);
            transition-delay: 0.55s;
            margin-top: 10px;
            color: rgba(255, 255, 255, 0.55);
            font-size: 13px;
            letter-spacing: 1px;
        }

        /* 抽卡面板 */
        .card-panel {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.5s ease;
            z-index: 100;
        }

        .card-panel.show {
            opacity: 1;
            pointer-events: all;
        }

        .card {
            width: 280px;
            height: 400px;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
            border-radius: 15px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 30px;
            box-shadow: 
                0 20px 60px rgba(0, 0, 0, 0.5),
                inset 0 0 30px rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            cursor: pointer;
            transition: transform 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .card-fly {
            transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.75s ease;
            transform-origin: center;
            will-change: transform, opacity;
        }

        .card-tap-ring {
            position: fixed;
            border-radius: 999px;
            border: 1.5px solid rgba(255, 200, 120, 0.55);
            box-shadow: 0 0 18px rgba(255, 180, 90, 0.25), 0 0 40px rgba(255, 180, 90, 0.12);
            pointer-events: none;
            z-index: 10050;
            opacity: 0;
            animation: card-tap-ring 1.2s ease-out forwards;
        }

        @keyframes card-tap-ring {
            0% { opacity: 0; transform: scale(0.96); }
            20% { opacity: 1; }
            100% { opacity: 0; transform: scale(1.08); }
        }

        .card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
            animation: card-shine 3s ease-in-out infinite;
        }

        @keyframes card-shine {
            0%, 100% { transform: rotate(0deg); }
            50% { transform: rotate(180deg); }
        }

        .card:hover {
            transform: scale(1.02);
        }

        .card-symbol {
            font-size: 60px;
            margin-bottom: 20px;
            filter: drop-shadow(0 0 10px rgba(255, 200, 100, 0.5));
        }

        .card-text {
            color: rgba(255, 255, 255, 0.9);
            font-size: 18px;
            text-align: center;
            line-height: 1.8;
            letter-spacing: 2px;
        }

        .card-hint {
            position: absolute;
            bottom: 30px;
            color: rgba(255, 255, 255, 0.4);
            font-size: 12px;
            letter-spacing: 1px;
        }

        .card-close {
            margin-top: 40px;
            padding: 12px 40px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            background: transparent;
            color: rgba(255, 255, 255, 0.7);
            font-size: 14px;
            cursor: pointer;
            border-radius: 25px;
            transition: all 0.3s ease;
        }

        .card-close:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .card-gallery {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease;
            z-index: 110;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 18px;
        }

        .card-gallery.show {
            opacity: 1;
            pointer-events: all;
        }

        .card-gallery-sheet {
            width: min(520px, 100%);
            background: rgba(15, 20, 35, 0.92);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
            padding: 16px;
        }

        .card-gallery-title {
            color: rgba(255, 255, 255, 0.85);
            font-size: 14px;
            letter-spacing: 2px;
            text-align: center;
            margin: 4px 0 12px;
        }

        .card-gallery-grid {
            width: 100%;
            display: grid;
            gap: 4px;
            justify-items: center;
            align-items: center;
            padding: 0;
            --thumb: clamp(96px, 24vw, 140px);
        }

        .card-gallery-grid.count-1 {
            grid-template-columns: var(--thumb);
            justify-content: center;
        }

        .card-gallery-grid.count-2 {
            grid-template-columns: repeat(2, var(--thumb));
            justify-content: center;
        }

        .card-gallery-grid.count-3 {
            grid-template-columns: repeat(2, var(--thumb));
            justify-content: center;
        }

        .card-gallery-grid.count-3 .slot-0 {
            grid-column: 1 / 3;
            grid-row: 1;
            justify-self: center;
        }

        .card-gallery-grid.count-3 .slot-1 {
            grid-column: 1;
            grid-row: 2;
        }

        .card-gallery-grid.count-3 .slot-2 {
            grid-column: 2;
            grid-row: 2;
        }

        .card-gallery-grid.count-4 {
            grid-template-columns: repeat(2, var(--thumb));
            justify-content: center;
        }

        .card-gallery-grid.count-5 {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            max-width: calc((var(--thumb) * 3) + 8px);
            margin: 0 auto;
        }

        .card-thumb {
            width: var(--thumb);
            max-width: none;
            aspect-ratio: 5 / 6;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.92) 50%, rgba(15, 52, 96, 0.88) 100%);
            box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            cursor: pointer;
            transition: transform 0.18s ease, border-color 0.18s ease;
            padding: 6px;
            user-select: none;
        }

        .card-thumb:hover {
            transform: translateY(-2px) scale(1.01);
            border-color: rgba(255, 200, 120, 0.28);
        }

        .card-thumb .symbol {
            font-size: clamp(18px, 5.4vw, 28px);
            filter: drop-shadow(0 0 8px rgba(255, 200, 100, 0.35));
        }

        .card-thumb .text {
            color: rgba(255, 255, 255, 0.72);
            font-size: clamp(9px, 2.7vw, 11px);
            line-height: 1.32;
            text-align: center;
            max-height: 3.96em;
            overflow: hidden;
        }

        .card-thumb.placeholder {
            opacity: 0.25;
            cursor: default;
            border-style: dashed;
        }

        .card-thumb.placeholder:hover {
            transform: none;
            border-color: rgba(255, 255, 255, 0.12);
        }

        .card-gallery-pager {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 14px;
            margin-top: 12px;
        }

        .card-gallery-nav {
            width: 44px;
            height: 44px;
            padding: 0;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.16);
            background: rgba(255, 255, 255, 0.06);
            color: rgba(255, 255, 255, 0.8);
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .card-gallery-nav:disabled {
            opacity: 0.35;
            cursor: default;
        }

        .card-gallery-page {
            color: rgba(255, 255, 255, 0.55);
            font-size: 12px;
            min-width: 60px;
            text-align: center;
        }

        /* 烟雾效果 */
        .smoke {
            position: absolute;
            bottom: 100%;
            left: 50%;
            width: 7px;
            height: 0;
            background: linear-gradient(to top, rgba(230,230,230,0.45), transparent);
            filter: blur(5px);
            opacity: 0;
            transform: translateX(-50%);
            pointer-events: none;
            display: block;
            z-index: 50;
        }

        .smoke.rising {
            animation: smoke-rise 3s ease-out forwards;
        }

        @keyframes smoke-rise {
            0% {
                height: 0;
                opacity: 0.7;
            }
            100% {
                height: 120px;
                opacity: 0;
                transform: translateX(-50%) translateY(-120px);
            }
        }

        /* 粒子统一容器（减少对 body 的频繁插入，提高流畅度） */
        .particle-layer {
            position: fixed;
            left: 0;
            top: 0;
            width: 100vw;
            height: 100vh;
            pointer-events: none;
            overflow: hidden;
            z-index: 9999;
            contain: layout style paint;
        }

        /* 焚烧火焰粒子 */
        .fire-particle {
            position: absolute;
            pointer-events: none;
            border-radius: 50%;
            filter: blur(1px);
            will-change: transform, opacity;
            transform: translateZ(0);
        }

        .fire-particle.rise {
            animation: fire-rise var(--duration) ease-out forwards;
        }

        @keyframes fire-rise {
            0% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
            50% {
                opacity: 0.8;
            }
            100% {
                opacity: 0;
                transform: translateY(var(--rise-height)) translateX(var(--drift)) scale(0.2);
            }
        }

        /* 灰烬粒子 */
        .ash-particle {
            position: absolute;
            width: 4px;
            height: 4px;
            background: #ff6b35;
            border-radius: 50%;
            pointer-events: none;
            opacity: 0;
            will-change: transform, opacity;
            transform: translateZ(0);
        }

        .ash-particle.float {
            animation: ash-float 3s ease-out forwards;
        }

        @keyframes ash-float {
            0% {
                opacity: 1;
                transform: translateY(0) scale(1) rotate(0deg);
            }
            100% {
                opacity: 0;
                transform: translateY(-300px) translateX(var(--drift)) scale(0) rotate(var(--rotate));
            }
        }

        /* 火星粒子 */
        .spark-particle {
            position: absolute;
            width: 3px;
            height: 3px;
            background: #fff;
            border-radius: 50%;
            pointer-events: none;
            box-shadow: 0 0 6px 2px #ff6b35, 0 0 10px 4px #ff4500;
            will-change: transform, opacity;
            transform: translateZ(0);
        }

        .spark-particle.burst {
            animation: spark-burst var(--duration) ease-out forwards;
        }

        @keyframes spark-burst {
            0% {
                opacity: 1;
                transform: translate(0, 0) scale(1);
            }
            100% {
                opacity: 0;
                transform: translate(var(--tx), var(--ty)) scale(0);
            }
        }

        /* 焚烧光晕 */
        .burn-glow {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 0;
            height: 0;
            background: radial-gradient(circle, rgba(255, 100, 0, 0.4) 0%, rgba(255, 50, 0, 0.2) 40%, transparent 70%);
            border-radius: 50%;
            pointer-events: none;
            z-index: 99;
        }

        .burn-glow.active {
            animation: glow-pulse 2.5s ease-out forwards;
        }

        @keyframes glow-pulse {
            0% {
                width: 0;
                height: 0;
                opacity: 0;
            }
            20% {
                width: 600px;
                height: 600px;
                opacity: 1;
            }
            60% {
                width: 800px;
                height: 800px;
                opacity: 0.8;
            }
            100% {
                width: 1000px;
                height: 1000px;
                opacity: 0;
            }
        }

        /* 文字燃烧效果 */
        .wish-paper.burning .wish-textarea {
            animation: text-burn 1.5s ease-in forwards;
        }

        @keyframes text-burn {
            0% {
                color: #4a4a4a;
                text-shadow: none;
            }
            30% {
                color: #ff6b35;
                text-shadow: 0 0 10px #ff4500, 0 0 20px #ff6b35;
            }
            60% {
                color: #ff4500;
                text-shadow: 0 0 20px #ff0000, 0 0 40px #ff4500;
            }
            100% {
                color: transparent;
                text-shadow: none;
            }
        }

        /* 余烬飘落 */
        .ember-particle {
            position: absolute;
            pointer-events: none;
            border-radius: 50%;
            z-index: 10000;
            will-change: transform, opacity;
            transform: translateZ(0);
        }

        .ember-particle.fall {
            animation: ember-fall var(--duration) ease-out forwards;
        }
        
        @keyframes ember-fall {
            0% {
                opacity: 1;
                transform: translate(0, 0) rotate(0deg);
            }
            100% {
                opacity: 0;
                transform: translate(var(--drift-x, 30px), var(--fall-height, 200px)) rotate(360deg);
            }
        }

        /* 屏幕震动 */
        @keyframes screen-shake {
            0%, 100% { transform: translate(0, 0); }
            10% { transform: translate(-2px, -1px); }
            20% { transform: translate(2px, 1px); }
            30% { transform: translate(-1px, 2px); }
            40% { transform: translate(1px, -1px); }
            50% { transform: translate(-2px, 1px); }
            60% { transform: translate(2px, -2px); }
            70% { transform: translate(-1px, -1px); }
            80% { transform: translate(1px, 2px); }
            90% { transform: translate(-2px, -2px); }
        }

        .shake {
            animation: screen-shake 0.5s ease-in-out;
        }

        /* 音效控制提示 */
        .sound-hint {
            position: fixed;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -100%);
            color: rgba(255, 255, 255, 0.78);
            font-size: 12px;
            opacity: 0;
            transition: opacity 0.3s ease;
            padding: 8px 12px;
            border-radius: 999px;
            background: rgba(0, 0, 0, 0.45);
            border: 1px solid rgba(255, 255, 255, 0.12);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            text-shadow: 0 0 18px rgba(255, 200, 120, 0.12);
            pointer-events: none;
            z-index: 10010;
            white-space: nowrap;
            max-width: calc(100vw - 24px);
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .sound-hint.show {
            opacity: 1;
        }

        /* 熄灭后的晚安提示 */
        .goodnight {
            position: fixed;
            top: 35%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: rgba(255, 255, 255, 0.7);
            font-size: 28px;
            letter-spacing: 5px;
            opacity: 0;
            transition: opacity 1s ease;
            pointer-events: none;
            text-align: center;
            white-space: nowrap;
        }

        .goodnight.show {
            opacity: 1;
        }

        /* 统计信息 */
        .stats {
            position: fixed;
            top: 20px;
            left: 20px;
            color: rgba(255, 255, 255, 0.4);
            font-size: 12px;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        .stats.show {
            opacity: 1;
            pointer-events: auto;
            cursor: default;
        }

        .stats span {
            -webkit-tap-highlight-color: transparent;
        }

        .stats [data-stats="lights"],
        .stats [data-stats="wishes"] {
            pointer-events: none;
        }

        .stats [data-stats="cards"] {
            pointer-events: auto;
            cursor: pointer;
            color: rgba(255, 255, 255, 0.62);
            text-decoration: underline;
            text-underline-offset: 2px;
        }
