﻿/* ============================================
   全局样式 - global.css
   ============================================
   作用：
   1. 提供全站共用的颜色、间距、圆角、阴影、字体和过渡变量。
   2. 统一 reset、基础排版、按钮、导航、页脚等公共样式基线。
   3. 给所有页面提供同一套视觉底盘，避免盐憩拆成几套互不相干的风格。
   阅读顺序：
   1. :root 变量
   2. reset 与基础元素
   3. 导航与通用组件
   4. 页脚与公共响应式
*/

/* 文件导读：该文件更像整站样式的“公共海床”，先把变量和基础规则读懂，再看页面专属样式会轻松很多。 */
/* 定义全局主题变量 */
:root {
    /* 颜色系统 - 莫兰迪深海风 */
    --primary: #2d5a7b; /* 深邃海蓝 */
    --primary-dark: #1a3c54;
    --primary-light: #5b8ba8;
    --secondary: #6e9da8; /* 浅葱青 */
    --accent: #d2a97c; /* 沙滩暖金 */
    
    /* 中性色 */
    --text-dark: #1f2d38;
    --text-light: #687e8f;
    --bg-light: #eef4f8;
    --bg-white: #ffffff;
    --border-color: #d1e2ec;
    
    /* 玻璃效果 */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-backdrop: blur(20px);
    
    /* 共享海面材质 token：
       更新为现代极简清透风格，大幅降低阴影透明度和厚重感，取消不必要的内阴影。 */
    --surface-glass-soft: rgba(255, 255, 255, 0.02);
    --surface-glass-strong: rgba(255, 255, 255, 0.06);
    --surface-border-soft: rgba(255, 255, 255, 0.04);
    --surface-border-strong: rgba(255, 255, 255, 0.08);
    --surface-shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.03);
    --surface-shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.06);
    --surface-glow-soft: 0 0 20px rgba(144, 212, 238, 0.02);
    --surface-glow-strong: 0 0 30px rgba(144, 212, 238, 0.04);
    --surface-backdrop-soft: blur(20px) saturate(120%);
    --surface-backdrop-strong: blur(32px) saturate(140%);

    /* 焦点 token：给共享交互元素一套统一而克制的可访问焦点。 */
    --focus-ring-color: rgba(214, 238, 250, 0.5);
    --focus-ring-shadow: 0 0 0 2px var(--focus-ring-color);
    --focus-ring-offset: 2px;
    
    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 50%;
    
    /* 阴影 - 更新为更现代克制的阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
    
    /* 过渡 */
    --motion-fast: 0.2s cubic-bezier(0.2, 0, 0, 1);
    --motion-normal: 0.4s cubic-bezier(0.2, 0, 0, 1);
    --motion-slow: 0.8s cubic-bezier(0.2, 0, 0, 1);
    --motion-breathe: 2s cubic-bezier(0.4, 0, 0.2, 1);
    --motion-depth-enter: 760ms cubic-bezier(0.2, 0, 0, 1);
    --motion-depth-exit: 1000ms cubic-bezier(0.2, 0, 0, 1);
    --motion-ocean-enter: 1040ms cubic-bezier(0.2, 0, 0, 1);
    --motion-ocean-exit: 1200ms cubic-bezier(0.2, 0, 0, 1);
    --transition-fast: var(--motion-fast);
    --transition-normal: var(--motion-normal);
    --transition-slow: var(--motion-slow);
    
    /* 字体 - 引入更现代的无衬线体作为主力 */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
}

/* 亮度/深色模式支持 */
/* 当前屏幕条件下的响应式样式 */
@media (prefers-color-scheme: dark) {
/* 定义全局主题变量 */
    :root {
        --text-dark: #ecf0f1;
        --text-light: #95a5a6;
        --bg-light: #1a1a1a;
        --bg-white: #2d2d2d;
        --border-color: #444;
    }
}

/* ============================================
   全局重置与基础样式
   ============================================ */

