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

:root {
    --chinese-red: #a72b2a;
    --chinese-red-dark: #7a1f1e;
    --chinese-red-light: #c94040;
    --gold: #c9a227;
    --gold-light: #e8c547;
    --gold-dark: #8b7119;
    --ink-black: #1a1a1a;
    --ink-gray: #2d2d2d;
    --paper: #f4efe4;
    --paper-cream: #e8e0d0;
    --jade-green: #2d6a4f;
    --jade-light: #40916c;
    --shadow-red: rgba(167, 43, 42, 0.3);
    --shadow-gold: rgba(201, 162, 39, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

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

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(201, 162, 39, 0.03) 50px,
            rgba(201, 162, 39, 0.03) 51px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(201, 162, 39, 0.03) 50px,
            rgba(201, 162, 39, 0.03) 51px
        );
    pointer-events: none;
    z-index: 0;
}

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.12;
    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%3Ccircle cx='40' cy='40' r='35' fill='none' stroke='%23a72b2a' stroke-width='2'/%3E%3Ccircle cx='40' cy='40' r='28' fill='none' stroke='%23a72b2a' stroke-width='1'/%3E%3Crect x='32' y='32' width='16' height='16' fill='none' stroke='%23a72b2a' stroke-width='2'/%3E%3Crect x='35' y='35' width='10' height='10' fill='none' stroke='%23a72b2a' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    animation: flowPattern 60s linear infinite;
}

.bg-pattern-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='60' cy='60' r='50' fill='none' stroke='%23c9a227' stroke-width='2.5'/%3E%3Ccircle cx='60' cy='60' r='40' fill='none' stroke='%23c9a227' stroke-width='1.5'/%3E%3Crect x='48' y='48' width='24' height='24' fill='none' stroke='%23c9a227' stroke-width='2'/%3E%3Crect x='52' y='52' width='16' height='16' fill='none' stroke='%23c9a227' stroke-width='1'/%3E%3Cpath d='M60 20 L60 10 M60 100 L60 110 M20 60 L10 60 M100 60 L110 60' stroke='%23c9a227' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: 120px 120px;
}

.bg-pattern-3 {
    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='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='%23a72b2a' stroke-width='2'/%3E%3Ccircle cx='50' cy='50' r='35' fill='none' stroke='%23a72b2a' stroke-width='1'/%3E%3Ccircle cx='50' cy='50' r='25' fill='none' stroke='%23a72b2a' stroke-width='0.8'/%3E%3Crect x='40' y='40' width='20' height='20' fill='none' stroke='%23a72b2a' stroke-width='1.5'/%3E%3Crect x='43' y='43' width='14' height='14' fill='none' stroke='%23a72b2a' stroke-width='0.8'/%3E%3C/svg%3E");
    background-size: 100px 100px;
}

@keyframes flowPattern {
    0% { background-position: 0 0; }
    100% { background-position: 80px 80px; }
}

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

.cloud-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.12;
}

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

.lang-selector {
    position: relative;
    z-index: 100;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(244, 239, 228, 0.95);
    border: 1px solid var(--gold);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 18px;
    color: var(--ink-black);
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(167, 43, 42, 0.05);
    border-color: var(--chinese-red);
}

.lang-btn::after {
    content: '▼';
    font-size: 10px;
    color: var(--gold-dark);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--paper);
    border: 2px solid var(--gold);
    border-radius: 4px;
    box-shadow: 0 8px 25px var(--shadow-gold);
    display: none;
    min-width: 180px;
    max-height: 400px;
    overflow-y: auto;
}

.lang-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

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

.lang-option {
    display: block;
    width: 100%;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--ink-black);
    font-size: 14px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Noto Serif SC', serif;
}

.lang-option:hover {
    background: rgba(167, 43, 42, 0.08);
    color: var(--chinese-red);
}

.lang-option .lang-flag {
    margin-right: 8px;
    font-size: 16px;
}

.lang-option .lang-name {
    margin-right: 8px;
}

.lang-option .lang-native {
    color: var(--gold-dark);
    font-size: 12px;
}

nav {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
    z-index: 100;
    padding: 15px 40px;
    background: rgba(244, 239, 228, 0.95);
    border: 2px solid var(--gold);
    border-radius: 4px;
    box-shadow: 0 4px 20px var(--shadow-gold);
}

nav::before,
nav::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

nav::before {
    top: 6px;
}

nav::after {
    bottom: 6px;
}

