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

:root {
    --primary-wheat: #F4A460;
    --primary-sunflower: #FFB347;
    --primary-deep: #FF8C00;
    --primary-warm: #FF6B35;

    /* Softer, less saturated base palette */
    --bg-1: #FFF3E6; /* warm neutral, slightly deeper */
    --bg-2: #F3E0D1; /* soft sand, slightly deeper */
    --brand-amber-rgb: 217, 119, 6; /* used for subtle textures */

    --gradient-primary: linear-gradient(135deg, #F4A460 0%, #FFB347 25%, #FF8C00 50%, #F4A460 75%, #FFB347 100%);
    --gradient-soft: linear-gradient(135deg, rgba(244, 164, 96, 0.1) 0%, rgba(255, 179, 71, 0.15) 100%);
    --gradient-secondary: linear-gradient(135deg, rgba(255, 248, 240, 0.98) 0%, rgba(255, 239, 213, 0.95) 100%);

    /* Backgrounds tuned down for glare reduction */
    --bg-primary: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 40%, #E9D8C8 100%);
    --bg-card: linear-gradient(135deg, rgba(252, 236, 220, 0.96) 0%, rgba(242, 216, 189, 0.92) 100%);
    --bg-button-secondary: linear-gradient(135deg, rgba(255, 248, 240, 0.98) 0%, rgba(255, 239, 213, 0.95) 100%);
    --bg-input: rgba(255, 248, 240, 0.95);
    --bg-dropdown: rgba(255, 255, 255, 0.95);

    --text-primary: #B8860B;
    --text-secondary: rgba(184, 134, 11, 0.9);
    --text-body: rgba(184, 134, 11, 0.88);
    --text-helper: rgba(184, 134, 11, 0.72);
    --text-placeholder: rgba(184, 134, 11, 0.6);
    --text-disabled: rgba(184, 134, 11, 0.5);
    --text-white: #FFFFFF;

    --color-success: #4CAF50;
    --color-success-light: #8BC34A;
    --color-warning: #FF6B35;
    --color-warning-light: #FF8C42;
    --color-error: #F44336;
    --color-error-light: #E57373;
    --color-info: #2196F3;
    --color-info-light: #64B5F6;

    --border-default: rgba(244, 164, 96, 0.2);
    --border-hover: rgba(244, 164, 96, 0.35);
    --border-active: rgba(244, 164, 96, 0.5);
    --border-focus: var(--primary-wheat);

    --font-chinese: 'Noto Serif SC', serif;
    --font-latin: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-system: 'Alibaba PuHuiTi 3.0', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', sans-serif;

    --font-size-hero: 36px;
    --font-size-h1: 32px;
    --font-size-h2: 28px;
    --font-size-h3: 24px;
    --font-size-subtitle: 18px;
    --font-size-body: 16px;
    --font-size-body-sm: 14px;
    --font-size-caption: 12px;
    --font-size-tiny: 10px;

    --line-height-hero: 1.2;
    --line-height-h1: 1.2;
    --line-height-h2: 1.3;
    --line-height-h3: 1.3;
    --line-height-subtitle: 1.4;
    --line-height-body: 1.5;
    --line-height-body-sm: 1.5;
    --line-height-caption: 1.4;
    --line-height-tiny: 1.4;

    --font-weight-hero: 700;
    --font-weight-h1: 700;
    --font-weight-h2: 700;
    --font-weight-h3: 600;
    --font-weight-subtitle: 500;
    --font-weight-body: 400;
    --font-weight-body-sm: 400;
    --font-weight-caption: 400;
    --font-weight-tiny: 400;

    --letter-spacing-hero: 3px;
    --letter-spacing-h1: 2px;
    --letter-spacing-h2: 1px;
    --letter-spacing-h3: 1px;
    --letter-spacing-subtitle: 0.5px;
    --letter-spacing-body: 0px;

    --text-shadow-hero: 0 4px 16px rgba(244, 164, 96, 0.4);
    --text-shadow-title: 0 3px 12px rgba(244, 164, 96, 0.3);
    --text-shadow-subtitle: 0 2px 8px rgba(244, 164, 96, 0.2);
    --text-shadow-body: 0 1px 4px rgba(244, 164, 96, 0.15);
    --text-shadow-helper: 0 1px 3px rgba(244, 164, 96, 0.1);

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 32px;
    --space-4xl: 40px;
    --space-5xl: 48px;
    --space-6xl: 60px;

    --space-section: 40px;
    --space-component: 24px;
    --space-element: 16px;
    --space-text: 12px;

    --card-gap: calc(var(--space-4xl) / 3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 50%;
    --radius-container: 30px;

    --shadow-light: 0 2px 8px rgba(244, 164, 96, 0.1);
    --shadow-normal: 0 6px 20px rgba(244, 164, 96, 0.15);
    --shadow-heavy: 0 12px 32px rgba(244, 164, 96, 0.25);
    --shadow-extreme: 0 25px 70px rgba(0, 0, 0, 0.18), 0 12px 35px rgba(0, 0, 0, 0.12);
    --shadow-inset: inset 0 2px 4px rgba(255, 255, 255, 0.3);

    --shadow-button-primary:
        0 10px 26px rgba(244, 164, 96, 0.32),
        0 4px 14px rgba(255, 179, 71, 0.24),
        inset 0 2px 4px rgba(255, 255, 255, 0.26);

    --shadow-button-hover:
        0 14px 34px rgba(244, 164, 96, 0.42),
        0 6px 18px rgba(255, 179, 71, 0.3),
        inset 0 3px 6px rgba(255, 255, 255, 0.32);

    --ease-standard: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-fast: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-slow: cubic-bezier(0.0, 0, 0.2, 1);

    --duration-fast: 0.2s;
    --duration-standard: 0.3s;
    --duration-long: 0.5s;
    --duration-enter: 0.8s;
    --duration-carousel: 0.6s;

    --z-background: 1;
    --z-decoration: 2;
    --z-content: 10;
    --z-header: 100;
    --z-dropdown: 200;
    --z-modal: 300;
    --z-notification: 400;
    --z-tooltip: 500;

    --layout-max-width: 1080px;
    --primary: var(--primary-wheat);
    --secondary: var(--primary-sunflower);
    --bg: var(--bg-primary);
    --bg-alt: rgba(255, 248, 240, 0.82);
    --text: var(--text-body);
    --muted: var(--text-helper);
    --border: var(--border-default);
    --radius: var(--radius-lg);
    --maxw: var(--layout-max-width);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-system);
    color: var(--text-body);
    background: var(--bg-primary);
    /* Global comfort filter: slightly dim, less saturated and lower contrast */
    filter: brightness(0.96) saturate(0.78) contrast(0.94);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    /* 多层暖色渐变的极慢漂移背景，增强高级感 */
    background:
        radial-gradient(
            140% 120% at 8% -10%,
            rgba(var(--brand-amber-rgb), 0.20) 0%,
            rgba(var(--brand-amber-rgb), 0.06) 32%,
            transparent 60%
        ),
        radial-gradient(
            130% 140% at 96% 110%,
            rgba(255, 179, 71, 0.18) 0%,
            rgba(255, 179, 71, 0.05) 30%,
            transparent 62%
        ),
        radial-gradient(
            220% 200% at 50% -40%,
            rgba(255, 248, 240, 0.40) 0%,
            rgba(255, 248, 240, 0.10) 45%,
            transparent 80%
        );
    z-index: var(--z-background);
    pointer-events: none;
    transform-origin: 50% 50%;
    animation: ambientGradientDrift 80s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    /* 全局光斑效果已移除，保留占位以便未来背景动画使用 */
    background: none;
    opacity: 0;
    pointer-events: none;
    z-index: var(--z-decoration);
}

@keyframes ambientGradientDrift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    33% {
        transform: translate3d(-1.5%, -1%, 0) scale(1.02);
    }
    66% {
        transform: translate3d(1.2%, 1.3%, 0) scale(1.015);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes wheatWave {
    0%,
    100% {
        transform: translateX(0) skewX(0deg);
    }
    25% {
        transform: translateX(3px) skewX(1deg);
    }
    75% {
        transform: translateX(-3px) skewX(-1deg);
    }
}

@keyframes goldenRotate {
    from {
        transform: rotate(0deg);
        opacity: 0.35;
    }
    50% {
        opacity: 0.6;
    }
    to {
        transform: rotate(360deg);
        opacity: 0.35;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none;
    }
}

header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: rgba(255, 248, 240, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(244, 164, 96, 0.25);
}

.nav {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-primary);
}

.brand img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    object-fit: contain;
    box-shadow: var(--shadow-light);
}

