/* ===== 凡人修仙传 · 慕沛灵 & 南宫阙 主题样式 ===== */

/* ===== 全局 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 慕沛灵色系 - 青色转绯红 */
    --mu-primary: #2dd4bf;
    --mu-secondary: #f472b6;
    --mu-accent: #fb923c;
    --mu-glow: rgba(45, 212, 191, 0.3);

    /* 南宫阙色系 - 月白银紫 */
    --nan-primary: #c4b5fd;
    --nan-secondary: #e2e8f0;
    --nan-accent: #a78bfa;
    --nan-glow: rgba(167, 139, 250, 0.3);

    /* 基础色 */
    --bg-deep: #0a0a0f;
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-alt: #16213e;
    --text: #e8e8ed;
    --text-muted: #8b8b9e;
    --text-dim: #5c5c6e;

    /* 功能色 */
    --gold: #d4a853;
    --gold-light: #f0d78c;
    --red-tragedy: #ef4444;
    --red-glow: rgba(239, 68, 68, 0.2);

    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(212, 168, 83, 0.15);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'PingFang SC', 'Noto Serif SC', 'Microsoft YaHei', 'SimSun', serif;
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(45, 212, 191, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(167, 139, 250, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(244, 114, 182, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ===== 粒子背景 ===== */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--gold);
    border-radius: 50%;
    animation: particleFloat linear infinite;
    opacity: 0;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.2; }
    100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

/* ===== 独立进入页 ===== */
.enter-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.enter-content {
    animation: splashIn 1.2s ease-out;
}

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

.enter-realm {
    font-size: 0.9rem;
    color: var(--gold);
    letter-spacing: 8px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.enter-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 900;
    letter-spacing: 6px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #2dd4bf, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.enter-sep {
    color: var(--gold);
    font-weight: 200;
    -webkit-text-fill-color: var(--gold);
}

.enter-sub {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 4px;
    margin-bottom: 48px;
}

.enter-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.enter-btn {
    padding: 16px 40px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 3px;
    border-radius: 100px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.35s ease;
    font-family: inherit;
}

.enter-btn-main {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.2), rgba(244, 114, 182, 0.15));
    border: 2px solid rgba(45, 212, 191, 0.4);
    color: #2dd4bf;
}

.enter-btn-main:hover {
    box-shadow: 0 0 40px rgba(45, 212, 191, 0.3);
    transform: scale(1.05);
}

.enter-btn-alt {
    background: rgba(212, 168, 83, 0.1);
    border: 2px solid var(--gold);
    color: var(--gold-light);
}

.enter-btn-alt:hover {
    box-shadow: 0 0 40px rgba(212, 168, 83, 0.3);
    transform: scale(1.05);
}

.enter-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    opacity: 0.6;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 83, 0.12);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom-color: rgba(212, 168, 83, 0.25);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    letter-spacing: 1px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold-light);
    background: rgba(212, 168, 83, 0.08);
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 26px;
    height: 2.5px;
    background: var(--text);
    border-radius: 10px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 100px 24px 80px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(45, 212, 191, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(167, 139, 250, 0.06) 0%, transparent 60%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-moon {
    position: absolute;
    top: 15%;
    right: 20%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(232, 232, 237, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: moonGlow 6s ease-in-out infinite;
}

@keyframes moonGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.08); }
}

.hero-cloud {
    position: absolute;
    width: 200px;
    height: 60px;
    background: rgba(232, 232, 237, 0.03);
    border-radius: 100px;
    filter: blur(30px);
}

.cloud-1 { top: 25%; left: 10%; animation: cloudDrift 20s linear infinite; }
.cloud-2 { top: 50%; right: 5%; animation: cloudDrift 25s linear infinite reverse; width: 150px; }
.cloud-3 { top: 70%; left: 30%; animation: cloudDrift 18s linear infinite 5s; width: 180px; }

@keyframes cloudDrift {
    0% { transform: translateX(0); }
    50% { transform: translateX(60px); }
    100% { transform: translateX(0); }
}

.hero-sword {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.08;
    animation: swordFloat 8s ease-in-out infinite;
}

.sword-1 { top: 20%; left: 15%; animation-delay: 0s; }
.sword-2 { bottom: 25%; right: 12%; animation-delay: 4s; }

