:root {
    /* Color Palette */
    --cinnabar: #C41E3A; /* 朱砂红 */
    --imperial-red: #4E0404; /* 深红背景 */
    --gold: #FFD700; /* 纯金 */
    --champagne: #F7E7CE; /* 香槟金 */
    --ink: #1A1A1A; /* 墨色 */
    --rice-paper: #F4F1E8; /* 宣纸白 */
    
    /* Gradients */
    --bg-gradient: radial-gradient(circle at center, #8E0E00 0%, #1F1C18 100%);
    --gold-gradient: linear-gradient(135deg, #FFD700 0%, #FDB931 50%, #9E7D36 100%);
    
    /* Fonts */
    --font-title: 'Ma Shan Zheng', cursive;
    --font-sub: 'Zhi Mang Xing', cursive;
    --font-body: 'Noto Serif SC', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor */
}

body {
    background-color: var(--ink);
    color: var(--rice-paper);
    font-family: var(--font-body);
    overflow-x: hidden;
    position: relative;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--gold);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--gold);
    transition: width 0.2s, height 0.2s;
}

body:hover .cursor-outline {
    width: 50px;
    height: 50px;
    background: rgba(255, 215, 0, 0.1);
}

/* Background Texture */
.bg-texture {
    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='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

.bg-clouds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    z-index: -2;
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cinnabar);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loader-content {
    text-align: center;
    color: var(--gold);
}

.loader-text {
    font-family: var(--font-sub);
    font-size: 8rem;
    opacity: 0; /* Animated via JS */
}

.loader-sub {
    font-family: var(--font-body);
    letter-spacing: 1rem;
    margin-top: 1rem;
    opacity: 0;
}

.loader-line {
    width: 0;
    height: 2px;
    background: var(--gold);
    margin: 2rem auto;
}

/* Fireworks Canvas */
#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.seal {
    width: 40px;
    height: 40px;
    background: var(--cinnabar);
    color: white;
    font-family: var(--font-sub);
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(196, 30, 58, 0.5);
}

.text {
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--rice-paper);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 3rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--rice-paper);
    font-family: var(--font-body);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.special-btn span {
    border: 1px solid var(--gold);
    padding: 8px 20px;
    border-radius: 50px;
    transition: all 0.3s;
}

.special-btn:hover span {
    background: var(--gold);
    color: var(--ink);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://loremflickr.com/1920/1080/chinese,new,year,red/all');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    mix-blend-mode: luminosity;
    transform: scale(1.1);
    /* Parallax controlled by JS */
}

.hero-decorations {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.decor-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vh;
    height: 80vh;
    opacity: 0.2;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding-top: 5rem;
    width: 100%; /* Ensure content can take full width if needed */
    padding-left: 1rem;
    padding-right: 1rem;
}

.year-stamp {
    font-family: var(--font-body);
    font-size: 1.2rem;
    letter-spacing: 0.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.main-title {
    font-family: var(--font-title);
    font-size: clamp(3rem, 10vw, 8rem); /* Responsive Font Size */
    line-height: 1.2;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 1rem;
}

.char-wrapper {
    display: inline-block;
}

.char {
    display: inline-block;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback */
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.2));
}

.sub-title {
    font-family: var(--font-sub);
    font-size: 2.5rem;
    color: var(--rice-paper);
    opacity: 0.9;
    margin-bottom: 4rem;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#countdown {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
}

.time-unit {
    display: flex;
    flex-direction: column;
}

.time-unit span {
    font-family: 'Times New Roman', serif;
    font-size: 3rem;
    font-weight: bold;
    color: var(--gold);
}