.brand .title {
    font-family: var(--font-chinese);
    font-weight: var(--font-weight-h3);
    letter-spacing: var(--letter-spacing-h3);
    font-size: var(--font-size-h3);
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.nav-links a {
    color: var(--text-body);
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-fast);
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 248, 240, 0.9);
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px rgba(244, 164, 96, 0.25);
}

.lang-toggle {
    display: inline-flex;
    gap: var(--space-xs);
    border: 1px solid rgba(244, 164, 96, 0.25);
    border-radius: 999px;
    padding: 2px;
    background: rgba(255, 248, 240, 0.55);
}

.lang-toggle button {
    background: transparent;
    border: 0;
    padding: var(--space-xs) var(--space-md);
    border-radius: 999px;
    cursor: pointer;
    color: var(--text-helper);
    font-family: var(--font-latin);
    font-size: 13px;
    transition: all var(--duration-fast) var(--ease-fast);
}

.lang-toggle button.active {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: 0 3px 9px rgba(244, 164, 96, 0.25);
}

.hero {
    position: relative;
    color: var(--text-body);
    padding: 32px 16px 24px;
    isolation: isolate;
    border-bottom: 1px solid rgba(244, 164, 96, 0.18);
    margin-bottom: var(--space-3xl);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Hero panel in primary warm wheat tone, no spotlight */
    background: #F7E0C3;
    z-index: -1;
}