@keyframes swordFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
}

.hero-realm {
    font-size: 0.95rem;
    color: var(--gold);
    letter-spacing: 8px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.hero-title {
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.char-mu {
    background: linear-gradient(135deg, #2dd4bf, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.char-sep {
    color: var(--gold);
    font-weight: 300;
    font-size: 0.7em;
    -webkit-text-fill-color: var(--gold);
}

.char-nan {
    background: linear-gradient(135deg, #c4b5fd, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    letter-spacing: 3px;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 40px;
}

.hero-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 0.85rem;
    letter-spacing: 2px;
    animation: scrollHint 2s ease-in-out infinite;
}

.scroll-arrow {
    font-size: 1.2rem;
}

@keyframes scrollHint {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(8px); }
}

/* ===== 角色区块通用 ===== */
.character-section {
    padding: 100px 0;
    position: relative;
}

.mu-section {
    background: linear-gradient(180deg, var(--bg-deep) 0%, rgba(45, 212, 191, 0.03) 30%, rgba(45, 212, 191, 0.02) 70%, var(--bg-deep) 100%);
}

.nan-section {
    background: linear-gradient(180deg, var(--bg-deep) 0%, rgba(167, 139, 250, 0.03) 30%, rgba(167, 139, 250, 0.02) 70%, var(--bg-deep) 100%);
}

.char-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 60px;
}

.char-header.reverse {
    grid-template-columns: 1fr 300px;
}

/* 角色肖像 */
.char-portrait {
    position: relative;
}

.portrait-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: var(--radius);
    border: 2px solid rgba(212, 168, 83, 0.2);
    transition: var(--transition);
    display: block;
}

.mu-portrait .portrait-img {
    border-color: rgba(45, 212, 191, 0.3);
    box-shadow: 0 0 30px rgba(45, 212, 191, 0.1);
}

.nan-portrait .portrait-img {
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.1);
}

.portrait-img:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.mu-portrait .portrait-img:hover {
    box-shadow: 0 0 50px rgba(45, 212, 191, 0.2);
}

.nan-portrait .portrait-img:hover {
    box-shadow: 0 0 50px rgba(167, 139, 250, 0.2);
}

/* 角色介绍 */
.char-intro {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.char-realm-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    width: fit-content;
}

.realm-zhuji {
    background: rgba(45, 212, 191, 0.15);
    color: var(--mu-primary);
    border: 1px solid rgba(45, 212, 191, 0.3);
}

.realm-yuanying {
    background: rgba(167, 139, 250, 0.15);
    color: var(--nan-primary);
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.char-name {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 3px;
}

.mu-section .char-name { color: var(--mu-primary); }
.nan-section .char-name { color: var(--nan-primary); }

.char-title {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.char-motto {
    font-size: 1.15rem;
    color: var(--gold);
    font-style: italic;
    letter-spacing: 2px;
    padding: 10px 0;
    border-left: 3px solid var(--gold);
    padding-left: 16px;
    margin: 8px 0;
}

.char-quick-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.info-item {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.04);
}

.info-label {
    color: var(--text-dim);
    font-weight: 600;
    min-width: 40px;
}

.text-tragedy {
    color: var(--red-tragedy);
    font-weight: 600;
}

/* ===== 故事区块 ===== */
.story-block, .personality-block, .power-block {
    margin-bottom: 50px;
}

.story-block h3, .personality-block h3, .power-block h3 {
    font-size: 1.4rem;
    margin-bottom: 30px;
    letter-spacing: 2px;
    color: var(--gold-light);
}

/* 时间线 */
.story-timeline {
    position: relative;
    padding-left: 30px;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--gold), var(--text-dim));
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--bg-deep);
    box-shadow: 0 0 10px rgba(212, 168, 83, 0.4);
    z-index: 2;
}

.nan-dot {
    background: var(--nan-accent);
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.4);
}

.tragedy-dot {
    background: var(--red-tragedy);
    box-shadow: 0 0 12px var(--red-glow);
}

.timeline-content {
    background: var(--bg-card);
    padding: 24px 28px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.04);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: rgba(212, 168, 83, 0.2);
    box-shadow: var(--shadow-card);
}

