/* ============================================
   逆序极乐 ESIDARAP - 全局样式
   主题：紫色调像素风
   ============================================ */

/* CSS 变量定义 */
:root {
    /* 主色调 - 紫色调 */
    --color-bg-primary: #1a1425;
    --color-bg-secondary: #241a35;
    --color-bg-tertiary: #2d1f45;
    --color-bg-card: #2a1e3d;
    
    /* 强调色 - 紫色/金色 */
    --color-accent: #9d4edd;
    --color-accent-hover: #c77dff;
    --color-accent-dark: #7b2cbf;
    --color-gold: #ffd700;
    --color-gold-hover: #ffec8b;
    
    /* 辅助色 */
    --color-green: #4ade80;
    --color-blue: #60a5fa;
    --color-purple: #a78bfa;
    --color-red: #ef4444;
    --color-cyan: #22d3ee;
    
    /* 稀有度颜色 */
    --rarity-gray: #9ca3af;
    --rarity-white: #f3f4f6;
    --rarity-blue: #60a5fa;
    --rarity-green: #4ade80;
    --rarity-orange: #fb923c;
    --rarity-red: #f87171;
    --rarity-pink: #f472b6;
    --rarity-purple: #a78bfa;
    --rarity-yellow: #facc15;
    --rarity-cyan: #22d3ee;
    
    /* 文字颜色 */
    --text-primary: #f1f5f9;
    --text-secondary: #c4b5fd;
    --text-muted: #8b7bb5;
    
    /* 边框 */
    --border-color: rgba(157, 78, 221, 0.2);
    --border-radius: 8px;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(157, 78, 221, 0.3);
    
    /* 间距 */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Consolas', 'Monaco', monospace;
    
    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 重置样式 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   导航栏
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 20, 37, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0 var(--space-lg);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-accent);
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    image-rendering: pixelated;
}

.logo-text {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
}

    /* 统一所有导航项（链接和按钮）的样式，确保垂直对齐 */
    .nav-menu a,
    .nav-dropdown-toggle {
        display: inline-flex;
        align-items: center;
        padding: var(--space-sm) var(--space-md);
        border-radius: var(--border-radius);
        transition: all var(--transition-fast);
        font-weight: 500;
        font-size: 1rem;
        line-height: 1.5;
        color: var(--text-secondary);
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
    }

        .nav-menu a:hover,
        .nav-menu a.active,
        .nav-dropdown-toggle:hover,
        .nav-dropdown.active .nav-dropdown-toggle {
            color: var(--color-accent);
            background: rgba(157, 78, 221, 0.15);
        }

/* 下拉菜单容器 */
.nav-dropdown {
    position: relative;
}

/* 下拉箭头：默认隐藏，hover 时显示 */
.nav-dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 4px;
    transition: transform var(--transition-fast);
    opacity: 0;
}

.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown-toggle:hover .nav-dropdown-arrow {
    opacity: 1;
}

.nav-dropdown.active .nav-dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 140px;
    background: rgba(42, 30, 61, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(157, 78, 221, 0.15);
    border-radius: var(--border-radius);
    padding: var(--space-xs) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 1001;
    list-style: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu li {
    margin: 0;
}

.nav-dropdown-menu a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    font-size: 0.9375rem;
    white-space: nowrap;
}

    .nav-dropdown-menu a:hover {
        background: rgba(157, 78, 221, 0.1);
        color: var(--color-accent);
    }

    .nav-dropdown-menu a.active {
        background: rgba(157, 78, 221, 0.3);
        color: #efe3ff;
        font-weight: 600;
    }

/* 混沌主题下拉菜单（保持不变） */
[data-theme="chaos"] .nav-dropdown-toggle:hover,
[data-theme="chaos"] .nav-dropdown.active .nav-dropdown-toggle {
    background: rgba(217, 70, 92, 0.15);
}

[data-theme="chaos"] .nav-dropdown-menu {
    background: rgba(45, 20, 20, 0.65);
    border-color: rgba(217, 70, 92, 0.15);
}

    [data-theme="chaos"] .nav-dropdown-menu a:hover {
        background: rgba(217, 70, 92, 0.1);
        color: #e85d75;
    }

    [data-theme="chaos"] .nav-dropdown-menu a.active {
        background: rgba(217, 70, 92, 0.32);
        color: #ffd9e0;
        font-weight: 600;
    }