/* *, *::before, *::after 的前置装饰样式 */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* html 的主要视觉与布局效果 */
html {
    scroll-behavior: auto;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #081923;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* 设置页面根节点与全局背景联动效果 */
body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #081923;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* 共享焦点环：
   只补可访问性底盘，不覆盖各页面已存在的专属海层交互。 */
:where(a, button, input, select, textarea, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 1px solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
    box-shadow: var(--focus-ring-shadow);
}

/* 舞台调试开关：收进导航右侧，让调试入口留在页面框架里，
   不再像悬浮工具一样压在海面内容之上。 */
.stage-debug-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 7px 12px 7px 10px;
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font: inherit;
    color: rgba(225, 239, 247, 0.88);
    border-radius: 999px;
    background: var(--surface-glass-soft);
    border: 1px solid var(--surface-border-soft);
    box-shadow: var(--surface-shadow-soft);
    backdrop-filter: var(--surface-backdrop-soft);
    -webkit-backdrop-filter: var(--surface-backdrop-soft);
    transition:
        opacity 220ms ease,
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease,
        background-color 220ms ease,
        padding 220ms ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -6px, 0);
}

:is(html, body).yanqi-stage-debug .stage-debug-toggle {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

.stage-debug-toggle:hover,
.stage-debug-toggle:focus-visible {
    transform: translate3d(0, -2px, 0);
    border-color: rgba(214, 236, 246, 0.18);
    box-shadow:
        0 14px 24px rgba(4, 16, 25, 0.12),
        var(--surface-glow-soft),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stage-debug-toggle:focus-visible {
    outline: none;
}

.stage-debug-toggle:not(.is-active) {
    padding-right: 10px;
}

.stage-debug-toggle.is-active {
    border-color: var(--surface-border-strong);
    background: var(--surface-glass-strong);
    box-shadow: var(--surface-shadow-strong);
}

.stage-debug-toggle-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(164, 194, 208, 0.68);
    box-shadow: 0 0 0 4px rgba(141, 193, 218, 0.05);
    transition: background-color 220ms ease, box-shadow 220ms ease;
}

.stage-debug-toggle.is-active .stage-debug-toggle-dot {
    background: rgba(184, 240, 250, 0.96);
    box-shadow:
        0 0 0 4px rgba(141, 193, 218, 0.1),
        0 0 14px rgba(160, 228, 244, 0.3);
}

.stage-debug-toggle-copy {
    display: grid;
    gap: 1px;
    text-align: left;
}

.stage-debug-toggle-label {
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.stage-debug-toggle-state {
    font-size: 0.58rem;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(200, 223, 235, 0.64);
}

.stage-debug-toggle:not(.is-active) .stage-debug-toggle-state {
    display: none;
}

.stage-debug-toggle.is-leaving,
body.page-transition-active .stage-debug-toggle {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, -6px, 0);
}

@media (max-width: 768px) {
    .stage-debug-toggle {
        min-height: 34px;
        padding: 6px 10px 6px 9px;
        gap: 7px;
    }

    .stage-debug-toggle-label {
        font-size: 0.68rem;
    }

    .stage-debug-toggle-state {
        font-size: 0.56rem;
    }
}

/* 标题样式 */
/* h1, h2, h3, h4, h5, h6 的主要视觉与布局效果 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

/* h1 { font-size: 2.5rem; } 的主要视觉与布局效果 */
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* 段落 */
p {
    margin-bottom: var(--spacing-md);
}

/* 列表 */
/* ul, ol 的主要视觉与布局效果 */
ul, ol {
    margin-left: var(--spacing-lg);
}

/* li 的主要视觉与布局效果 */
li {
    margin-bottom: var(--spacing-sm);
}

/* 链接 */
/* a 的主要视觉与布局效果 */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

/* a:hover 鼠标移入时的样式 */
a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 统一按钮元素的鼠标、边框和字体基线，方便后续各页面再覆盖成品牌化按钮 */
button {
    font-family: var(--font-family);
    font-size: 1rem;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

/* 统一输入类控件的字体基线，避免不同页面表单控件出现默认样式差异 */
input,
select,
textarea {
    font-family: var(--font-family);
    font-size: 1rem;
}

/* 图片 */
/* img 的主要视觉与布局效果 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   导航栏样式
   ============================================ */

/* 控制顶部导航的布局、透明度和当前页状态反馈 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background:
        linear-gradient(180deg, rgba(10, 33, 52, 0.88) 0%, rgba(12, 42, 64, 0.8) 100%),
        rgba(9, 27, 41, 0.76);
    backdrop-filter: blur(16px) saturate(130%);
    /* 导航固定在最上层后，背后页面会持续滚动经过。
       这里做模糊和轻微增色，是为了让导航始终像漂浮在海水上，而不是一条死黑条。 */
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    border-bottom: 1px solid rgba(210, 230, 242, 0.12);
    z-index: 1000;
    box-shadow: 0 10px 28px rgba(5, 18, 29, 0.16);
}

/* 控制顶部导航的布局、透明度和当前页状态反馈 */
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 控制顶部导航的布局、透明度和当前页状态反馈 */
.nav-brand {
    display: flex;
    align-items: center;
}

/* .logo 的主要视觉与布局效果 */
.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f5fbff;
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
    letter-spacing: 0.12em;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

/* .logo:hover 鼠标移入时的样式 */
.logo:hover {
    color: #f5fbff;
    opacity: 0.88;
    text-decoration: none;
}

/* 控制顶部导航的布局、透明度和当前页状态反馈 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    flex: 1;
    justify-content: center;
}

/* 控制顶部导航的布局、透明度和当前页状态反馈 */
.nav-link {
    color: rgba(220, 235, 244, 0.68);
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: color var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
    position: relative;
}

/* .nav-link:hover, .nav-link.active 鼠标移入时的样式 */
.nav-link:hover,
.nav-link.active {
    color: #f5fbff;
    text-decoration: none;
}

/* .nav-link:hover 鼠标移入时的样式 */
.nav-link:hover {
    transform: translateY(-1px);
}

/* .nav-link.active::after 的后置装饰样式 */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, rgba(182, 220, 241, 0), rgba(214, 238, 250, 0.92), rgba(182, 220, 241, 0));
    border-radius: 999px;
    box-shadow: 0 0 16px rgba(180, 221, 241, 0.18);
}