.timeline-content h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text);
    letter-spacing: 1px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

.timeline-content strong {
    color: var(--text);
}

.timeline-end .timeline-content {
    border-color: rgba(239, 68, 68, 0.2);
    background: linear-gradient(135deg, var(--bg-card), rgba(239, 68, 68, 0.05));
}

/* 性格转变 */
.personality-shift {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.personality-before, .personality-after {
    flex: 1;
    min-width: 200px;
    padding: 28px;
    border-radius: var(--radius);
    text-align: center;
}

.personality-before {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(45, 212, 191, 0.03));
    border: 1px solid rgba(45, 212, 191, 0.2);
}

.personality-after {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.1), rgba(244, 114, 182, 0.03));
    border: 1px solid rgba(244, 114, 182, 0.2);
}

.shift-label {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.personality-before .shift-label { background: rgba(45, 212, 191, 0.2); color: var(--mu-primary); }
.personality-after .shift-label { background: rgba(244, 114, 182, 0.2); color: var(--mu-secondary); }

.shift-arrow {
    font-size: 1.5rem;
    color: var(--gold);
    font-weight: bold;
}

.personality-before p, .personality-after p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* 战力网格 */
.power-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.power-card {
    background: var(--bg-card);
    padding: 28px 24px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid rgba(167, 139, 250, 0.1);
    transition: var(--transition);
}

.power-card:hover {
    transform: translateY(-4px);
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: var(--shadow-card);
}

.power-icon {
    font-size: 2.2rem;
    margin-bottom: 14px;
}

.power-card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text);
    letter-spacing: 1px;
}

.power-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== 命运交织 ===== */
.fate-section {
    padding: 100px 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(45, 212, 191, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(167, 139, 250, 0.04) 0%, transparent 50%);
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--mu-primary), var(--nan-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fate-subtitle {
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 60px;
}

.fate-compare {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 50px;
}

.fate-card {
    flex: 1;
    padding: 36px 28px;
    border-radius: var(--radius);
    text-align: left;
}

.mu-fate {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.08), rgba(244, 114, 182, 0.05));
    border: 1px solid rgba(45, 212, 191, 0.15);
}

.nan-fate {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(226, 232, 240, 0.03));
    border: 1px solid rgba(167, 139, 250, 0.15);
}

.fate-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.fate-icon {
    font-size: 2rem;
}

.fate-card-header h3 {
    font-size: 1.3rem;
    letter-spacing: 2px;
}

.mu-fate .fate-card-header h3 { color: var(--mu-primary); }
.nan-fate .fate-card-header h3 { color: var(--nan-primary); }

.fate-points {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.fate-point {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.point-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--bg-card);
    color: var(--gold);
    border: 1px solid rgba(212, 168, 83, 0.3);
}

.fate-point p {
    color: var(--text-muted);
    font-size: 0.95rem;
    padding-top: 4px;
}

.fate-quote {
    text-align: center;
    font-style: italic;
    color: var(--text-dim);
    font-size: 0.9rem;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
    letter-spacing: 1px;
}

.fate-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
    flex-shrink: 0;
}

.divider-line {
    width: 1px;
    flex: 1;
    background: linear-gradient(180deg, transparent, rgba(212, 168, 83, 0.3), transparent);
}

.divider-symbol {
    font-size: 1.5rem;
    padding: 10px 0;
    opacity: 0.6;
}

.fate-insight {
    max-width: 650px;
    margin: 0 auto;
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid rgba(212, 168, 83, 0.12);
}

.fate-insight p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 2;
    letter-spacing: 1px;
}

.fate-insight strong { color: var(--text); }
.fate-insight em { color: var(--gold-light); font-style: normal; }

/* ===== 页脚 ===== */
.footer {
    text-align: center;
    padding: 50px 0;
    color: var(--text-dim);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    background: var(--bg-deep);
    position: relative;
    z-index: 1;
}

.footer-main {
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 600;
}

.footer-sub {
    font-size: 0.78rem;
    opacity: 0.5;
    margin-bottom: 4px;
}

