/* =========================================
   设计令牌 (Design Tokens) - 二次元机能风
   参照《明日方舟》《女神异闻录》UI风格
   ========================================= */
:root {
    /* 明亮底色 + 深色模块（反塑料感） */
    --bg-primary: var(--color-gray-100, #f4f5f7);
    --bg-secondary: var(--color-white, #ffffff);
    --bg-dark: var(--color-black, #1a1a1a);
    --bg-card: var(--color-white, #ffffff);
    
    /* 核心点缀色（警示黄/橙） */
    --primary-accent: var(--color-primary, #ffb703);
    --secondary-accent: var(--color-secondary, #fb8500);
    --tech-blue: var(--color-accent, #00b4d8);
    --danger-red: var(--color-danger, #e63946);
    
    /* 文字颜色 */
    --text-primary: var(--color-gray-900, #2b2d42);
    --text-inverse: var(--color-white, #f4f5f7);
    --text-muted: var(--color-gray-500, #8d99ae);
    
    /* 边框 */
    --border-dark: 2px solid var(--color-gray-900, #2b2d42);
    --border-accent: 2px solid var(--primary-accent);
    
    /* 字体 */
    --font-mono: 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
    --font-sans: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    
    /* 切角角度 */
    --clip-angle: 14px;
    
    /* ===== 引入的最佳实践系统 ===== */
    /* 颜色系统 */
    --color-primary: #ffb703;
    --color-primary-hover: #e6a502;
    --color-primary-light: #ffcc40;
    --color-primary-dark: #cc9200;
    --color-secondary: #fb8500;
    --color-accent: #00b4d8;
    --color-danger: #e63946;
    
    --color-white: #ffffff;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f4f5f7;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #8d99ae;
    --color-gray-600: #6b7280;
    --color-gray-700: #4b5563;
    --color-gray-800: #374151;
    --color-gray-900: #2b2d42;
    --color-black: #1a1a1a;

    /* 字体系统补充 */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    /* 间距系统 */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* 尺寸系统 */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* 阴影系统 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-cyber: 6px 6px 0 var(--color-gray-900);

    /* 过渡 - Fuwari风格更流畅的缓动 */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 深色模式变量 */
[data-theme="dark"] {
  --bg-primary: var(--color-gray-900);
  --bg-secondary: var(--color-gray-800);
  --bg-card: var(--color-gray-800);
  --text-primary: var(--color-white);
  --text-secondary: var(--color-gray-300);
  --border-dark: 2px solid var(--color-gray-600);
  --shadow-cyber: 6px 6px 0 var(--color-gray-600);
}

/* =========================================
   ANIMATIONS & EFFECTS
   ========================================= */

@keyframes cyber-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        box-shadow:
            0 0 .5rem #fff,
            inset 0 0 .5rem #fff,
            0 0 .1rem var(--primary-accent),
            inset 0 0 .1rem var(--primary-accent),
            0 0 .1rem var(--primary-accent),
            inset 0 0 .1rem var(--primary-accent);
    }
    20%, 24%, 55% {
        box-shadow: none;
    }
}

.flicker-effect {
    animation: cyber-flicker 3s infinite;
}

/* =========================================
   页面入场动画 (Fuwari风格)
   ========================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* 页面元素入场动画类 */
.animate-fade-in {
    animation: fadeIn var(--transition-slow) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp var(--transition-slow) forwards;
}

.animate-slide-left {
    animation: slideInLeft var(--transition-slow) forwards;
}

.animate-slide-right {
    animation: slideInRight var(--transition-slow) forwards;
}

/* 交错动画延迟 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* =========================================
   重置与基础样式
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    touch-action: manipulation;
}

:focus-visible {
    outline: 3px solid var(--tech-blue);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 16px;
    left: 1rem;
    z-index: 10005;
    padding: 0.65rem 1rem;
    background: var(--bg-dark);
    color: var(--primary-accent);
    font-family: var(--font-mono);
    transform: translateY(-160%);
    transition: transform var(--transition-fast);
}

.skip-link:focus {
    transform: translateY(0);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--text-primary);
}

/* =========================================
   背景装饰
   ========================================= */

/* 顶部斜纹警戒带 */
.hazard-stripe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: repeating-linear-gradient(
        -45deg,
        var(--primary-accent),
        var(--primary-accent) 15px,
        var(--bg-dark) 15px,
        var(--bg-dark) 30px
    );
    z-index: 1001;
}

/* 点阵网格背景 */
.dot-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--text-muted) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* 巨大背景水印 */
.bg-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    font-family: var(--font-mono);
    font-size: 18vw;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.025);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
    letter-spacing: -0.05em;
    line-height: 0.8;
}

/* =========================================
   头部导航
   ========================================= */
.cyber-header {
    position: fixed;
    top: 12px;
    left: 0;
    width: 100%;
    padding: 0.75rem 2rem;
    background: var(--bg-secondary);
    border-bottom: var(--border-dark);
    z-index: 1000;
}

.cyber-nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.logo-bracket {
    color: var(--secondary-accent);
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
    min-width: 0;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::before {
    content: '//';
    margin-right: 6px;
    color: var(--text-muted);
    transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::before,
.nav-link.active::before {
    color: var(--secondary-accent);
    text-shadow: 0 0 8px var(--secondary-accent);
}

/* 语言切换器 */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-dark);
    padding: 4px 10px;
    transform: skewX(-12deg);
    border: 2px solid var(--primary-accent);
}

.lang-btn {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transform: skewX(12deg);
    transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--primary-accent);
    text-shadow: 0 0 8px var(--primary-accent);
}

.lang-divider {
    color: var(--text-muted);
    font-size: 0.8rem;
    transform: skewX(12deg);
}

.theme-toggle {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
    padding: 0.35rem;
    border: 1px solid var(--text-primary);
    border-radius: 4px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
}

.theme-icon {
    display: block;
    filter: invert(0.8);
}

#scroll-progress {
    position: fixed;
    top: 12px;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1002;
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

/* =========================================
   Hero 区域
   ========================================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6rem 4rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.home-hero {
    flex-direction: row;
    gap: 4rem;
    align-items: flex-start;
    padding-top: 7rem;
}

.home-hero-content {
    flex: 1.5;
}

.home-hero-decoration {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.home-skills-panel {
    width: 100%;
    padding: 1.5rem;
    background: var(--bg-card);
    border: var(--border-dark);
}

.home-panel-title {
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: 1rem;
}

.home-radar-container {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.home-radar-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-content {
    flex: 1;
    max-width: 650px;
}

/* 系统状态 */
.system-status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--secondary-accent);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-dark);
    color: var(--primary-accent);
    border-left: 4px solid var(--primary-accent);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--primary-accent);
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-divider {
    color: var(--text-muted);
}

/* 打字机标题 */
.hero-title {
    font-family: var(--font-mono);
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1rem;
    min-height: 3.2rem;
    border: none;
    position: relative;
}

.hero-title::after {
    content: '|';
    color: var(--secondary-accent);
    animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-subtitle {
    margin-bottom: 2rem;
}

.subtitle-en {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.subtitle-zh {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* 终端盒子 */
.terminal-box {
    background: var(--bg-dark);
    margin-bottom: 2rem;
    border: var(--border-dark);
    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(100% - var(--clip-angle)),
        calc(100% - var(--clip-angle)) 100%,
        0 100%
    );
}

.terminal-header {
    background: var(--text-primary);
    padding: 0.5rem 1rem;
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary-accent);
}

.terminal-body {
    padding: 1rem;
}

.home-terminal-body {
    color: var(--text-inverse);
    font-family: var(--font-sans);
    line-height: 1.8;
}

.home-terminal-body p + p {
    margin-top: 0.65rem;
}

.module-line {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.module-name {
    color: var(--tech-blue);
    font-weight: 700;
}

.system-ready {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--text-muted);
}

.ready-mark {
    color: var(--primary-accent);
}

/* 按钮 - 机能风硬阴影 */
.btn-cyber {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 900;
    padding: 14px 32px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--bg-dark);
    color: var(--text-inverse);
    clip-path: polygon(
        0 0,
        calc(100% - var(--clip-angle)) 0,
        100% var(--clip-angle),
        100% 100%,
        var(--clip-angle) 100%,
        0 calc(100% - var(--clip-angle))
    );
    box-shadow: 6px 6px 0 var(--text-primary);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn-cyber:hover {
    background: var(--primary-accent);
    color: var(--text-primary);
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 var(--text-primary);
}

.btn-cyber:active {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 var(--text-primary);
}

.btn-outline {
    background: transparent;
    border: var(--border-dark);
    color: var(--text-primary);
    box-shadow: 4px 4px 0 var(--secondary-accent);
}

.btn-outline:hover {
    background: var(--secondary-accent);
    border-color: var(--secondary-accent);
    color: var(--text-inverse);
    box-shadow: 4px 4px 0 var(--text-primary);
}

/* 行动按钮组 */
.hero-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* =========================================
   右侧装饰区
   ========================================= */
.hero-decoration {
    position: relative;
    width: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-frame {
    width: 260px;
    height: 260px;
    border: 3px solid var(--text-primary);
    position: relative;
    background: var(--bg-secondary);
    clip-path: polygon(
        20px 0,
        100% 0,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        0 100%,
        0 20px
    );
}

.avatar-frame::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid var(--primary-accent);
    clip-path: polygon(
        25px 0,
        100% 0,
        100% calc(100% - 25px),
        calc(100% - 25px) 100%,
        0 100%,
        0 25px
    );
}

.avatar-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-placeholder {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    border: 2px dashed var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-icon {
    font-size: 4rem;
}

.avatar-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-accent);
    animation: scan 2.5s linear infinite;
    box-shadow: 0 0 10px var(--primary-accent);
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

.deco-lines {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deco-lines span {
    width: 80px;
    height: 3px;
    background: var(--text-primary);
}

.deco-lines span:nth-child(2) { width: 50px; }
.deco-lines span:nth-child(3) { width: 100px; }
.deco-lines span:nth-child(4) { width: 35px; }

/* =========================================
   页脚
   ========================================= */
.cyber-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-dark);
    border-top: 3px solid var(--primary-accent);
    z-index: 100;
}

.marquee-container {
    overflow: hidden;
    padding: 0.5rem 0;
}

.marquee-content {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary-accent);
    white-space: nowrap;
    animation: marquee 12s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================================
   Glitch 效果
   ========================================= */
.glitch-hover:hover {
    animation: glitch 0.2s ease;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); text-shadow: none; }
    20% { transform: translate(-2px, 2px); text-shadow: 2px 0 var(--danger-red), -2px 0 var(--tech-blue); }
    40% { transform: translate(2px, -2px); text-shadow: -2px 0 var(--danger-red), 2px 0 var(--tech-blue); }
    60% { transform: translate(-1px, 1px); text-shadow: 1px 0 var(--danger-red), -1px 0 var(--tech-blue); }
    80% { transform: translate(1px, -1px); text-shadow: -1px 0 var(--danger-red), 1px 0 var(--tech-blue); }
}

/* =========================================
   响应式
   ========================================= */
@media (max-width: 1024px) {
    .hero-section {
        flex-direction: column;
        padding: 5rem 2rem 6rem;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-decoration {
        margin-top: 2rem;
    }
    
    .system-status {
        justify-content: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .bg-watermark {
        font-size: 30vw;
    }
}

@media (max-width: 768px) {
    .cyber-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0.25rem 0 0.5rem;
        scrollbar-width: thin;
    }
    
    .lang-switcher {
        order: 2;
    }
    
    .hero-title {
        font-size: 2rem;
    }

    .hero-section,
    .portfolio-section,
    .about-section,
    .contact-section,
    .life-main {
        padding-top: 10rem;
    }
    
    .hero-decoration {
        width: 100%;
        height: 280px;
    }
    
    .avatar-frame {
        width: 200px;
        height: 200px;
    }
    
    .hazard-stripe {
        height: 8px;
    }
    
    .cyber-header {
        top: 8px;
    }
}

/* =========================================
 生活时间轴样式 (life.html 专用)
 ========================================= */
.timeline {
    border-left: 3px solid var(--primary-accent);
    padding-left: 2rem;
    position: relative;
}

.timeline-item {
    margin-bottom: 2.5rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--bg-primary);
    border: 3px solid var(--primary-accent);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover::before {
    transform: scale(1.3);
    box-shadow: 0 0 12px var(--primary-accent);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

.timeline-item:hover .timeline-date {
    color: var(--primary-accent);
}

.timeline-content {
    background: var(--bg-card);
    border: var(--border-dark);
    padding: 1.25rem;
    color: var(--text-primary);
    line-height: 1.6;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
    box-shadow: 4px 4px 0 var(--text-muted);
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover .timeline-content {
    box-shadow: 6px 6px 0 var(--secondary-accent);
    transform: translate(-2px, -2px);
}

.timeline-content .tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    letter-spacing: 1px;
}

.life-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 7rem 2rem 5rem;
}

.life-section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.gallery-section-header {
    margin: 4rem 0 2rem;
    text-align: center;
}

.timeline-content p {
    margin-top: 0.65rem;
}

.tag-primary { background: var(--primary-accent); color: var(--bg-dark); }
.tag-secondary { background: var(--secondary-accent); color: var(--bg-dark); }
.tag-blue { background: var(--tech-blue); color: var(--bg-dark); }
.tag-muted { background: var(--text-muted); color: var(--bg-dark); }

/* =========================================
 相册网格 (Gallery)
 ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-card);
    border: 2px solid transparent;
    width: 100%;
    padding: 0;
    color: inherit;
    text-align: left;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
    filter: grayscale(40%);
}

.gallery-item:hover {
    border-color: var(--primary-accent);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

/* 悬停信息层 */
.gallery-overlay {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    padding: 10px;
    background: rgba(26, 26, 26, 0.85);
    transition: bottom 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    bottom: 0;
}

.gallery-tag {
    color: var(--primary-accent);
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 0.8rem;
}

/* 机能风四角装饰 */
.gallery-corner {
    position: absolute;
    width: 15px;
    height: 15px;
    z-index: 2;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.top-left {
    top: 5px;
    left: 5px;
    border-top: 2px solid var(--primary-accent);
    border-left: 2px solid var(--primary-accent);
}

.bottom-right {
    bottom: 5px;
    right: 5px;
    border-bottom: 2px solid var(--primary-accent);
    border-right: 2px solid var(--primary-accent);
}

/* 全屏弹窗 */
.cyber-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cyber-modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    overscroll-behavior: contain;
}

.modal-content {
    position: relative;
    z-index: 10000;
    max-width: 90vw;
    max-height: 90vh;
    border: 3px solid var(--primary-accent);
    box-shadow: 8px 8px 0 var(--text-primary);
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
}

.btn-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--primary-accent);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.btn-close:hover {
    color: var(--bg-secondary);
    text-shadow: 0 0 5px var(--primary-accent);
}

.modal-open {
    overflow: hidden;
}

.comments-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--text-muted);
}