/* 控制顶部导航的布局、透明度和当前页状态反馈 */
.nav-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.showcase-reset-btn {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    gap: 2px;
    min-height: 40px;
    padding: 8px 14px 8px 12px;
    border: 1px solid var(--surface-border-soft);
    border-radius: 999px;
    background: var(--surface-glass-soft);
    box-shadow:
        0 12px 22px rgba(4, 16, 25, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: rgba(235, 246, 252, 0.9);
    cursor: pointer;
    text-align: left;
    font: inherit;
    backdrop-filter: var(--surface-backdrop-soft);
    -webkit-backdrop-filter: var(--surface-backdrop-soft);
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease,
        background-color 220ms ease;
}

.showcase-reset-btn:hover,
.showcase-reset-btn:focus-visible {
    transform: translate3d(0, -2px, 0);
    border-color: rgba(214, 238, 246, 0.22);
    box-shadow:
        0 16px 28px rgba(4, 16, 25, 0.16),
        0 0 18px rgba(114, 180, 209, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.showcase-reset-btn:focus-visible {
    outline: none;
}

.showcase-reset-btn-kicker {
    font-size: 0.58rem;
    line-height: 1.1;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(194, 223, 237, 0.58);
}

.showcase-reset-btn-label {
    font-size: 0.78rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(244, 249, 252, 0.94);
}

/* .avatar 的主要视觉与布局效果 */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: transform var(--transition-fast);
    border: 1px solid rgba(221, 236, 246, 0.24);
}

/* .avatar:hover 鼠标移入时的样式 */
.avatar:hover {
    transform: scale(1.1);
}

html.has-avatar-return-open,
body.has-avatar-return-open {
    overflow: hidden;
}

/* 头像返回浮层：
   这不是浏览器原生确认框，而是一层安静的“上浮确认”，
   让用户从当前海层回到入口前先有一段缓冲。 */
.avatar-return-modal {
    position: fixed;
    inset: 0;
    z-index: 860;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
}

.avatar-return-modal.active,
.avatar-return-modal.is-closing {
    pointer-events: auto;
}

.avatar-return-modal.active {
    opacity: 1;
}

.avatar-return-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 18%, rgba(171, 221, 246, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(4, 16, 28, 0.28), rgba(4, 12, 22, 0.7));
    backdrop-filter: blur(16px) saturate(108%);
    -webkit-backdrop-filter: blur(16px) saturate(108%);
}

.avatar-return-dialog {
    position: relative;
    width: min(100%, 520px);
    border-radius: 32px;
    border: 1px solid rgba(197, 228, 242, 0.14);
    background:
        linear-gradient(180deg, rgba(12, 36, 54, 0.92), rgba(8, 24, 38, 0.88)),
        rgba(7, 20, 31, 0.84);
    box-shadow:
        0 28px 52px rgba(4, 14, 24, 0.34),
        0 0 34px rgba(118, 186, 214, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px) saturate(126%);
    -webkit-backdrop-filter: blur(24px) saturate(126%);
    transform: translate3d(0, 28px, 0) scale(0.98);
    opacity: 0;
    transition:
        transform 420ms cubic-bezier(0.18, 0.8, 0.22, 1),
        opacity 280ms ease,
        box-shadow 320ms ease;
}

.avatar-return-modal.active .avatar-return-dialog {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
}

.avatar-return-modal.is-closing .avatar-return-dialog {
    transform: translate3d(0, 18px, 0) scale(0.985);
    opacity: 0;
}

.avatar-return-inner {
    position: relative;
    padding: 30px 30px 28px;
}

.avatar-return-inner::before {
    content: "";
    position: absolute;
    inset: 14px 14px auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(188, 228, 244, 0), rgba(188, 228, 244, 0.42), rgba(188, 228, 244, 0));
    opacity: 0.88;
}

