@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;700&display=swap');

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        :root {
            --ink-black: #1a1a1a;
            --ink-gray: #4a4a4a;
            --paper-bg: #f4f1ea;
            --accent-red: #8b0000;
            --dark-bg: #141414;
            --gold: #d4af37;
        }

        body {
            font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
            background-color: var(--dark-bg);
            overflow: hidden;
            margin: 0;
            height: 100vh;
            width: 100vw;
            height: 100dvh;
            transition: background-color 2s cubic-bezier(0.4, 0, 0.2, 1);
            -webkit-font-smoothing: antialiased;
            position: fixed;
        }

        body.light {
            background-color: var(--paper-bg);
        }

        .rice-paper {
            position: absolute;
            inset: 0;
            opacity: 0;
            transition: opacity 2s ease;
            background-color: var(--paper-bg);
            background-image: 
                radial-gradient(ellipse at 20% 50%, rgba(0,0,0,0.03) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(0,0,0,0.02) 0%, transparent 50%),
                url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
            pointer-events: none;
        }

        body.light .rice-paper {
            opacity: 1;
        }

        .ink-wash {
            position: absolute;
            border-radius: 50%;
            filter: blur(80px);
            opacity: 0.25;
            pointer-events: none;
            transition: opacity 2s ease;
        }

        body.light .ink-wash {
            opacity: 0.12;
        }

        .ink-wash-1 {
            width: 60vmin;
            height: 60vmin;
            background: radial-gradient(circle, #3a3a3a 0%, transparent 70%);
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            animation: breathe 8s infinite ease-in-out;
        }

        @keyframes breathe {
            0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
            50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
        }

        .particles {
            position: absolute;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 2;
        }

        .particle {
            position: absolute;
            background: rgba(212, 175, 55, 0.3);
            border-radius: 50%;
            pointer-events: none;
        }

        body.light .particle {
            background: rgba(0,0,0,0.08);
        }

        @keyframes float {
            0% { transform: translateY(0) translateX(0); opacity: 0.3; }
            50% { transform: translateY(-20px) translateX(10px); opacity: 0.6; }
            100% { transform: translateY(0) translateX(0); opacity: 0.3; }
        }

        .light-gate {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            transform: translate(-50%, -50%);
            background: radial-gradient(circle, rgba(255, 252, 245, 0.95) 0%, rgba(255, 250, 240, 0.6) 30%, rgba(244, 241, 234, 0.2) 60%, transparent 70%);
            border-radius: 50%;
            pointer-events: none;
            z-index: 5;
            opacity: 0;
        }

        .light-gate.opening {
            animation: lightExpand 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }

        @keyframes lightExpand {
            0% { width: 0; height: 0; opacity: 0; }
            30% { opacity: 1; }
            100% { width: 300vmax; height: 300vmax; opacity: 1; }
        }

        .door-light {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 200px;
            transform: translate(-50%, -50%);
            background: linear-gradient(to bottom, transparent, rgba(255, 250, 240, 0.8), transparent);
            filter: blur(8px);
            opacity: 0;
            z-index: 8;
            pointer-events: none;
        }

        .door-light.opening {
            animation: doorSlit 0.8s ease-out forwards;
        }

        @keyframes doorSlit {
            0% { width: 0; opacity: 0; }
            50% { opacity: 1; }
            100% { width: 200px; opacity: 0; }
        }

        #welcome-page {
            position: fixed;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 20;
            transition: opacity 0.8s ease;
            padding: 2rem;
        }

        .welcome-inner {
            position: relative;
            z-index: 10;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            max-width: 900px;
        }

        .datetime-bar {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 5vmin;
            opacity: 0;
            animation: fadeInUp 1.2s ease-out 0.2s forwards;
            z-index: 10;
        }

        .time-display {
            font-size: 7vmin;
            font-weight: 300;
            letter-spacing: 0.15em;
            color: var(--gold);
            font-variant-numeric: tabular-nums;
            transition: color 1.5s ease;
            line-height: 1.2;
        }

        body.light .time-display {
            color: var(--ink-black);
        }

        .lunar-display {
            font-size: 3.2vmin;
            color: #8a7a4a;
            letter-spacing: 0.2em;
            margin-top: 1vmin;
            transition: color 1.5s ease;
            text-align: center;
            line-height: 1.6;
        }

        body.light .lunar-display {
            color: var(--ink-gray);
        }

        .date-separator {
            display: inline-block;
            width: 4px;
            height: 4px;
            background: currentColor;
            border-radius: 50%;
            margin: 0 0.6em;
            vertical-align: middle;
            opacity: 0.5;
        }

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

        .taiji-wrapper {
            position: relative;
            width: 60vmin;
            height: 60vmin;
            max-width: 280px;
            max-height: 280px;
            cursor: pointer;
            z-index: 20;
            transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            touch-action: manipulation;
            margin: 2vmin 0;
        }

        .taiji-wrapper:hover,
        .taiji-wrapper:active {
            transform: scale(1.03);
        }

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

        .rotating {
            animation: rotate 40s linear infinite;
        }

        .taiji-svg {
            width: 100%;
            height: 100%;
            filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0.15));
            transition: filter 0.5s ease;
        }

        .taiji-wrapper:hover .taiji-svg,
        .taiji-wrapper:active .taiji-svg {
            filter: drop-shadow(0 0 60px rgba(212, 175, 55, 0.25));
        }

        .trigram {
            position: absolute;
            font-size: 4vmin;
            color: var(--gold);
            opacity: 0.6;
            transition: all 0.5s ease;
            font-family: 'Noto Serif SC', serif;
            text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
            pointer-events: none;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        body.light .trigram {
            color: var(--ink-black);
            text-shadow: none;
        }

        .title-text {
            font-size: 6vmin;
            font-weight: 300;
            letter-spacing: 0.5em;
            color: var(--gold);
            text-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
            opacity: 0;
            transform: translateY(20px);
            animation: fadeInUp 1.5s ease-out 0.5s forwards;
            transition: color 1.5s ease;
            text-align: center;
            margin-top: 3rem;
        }

        body.light .title-text {
            color: var(--ink-black);
            text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
        }

        .subtitle-text {
            font-size: 3.5vmin;
            color: #aaa;
            letter-spacing: 0.3em;
            margin-top: 1rem;
            opacity: 0;
            animation: fadeInUp 1.5s ease-out 0.8s forwards;
            transition: color 1.5s ease;
            text-align: center;
        }

        body.light .subtitle-text {
            color: var(--ink-gray);
        }

        .home-content {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100dvh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 1s ease;
            z-index: 15;
            overflow-y: auto;
        }

        .home-content.active {
            opacity: 1;
            pointer-events: all;
        }

        .home-inner {
            width: 100%;
            max-width: 900px;
            padding: 2rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .home-title-1 {
            font-size: 6vmin;
            font-weight: 300;
            letter-spacing: 0.3em;
            margin-bottom: 1rem;
            text-align: center;
            opacity: 0;
            transform: translateY(8px);
            transition: all 1s ease;
        }

        .home-title-2 {
            font-size: 9vmin;
            font-weight: 700;
            letter-spacing: 0.2em;
            margin-bottom: 2rem;
            text-align: center;
            opacity: 0;
            transform: translateY(8px);
            transition: all 1s ease 0.2s;
        }

        .ink-divider {
            width: 30vmin;
            max-width: 120px;
            height: 2px;
            background: linear-gradient(to right, transparent, var(--ink-black), transparent);
            margin: 0 auto;
            opacity: 0;
            transform: scaleX(0);
            transition: all 0.8s ease 0.3s;
            position: relative;
        }

        .ink-divider.show {
            opacity: 0.3;
            transform: scaleX(1);
        }

        .ink-divider::before,
        .ink-divider::after {
            content: '';
            position: absolute;
            width: 6px;
            height: 6px;
            background: var(--ink-black);
            border-radius: 50%;
            top: 50%;
            transform: translateY(-50%);
            opacity: 0.5;
        }

        .ink-divider::before { left: 20%; }
        .ink-divider::after { right: 20%; }

        .nav-menu {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 2rem;
            list-style: none;
            padding: 0;
            margin: 2rem 0;
            width: 100%;
        }

        .nav-item {
            position: relative;
            font-size: 3.5vmin;
            color: var(--ink-black);
            cursor: pointer;
            padding: 0.5rem 1rem;
            transition: all 0.3s ease;
            letter-spacing: 0.2em;
            opacity: 0;
            transform: translateY(20px);
            white-space: nowrap;
        }

        .nav-item.show {
            opacity: 1;
            transform: translateY(0);
            transition: all 0.6s ease;
        }

        .nav-item a{
            text-decoration: none;
            color: var(--ink-black);
        }

        .nav-item a:hover{
            text-decoration: none;
            color: var(--accent-red);
        }
        
        .nav-item::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 0;
            height: 2px;
            background: var(--ink-black);
            transition: all 0.3s ease;
            transform: translateX(-50%);
        }

        

        .home-desc {
            font-size: 5vmin;
            line-height: 2;
            letter-spacing: 0.15em;
            text-align: center;
            color: var(--ink-gray);
            margin-top: 2rem;
            opacity: 0;
            transform: translateY(6px);
            transition: all 1s ease 0.5s;
        }

        .back-btn {
            margin-top: 3rem;
            padding: 1rem 2rem;
            border: 1px solid var(--ink-black);
            color: var(--ink-black);
            background: transparent;
            font-family: 'Noto Serif SC', serif;
            letter-spacing: 0.2em;
            font-size: 3vmin;
            cursor: pointer;
            transition: all 0.5s ease;
            opacity: 0;
            transform: translateY(4px);
            transition: all 1s ease 0.7s;
        }

        .back-btn:hover {
            background: var(--ink-black);
            color: var(--paper-bg);
        }

        .seal {
            position: absolute;
            bottom: 5vmin;
            right: 5vmin;
            width: 14vmin;
            height: 14vmin;
            max-width: 60px;
            max-height: 60px;
            min-width: 40px;
            min-height: 40px;
            border: 3px solid var(--accent-red);
            color: var(--accent-red);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2vmin;
            font-weight: bold;
            transform: rotate(-5deg);
            opacity: 0;
            mix-blend-mode: multiply;
            letter-spacing: 0.1em;
            transition: opacity 1s ease;
        }

        .seal.show {
            opacity: 0.8;
        }

        .split-left {
            animation: doorOpenLeft 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
            transform-origin: right center;
        }

        .split-right {
            animation: doorOpenRight 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
            transform-origin: left center;
        }

        @keyframes doorOpenLeft {
            0% { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }
            100% { transform: translateX(-40vmin) rotate(-25deg) scale(0.9); opacity: 0; }
        }

        @keyframes doorOpenRight {
            0% { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }
            100% { transform: translateX(40vmin) rotate(25deg) scale(0.9); opacity: 0; }
        }
        
        /* 横屏优化 */
        @media (max-height: 500px) and (orientation: landscape) {
            .taiji-wrapper {
                width: 40vmin;
                height: 40vmin;
            }
            .datetime-bar {
                margin-bottom: 6vmin;
            }
            .title-text {
                font-size: 6vmin;
                margin-top: 1rem;
            }
            
            .subtitle-text {
                font-size: 3vmin;
                margin-top: 0.5rem;
            }
            
            .hint-text {
                font-size: 2.5vmin;
                margin-top: 1rem;
            }
            
            .home-title-1 {
                font-size: 5vmin;
            }
            
            .home-title-2 {
                font-size: 7vmin;
            }
            
            .nav-menu {
                gap: 1rem;
            }
            
            .nav-item {
                font-size: 3vmin;
                padding: 0.3rem 0.8rem;
            }
            
            .home-desc {
                font-size: 3vmin;
                margin-top: 1rem;
            }
        }

        /* 小屏手机优化 */
        @media (max-width: 480px) {
            .taiji-wrapper {
                width: 55vmin;
                height: 55vmin;
            }
            .datetime-bar {
                margin-bottom: 12vmin;
            }
            .trigram {
                font-size: 5vmin;
            }
            
            .title-text {
                font-size: 7vmin;
                letter-spacing: 0.3em;
            }
            
            .subtitle-text {
                font-size: 3.5vmin;
            }
            
            .hint-text {
                font-size: 3vmin;
            }
            
            .nav-menu {
                gap: 1rem;
            }
            .seal{
                font-size: 4vmin;
            }
            .nav-item {
                font-size: 4vmin;
                padding: 0.4rem 0.8rem;
            }
        }

        /* 平板优化 */
        @media (min-width: 768px) and (max-width: 1024px) {
            .taiji-wrapper {
                width: 35vmin;
                height: 35vmin;
                max-width: 240px;
                max-height: 240px;
            }
            
            .title-text {
                font-size: 5vmin;
            }
            
            .home-title-1 {
                font-size: 4vmin;
            }
            
            .home-title-2 {
                font-size: 6vmin;
            }
        }

        /* 防止iOS橡皮筋效果 */
        @supports (-webkit-touch-callout: none) {
            body {
                position: fixed;
                width: 100%;
                height: 100%;
            }
            
            .home-content {
                -webkit-overflow-scrolling: touch;
            }
        }
        
        