/* ========================================
   浴衣の叢雨 (Murasame) Live2D 互动网站
   Apple 设计语言融合版
   Ciallo～(∠?ω< )⌒★!
   ======================================== */

/* ====== CSS Variables (Apple 设计语义) ====== */
:root {
    /* 品牌色 - 保持粉色品红主题 */
    --accent: #e84393;
    --accent-light: #fd79a8;
    --accent-dark: #b71c5e;

    /* Apple 风格语义色 */
    --ink: #1d1d1f;
    --ink-muted-80: #333333;
    --ink-muted-48: #7a7a7a;
    --body-on-dark: #f5f5f7;
    --body-muted: #86868b;
    --hairline: rgba(255, 255, 255, 0.12);
    --hairline-light: rgba(0, 0, 0, 0.06);
    --surface-pearl: rgba(255, 255, 255, 0.06);
    --canvas: #1a0a1e;
    --canvas-parchment: #14081a;
    --surface-tile-1: #1d0d24;
    --surface-tile-2: #22102a;
    --surface-black: #000000;

    /* 派生语义色 */
    --bg-primary: var(--canvas);
    --bg-secondary: var(--surface-tile-1);
    --bg-card: var(--surface-pearl);
    --text-primary: var(--body-on-dark);
    --text-secondary: #c4a8d0;
    --text-muted: var(--body-muted);
    --border: var(--hairline);
    --nav-bg: var(--surface-black);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-product: rgba(0, 0, 0, 0.22) 3px 5px 30px;

    /* Apple 风格圆角 */
    --radius-sm: 8px;
    --radius-md: 11px;
    --radius-lg: 18px;
    --radius-pill: 9999px;
    --radius: var(--radius-lg);

    /* Apple 风格间距 (8px 基准) */
    --space-xxs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    --space-section: 80px;

    /* 排版 */
    --font-display: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-ui: system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Apple 风格字号 */
    --text-hero: clamp(1.8rem, 5vw, 3rem);
    --text-display: clamp(1.3rem, 3.5vw, 2rem);
    --text-title: 1.2rem;
    --text-body: 0.95rem;
    --text-caption: 0.8rem;
    --text-nav: 0.75rem;
    --text-micro: 0.65rem;

    /* 导航 */
    --nav-height: 48px;
}

/* ====== Reset ====== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: var(--text-body);
    letter-spacing: -0.01em;
    min-width: 320px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====== Scrollbar ====== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-light); }

/* ========================================
   Age Gate
   ======================================== */
.age-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: opacity 0.5s ease;
}
.age-gate.hidden {
    opacity: 0;
    pointer-events: none;
}
.age-gate-box {
    background: linear-gradient(135deg, #2d1b36 0%, #1a0a1e 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 56px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease;
}
.age-gate-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    animation: pulse 2s ease-in-out infinite;
}
.age-gate-box h2 {
    font-size: 1.3rem;
    color: var(--accent-light);
    margin-bottom: 12px;
    letter-spacing: 2px;
}
.age-gate-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}
.age-gate-text-small {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}
.age-gate-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.age-btn {
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    padding: 12px 40px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}
.age-btn-yes {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(232, 67, 147, 0.3);
}
.age-btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 67, 147, 0.5);
}
.age-btn-no {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.age-btn-no:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
    height: var(--nav-height);
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    height: var(--nav-height);
}
.nav-logo {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--body-on-dark);
    text-decoration: none;
    letter-spacing: -0.01em;
    opacity: 0.92;
    transition: opacity 0.2s ease;
}
.nav-logo:hover {
    opacity: 1;
}
.nav-links {
    display: flex;
    gap: var(--space-xl);
    list-style: none;
}
.nav-link {
    text-decoration: none;
    color: var(--body-muted);
    font-family: var(--font-ui);
    font-size: var(--text-nav);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
    padding: 4px 0;
}
.nav-link:hover {
    color: var(--body-on-dark);
}
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--body-on-dark);
    opacity: 0.8;
    padding: 4px;
    transition: opacity 0.2s;
}
.hamburger:hover {
    opacity: 1;
}