nav a {
    text-decoration: none;
    color: var(--ink-black);
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 26px;
    position: relative;
    padding: 5px 15px;
    transition: all 0.3s ease;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

nav a:hover::before,
nav a.active::before {
    border-color: var(--chinese-red);
    background: rgba(167, 43, 42, 0.05);
}

nav a:hover,
nav a.active {
    color: var(--chinese-red);
}

nav a span {
    font-family: 'Noto Serif SC', serif;
    font-size: 10px;
    display: block;
    text-align: center;
    color: var(--gold-dark);
    margin-top: 2px;
    font-weight: 300;
}

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

.hero-badge {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 12px 30px;
    background: rgba(167, 43, 42, 0.08);
    border: 1px solid var(--chinese-red);
    border-radius: 50px;
}

.hero-badge span {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 24px;
    color: var(--chinese-red);
}

.hero-badge .separator {
    width: 30px;
    height: 1px;
    background: var(--gold);
}

.hero-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: clamp(120px, 30vw, 200px);
    color: var(--ink-black);
    line-height: 1;
    position: relative;
    margin-bottom: 20px;
}

.hero-title::before,
.hero-title::after {
    content: '◆';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--gold);
}

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

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

.hero-subtitle {
    font-size: 18px;
    color: var(--ink-gray);
    letter-spacing: 8px;
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

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

.hero-divider .dot {
    width: 8px;
    height: 8px;
    border: 1px solid var(--gold);
    transform: rotate(45deg);
}

.enter-btn {
    display: inline-block;
    padding: 15px 50px;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 24px;
    color: var(--paper);
    background: linear-gradient(135deg, var(--chinese-red) 0%, var(--chinese-red-dark) 100%);
    border: none;
    border-radius: 4px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px var(--shadow-red);
}

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

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

.enter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-red);
}

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

.scroll-hint span {
    font-size: 12px;
    color: var(--gold-dark);
    letter-spacing: 2px;
}

.scroll-hint::after {
    content: '▼';
    color: var(--gold);
    font-size: 14px;
}

@keyframes floatHint {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

.page-header {
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
    z-index: 10;
}

.page-header h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: clamp(60px, 15vw, 100px);
    color: var(--ink-black);
    margin-bottom: 10px;
}

.page-header p {
    font-size: 16px;
    color: var(--ink-gray);
    letter-spacing: 6px;
    font-weight: 300;
}

.works-section {
    position: relative;
    z-index: 10;
    padding: 40px 20px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.work-card {
    background: var(--paper-cream);
    border: 1px solid rgba(201, 162, 39, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid var(--gold);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-gold);
}

.work-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--paper) 0%, var(--paper-cream) 100%);
    position: relative;
    overflow: hidden;
}

.work-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 45%, rgba(201, 162, 39, 0.1) 45%, rgba(201, 162, 39, 0.1) 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, rgba(201, 162, 39, 0.1) 45%, rgba(201, 162, 39, 0.1) 55%, transparent 55%);
    background-size: 20px 20px;
}

.work-info {
    padding: 20px;
    text-align: center;
    position: relative;
}

.work-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--gold);
}

.work-info h3 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 28px;
    color: var(--ink-black);
    margin-top: 10px;
}

.about-section {
    position: relative;
    z-index: 10;
    padding: 60px 20px 80px;
    max-width: 800px;
    margin: 0 auto;
}

.about-content {
    background: var(--paper-cream);
    padding: 50px;
    border: 1px solid rgba(201, 162, 39, 0.3);
    position: relative;
}

.about-content::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid var(--gold);
}

.about-content h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 48px;
    color: var(--chinese-red);
    text-align: center;
    margin-bottom: 30px;
}

.about-content p {
    font-size: 16px;
    color: var(--ink-gray);
    line-height: 2;
    text-align: center;
    margin-bottom: 20px;
}

footer {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(201, 162, 39, 0.3);
    background: rgba(244, 239, 228, 0.5);
}

footer p {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 22px;
    color: var(--ink-gray);
    margin-bottom: 15px;
}

footer a {
    color: var(--chinese-red);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--gold-dark);
}

@media (max-width: 768px) {
    nav {
        gap: 20px;
        padding: 12px 25px;
    }
    
    nav a {
        font-size: 22px;
        padding: 5px 10px;
    }
    
    .hero-title::before,
    .hero-title::after {
        display: none;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        padding: 30px 20px;
    }
}