/* 移动端导航 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

    .nav-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--text-primary);
        transition: all var(--transition-fast);
    }

/* ============================================
   搜索框
   ============================================ */
.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: var(--space-md) var(--space-xl);
    padding-right: 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-glow);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-accent);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-50%) scale(1.05);
}

/* 搜索建议 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: var(--space-sm);
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(157, 78, 221, 0.1);
}

.suggestion-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
}

.suggestion-info {
    flex: 1;
}

.suggestion-name {
    font-weight: 600;
    color: var(--text-primary);
}

.suggestion-type {
    font-size: 0.875rem;

.footer-bottom p {
    margin: var(--space-xs) 0;
}

.footer-icp {
    font-size: 0.8rem;
    opacity: 0.85;
}

.footer-icp a,
.footer-bottom a {
    color: inherit;
    text-decoration: none;
}

.footer-icp a:hover,
.footer-bottom a:hover {
    color: var(--accent-color);
}
    color: var(--text-muted);
}

/* ============================================
   主内容区
   ============================================ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
}

section {
    margin-bottom: var(--space-2xl);
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--border-color);
}

.section-icon {
    font-size: 1.25rem;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-2xl) var(--space-xl) var(--space-lg);
    margin-top: var(--space-2xl);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
}

.footer-section h4 {
    color: var(--color-accent);
    margin-bottom: var(--space-md);
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    max-width: 1200px;
    margin: var(--space-xl) auto 0;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-bg-primary);
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-sm);
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu a {
        display: block;
        padding: var(--space-md);
    }
    
    .main-content {
        padding: var(--space-md);
    }
    
    section h2 {
        font-size: 1.25rem;
    }
}

/* ============================================
   动画
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   工具类
   ============================================ */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 稀有度标签 */
.rarity {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.rarity-gray { background: rgba(156, 163, 175, 0.2); color: var(--rarity-gray); }
.rarity-white { background: rgba(243, 244, 246, 0.2); color: var(--rarity-white); }
.rarity-blue { background: rgba(96, 165, 250, 0.2); color: var(--rarity-blue); }
.rarity-green { background: rgba(74, 222, 128, 0.2); color: var(--rarity-green); }
.rarity-orange { background: rgba(251, 146, 60, 0.2); color: var(--rarity-orange); }
.rarity-red { background: rgba(248, 113, 113, 0.2); color: var(--rarity-red); }
.rarity-pink { background: rgba(244, 114, 182, 0.2); color: var(--rarity-pink); }
.rarity-purple { background: rgba(167, 139, 250, 0.2); color: var(--rarity-purple); }
.rarity-yellow { background: rgba(250, 204, 21, 0.2); color: var(--rarity-yellow); }
.rarity-cyan { background: rgba(34, 211, 238, 0.2); color: var(--rarity-cyan); }
.rarity-expert {
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.15), rgba(255, 165, 0, 0.15), rgba(255, 255, 0, 0.15), rgba(0, 255, 0, 0.15), rgba(0, 127, 255, 0.15), rgba(139, 0, 255, 0.15));
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    background-image: linear-gradient(90deg, #ff0000, #ffa500, #ffff00, #00ff00, #007fff, #8b00ff);
}

/* ============================================
   右侧悬浮导航栏
   ============================================ */
.side-nav {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%) translateX(calc(100% - 50px));
    z-index: 999;
    transition: transform var(--transition-normal);
}

.side-nav.open {
    transform: translateY(-50%) translateX(0);
}

