/* ============================================
   荒野大镖客2 Wiki - 全局样式
   Red Dead Redemption 2 Wiki
   ============================================ */

:root {
    /* 西部配色 */
    --primary: #d97706;           /* 琥珀金 */
    --primary-light: #f59e0b;
    --primary-dark: #b45309;
    --secondary: #92400e;         /* 深棕 */
    --accent: #dc2626;            /* 血红 */
    --accent-light: #ef4444;

    /* 区域颜色 */
    --ambarino: #bfdbfe;          /* 雪山蓝白 */
    --lemoyne: #86efac;           /* 沼泽绿 */
    --new-hanover: #fde68a;       /* 草原金 */
    --west-elizabeth: #a7f3d0;    /* 平原绿 */
    --new-austin: #fcd34d;        /* 沙漠黄 */
    --guarma: #6ee7b7;            /* 热带绿 */

    /* 职业/武器颜色 */
    --revolver: #f97316;          /* 左轮橙 */
    --rifle: #22c55e;             /* 步枪绿 */
    --shotgun: #ef4444;           /* 霰弹红 */
    --thrown: #a855f7;            /* 投掷紫 */
    --melee-color: #eab308;       /* 近战黄 */

    /* 界面颜色 */
    --bg-dark: #1a1410;           /* 深棕黑 */
    --bg-card: #2a2018;           /* 卡片棕 */
    --bg-light: #3a3028;          /* 浅棕 */
    --text-primary: #f5f0e8;      /* 羊皮纸白 */
    --text-secondary: #c4b8a8;    /* 旧纸色 */
    --text-muted: #8a7e6e;        /* 灰棕 */
    --border: #4a3f35;            /* 边框棕 */

    /* 状态颜色 */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --radius: 6px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: 'Georgia', 'Noto Serif SC', 'Times New Roman', serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
}

/* ===== 导航栏 ===== */
.navbar {
    background: linear-gradient(135deg, #1a1410 0%, #2a2018 100%);
    border-bottom: 2px solid var(--primary-dark);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Georgia', serif;
}

.navbar-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.navbar-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    padding: 0.5rem 0;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--primary-light);
}

.navbar-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.search-box {
    position: relative;
}

.search-box input {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    color: var(--text-primary);
    width: 220px;
    font-size: 0.875rem;
    transition: all 0.2s;
    font-family: -apple-system, sans-serif;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    width: 280px;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
}

/* ===== Hero 区域 ===== */
.hero {
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero-red-dead {
    background: linear-gradient(135deg, #1a1410 0%, #2d1f10 30%, #3a2815 60%, #1a1410 100%);
}

.hero-red-dead::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(217, 119, 6, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 80% 30%, rgba(146, 64, 14, 0.06) 0%, transparent 30%),
        radial-gradient(circle at 50% 80%, rgba(220, 38, 38, 0.04) 0%, transparent 30%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.2), rgba(180, 83, 9, 0.15));
    border: 1px solid rgba(217, 119, 6, 0.4);
    border-radius: 50px;
    color: var(--primary-light);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.08em;
    font-family: -apple-system, sans-serif;
    font-weight: 600;
}

.game-logo {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #92400e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Georgia', serif;
    letter-spacing: 0.05em;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-family: -apple-system, sans-serif;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2.5rem;
}

.stat-box {
    text-align: center;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 100px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-light);
    font-family: 'Georgia', serif;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-family: -apple-system, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== 主内容区 ===== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

/* ===== 侧边栏 ===== */
.sidebar {
    position: sticky;
    top: 84px;
    height: fit-content;
}

.sidebar-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.2rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.sidebar-section h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-family: -apple-system, sans-serif;
    font-weight: 700;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-size: 0.9rem;
    font-family: -apple-system, sans-serif;
}

.sidebar-nav a:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.sidebar-nav a::before {
    content: '›';
    color: var(--primary);
    font-weight: bold;
}

/* ===== 内容区 ===== */
.content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
}

.content h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-dark);
    font-family: 'Georgia', serif;
}

.content h2 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    color: var(--primary-light);
    font-family: 'Georgia', serif;
    border-left: 3px solid var(--primary);
    padding-left: 0.75rem;
}

.content h3 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
    font-family: 'Georgia', serif;
}

.content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== 面包屑 ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: -apple-system, sans-serif;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

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