.hero-inner {
    max-width: var(--layout-max-width);
    margin: 0 auto;
}

.hero h1 {
    margin: 0 0 var(--space-md);
    font-size: var(--font-size-hero);
    line-height: var(--line-height-hero);
    font-family: var(--font-chinese);
    font-weight: 800;
    color: #9C6A06;
    letter-spacing: var(--letter-spacing-hero);
    text-shadow: none;
}

.hero p {
    margin: 0 0 var(--space-lg);
    font-size: var(--font-size-subtitle);
    color: rgba(184, 134, 11, 0.92);
    line-height: var(--line-height-subtitle);
    text-shadow: none;
}

.cta {
    display: inline-flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    border: 0;
    cursor: pointer;
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-xl);
    font-weight: 600;
    text-decoration: none;
    font-size: var(--font-size-body);
    transition: all var(--duration-standard) var(--ease-standard);
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: var(--shadow-button-primary);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-button-hover);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-ghost {
    background: var(--bg-button-secondary);
    color: var(--primary-wheat);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-light);
}

.btn-ghost:hover {
    box-shadow: var(--shadow-normal);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn[aria-disabled='true'] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

main.container {
    flex: 1 0 auto;
    width: 100%;
}

.container {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: var(--space-3xl) 16px;
    position: relative;
    z-index: var(--z-content);
}

.container > * + * {
    margin-top: var(--card-gap);
}

.grid {
    display: grid;
    gap: var(--space-2xl);
}

.card-grid {
    gap: var(--card-gap);
    margin-bottom: var(--card-gap);
}

@media (max-width: 600px) {
    :root {
        --card-gap: calc(var(--space-3xl) / 3);
    }

    .card-grid {
        margin-bottom: var(--card-gap);
    }
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 36px;
        padding-bottom: 32px;
    }

    .hero h1 {
        font-size: 30px;
    }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    /* Neutral, deeper shadow to separate cards from background */
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.09);
    transition: all var(--duration-standard) var(--ease-standard);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 60%);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-standard) var(--ease-standard);
}

.card:hover {
    transform: translateY(-2px) scale(1.01);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-heavy);
}

.card:hover::after {
    opacity: 1;
}

.card p:not(.muted):not(.highlight) {
    max-width: 62ch;
}

.muted {
    color: var(--text-helper);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    text-shadow: var(--text-shadow-body);
}

.section-title {
    margin: 0 0 var(--space-md);
    font-size: var(--font-size-h3);
    font-family: var(--font-chinese);
    font-weight: var(--font-weight-h3);
    letter-spacing: var(--letter-spacing-h3);
    color: var(--text-primary);
    text-shadow: var(--text-shadow-title);
}

.list {
    padding-left: 22px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.list li {
    margin: 0;
    color: var(--text-body);
    line-height: var(--line-height-body);
}

.kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: rgba(255, 248, 240, 0.92);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    color: var(--text-secondary);
}

footer {
    border-top: 1px solid rgba(244, 164, 96, 0.25);
    margin-top: var(--space-3xl);
    background: linear-gradient(180deg, rgba(255, 248, 240, 0.92) 0%, rgba(255, 239, 213, 0.75) 100%);
}

.footer-inner {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: var(--space-lg) 16px;
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.copyright {
    color: var(--text-helper);
    font-size: var(--font-size-body-sm);
}

.notice {
    background: rgba(255, 248, 240, 0.92);
    border: 1px solid rgba(244, 164, 96, 0.35);
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-light);
}

[data-lang] {
    display: none;
}

[data-lang].active {
    display: block;
}

.kv {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-body);
}

.kv .em {
    font-weight: 600;
    color: var(--primary-wheat);
    letter-spacing: 0.5px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 248, 240, 0.85);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table th,
.table td {
    border: 1px solid rgba(244, 164, 96, 0.25);
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    color: var(--text-body);
}

.table th {
    background: rgba(255, 239, 213, 0.8);
    color: var(--text-primary);
}

.highlight {
    background: linear-gradient(135deg, rgba(244, 164, 96, 0.18) 0%, rgba(255, 179, 71, 0.1) 100%);
    border-left: 4px solid rgba(244, 164, 96, 0.6);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: var(--font-size-caption);
    border: 1px solid rgba(244, 164, 96, 0.4);
    color: var(--text-secondary);
    background: rgba(255, 248, 240, 0.8);
    letter-spacing: 0.5px;
}

.badge.primary {
    color: var(--text-white);
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: 0 6px 14px rgba(244, 164, 96, 0.3);
}

[data-lang] a,
.card a {
    color: var(--primary-warm);
}

.table a {
    color: var(--primary-deep);
    font-weight: 600;
}

.notice strong {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    body::before,
    body::after {
        background-size: auto;
    }
}