.side-nav-toggle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) translateX(-100%);
    width: 50px;
    height: 80px;
    background: rgba(42, 30, 61, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(157, 78, 221, 0.15);
    border-right: none;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.side-nav-toggle:hover {
    background: rgba(157, 78, 221, 0.15);
}

.side-nav-toggle .toggle-icon {
    font-size: 1.2rem;
    color: var(--text-primary);
    transition: transform var(--transition-normal);
}

.side-nav.open .side-nav-toggle .toggle-icon {
    transform: rotate(180deg);
}

.side-nav-content {
    width: 220px;
    background: rgba(42, 30, 61, 0.35);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(157, 78, 221, 0.12);
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: var(--space-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.side-nav-section {
    margin-bottom: var(--space-lg);
}

.side-nav-section:last-child {
    margin-bottom: 0;
}

.side-nav-section h4 {
    color: var(--color-accent);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
}

/* 主题切换按钮 */
.theme-btn {
    width: 100%;
    padding: var(--space-md);
    background: rgba(157, 78, 221, 0.08);
    border: 1px solid rgba(157, 78, 221, 0.15);
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all var(--transition-fast);
    color: var(--text-primary);
}

.theme-btn:hover {
    background: rgba(157, 78, 221, 0.15);
    border-color: rgba(157, 78, 221, 0.3);
}

.theme-btn .theme-icon {
    font-size: 1.25rem;
}

.theme-btn .theme-text {
    font-weight: 500;
}

/* 快速导航链接 */
.side-nav-links {
    list-style: none;
}

.side-nav-links li {
    margin-bottom: var(--space-xs);
}

.side-nav-links a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    font-size: 0.9375rem;
}

.side-nav-links a:hover {
    background: rgba(157, 78, 221, 0.1);
    color: var(--color-accent);
}

/* 响应式：移动端隐藏侧边栏 */
@media (max-width: 768px) {
    .side-nav {
        display: none;
    }
}

/* ============================================
   主题过渡动画
   ============================================ */
* {
    transition: background-color var(--transition-normal),
                border-color var(--transition-normal),
                color var(--transition-fast);
}

/* 混沌主题特殊样式 - 暗红色系 */
[data-theme="chaos"] .navbar {
    background: rgba(26, 10, 10, 0.92);
    backdrop-filter: blur(10px);
}

[data-theme="chaos"] .footer {
    background: rgba(42, 16, 16, 0.9);
}

[data-theme="chaos"] body {
    background: linear-gradient(135deg, rgba(26, 10, 10, 0.95) 0%, rgba(42, 16, 16, 0.95) 100%);
}

/* 保留透明感的侧边栏 - 混沌主题 */
[data-theme="chaos"] .side-nav-toggle {
    background: rgba(45, 20, 20, 0.35);
    backdrop-filter: blur(14px);
    border-color: rgba(217, 70, 92, 0.15);
}

[data-theme="chaos"] .side-nav-toggle:hover {
    background: rgba(217, 70, 92, 0.15);
}

[data-theme="chaos"] .side-nav-content {
    background: rgba(45, 20, 20, 0.3);
    backdrop-filter: blur(18px);
    border-color: rgba(217, 70, 92, 0.12);
}

[data-theme="chaos"] .theme-btn {
    background: rgba(217, 70, 92, 0.08);
    border-color: rgba(217, 70, 92, 0.15);
}

[data-theme="chaos"] .theme-btn:hover {
    background: rgba(217, 70, 92, 0.15);
    border-color: rgba(217, 70, 92, 0.3);
}

[data-theme="chaos"] .side-nav-section h4 {
    color: #d9465c;
    border-color: rgba(217, 70, 92, 0.15);
}

[data-theme="chaos"] .side-nav-links a:hover {
    background: rgba(217, 70, 92, 0.1);
    color: #e85d75;
}

/* 混沌主题卡片透明效果 */
[data-theme="chaos"] .biome-card,
[data-theme="chaos"] .enemy-card,
[data-theme="chaos"] .item-row {
    background: rgba(45, 20, 20, 0.6);
    border-color: rgba(217, 70, 92, 0.2);
}

[data-theme="chaos"] .biome-card:hover,
[data-theme="chaos"] .enemy-card:hover,
[data-theme="chaos"] .item-row:hover {
    background: rgba(45, 20, 20, 0.8);
    border-color: rgba(217, 70, 92, 0.4);
    box-shadow: 0 0 25px rgba(217, 70, 92, 0.25);
}

/* 混沌主题信息框透明效果 */
[data-theme="chaos"] .biome-info-box,
[data-theme="chaos"] .infobox {
    background: rgba(45, 20, 20, 0.65);
    border-color: rgba(217, 70, 92, 0.25);
}

/* 混沌主题表格透明效果 */
[data-theme="chaos"] .wiki-table th {
    background: rgba(58, 21, 21, 0.8);
    color: #d9465c;
}

[data-theme="chaos"] .wiki-table tr:hover td {
    background: rgba(217, 70, 92, 0.08);
}

/* 混沌主题目录透明效果 */
[data-theme="chaos"] .wiki-toc {
    background: rgba(45, 20, 20, 0.5);
    border-color: rgba(217, 70, 92, 0.2);
}

[data-theme="chaos"] .toc-title {
    color: #d9465c;
    border-color: rgba(217, 70, 92, 0.2);
}

[data-theme="chaos"] .toc-list a:hover {
    color: #e85d75;
    background: rgba(217, 70, 92, 0.1);
}
}

[data-theme="chaos"] .side-nav-links a:hover {
    background: rgba(88, 166, 255, 0.1);
    color: #58a6ff;
}

/* ============================================
   黎明主题 - 大板块悬停特效：紫金交织微光边框
   ============================================ */

/* 仅黎明主题下，对主要的大板块生效 */
[data-theme="dawn"] .about-section,
[data-theme="dawn"] .boss-section,
[data-theme="dawn"] .items-section,
[data-theme="dawn"] .new-content-section,
[data-theme="dawn"] .external-links-section {
    position: relative;
    border: 1px solid transparent;
    border-radius: 16px;
    transition: box-shadow 0.4s ease, border-color 0.3s ease;
}

    /* 悬停时的紫金交织微光边框效果 */
    [data-theme="dawn"] .about-section:hover,
    [data-theme="dawn"] .boss-section:hover,
    [data-theme="dawn"] .items-section:hover,
    [data-theme="dawn"] .new-content-section:hover,
    [data-theme="dawn"] .external-links-section:hover {
        border-color: rgba(157, 78, 221, 0.5);
        box-shadow: 0 0 20px rgba(157, 78, 221, 0.4), /* 紫色光晕 */
        0 0 12px rgba(255, 215, 0, 0.3), /* 金色光晕 */
        0 4px 12px rgba(0, 0, 0, 0.2);
    }

/* 详情页左右布局 */
.wiki-page-content {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.content {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.item-description {
    line-height: 1.6;
    color: var(--text-secondary);
}

/* 信息框样式 */
.infobox {
    width: 300px;
    flex-shrink: 0;
    background: var(--color-bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.9rem;
}

.infobox-header {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.infobox-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
}

.infobox-image img {
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
}

.infobox-content {
    padding: 0.5rem 1rem;
}

.infobox-section {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

    .infobox-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

.infobox-section-title {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
}

.infobox-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

.infobox-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.infobox-value {
    text-align: right;
    color: var(--text-primary);
}

/* 合成配方样式 */
.infobox-recipe {
    margin-top: 0.5rem;
}

.recipe-station {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.recipe-materials {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recipe-material {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.material-count {
    color: var(--color-accent);
}

/* 响应式：移动端信息框在上方 */
@media (max-width: 768px) {
    .wiki-page-content {
        flex-direction: column;
    }

    .infobox {
        width: 100%;
        order: -1;
        margin-bottom: 1.5rem;
    }
}
/* 合成材料小图标 */
.recipe-material {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    padding: 2px 0;
}

.material-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    image-rendering: pixelated;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 2px;
}

.material-name {
    flex: 1;
}

.material-count {
    color: var(--color-accent);
    font-weight: 500;
}

/* 多个配方之间的分隔线 */
.recipe-divider {
    margin: 0.75rem 0;
    border: 0;
    height: 1px;
    background: var(--border-color);
}

/* 配方容器 */
.infobox-recipes {
    display: flex;
    flex-direction: column;
}

.infobox-recipe-item {
    width: 100%;
}

/* 搜索按钮图标 */
.search-icon-img {
    width: 20px;
    height: 20px;
    display: block;
    filter: brightness(0) invert(1); /* 如果图标是黑色，需要变成白色 */
}

/* 统计卡片图标 */
.stat-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
}

/* 侧边栏导航图标 */
.nav-icon-img {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    vertical-align: middle;
    image-rendering: pixelated;
}

/* 章节标题图标（如 📦 → 图片） */
.section-icon-img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
    image-rendering: pixelated;
}

/* 物品分类图标图片样式 */
.category-icon-img {
    width: 32px; /* 根据实际图标尺寸调整 */
    height: 32px;
    object-fit: contain;
    margin-bottom: 8px; /* 与文字间距 */
    image-rendering: pixelated; /* 保留像素风格 */
}

/* 确保分类卡片内的图片和文字垂直居中排列 */
.item-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* 其他已有样式保持不变（如背景、边框等） */
}

/* 可选：为统计卡片图标（如果有类似需求）提供统一样式 */
.stat-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
}

/* 侧边栏导航图标（如果之前没有完整定义） */
.nav-icon-img {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    vertical-align: middle;
    image-rendering: pixelated;
}

/* 章节标题图标（如关于、Boss等） */
.section-icon-img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
    image-rendering: pixelated;
}

/* 外部链接按钮中的自定义图标 */
.link-icon-img {
    width: 20px; /* 根据实际图标尺寸调整 */
    height: 20px;
    vertical-align: middle;
    margin-right: 6px; /* 与文字间距 */
    image-rendering: pixelated; /* 保留像素风格（可选） */
}

/* 确保按钮内图片和文字垂直居中 */
.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    /* 其他已有样式保持不变 */
}

/* 琐事区域 */
.trivia-content {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 16px;
    border-radius: 8px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-line;
}

/* 武器演示区域 */
.demo-container {
    text-align: center;
    margin-top: 8px;
}

.demo-gif {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    background: #000;
}

/* ==================== BGM 播放器（js/bgm.js 注入） ==================== */
.bgm-section {
    --bgm-color: #9d4edd;
}

/* 当前曲目卡片 */
.bgm-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--bgm-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bgm-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--bgm-color);
}