/* Nav actions (language toggle, etc.) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.lang-toggle {
    background: none;
    border: 0.5px solid var(--hairline);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: var(--text-micro);
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--body-muted);
    line-height: 1;
}
.lang-toggle:hover {
    background: var(--surface-pearl);
    border-color: rgba(255, 255, 255, 0.2);
}
.lang-toggle .active-lang {
    color: var(--accent-light);
    font-weight: 600;
}
.lang-sep {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.6rem;
}

/* ========================================
   Hero Section (Live2D Display Area)
   ======================================== */
.hero {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-section) var(--space-lg) var(--space-xl);
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(232, 67, 147, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(253, 121, 168, 0.05) 0%, transparent 50%);
}

/* Hero 背景图片 */
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 0;
    will-change: opacity, background-image;
}
.hero-bg.loaded {
    opacity: 1;
}
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(26, 10, 30, 0.65) 0%, rgba(26, 10, 30, 0.45) 50%, rgba(26, 10, 30, 0.75) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-light);
    border-radius: 50%;
    opacity: 0.4;
    animation: float-particle linear infinite;
}

.hero-content {
    text-align: center;
    z-index: 3;
    width: 100%;
    max-width: 900px;
}

.hero-title h1 {
    font-size: var(--text-hero);
    font-weight: 600;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-xs);
    line-height: 1.1;
}
.hero-subtitle {
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: var(--text-muted);
    letter-spacing: -0.01em;
    margin-bottom: var(--space-lg);
    font-weight: 400;
}

/* ========================================
   Live2D Container
   ======================================== */
.live2d-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.live2d-container {
    width: min(700px, 90vw);
    height: min(520px, 70vh);
    aspect-ratio: 7 / 5.2;
    background: radial-gradient(ellipse at center, rgba(29, 13, 36, 0.8) 0%, rgba(20, 8, 26, 0.9) 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-product);
    border: 0.5px solid var(--hairline);
    position: relative;
    overflow: hidden;
}
#live2d-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Loading */
.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(26, 10, 30, 0.9);
    z-index: 10;
    transition: opacity 0.5s ease;
}
.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--accent-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}
.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    animation: pulse-text 2s ease-in-out infinite;
    margin-bottom: var(--space-md);
}

/* 加载进度条 */
.loading-bar-track {
    width: 160px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}
.loading-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
    transition: width 0.5s ease;
    animation: loading-bar-pulse 1.5s ease-in-out infinite;
}
@keyframes loading-bar-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Error */
.error-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(26, 10, 30, 0.95);
    z-index: 10;
    padding: 24px;
}
.error-text {
    color: #ff6b6b;
    font-size: 1.2rem;
    margin-bottom: 8px;
}
.error-detail {
    color: var(--text-muted);
    font-size: 0.85rem;
    max-width: 80%;
    word-break: break-all;
    margin-bottom: var(--space-md);
}

/* 重试按钮 */
.retry-btn {
    padding: 10px 24px;
    border: 0.5px solid var(--accent);
    border-radius: var(--radius-pill);
    background: rgba(232, 67, 147, 0.15);
    color: var(--accent-light);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}
.retry-btn:hover {
    background: rgba(232, 67, 147, 0.3);
    transform: scale(1.05);
}
.retry-btn:active {
    transform: scale(0.95);
}

/* ========================================
   Speech Bubble
   ======================================== */
.speech-bubble {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    max-width: 320px;
    background: rgba(20, 8, 26, 0.95);
    border: 0.5px solid var(--accent);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    box-shadow: 0 8px 32px rgba(232, 67, 147, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    z-index: 5;
}
.speech-bubble.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.speech-bubble-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}
.speech-bubble-text .char-visible {
    opacity: 1;
    transition: opacity 0.1s ease;
}
.speech-bubble-text .char-hidden {
    opacity: 0;
}
.speech-bubble-tail {
    position: absolute;
    bottom: -10px;
    right: 40px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--accent);
    filter: drop-shadow(0 4px 8px rgba(232, 67, 147, 0.2));
}
.speech-bubble-tail::after {
    content: '';
    position: absolute;
    top: -11px;
    left: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(26, 10, 30, 0.95);
}