.comments-section h2 {
    margin-bottom: 1rem;
    color: var(--primary-accent);
    font-family: var(--font-mono);
}

.comments-placeholder {
    color: var(--text-muted);
}

.home-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    margin-top: 2rem;
    padding: 2rem 1rem 8rem;
    border-top: 1px solid var(--text-muted);
    text-align: center;
}

.live-timers {
    display: inline-block;
    padding: 1rem 2rem;
    border: var(--border-dark);
    border-top: 4px solid var(--primary-accent);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.timer-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.timer-row + .timer-row {
    margin-top: 0.8rem;
}

.timer-icon {
    font-size: 1.4rem;
}

.timer-icon-hatch { color: var(--primary-accent); }
.timer-icon-voyager { color: var(--tech-blue); }
/* =========================================
   文影专属名片 (Profile Card)
   ========================================= */
.profile-card {
    background: var(--bg-card);
    border: var(--border-dark);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 6px 6px 0 var(--text-muted);
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.profile-card-bg {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--primary-accent);
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-card:hover .profile-avatar-img {
    transform: scale(1.05);
}

.profile-card-content {
    padding: 1.5rem;
    text-align: center;
}

.profile-name {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.profile-catchphrase {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-weight: bold;
}

.profile-socials {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--bg-primary);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-muted);
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.social-badge {
    cursor: default;
}

.social-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.social-btn:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* =========================================
   APlayer / MetingJS 悬浮窗自定义样式
   ========================================= */

/* 1. 修复 APlayer 播放按钮偏移问题 (禁止全局 box-sizing 污染 aplayer) */
.aplayer * {
    box-sizing: content-box;
}

/* 2. 悬浮窗整体毛玻璃质感 (展开时的底板) */
.aplayer.aplayer-fixed .aplayer-body {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px 12px 12px 12px !important;
    left: 10px !important;
    bottom: 10px !important;
    overflow: hidden;
}

/* 展开时的播放列表毛玻璃化 */
.aplayer.aplayer-fixed .aplayer-list {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-bottom: none !important;
    border-radius: 12px 12px 0 0 !important;
    bottom: 76px !important; /* 适配新的底部间距 */
    left: 10px !important;
}

/* 3. 缩小(吸边)状态下的圆形悬浮窗，展示图片封面 */
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body {
    border-radius: 50% !important; /* 圆形框 */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    background: transparent !important;
}

/* 缩小状态下让图片封面变圆，并占满悬浮窗区域 */
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-pic {
    border-radius: 50% !important;
    width: 66px !important;
    height: 66px !important;
}

/* 缩小状态下隐藏内边框，使封面更干净 */
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body {
    border: none !important;
}

/* 播放时的"黑胶唱片"旋转效果 */
.aplayer.aplayer-fixed.aplayer-narrow.aplayer-playing .aplayer-pic {
    animation: aplayer-album-spin 12s linear infinite;
}
@keyframes aplayer-album-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 反向旋转悬浮窗内的播放/暂停按钮，保证图标始终正向！ */
.aplayer.aplayer-fixed.aplayer-narrow.aplayer-playing .aplayer-pic .aplayer-button {
    animation: aplayer-album-spin-reverse 12s linear infinite;
}
@keyframes aplayer-album-spin-reverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

/* =========================================
   CYBERPUNK VUE - CSS EFFECTS
   ========================================= */

/* Cyberpunk Button Hover from cyberpunk-vue */
.cyber-btn, .btn-view, .lang-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cyber-btn::before, .btn-view::before, .lang-btn::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--tech-blue); /* Neon cyan/blue glow */
    transform-origin: right;
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.cyber-btn:hover::before, .btn-view:hover::before, .lang-btn:hover::before {
    transform-origin: left center;
    transform: scaleX(1);
}

.cyber-btn:hover, .btn-view:hover, .lang-btn:hover {
    color: var(--text-inverse); /* ensure text contrasts the filled background */
}
.cyber-btn:hover::before, .btn-view:hover::before, .lang-btn:hover::before {
    transform-origin: left center;
    transform: scaleX(1);
}

.cyber-btn:hover, .btn-view:hover, .cyber-btn:hover {
    color: var(--text-inverse); /* ensure text contrasts the filled background */
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Cyberpunk Text Styling for Live Timers */
.cyber-text-box {
    letter-spacing: 1.5px;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
}

.cyber-num {
    color: var(--secondary-accent);
    font-weight: 900;
    font-size: 1.2em;
    font-family: 'Fira Code', monospace;
    text-shadow: 0 0 8px var(--secondary-accent), 0 0 15px var(--secondary-accent);
    margin: 0 4px;
    display: inline-block;
}
