:root {
    --ink-black: #1a1a1a;
    --ink-dark: #2d2d2d;
    --vermillion: #c41e3a;
    --vermillion-light: #e63946;
    --gold: #d4a84b;
    --gold-light: #f4d03f;
    --jade: #00a86b;
    --paper-white: #f5f0e6;
    --paper-cream: #ebe5d8;
    --shadow-red: rgba(196, 30, 58, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif SC', serif;
    background: var(--paper-white);
    color: var(--ink-black);
    min-height: 100vh;
    overflow-x: hidden;
}

.pattern-layer-1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 10 L45 35 L40 40 L35 35 Z' fill='none' stroke='%231a1a1a' stroke-width='1'/%3E%3Ccircle cx='40' cy='40' r='25' fill='none' stroke='%231a1a1a' stroke-width='0.5'/%3E%3Ccircle cx='40' cy='40' r='15' fill='none' stroke='%231a1a1a' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 80px 80px;
}

.pattern-layer-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='60' viewBox='0 0 120 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 30 Q30 0 60 30 Q90 60 120 30' fill='none' stroke='%23d4a84b' stroke-width='1'/%3E%3Cpath d='M0 40 Q30 10 60 40 Q90 70 120 40' fill='none' stroke='%23d4a84b' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 120px 60px;
}

.pattern-layer-3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='10' y='10' width='80' height='80' fill='none' stroke='%231a1a1a' stroke-width='0.5'/%3E%3Crect x='20' y='20' width='60' height='60' fill='none' stroke='%231a1a1a' stroke-width='0.5'/%3E%3Crect x='30' y='30' width='40' height='40' fill='none' stroke='%231a1a1a' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 100px 100px;
}

#cloud-canvas,
#cloud-canvas-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

#cloud-canvas {
    opacity: 0.15;
}

#cloud-canvas-2 {
    opacity: 0.08;
}

.horse-glow {
    position: fixed;
    bottom: 5%;
    right: -5%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(ellipse, var(--shadow-red) 0%, transparent 70%);
    filter: blur(80px);
    z-index: 0;
    animation: horseGlow 10s ease-in-out infinite;
}

@keyframes horseGlow {
    0%, 100% { opacity: 0.25; transform: translateX(0) scale(1); }
    50% { opacity: 0.4; transform: translateX(-30px) scale(1.1); }
}

.surname-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Ma Shan Zheng', cursive;
    font-size: clamp(350px, 70vw, 700px);
    color: var(--ink-black);
    opacity: 0.025;
    z-index: 0;
    pointer-events: none;
    letter-spacing: 30px;
    white-space: nowrap;
}

.nav-chinese {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 50px;
    z-index: 100;
    padding: 15px 40px;
    background: rgba(245, 240, 230, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 168, 75, 0.3);
    border-radius: 50px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.06);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: all 0.4s ease;
    position: relative;
}

.chinese-char {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 24px;
    color: var(--ink-black);
    line-height: 1;
}

.pinyin {
    font-size: 9px;
    color: var(--gold);
    letter-spacing: 1px;
    margin-top: 4px;
    font-family: 'Noto Serif SC', serif;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.nav-item:hover .pinyin,
.nav-item.active .pinyin {
    opacity: 1;
    transform: translateY(0);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--vermillion);
    transition: width 0.3s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 80%;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    padding: 20px;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1.5s ease-out;
}

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

.year-badge {
    display: inline-flex;
    gap: 15px;
    margin-bottom: 35px;
    padding: 12px 30px;
    background: var(--ink-black);
    border-radius: 50px;
    animation: badgeIn 0.8s ease-out 0.3s both;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
}

@keyframes badgeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.year-chinese {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 22px;
    color: var(--gold-light);
}

.year-animal {
    font-size: 16px;
    color: var(--paper-white);
    letter-spacing: 5px;
}

.main-text {
    position: relative;
    display: inline-block;
}

.title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: clamp(100px, 25vw, 220px);
    font-weight: 400;
    color: var(--ink-black);
    letter-spacing: 40px;
    margin-left: 40px;
    text-shadow: 4px 4px 0 var(--gold-light);
    animation: titleIn 1s ease-out 0.5s both;
    position: relative;
}