.bgm-icon {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 6px var(--bgm-color));
    flex-shrink: 0;
}

.bgm-meta {
    min-width: 0;
    flex: 1;
}

.bgm-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bgm-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* 迷你均衡器（播放时跳动） */
.bgm-eq {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.25;
    transition: opacity var(--transition-fast);
}

.bgm-eq i {
    width: 3px;
    height: 30%;
    border-radius: 1px;
    background: var(--bgm-color);
}

.bgm-section.playing .bgm-eq {
    opacity: 1;
}

.bgm-section.playing .bgm-eq i {
    animation: bgm-eq-bounce 0.9s ease-in-out infinite;
}

.bgm-section.playing .bgm-eq i:nth-child(2) { animation-delay: 0.15s; }
.bgm-section.playing .bgm-eq i:nth-child(3) { animation-delay: 0.3s; }
.bgm-section.playing .bgm-eq i:nth-child(4) { animation-delay: 0.45s; }

@keyframes bgm-eq-bounce {
    0%, 100% { height: 25%; }
    50% { height: 100%; }
}

/* 进度条 */
.bgm-progress {
    margin-top: 8px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    overflow: hidden;
}

.bgm-progress span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--bgm-color), transparent 180%);
    transition: width 0.2s linear;
}

/* 控制按钮 */
.bgm-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.bgm-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.bgm-btn:hover {
    border-color: var(--bgm-color);
    color: var(--bgm-color);
}