/* Bubble mood colors */
.speech-bubble.mood-angry { border-color: #ff6b6b; box-shadow: 0 8px 32px rgba(255, 107, 107, 0.2); }
.speech-bubble.mood-angry .speech-bubble-tail { border-top-color: #ff6b6b; }
.speech-bubble.mood-flustered { border-color: #fd79a8; box-shadow: 0 8px 32px rgba(253, 121, 168, 0.2); }
.speech-bubble.mood-flustered .speech-bubble-tail { border-top-color: #fd79a8; }
.speech-bubble.mood-tease { border-color: #fdcb6e; box-shadow: 0 8px 32px rgba(253, 203, 110, 0.2); }
.speech-bubble.mood-tease .speech-bubble-tail { border-top-color: #fdcb6e; }
.speech-bubble.mood-playful { border-color: #a29bfe; box-shadow: 0 8px 32px rgba(162, 155, 254, 0.2); }
.speech-bubble.mood-playful .speech-bubble-tail { border-top-color: #a29bfe; }

/* ========================================
   Expression Bar
   ======================================== */
.expression-bar {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}
.expr-btn {
    width: 38px;
    height: 38px;
    border: 0.5px solid var(--hairline);
    border-radius: var(--radius-pill);
    background: var(--surface-pearl);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}
.expr-btn:hover {
    background: rgba(232, 67, 147, 0.15);
    border-color: var(--accent);
}
.expr-btn:active {
    transform: scale(0.92);
}
.expr-btn.active {
    background: rgba(232, 67, 147, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(232, 67, 147, 0.25);
}
.expr-reset {
    font-size: 0.85rem;
    opacity: 0.6;
}
.expr-reset:hover {
    opacity: 1;
}

.interaction-hint {
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    letter-spacing: -0.01em;
    animation: pulse-text 3s ease-in-out infinite;
}

/* 背景切换按钮 — 悬浮在 Live2D 容器右下角 */
.bg-refresh-btn {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    z-index: 20;
    width: 34px;
    height: 34px;
    border: 0.5px solid var(--hairline);
    border-radius: var(--radius-pill);
    background: rgba(26, 10, 30, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    opacity: 0.45;
    line-height: 1;
    padding: 0;
}
.bg-refresh-btn:hover {
    opacity: 1;
    background: rgba(232, 67, 147, 0.25);
    border-color: var(--accent);
    transform: scale(1.12);
}
.bg-refresh-btn:active {
    transform: scale(0.9);
}
.bg-refresh-btn.loading {
    pointer-events: none;
}
.bg-refresh-btn.loading::before {
    content: '⏳';
    animation: spin 0.6s linear infinite;
    display: block;
}
.bg-refresh-btn.loading {
    font-size: 0;
}
.bg-refresh-btn.loading::before {
    font-size: 0.9rem;
}

/* ========================================
   Section Common
   ======================================== */
.section {
    padding: var(--space-section) var(--space-lg);
}
.section-alt {
    background: var(--canvas-parchment);
    border-top: 0.5px solid var(--hairline);
    border-bottom: 0.5px solid var(--hairline);
}
.section-inner {
    max-width: 900px;
    margin: 0 auto;
}
.section-title {
    font-family: var(--font-display);
    font-size: var(--text-title);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--accent-light);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 0.5px solid var(--hairline);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}
.section-title::before {
    content: '◆';
    font-size: 0.6rem;
    color: var(--accent);
    opacity: 0.7;
}
.section-desc {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: var(--text-caption);
    letter-spacing: -0.01em;
    margin-bottom: var(--space-lg);
}

/* ========================================
   Profile Card
   ======================================== */
.profile-card {
    display: flex;
    gap: var(--space-xl);
    background: var(--surface-pearl);
    border: 0.5px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all 0.2s ease;
}
.profile-card:hover {
    background: rgba(255, 255, 255, 0.08);
}
.profile-avatar {
    flex-shrink: 0;
}
.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 4px 20px rgba(232, 67, 147, 0.3);
}
.profile-info {
    flex: 1;
    text-align: left;
}
.profile-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.profile-name-jp {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: normal;
}
.profile-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    background: rgba(232, 67, 147, 0.1);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.profile-table {
    width: 100%;
    border-collapse: collapse;
}
.profile-table td {
    padding: 8px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.profile-table .label {
    color: var(--text-muted);
    width: 100px;
    font-size: 0.8rem;
}

/* ========================================
   Voice Log
   ======================================== */
.log-container {
    background: var(--surface-pearl);
    border: 0.5px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    min-height: 120px;
    max-height: 360px;
    overflow-y: auto;
}
.log-container:hover {
    background: rgba(255, 255, 255, 0.08);
}
.log-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 32px;
    font-size: 0.9rem;
}
.log-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.log-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    animation: fadeInUp 0.3s ease;
}
.log-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
.log-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 60px;
    padding-top: 2px;
}
.log-mood {
    font-size: 0.8rem;
    flex-shrink: 0;
}
.log-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-word;
}
.log-text .jp {
    display: block;
}
.log-text .cn {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.log-clear-btn {
    margin-top: 12px;
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}
.log-clear-btn:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: var(--canvas-parchment);
    border-top: 0.5px solid var(--hairline);
    padding: var(--space-xxl) var(--space-lg);
    text-align: center;
}
.footer-inner {
    max-width: 600px;
    margin: 0 auto;
}
.footer-links {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: var(--accent-light);
}
.footer-copy {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: var(--text-micro);
    line-height: 1.6;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-xs);
}
.footer-copy-sub {
    color: rgba(134, 134, 139, 0.4);
    font-size: var(--text-micro);
    letter-spacing: -0.01em;
}
.back-to-top {
    display: inline-block;
    margin-top: var(--space-lg);
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: var(--text-caption);
    letter-spacing: -0.01em;
    color: var(--text-muted);
    transition: color 0.2s ease;
    padding: var(--space-xs) var(--space-md);
    border: 0.5px solid var(--hairline);
    border-radius: var(--radius-pill);
}
.back-to-top:hover {
    color: var(--accent-light);
    border-color: var(--accent);
}

.footer-sponsor {
    display: inline-block;
    margin-top: var(--space-sm);
    font-family: var(--font-ui);
    font-size: var(--text-micro);
    letter-spacing: -0.01em;
    color: rgba(134, 134, 139, 0.4);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: var(--space-xxs) var(--space-sm);
    border-radius: var(--radius-pill);
}
.footer-sponsor:hover {
    color: var(--accent-light);
    background: rgba(232, 67, 147, 0.08);
}

/* ========================================
   Animations
   ======================================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.4; }
    90% { opacity: 0.4; }
    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   Responsive Design - 全平台适配
   ======================================== */

/* 平板及以下 (<= 1024px) */
@media (max-width: 1024px) {
    .live2d-container {
        width: min(600px, 92vw);
        height: min(450px, 60vh);
    }
    .profile-card {
        padding: 28px;
    }
    .profile-avatar .avatar-placeholder {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
}

/* 小平板 & 大手机横屏 (<= 820px) */
@media (max-width: 820px) {
    .hero {
        padding: 70px 16px 32px;
    }
    .live2d-container {
        width: min(520px, 95vw);
        height: min(380px, 55vh);
    }
    .speech-bubble {
        max-width: 45vw;
        min-width: 140px;
        top: 12px;
        right: 12px;
        padding: 12px 16px;
    }
    .nav-links {
        display: none;
    }
    .hamburger {
        display: block;
    }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--nav-bg);
        padding: var(--space-md) var(--space-lg);
        border-bottom: 0.5px solid var(--hairline);
        z-index: 999;
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
    }
    .section {
        padding: 40px 20px;
    }
    .section-title {
        font-size: 1.2rem;
    }
}

/* 手机横屏 & 大手机竖屏 (<= 640px) */
@media (max-width: 640px) {
    .hero {
        padding: 60px 12px 24px;
        min-height: auto;
    }
    .hero-title h1 {
        font-size: clamp(1.3rem, 5.5vw, 1.8rem);
        letter-spacing: 1px;
    }
    .hero-subtitle {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
        margin-bottom: 14px;
    }
    .live2d-container {
        width: min(480px, 96vw);
        height: min(340px, 50vh);
        border-radius: 14px;
    }
    .interaction-hint {
        font-size: 0.7rem;
    }
    .speech-bubble {
        max-width: 50vw;
        min-width: 120px;
        top: 8px;
        right: 8px;
        padding: 10px 14px;
        border-radius: 12px;
    }
    .speech-bubble-text {
        font-size: 0.8rem;
    }
    .expression-bar {
        gap: 5px;
    }
    .expr-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 16px;
    }
    .profile-info {
        text-align: center;
    }
    .profile-tags {
        justify-content: center;
    }
    .profile-avatar .avatar-placeholder {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    .section {
        padding: 32px 14px;
    }
}

/* 手机竖屏 (<= 480px) */
@media (max-width: 480px) {
    .hero {
        padding: 56px 8px 20px;
    }
    .nav-inner {
        padding: 0 12px;
        height: 48px;
    }
    .nav-logo {
        font-size: 1rem;
    }
    .hero-title h1 {
        font-size: clamp(1.1rem, 6vw, 1.4rem);
    }
    .hero-subtitle {
        font-size: 0.7rem;
    }
    .live2d-container {
        width: 98vw;
        height: min(300px, 45vh);
        border-radius: 12px;
        margin: 0 -4px;
    }
    .speech-bubble {
        max-width: 55vw;
        min-width: 100px;
        top: 6px;
        right: 6px;
        padding: 8px 12px;
        border-radius: 10px;
    }
    .speech-bubble-text {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    .expression-bar {
        gap: 4px;
    }
    .expr-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        border-radius: 50%;
    }
    .interaction-hint {
        font-size: 0.65rem;
    }
    .age-gate-box {
        padding: 24px 20px;
        margin: 0 12px;
    }
    .age-gate-box h2 {
        font-size: 1.1rem;
    }
    .age-gate-icon {
        font-size: 2.2rem;
    }
    .age-gate-btns {
        flex-direction: column;
        gap: 8px;
    }
    .age-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
    .profile-card {
        padding: 16px 12px;
    }
    .profile-info h3 {
        font-size: 1.2rem;
    }
    .profile-table td {
        font-size: 0.8rem;
    }
    .profile-table .label {
        width: 70px;
    }
    .section {
        padding: 24px 10px;
    }
    .section-title {
        font-size: 1rem;
        margin-bottom: 16px;
    }
    .section-desc {
        font-size: 0.75rem;
    }
    .log-container {
        padding: 12px;
        max-height: 280px;
    }
    .log-item {
        padding: 8px 10px;
        gap: 8px;
    }
    .log-text {
        font-size: 0.78rem;
    }
    .log-time {
        font-size: 0.65rem;
        min-width: 45px;
    }
    .footer-links {
        gap: 14px;
    }
    .footer-links a {
        font-size: 0.78rem;
    }
    .footer-copy {
        font-size: 0.72rem;
    }
    .hero-particles .particle {
        display: none;
    }
}

/* 小屏手机 (<= 360px) */
@media (max-width: 360px) {
    .hero {
        padding: 48px 4px 16px;
    }
    .live2d-container {
        height: min(250px, 40vh);
        border-radius: 10px;
    }
    .speech-bubble {
        max-width: 65vw;
        min-width: 80px;
        padding: 6px 10px;
    }
    .speech-bubble-text {
        font-size: 0.7rem;
    }
    .expr-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    .expression-bar {
        gap: 3px;
    }
}

/* 高度适配：在矮屏幕上缩小 Live2D 容器 */
@media (max-height: 700px) {
    .live2d-container {
        height: min(400px, 55vh);
    }
    .hero {
        padding-top: 64px;
        padding-bottom: 20px;
    }
    .hero-title h1 {
        margin-bottom: 4px;
    }
    .hero-subtitle {
        margin-bottom: 12px;
    }
    .expression-bar {
        margin-bottom: 6px;
    }
}

@media (max-height: 500px) {
    .live2d-container {
        height: min(280px, 55vh);
    }
    .hero {
        padding-top: 52px;
        padding-bottom: 12px;
    }
}

/* 大屏 (> 1400px)：充分利用空间 */
@media (min-width: 1400px) {
    .live2d-container {
        width: min(800px, 70vw);
        height: min(600px, 75vh);
    }
    .hero-title h1 {
        font-size: 3rem;
    }
    .section-inner {
        max-width: 1100px;
    }
}

/* 打印样式 */
@media print {
    .navbar, .expression-bar, .interaction-hint, .hero-particles, .age-gate {
        display: none !important;
    }
    .hero {
        min-height: auto;
        padding: 20px;
    }
}

/* 暗色模式系统偏好跟随 */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #2a0d30;
    }
}