.card {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-icon {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    font-family: 'Georgia', serif;
}

.card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    font-family: -apple-system, sans-serif;
}

.card-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* ===== 标签 ===== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: -apple-system, sans-serif;
}

.tag-primary {
    background: rgba(217, 119, 6, 0.2);
    color: var(--primary-light);
}

.tag-success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.tag-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.tag-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.tag-info {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.tag-revolver {
    background: rgba(249, 115, 22, 0.2);
    color: var(--revolver);
}

.tag-rifle {
    background: rgba(34, 197, 94, 0.2);
    color: var(--rifle);
}

.tag-shotgun {
    background: rgba(239, 68, 68, 0.2);
    color: var(--shotgun);
}

.tag-thrown {
    background: rgba(168, 85, 247, 0.2);
    color: var(--thrown);
}

.tag-melee {
    background: rgba(234, 179, 8, 0.2);
    color: var(--melee-color);
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-family: -apple-system, sans-serif;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent), #b91c1c);
    color: white;
    border: 1px solid var(--accent);
}

/* ===== 表格 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    font-family: -apple-system, sans-serif;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-light);
    font-weight: 700;
    color: var(--primary-light);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.data-table tr:hover {
    background: rgba(217, 119, 6, 0.05);
}

.data-table td {
    color: var(--text-secondary);
}

/* ===== 提示框 ===== */
.tip {
    background: rgba(34, 197, 94, 0.08);
    border-left: 4px solid var(--success);
    padding: 1rem 1.2rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
    font-family: -apple-system, sans-serif;
    font-size: 0.9rem;
}

.warning {
    background: rgba(245, 158, 11, 0.08);
    border-left: 4px solid var(--warning);
    padding: 1rem 1.2rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
    font-family: -apple-system, sans-serif;
    font-size: 0.9rem;
}

.danger {
    background: rgba(239, 68, 68, 0.08);
    border-left: 4px solid var(--danger);
    padding: 1rem 1.2rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
    font-family: -apple-system, sans-serif;
    font-size: 0.9rem;
}

/* ===== 章节卡片 ===== */
.chapter-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.chapter-card:hover {
    border-left-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.chapter-card .chapter-num {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    font-weight: 700;
    font-family: -apple-system, sans-serif;
    margin-bottom: 0.5rem;
}

.chapter-card h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: 'Georgia', serif;
}

.chapter-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ===== 武器/马匹数据卡 ===== */
.stat-row {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    font-family: -apple-system, sans-serif;
    font-size: 0.85rem;
}

.stat-row .stat-name {
    color: var(--text-muted);
    min-width: 80px;
}

.stat-row .stat-bar {
    flex: 1;
    background: var(--bg-dark);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    position: relative;
    margin-top: 4px;
}

.stat-row .stat-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s;
}

.stat-fill.speed { background: var(--primary); }
.stat-fill.accel { background: var(--success); }
.stat-fill.handling { background: var(--info); }
.stat-fill.health { background: var(--accent); }

.stat-row .stat-value {
    min-width: 30px;
    text-align: right;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===== 页脚 ===== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 1rem;
    font-family: -apple-system, sans-serif;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-family: -apple-system, sans-serif;
}

.footer-section a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    max-width: 1400px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: -apple-system, sans-serif;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: relative;
        top: 0;
    }
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-nav { display: none; }
    .search-box input { width: 150px; }
    .game-logo { font-size: 2.2rem; }
    .hero { padding: 3rem 1rem; }
    .hero-stats { flex-direction: column; gap: 1rem; }
    .card-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; }
    .content { padding: 1.5rem; }
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== 通用 ===== */
a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 1rem 0; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; color: var(--text-secondary); font-size: 0.9rem; }
pre { background: var(--bg-dark); border-radius: var(--radius); padding: 1rem; overflow-x: auto; margin: 1rem 0; }
code { font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.85rem; color: var(--primary-light); }

/* ===== 区域颜色卡片 ===== */
.region-card.ambarino { border-left-color: #60a5fa; }
.region-card.lemoyne { border-left-color: #4ade80; }
.region-card.new-hanover { border-left-color: #fbbf24; }
.region-card.west-elizabeth { border-left-color: #34d399; }
.region-card.new-austin { border-left-color: #f59e0b; }
.region-card.guarma { border-left-color: #2dd4bf; }