.title::before,
.title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35px;
    height: 35px;
    border: 1px solid var(--gold);
    transform: translateY(-50%) rotate(45deg);
    opacity: 0.6;
}

.title::before {
    left: -50px;
}

.title::after {
    right: -50px;
}

@keyframes titleIn {
    from { 
        opacity: 0; 
        letter-spacing: 80px;
    }
    to { 
        opacity: 1; 
        letter-spacing: 40px;
    }
}

.subtitle {
    font-size: 14px;
    letter-spacing: 18px;
    color: var(--ink-dark);
    margin-top: 25px;
    font-weight: 300;
    animation: subtitleIn 1s ease-out 0.8s both;
}

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

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 45px 0;
    animation: dividerIn 1s ease-out 1s both;
}

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

.divider .dot {
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
}

.divider .line {
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.enter-btn {
    display: inline-block;
    padding: 16px 55px;
    background: var(--vermillion);
    color: var(--paper-white);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    animation: btnIn 1s ease-out 1.2s both;
    border: none;
    cursor: pointer;
}

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

.enter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s ease;
}

.enter-btn:hover::before {
    left: 100%;
}

.enter-btn:hover {
    background: var(--vermillion-light);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px var(--shadow-red);
}

.btn-decoration {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 1px solid var(--gold);
    opacity: 0.5;
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: scrollIn 1s ease-out 1.5s both;
}

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

.scroll-text {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--ink-dark);
}

.scroll-curve {
    width: 1px;
    height: 45px;
    background: linear-gradient(to bottom, var(--ink-dark), transparent);
    position: relative;
}

.scroll-curve::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-right: 1px solid var(--vermillion);
    border-bottom: 1px solid var(--vermillion);
    transform: translateX(-50%) rotate(45deg);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) rotate(45deg) translateY(0); }
    50% { transform: translateX(-50%) rotate(45deg) translateY(12px); }
}

.preview-section {
    position: relative;
    z-index: 10;
    padding: 100px 40px 120px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 25px;
    margin-bottom: 18px;
}

.title-decoration {
    width: 70px;
    height: 2px;
    background: var(--vermillion);
    margin: 0 auto;
    position: relative;
}

.title-decoration::before,
.title-decoration::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--gold);
    transform: translateY(-50%) rotate(45deg);
}

.title-decoration::before { left: -18px; }
.title-decoration::after { right: -18px; }

.gallery-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.gallery-card {
    opacity: 0;
    animation: cardIn 0.8s ease-out calc(var(--delay) + 0.5s) both;
}

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

.card-inner {
    background: var(--paper-cream);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    transition: all 0.5s ease;
    cursor: pointer;
    border: 1px solid rgba(212, 168, 75, 0.12);
}

.card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--gold);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.card-inner:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.12);
}

.card-inner:hover::before {
    opacity: 1;
}

.card-image {
    height: 260px;
    background: linear-gradient(135deg, var(--ink-dark) 0%, var(--ink-black) 100%);
    position: relative;
    overflow: hidden;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border: 1px solid var(--gold);
    opacity: 0.3;
}

.card-content {
    padding: 28px;
    text-align: center;
}

.card-year {
    display: block;
    font-size: 11px;
    color: var(--gold);
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.card-content h3 {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 12px;
}

.footer-chinese {
    position: relative;
    z-index: 10;
    padding: 70px 20px;
    text-align: center;
    border-top: 1px solid rgba(212, 168, 75, 0.2);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.poem {
    font-size: 14px;
    letter-spacing: 10px;
    color: var(--ink-dark);
    margin-bottom: 28px;
    font-style: italic;
}

.contact-link {
    display: inline-block;
    padding: 12px 35px;
    border: 1px solid var(--gold);
    color: var(--gold);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 4px;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: var(--gold);
    color: var(--paper-white);
}

@media (max-width: 768px) {
    .nav-chinese {
        gap: 28px;
        padding: 14px 28px;
    }
    
    .title {
        letter-spacing: 20px;
        margin-left: 20px;
    }
    
    .title::before,
    .title::after {
        display: none;
    }
    
    .gallery-row {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .horse-glow {
        width: 65vw;
        height: 65vw;
        right: -25%;
    }
    
    .surname-bg {
        font-size: clamp(180px, 55vw, 350px);
    }
}