.footer-copy {
    margin-top: 16px;
    color: var(--gold);
    opacity: 0.5;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

/* ===== 图集 ===== */
.gallery-block {
    margin-bottom: 30px;
}

.gallery-block h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    letter-spacing: 2px;
    color: var(--gold-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

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

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-card);
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 168, 83, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.mu-section .gallery-item:hover {
    border-color: rgba(45, 212, 191, 0.4);
    box-shadow: 0 12px 40px rgba(45, 212, 191, 0.1);
}

.nan-section .gallery-item:hover {
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 12px 40px rgba(167, 139, 250, 0.1);
}

/* ===== 滚动动画 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 灯箱 ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    pointer-events: all;
    opacity: 1;
}

.lightbox-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.lightbox-img {
    position: relative;
    z-index: 1;
    max-width: 85vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 2;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 30px 40px;
        gap: 6px;
        transition: var(--transition);
    }

    .nav-menu.active { right: 0; }

    .nav-link {
        font-size: 1.05rem;
        padding: 12px 16px;
    }

    .hero-title {
        font-size: 2.4rem;
        flex-direction: column;
        gap: 4px;
    }

    .char-header,
    .char-header.reverse {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .char-portrait {
        max-width: 220px;
        margin: 0 auto;
    }

    .char-intro { text-align: center; }
    .char-realm-tag { margin: 0 auto; }
    .char-motto { border-left: none; border-bottom: 3px solid var(--gold); padding: 0 0 10px; }

    .char-quick-info {
        grid-template-columns: 1fr;
    }

    .fate-compare {
        flex-direction: column;
        gap: 0;
    }

    .fate-divider {
        flex-direction: row;
        padding: 16px 0;
    }

    .divider-line {
        width: auto;
        height: 1px;
        flex: 1;
    }

    .personality-shift {
        flex-direction: column;
    }

    .shift-arrow {
        transform: rotate(90deg);
    }

    section {
        padding: 70px 0;
    }

    .gallery-grid,
    .gallery-grid.gallery-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .lightbox-img { max-width: 95vw; max-height: 80vh; }
    .lightbox-close { top: 12px; right: 16px; width: 36px; height: 36px; font-size: 1.2rem; }

    .story-timeline {
        padding-left: 24px;
    }
}

/* ===== BGM 播放按钮 ===== */
.music-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid rgba(212, 168, 83, 0.25);
    color: var(--gold-light);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.music-toggle:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 168, 83, 0.15);
    transform: scale(1.08);
}

.music-toggle.playing {
    background: rgba(212, 168, 83, 0.12);
    border-color: var(--gold);
    animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(212, 168, 83, 0.1); }
    50% { box-shadow: 0 0 20px rgba(212, 168, 83, 0.25); }
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--mu-primary), var(--nan-primary));
    color: var(--bg-deep);
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 700;
    z-index: 9999;
    letter-spacing: 1px;
    animation: slideUp 0.4s ease, slideDown 0.4s ease 2.5s forwards;
    box-shadow: var(--shadow-glow);
}

@keyframes slideUp {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(0); opacity: 1; }
    to { transform: translateX(-50%) translateY(20px); opacity: 0; }
}

/* ===== 红颜图鉴 - 圆形关系图 ===== */
.web-section {
    padding: 110px 0 40px;
    text-align: center;
    position: relative;
}

.web-title-wrap {
    margin-bottom: 10px;
}

.web-realm {
    font-size: 0.85rem;
    color: var(--gold);
    letter-spacing: 6px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.web-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.web-sub {
    color: var(--text-dim);
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-top: 4px;
}

/* 关系图容器 */
.web-container {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    overflow: visible;
}

.web-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* 中心：韩立 */
.web-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.web-center-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 110px;
}

.wc-img {
    width: 80px; height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--gold);
    box-shadow: 0 0 30px rgba(212, 168, 83, 0.25);
}

.wc-img img { width: 100%; height: 100%; object-fit: cover; }

.wc-info { text-align: center; }

.wc-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: rgba(212, 168, 83, 0.2);
    color: var(--gold-light);
    margin-bottom: 4px;
}

.wc-info h2 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--gold-light);
    letter-spacing: 2px;
}

