/* ==============================================
   设计令牌体系：统一管控所有视觉参数
   注意：本文件在 <link> 加载顺序中必须放在最后，
   因为文件末尾的响应式媒体查询需要覆盖其他 CSS 文件
   中定义的同优先级选择器（浏览器按“样式表最终顺序”而
   非“文件名”决定覆盖关系）。
   ============================================== */
:root {
    /* 颜色系统 */
    --glow-color: rgba(102, 126, 234, 0.7);
    --bg-primary: #f0f4ff;
    --bg-secondary: #e4ecf7;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;

    /* 玻璃层级系统 */
    --glass-level-1: rgba(255, 255, 255, 0.22);
    --glass-level-2: rgba(255, 255, 255, 0.16);
    --glass-level-3: rgba(255, 255, 255, 0.12);
    --glass-border-1: rgba(255, 255, 255, 0.5);
    --glass-border-2: rgba(255, 255, 255, 0.35);
    --glass-border-3: rgba(255, 255, 255, 0.2);

    /* 模糊层级 */
    --blur-strong: 30px;
    --blur-medium: 24px;
    --blur-weak: 0px;

    /* 圆角系统 */
    --radius-pill: 999px;
    --radius-large: 20px;
    --radius-medium: 16px;

    /* 阴影系统 */
    --shadow-elevated: 0 12px 40px rgba(31, 38, 135, 0.12);
    --shadow-normal: 0 8px 32px rgba(31, 38, 135, 0.08);
    --shadow-soft: 0 4px 16px rgba(31, 38, 135, 0.06);

    /* 动效系统 */
    --ease-ios: cubic-bezier(0.25, 1.15, 0.35, 1);
    --ease-interrupt: cubic-bezier(0.4, 0, 0.6, 1);
    --duration-fast: 0.2s;
    --duration-normal: 0.35s;
    --duration-slow: 0.5s;
}

/* 全局高级平滑过渡 */
body,
.menu-btn,
.dropdown-content,
.switch-btn,
.avatar-placeholder,
.contact-value,
.decoration {
    transition: background 0.4s var(--ease-ios),
                border-color 0.4s var(--ease-ios),
                box-shadow 0.4s var(--ease-ios),
                backdrop-filter 0.4s var(--ease-ios),
                -webkit-backdrop-filter 0.4s var(--ease-ios),
                opacity 0.4s var(--ease-ios),
                filter 0.4s var(--ease-ios),
                color 0.4s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

/* 背景噪点纹理层 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px 180px;
}
body.dark-theme::before { opacity: 0.05; }

/* 主视觉区域 */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    padding: 0 20px;
    animation: fadeInUp 0.7s var(--ease-ios) 0.15s both;
    position: relative;
    z-index: 1;
}
.avatar-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--glass-level-1);
    backdrop-filter: blur(var(--blur-medium)) saturate(170%);
    -webkit-backdrop-filter: blur(var(--blur-medium)) saturate(170%);
    border: 1.5px solid var(--glass-border-1);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: fadeInUp 0.7s var(--ease-ios) 0.05s both;
}
.avatar-placeholder svg {
    width: 36px;
    height: 36px;
    stroke: var(--text-tertiary);
    transition: stroke 0.3s ease;
}
.avatar-placeholder:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.hero h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    transition: background 0.4s ease;
}
.hero .tagline {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding: 5px 16px;
    border: 1px solid var(--glass-border-3);
    border-radius: var(--radius-pill);
    background: var(--glass-level-3);
    margin-bottom: 16px;
    animation: fadeInUp 0.7s var(--ease-ios) 0s both;
}
.subtitle {
    font-size: 20px;
    color: var(--text-tertiary);
    font-weight: 400;
    letter-spacing: 1px;
}

/* 背景装饰光斑 */
.decoration {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    z-index: 0;
    animation: float 18s ease-in-out infinite;
    pointer-events: none;
}
.decoration-1 { width: 420px; height: 420px; background: #818cf8; top: 5%; right: 5%; animation-delay: 0s; }
.decoration-2 { width: 360px; height: 360px; background: #93c5fd; bottom: 10%; left: 5%; animation-delay: -9s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -30px) scale(1.05); }
}

/* ==============================================
   响应式适配
   放在文件末尾，确保在最终样式表中位于所有组件基础样式
   之后，从而正确覆盖（媒体查询本身不提升选择器优先级）。
   ============================================== */
@media (min-width: 1024px) and (orientation: landscape) {
    .sidebar-nav { right: 60px; top: 36px; }
    .dropdown { min-width: 340px; }
}
@media (min-width: 1200px) {
    .sidebar-nav { right: 60px; top: 40px; }
    .menu-btn { width: 44px; height: 44px; }
    .menu-btn svg { width: 18px; height: 18px; }
    .dropdown { min-width: 340px; border-radius: var(--radius-large); }
    .dropdown-content { padding: 24px 28px; border-radius: var(--radius-large); }
    .hero h1 { font-size: 72px; }
    .subtitle { font-size: 22px; }
    .avatar-placeholder { width: 100px; height: 100px; }
    .avatar-placeholder svg { width: 40px; height: 40px; }
}
@media (max-width: 768px) {
    .sidebar-nav { right: 20px; top: 20px; }
    .menu-btn { width: 48px; height: 48px; }
    .menu-btn svg { width: 18px; height: 18px; }
    .dropdown { min-width: 260px; border-radius: var(--radius-medium); max-width: calc(100vw - 40px); right: 50%; transform: translateX(50%); }
    .dropdown.active { transform: translateX(50%); }
    .dropdown-content { padding: 16px 20px; border-radius: var(--radius-medium); max-height: calc(100vh - 110px); }
    .hero h1 { font-size: 36px; }
    .subtitle { font-size: 16px; }
    .guide-toast { right: 20px; top: 80px; }
    .avatar-placeholder { width: 72px; height: 72px; }
    .avatar-placeholder svg { width: 30px; height: 30px; }
    .hero .tagline { font-size: 10px; letter-spacing: 2px; padding: 4px 12px; }
}