.bgm-play {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    border-color: var(--bgm-color);
}

.bgm-play.on {
    background: var(--bgm-color);
    color: #10141a;
    box-shadow: 0 0 14px var(--bgm-color);
}

/* 音量 */
.bgm-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.bgm-volume input[type="range"] {
    flex: 1;
    height: 4px;
    accent-color: var(--bgm-color);
    cursor: pointer;
}

/* 曲目列表（默认折叠） */
.bgm-list {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
    max-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transition: max-height var(--transition-normal), opacity var(--transition-fast);
    scrollbar-width: thin;
}

.bgm-section.list-open .bgm-list {
    max-height: 220px;
    opacity: 1;
}

.bgm-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.bgm-list li:hover {
    background: rgba(255, 255, 255, 0.06);
}

.bgm-list li.active {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 2px 0 0 var(--bgm-color);
}

.bgm-list li img {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.bgm-list li span {
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.bgm-list li em {
    font-style: normal;
    font-size: 0.68rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: auto;
    padding-left: 6px;
}

/* 频谱条：屏幕右缘竖条 */
#bgmSpectrum {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    z-index: 998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.25));
}

#bgmSpectrum.on {
    opacity: 1;
}

@media (max-width: 768px) {
    #bgmSpectrum {
        width: 12px;
    }
}