.wc-info p {
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.wc-detail {
    color: var(--text-muted) !important;
    font-size: 0.6rem !important;
}

/* 环绕节点 */
.web-node {
    position: absolute;
    top: 50%; left: 50%;
    z-index: 5;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--r))) rotate(calc(-1 * var(--angle)));
    cursor: pointer;
}

/* 节点卡片 */
.wn-card {
    width: 105px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.wn-card:hover {
    transform: scale(1.12);
    z-index: 20;
    box-shadow: var(--shadow-lg);
}

.wn-good { border-color: rgba(74, 222, 128, 0.2); }
.wn-good:hover { border-color: rgba(74, 222, 128, 0.5); box-shadow: 0 8px 30px rgba(74, 222, 128, 0.12); }

.wn-tragedy { border-color: rgba(248, 113, 113, 0.15); }
.wn-tragedy:hover { border-color: rgba(248, 113, 113, 0.4); box-shadow: 0 8px 30px rgba(248, 113, 113, 0.1); }

.wn-neutral { border-color: rgba(96, 165, 250, 0.12); }
.wn-neutral:hover { border-color: rgba(96, 165, 250, 0.4); box-shadow: 0 8px 30px rgba(96, 165, 250, 0.1); }

.wn-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-deep);
}

.wn-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wn-card:hover .wn-img img { transform: scale(1.08); }

.wn-body {
    padding: 6px 6px 8px;
    text-align: center;
}

.wn-body h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 2px;
    color: var(--text);
}

.wn-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 100px;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 2px 0;
}

.tag-good { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.tag-tragedy { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.tag-neutral { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }

.wn-fate {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 3px;
}

.wn-realm {
    display: block;
    font-size: 0.55rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-top: 1px;
    opacity: 0.7;
}

.wn-good .wn-fate { color: #4ade80; }
.wn-tragedy .wn-fate { color: #f87171; }
.wn-neutral .wn-fate { color: #60a5fa; }

/* 图例 */
.web-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.legend-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}

.dot-good { background: #4ade80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.4); }
.dot-tragedy { background: #f87171; box-shadow: 0 0 8px rgba(248, 113, 113, 0.4); }
.dot-neutral { background: #60a5fa; box-shadow: 0 0 8px rgba(96, 165, 250, 0.4); }

/* 详情弹窗 */
.wn-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wn-modal.active {
    pointer-events: all;
    opacity: 1;
}

.wn-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.wn-modal-card {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border-radius: var(--radius);
    max-width: 480px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid rgba(212, 168, 83, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s ease;
}

.wn-modal.active .wn-modal-card {
    transform: scale(1) translateY(0);
}

.wn-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    z-index: 2;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-size: 1.2rem;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.wn-modal-close:hover { background: rgba(255,255,255,0.2); }

.wn-modal-content { padding: 36px 28px 28px; }

.wn-modal-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.wn-modal-img {
    width: 80px; height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(212, 168, 83, 0.3);
}

.wn-modal-img img { width: 100%; height: 100%; object-fit: cover; }

.wn-modal-name {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 3px;
}

.wn-modal-tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 4px 0;
}

.wn-modal-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 10px;
}

.wn-modal-fate {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 4px;
}

.wn-modal-fate-good { background: rgba(74, 222, 128, 0.12); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.25); }
.wn-modal-fate-tragedy { background: rgba(248, 113, 113, 0.12); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.25); }
.wn-modal-fate-neutral { background: rgba(96, 165, 250, 0.12); color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.25); }

/* 关系图响应式 */
@media (max-width: 768px) {
    .web-container {
        max-width: 100%;
        aspect-ratio: auto;
        height: auto;
        padding: 20px 0;
    }

    .web-lines { display: none; }

    .web-center {
        position: relative;
        top: auto; left: auto;
        transform: none;
        margin: 0 auto 30px;
    }

    .web-node {
        position: relative;
        top: auto; left: auto;
        transform: none !important;
        display: inline-block;
        margin: 6px;
    }

    .web-section {
        padding: 100px 16px 20px;
    }

    .web-title { font-size: 1.6rem; }

    .wn-modal-card { max-width: 95vw; }
    .wn-modal-content { padding: 24px 18px 20px; }
    .wn-modal-name { font-size: 1.2rem; }
}