.avatar-return-kicker {
    margin: 0 0 12px;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(201, 230, 241, 0.62);
}

.avatar-return-title {
    margin: 0;
    font-size: clamp(1.55rem, 3.8vw, 2rem);
    line-height: 1.18;
    color: #f2fbff;
}

.avatar-return-copy {
    margin: 16px 0 0;
    font-size: 0.98rem;
    line-height: 1.9;
    color: rgba(217, 235, 243, 0.76);
}

.avatar-return-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.avatar-return-primary,
.avatar-return-secondary {
    flex: 1 1 0;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        background-color 220ms ease,
        box-shadow 220ms ease,
        color 220ms ease;
}

.avatar-return-primary {
    color: #062133;
    background:
        linear-gradient(135deg, rgba(234, 250, 255, 0.98), rgba(181, 226, 242, 0.9));
    box-shadow:
        0 16px 30px rgba(5, 18, 28, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.avatar-return-primary:hover,
.avatar-return-primary:focus-visible {
    transform: translate3d(0, -2px, 0);
    box-shadow:
        0 20px 34px rgba(5, 18, 28, 0.28),
        0 0 18px rgba(148, 219, 242, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.avatar-return-secondary {
    color: rgba(228, 241, 247, 0.84);
    border-color: rgba(192, 226, 240, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(145, 198, 221, 0.04)),
        rgba(7, 24, 37, 0.54);
}

.avatar-return-secondary:hover,
.avatar-return-secondary:focus-visible {
    transform: translate3d(0, -2px, 0);
    border-color: rgba(203, 232, 243, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(145, 198, 221, 0.06)),
        rgba(9, 28, 42, 0.66);
}

.avatar-return-primary:focus-visible,
.avatar-return-secondary:focus-visible {
    outline: none;
}

@media (max-width: 640px) {
    .avatar-return-modal {
        padding: 18px;
    }

    .avatar-return-inner {
        padding: 26px 22px 22px;
    }

    .avatar-return-actions {
        flex-direction: column;
    }

    .avatar-return-primary,
    .avatar-return-secondary {
        width: 100%;
    }
}

/* ============================================
   通用组件样式
   ============================================ */

/* 旧通用组件边界：
   `.card` / `.btn*` 属于早期共享帮助类，保留给信息页和低风险通用块使用。
   home / trip / detail / index 的海洋叙事模块不要再直接依赖它们搭主结构，
   否则会把页面气质拉回普通站点组件感。 */

/* 卡片 */
/* .card 的主要视觉与布局效果 */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

/* .card:hover 鼠标移入时的样式 */
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* 按钮变量 */
/* 设置通用按钮的颜色、边框和悬停过渡 */
.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 999px; /* 改为全圆角，提升现代感 */
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all var(--motion-normal);
    display: inline-block;
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 设置通用按钮的颜色、边框和悬停过渡 */
.btn-primary {
    background: linear-gradient(135deg, rgba(45, 90, 123, 0.9) 0%, rgba(26, 60, 84, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* .btn-primary:hover 鼠标移入时的样式 */
.btn-primary:hover {
    background: linear-gradient(135deg, rgba(55, 105, 140, 0.95) 0%, rgba(35, 75, 100, 0.85) 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 设置通用按钮的颜色、边框和悬停过渡 */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* .btn-secondary:hover 鼠标移入时的样式 */
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 设置通用按钮的颜色、边框和悬停过渡 */
.btn-outline {
    border: 1px solid var(--primary-light);
    color: var(--primary);
    background: transparent;
}

/* .btn-outline:hover 鼠标移入时的样式 */
.btn-outline:hover {
    background: rgba(91, 139, 168, 0.1);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* 容器 */
/* 控制通用内容容器的最大宽度和左右留白 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* 部分标题 */
/* 设置通用区块标题的字号、字重和排版节奏 */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

/* 设置通用区块标题的字号、字重和排版节奏 */
.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   底部样式
   ============================================ */

/* 控制页脚区域的布局、层次和收束氛围 */
.footer {
    background: var(--bg-light);
    padding: var(--spacing-2xl) var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    border-top: 1px solid var(--border-color);
}

/* 控制页脚区域的布局、层次和收束氛围 */
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

/* 控制页脚区域的布局、层次和收束氛围 */
.footer-column h4 {
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

/* 控制页脚区域的布局、层次和收束氛围 */
.footer-column p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* 控制页脚区域的布局、层次和收束氛围 */
.footer-column ul {
    list-style: none;
    margin-left: 0;
}

/* 控制页脚区域的布局、层次和收束氛围 */
.footer-column ul li {
    margin-bottom: var(--spacing-sm);
}

/* 控制页脚区域的布局、层次和收束氛围 */
.footer-column a {
    color: var(--text-light);
    transition: color var(--transition-fast);
}

/* .footer-column a:hover 鼠标移入时的样式 */
.footer-column a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* .social-icons 的主要视觉与布局效果 */
.social-icons {
    display: flex;
    gap: var(--spacing-md);
}

/* .social-icon 的主要视觉与布局效果 */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

/* .social-icon:hover 鼠标移入时的样式 */
.social-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* 控制页脚区域的布局、层次和收束氛围 */
.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================
   辅助样式
   ============================================ */

/* 返回顶部按钮 */
/* 控制返回顶部按钮的位置、显隐和悬停反馈 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0; /* 默认先不显示，避免首屏就出现打断海面入口 */
    transform: translateY(20px); /* 初始略微下沉，出现时会像从页面底部浮上来 */
    transition: all var(--transition-normal);
    z-index: 900;
    pointer-events: none; /* 隐藏状态不可点击，避免透明按钮挡住下面内容 */
}

/* .back-to-top.visible 显示状态下的样式 */
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* .back-to-top:hover 鼠标移入时的样式 */
.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* 显示/隐藏类 */
/* 提供通用的隐藏、不可见或无障碍辅助样式 */
.hidden {
    display: none !important;
}

/* 提供通用的隐藏、不可见或无障碍辅助样式 */
.invisible {
    visibility: hidden;
}

/* 提供通用的隐藏、不可见或无障碍辅助样式 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 响应式设计 */
/* 当前屏幕条件下的响应式样式 */
@media (max-width: 768px) {
/* h1 { font-size: 1.8rem; } 的主要视觉与布局效果 */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    
    .nav-menu {
        gap: var(--spacing-md);
    }
    
/* 设置通用区块标题的字号、字重和排版节奏 */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-lg);
    }
    
/* 控制页脚区域的布局、层次和收束氛围 */
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* 当前屏幕条件下的响应式样式 */
@media (max-width: 480px) {
/* h1 { font-size: 1.5rem; } 的主要视觉与布局效果 */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 1rem; }

    .navbar {
        height: auto;
        min-height: 64px;
        background:
            radial-gradient(circle at 16% 0%, rgba(174, 219, 238, 0.1), rgba(174, 219, 238, 0) 46%),
            linear-gradient(180deg, rgba(9, 30, 45, 0.9), rgba(8, 25, 37, 0.76));
    }
    
    .nav-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px 12px;
        min-height: 64px;
        height: auto;
        padding: 8px var(--spacing-md) 10px;
    }

    .nav-brand {
        min-width: 0;
    }

    .logo {
        font-size: 1.22rem;
        letter-spacing: 0.1em;
    }

    .nav-user {
        justify-self: end;
        min-width: 0;
    }
    
/* 控制顶部导航的布局、透明度和当前页状态反馈 */
    .nav-menu {
        grid-column: 1 / -1;
        display: flex;
        justify-content: flex-start;
        gap: 6px;
        max-width: 100%;
        overflow-x: auto;
        padding: 7px;
        border-radius: 999px;
        background:
            linear-gradient(180deg, rgba(236, 248, 255, 0.1), rgba(115, 172, 199, 0.04)),
            rgba(6, 25, 39, 0.54);
        border: 1px solid rgba(200, 230, 242, 0.12);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.06),
            0 10px 18px rgba(3, 13, 22, 0.12);
        backdrop-filter: blur(14px) saturate(126%);
        -webkit-backdrop-filter: blur(14px) saturate(126%);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-menu li {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .nav-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 30px;
        padding: 0 11px;
        border-radius: 999px;
        font-size: 0.74rem;
        line-height: 1;
        white-space: nowrap;
        color: rgba(224, 239, 247, 0.7);
    }

    .nav-link:hover {
        transform: none;
    }

    .nav-link.active {
        background: rgba(209, 235, 247, 0.09);
    }

    .nav-link.active::after {
        bottom: 3px;
        left: 18px;
        right: 18px;
        height: 1px;
    }
    
/* 控制返回顶部按钮的位置、显隐和悬停反馈 */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* 高对比度保护层：锁住整站共享深色品牌面的文字，不让导航与共享浮层退回系统黑字或链接蓝。 */
@media (forced-colors: active) {
    :root {
        --yanqi-forced-title: #f5fbff;
        --yanqi-forced-copy: rgba(232, 242, 248, 0.9);
        --yanqi-forced-muted: rgba(214, 231, 240, 0.82);
        --yanqi-forced-kicker: rgba(201, 224, 236, 0.72);
        --yanqi-forced-link: #f4fbff;
        --yanqi-forced-border: rgba(204, 231, 243, 0.28);
        --yanqi-forced-ring: rgba(236, 247, 253, 0.96);
    }

    :is(
        .stage-debug-toggle,
        .stage-debug-toggle-label,
        .stage-debug-toggle-state,
        .showcase-reset-btn,
        .showcase-reset-btn-kicker,
        .showcase-reset-btn-label,
        .logo,
        .nav-link,
        .avatar-return-kicker,
        .avatar-return-title,
        .avatar-return-copy,
        .avatar-return-primary,
        .avatar-return-secondary
    ) {
        forced-color-adjust: none;
    }

    .logo,
    .logo:visited,
    .logo:hover,
    .logo:focus-visible,
    .logo:active {
        color: var(--yanqi-forced-title);
        -webkit-text-fill-color: var(--yanqi-forced-title);
    }

    .nav-link,
    .nav-link:visited {
        color: var(--yanqi-forced-kicker);
        -webkit-text-fill-color: var(--yanqi-forced-kicker);
    }

    .nav-link:hover,
    .nav-link.active,
    .nav-link:focus-visible,
    .nav-link:active {
        color: var(--yanqi-forced-title);
        -webkit-text-fill-color: var(--yanqi-forced-title);
    }

    .nav-link.active::after {
        forced-color-adjust: none;
        background: linear-gradient(90deg, rgba(182, 220, 241, 0), rgba(214, 238, 250, 0.92), rgba(182, 220, 241, 0));
        box-shadow: 0 0 12px rgba(180, 221, 241, 0.18);
    }

    .stage-debug-toggle,
    .showcase-reset-btn,
    .avatar-return-primary,
    .avatar-return-secondary {
        color: var(--yanqi-forced-link);
        -webkit-text-fill-color: var(--yanqi-forced-link);
        border-color: var(--yanqi-forced-border);
    }

    .stage-debug-toggle-state,
    .showcase-reset-btn-kicker,
    .avatar-return-kicker {
        color: var(--yanqi-forced-kicker);
        -webkit-text-fill-color: var(--yanqi-forced-kicker);
    }

    .showcase-reset-btn-label,
    .avatar-return-title {
        color: var(--yanqi-forced-title);
        -webkit-text-fill-color: var(--yanqi-forced-title);
    }

    .avatar-return-copy {
        color: var(--yanqi-forced-copy);
        -webkit-text-fill-color: var(--yanqi-forced-copy);
    }

    :is(
        .logo,
        .nav-link,
        .stage-debug-toggle,
        .showcase-reset-btn,
        .avatar-return-primary,
        .avatar-return-secondary
    ):focus-visible {
        outline: 2px solid var(--yanqi-forced-ring);
        outline-offset: 3px;
    }
}