.time-unit label {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.divider {
    font-size: 2rem;
    color: var(--cinnabar);
    margin-bottom: 1.5rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.6;
}

.scroll-indicator .line {
    width: 1px;
    height: 50px;
    background: var(--rice-paper);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Wishing Wall Section */
#wishes {
    min-height: 100vh;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 6rem; /* Increased margin */
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vertical-text {
    writing-mode: vertical-rl;
    position: absolute;
    left: 50%;
    top: -4rem; /* Adjusted position */
    transform: translateX(-50%);
    font-family: var(--font-sub);
    font-size: 1.5rem;
    color: var(--cinnabar);
    opacity: 0.5;
    letter-spacing: 0.5rem;
    pointer-events: none;
    z-index: 0;
}

.section-header h2 {
    font-family: var(--font-title);
    font-size: 4rem;
    color: var(--gold);
    position: relative;
    z-index: 1;
    margin-top: 1rem;
}

.lantern-container {
    height: 60vh;
    position: relative;
    margin-bottom: 4rem;
    /* Lanterns float here */
}

/* Lantern Styles */
.lantern {
    position: absolute;
    width: 60px;
    height: 80px;
    background: rgba(196, 30, 58, 0.8);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(196, 30, 58, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    text-align: center;
    padding: 5px;
    overflow: hidden;
    /* GSAP will handle movement */
}

.lantern::before {
    content: '';
    position: absolute;
    top: -5px;
    width: 20px;
    height: 5px;
    background: #333;
}

.lantern::after {
    content: '';
    position: absolute;
    bottom: -5px;
    width: 20px;
    height: 5px;
    background: #333;
}

.lantern.lantern-gold {
    background: rgba(255, 215, 0, 0.8);
    color: #4E0404;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.wish-interface {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
}

.wish-interface h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--gold);
    font-family: var(--font-sub);
    font-size: 2rem;
}

.input-group {
    position: relative;
    margin-bottom: 2rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 10px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--rice-paper);
    font-family: var(--font-body);
    font-size: 1.1rem;
    outline: none;
}

.input-group label {
    position: absolute;
    top: 10px;
    left: 0;
    color: rgba(255, 255, 255, 0.5);
    transition: 0.3s ease;
    pointer-events: none;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:valid ~ label {
    top: -20px;
    font-size: 0.8rem;
    color: var(--gold);
}

.input-group .bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: 0.3s ease;
}

.input-group input:focus ~ .bar,
.input-group textarea:focus ~ .bar {
    transform: scaleX(1);
}

.style-selector {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-label input {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
}

.radio-custom.red { background: var(--cinnabar); }
.radio-custom.gold { background: var(--gold); }

.radio-label input:checked + .radio-custom {
    border-color: var(--rice-paper);
    transform: scale(1.2);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 1.2rem;
    font-family: var(--font-sub);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
}

.submit-btn:hover {
    color: var(--ink);
}

.ink-splash {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: -1;
}

.submit-btn:hover .ink-splash {
    width: 300%;
    height: 300%;
}

/* Culture Section */
#culture {
    min-height: 100vh;
    padding: 8rem 2rem; /* Increased top padding */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bg-ink {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Ink wash painting effect overlay can go here */
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 40%);
    z-index: -1;
}

.culture-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    max-width: 1200px;
}

.culture-card {
    width: 300px;
    height: 400px;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.culture-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 215, 0, 0.3);
    background: #1a1a1a; /* Solid background */
    overflow: hidden;
}

.card-back {
    background: var(--cinnabar); /* Red background for back */
    color: var(--rice-paper);
    transform: rotateY(180deg);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.card-front:hover .card-img {
    opacity: 0.3;
}

.card-overlay {
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,0.5);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
    padding: 1rem; /* Prevent text touching edges */
}

.card-front h3 {
    font-family: var(--font-title);
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.icon-large {
    display: none; /* Replaced by image */
}

/* Gallery Section */
#gallery {
    min-height: 100vh;
    padding: 8rem 2rem; /* Increased padding */
    background: var(--ink);
    position: relative;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(10, 5vw); /* Responsive row height */
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    /* opacity: 0; Removed to prevent issues if JS fails or misconfigures */
    background-color: #2a2a2a; /* Placeholder color */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block; /* Remove bottom space */
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Specific Grid Placements */
.item-1 { grid-column: 1 / span 8; grid-row: 1 / span 5; }
.item-2 { grid-column: 9 / span 4; grid-row: 1 / span 3; }
.item-3 { grid-column: 9 / span 4; grid-row: 4 / span 6; }
.item-4 { grid-column: 1 / span 4; grid-row: 6 / span 4; }
.item-5 { grid-column: 5 / span 4; grid-row: 6 / span 4; }

.card-back p {
    font-size: 1.1rem;
    line-height: 1.8;
}

footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
    z-index: 10;
    background: var(--ink);
}

.footer-logo {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Mobile menu implementation needed if expanded */
    .culture-grid { gap: 2rem; }
    #countdown { gap: 0.5rem; }
    .time-unit span { font-size: 2rem; }
    
    .gallery-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .gallery-item {
        height: 300px;
        width: 100%;
    }
    .section-header {
        margin-bottom: 4rem;
    }
    .section-header h2 {
        font-size: 2.5rem;
    }
    .vertical-text {
        font-size: 1.2rem;
        top: -3rem;
    }
}
