/* ===== 渲染拆解平台 — 明亮科技风 ===== */

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-bg: #eef2ff;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --bg: #f8fafc;
    --bg-white: #ffffff;
    --bg-subtle: #f1f5f9;
    --bg-code: #1e293b;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

/* ===== 导航 ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 14px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}
.nav-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}
.nav-brand-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.15s;
}
.nav-back:hover {
    color: var(--primary);
    background: var(--primary-bg);
}
.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}
.nav-breadcrumb {
    font-size: 14px;
    color: var(--text-secondary);
}
.nav-breadcrumb strong {
    color: var(--text);
    font-weight: 600;
}
.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    margin-left: auto;
}
.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* ===== 通用标签 ===== */
.tag {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    background: var(--primary-bg);
    color: var(--primary);
}
.tag-perf {
    background: var(--success-bg);
    color: var(--success);
}

/* ===== 占位图 ===== */
.placeholder-viewport {
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    gap: 8px;
}
.placeholder-viewport i { font-size: 48px; opacity: 0.3; }
.placeholder-viewport span { font-size: 14px; }
.placeholder-viewport small { font-size: 12px; opacity: 0.6; }

/* ===== 页脚 ===== */
.footer {
    text-align: center;
    padding: 32px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ============================== */
/* ===== 主页 (page-home) ===== */
/* ============================== */

.hero {
    text-align: center;
    padding: 64px 32px 48px;
    max-width: 700px;
    margin: 0 auto;
}
.hero h1 {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 28px;
}
.hero-stat { text-align: center; }
.hero-stat .num {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
}
.hero-stat .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* 筛选 */
.filter-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px 24px;
}
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-white);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.filter-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}
.filter-btn .count {
    background: rgba(0,0,0,0.08);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}
.filter-btn.active .count {
    background: rgba(255,255,255,0.25);
}

/* 场景卡片网格 */
.scenes-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px 80px;
}
.scenes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.scene-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.scene-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.scene-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
}
.scene-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.scene-card-thumb .thumb-placeholder {
    color: rgba(255,255,255,0.3);
    font-size: 48px;
}
.scene-card-game-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(4px);
}
.scene-card-report-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}
.scene-card-body { padding: 20px; }
.scene-card-title {
    font-size: 17px;
    font-weight: 650;
    margin-bottom: 6px;
}
.scene-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.scene-card-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.scene-card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.scene-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* 游戏角标颜色 */
.badge-king-glory { background: rgba(245, 158, 11, 0.85); }
.badge-genshin { background: rgba(79, 70, 229, 0.85); }
.badge-zzz { background: rgba(16, 185, 129, 0.85); }
.badge-wukong { background: rgba(239, 68, 68, 0.85); }
.badge-starrail { background: rgba(168, 85, 247, 0.85); }

/* ============================== */
/* ===== 场景页 (page-scene) ===== */
/* ============================== */

.scene-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 32px 80px;
}
.scene-header { margin-bottom: 32px; }
.scene-header h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.scene-header .desc {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 20px;
}
.scene-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}
.stat-chip i { color: var(--primary); font-size: 12px; }
.stat-chip strong { color: var(--text); font-weight: 600; }

/* 滑块 */
.slider-section {
    margin-bottom: 48px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.slider-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
}
.slider-viewport img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    transition: opacity 0.2s;
}
.slider-viewport img.hidden { opacity: 0; pointer-events: none; }
.slider-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(15,23,42,0.85);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}
.slider-controls {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
}
.slider-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s;
}
.slider-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}
.slider-controls label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.slider-range {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}
.slider-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    transition: transform 0.15s;
}
.slider-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.slider-info {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    min-width: 60px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Report 卡片 */
.reports-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}
.reports-section .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.report-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.report-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.report-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.report-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.report-card-thumb .thumb-icon {
    font-size: 36px;
    opacity: 0.2;
    color: #fff;
}
.report-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}
.badge-shader { background: var(--primary); }
.badge-performance { background: var(--success); }
.badge-overview { background: var(--warning); }
.report-card-body { padding: 18px 20px; }
.report-card-title {
    font-size: 16px;
    font-weight: 650;
    margin-bottom: 6px;
    color: var(--text);
}
.report-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.report-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.report-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.report-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ============================== */
/* ===== 详情页 (page-report) ===== */
/* ============================== */

.article {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 32px 100px;
}
.article-header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}
.article-header h1 {
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}
.article-header .desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.meta-item {
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.meta-item .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}
.meta-item .value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

/* Report Markdown 渲染内容 */
.report-content h1 {
    font-size: 26px;
    font-weight: 750;
    margin: 32px 0 12px;
    letter-spacing: -0.3px;
}
.report-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 28px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.report-content h3 {
    font-size: 16px;
    font-weight: 650;
    margin: 20px 0 8px;
    color: var(--primary);
}
.report-content p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.7;
}
.report-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin: 12px 0;
}
.report-content pre {
    background: var(--bg-code);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #e2e8f0;
}
.report-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    background: var(--bg-subtle);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary);
}
.report-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}
.report-content blockquote {
    border-left: 3px solid var(--primary);
    padding: 12px 16px;
    margin: 16px 0;
    background: var(--primary-bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-size: 14px;
}
.report-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}
.report-content th {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg-subtle);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}
.report-content td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.report-content ul, .report-content ol {
    margin: 12px 0;
    padding-left: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}
.report-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}
.report-content strong { color: var(--text); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .hero { padding: 40px 20px 32px; }
    .hero h1 { font-size: 28px; }
    .scenes-grid { grid-template-columns: 1fr; }
    .reports-grid { grid-template-columns: 1fr; }
    .filter-section, .scenes-section { padding-left: 16px; padding-right: 16px; }
    .scene-main { padding: 24px 16px 60px; }
    .article { padding: 24px 16px 60px; }
    .nav { padding: 12px 16px; }
    .scene-header h1 { font-size: 24px; }
    .article-header h1 { font-size: 24px; }
    .meta-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { gap: 20px; }
}

/* ===== 关于弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 520px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-lg);
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.modal-close:hover {
    background: var(--bg-subtle);
    color: var(--text);
}
.modal-content h2 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--text);
}
.about-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}
.about-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
}
.contact-item i {
    color: var(--primary);
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.contact-label {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 40px;
}
.contact-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}
