/* ===== 浮世录 - 亮色模式 ===== */

:root {
    --ink: #f5f0e8;
    --ink-light: #ffffff;
    --gold: #8b6914;
    --gold-dim: rgba(139, 105, 20, 0.2);
    --vermillion: #b5342b;
    --vermillion-dim: rgba(181, 52, 43, 0.15);
    --paper: #e8dcc8;
    --text: #2c2416;
    --text-dim: rgba(44, 36, 22, 0.6);
    --shadow: rgba(0,0,0,0.08);
}

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

body {
    font-family: 'Noto Serif SC', 'Georgia', serif;
    background: var(--ink);
    color: var(--text);
    min-height: 100vh;
}

/* ===== 英雄区 ===== */
.hero {
    position: relative;
    text-align: center;
    padding: 80px 20px 50px;
    background: linear-gradient(180deg, #fff8ee 0%, var(--ink) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px; left: 50%;
    transform: translateX(-50%);
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(139,105,20,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.world-name {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--gold);
    letter-spacing: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 12px;
}

.world-tagline {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--vermillion);
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.world-desc {
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text-dim);
    font-size: 0.95rem;
}

.admin-link {
    position: absolute;
    top: 16px; right: 20px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 1.2rem;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.admin-link:hover { opacity: 1; }

/* ===== Tab 导航 ===== */
.tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 12px 20px;
    background: rgba(245,240,232,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gold-dim);
}

.tab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.tab:hover { color: var(--text); border-color: var(--gold-dim); }

.tab.active {
    color: #fff;
    border-color: var(--gold);
    background: var(--gold);
}

/* ===== 内容区 ===== */
.content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 60px;
    min-height: 400px;
}

.loading {
    text-align: center;
    color: var(--text-dim);
    padding: 60px 0;
}

/* ===== 卡片网格 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--ink-light);
    border: 1px solid var(--gold-dim);
    border-radius: 8px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px var(--shadow);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-title {
    color: var(--gold);
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.card-sub {
    color: var(--vermillion);
    font-size: 0.8rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.card-text {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 14px; top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, var(--gold), var(--vermillion), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--ink-light);
    border: 1px solid var(--gold-dim);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px var(--shadow);
}

.timeline-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -33px; top: 24px;
    width: 10px; height: 10px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--gold-dim);
}

.timeline-year {
    color: var(--gold);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.timeline-era {
    color: var(--vermillion);
    font-size: 0.78rem;
    margin-bottom: 6px;
}

.timeline-title {
    color: var(--text);
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.timeline-desc {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ===== 画廊 ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--gold-dim);
    background: var(--ink-light);
    transition: all 0.3s;
    box-shadow: 0 2px 8px var(--shadow);
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.gallery-item img {
    width: 100%;
    display: block;
}

.gallery-item .caption {
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.gallery-music {
    padding: 20px;
}

.gallery-music .music-title {
    color: var(--gold);
    margin-bottom: 8px;
}

.gallery-music audio {
    width: 100%;
}

/* ===== 弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100;
}

.modal.show { display: flex; justify-content: center; align-items: center; }

.modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
}

.modal-body {
    position: relative;
    background: var(--ink-light);
    border: 1px solid var(--gold-dim);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    color: var(--text);
    line-height: 1.8;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-body .close-btn {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body h2 { color: var(--gold); margin-bottom: 8px; }
.modal-body h3 { color: var(--vermillion); font-size: 0.9rem; margin-bottom: 10px; }
.modal-body p { margin-bottom: 12px; color: var(--text-dim); font-size: 0.95rem; }
.modal-body .field { margin-bottom: 10px; }
.modal-body .field-label { color: var(--gold); font-size: 0.82rem; margin-bottom: 3px; }

/* 设定集内容保留换行 */
.lore-content { white-space: pre-wrap; }

/* 空状态 */
.empty {
    text-align: center;
    color: var(--text-dim);
    padding: 60px 0;
    font-size: 0.95rem;
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
    .tabs { gap: 2px; padding: 8px 10px; }
    .tab { padding: 8px 12px; font-size: 0.8rem; }
    .card-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
