/* =========================================
   EverQuest Legends Wiki - Dark Theme
   ========================================= */
:root {
    /* Dark palette */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2333;
    --bg-hover: #252d3f;
    --border: #30363d;
    --border-light: #21262d;
    
    /* Text */
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    
    /* EQ-inspired accent colors */
    --accent-gold: #d4a843;
    --accent-gold-dim: #b8872a;
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-red: #f85149;
    --accent-purple: #bc8cff;
    --accent-orange: #d29922;
    --accent-cyan: #39d2c0;
    
    /* Class colors */
    --bard-color: #e6cc77;
    --paladin-color: #f4c542;
    --enchanter-color: #c86aff;
    --cleric-color: #ffffff;
    --necromancer-color: #6bdb80;
    --wizard-color: #6aafff;
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 0px;
    
    font-size: 16px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-gold);
    letter-spacing: -0.02em;
}

.sidebar-header .subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-section {
    padding: 8px 0;
}

.nav-section h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 8px 20px 4px;
    font-weight: 600;
}

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

.nav-section li a {
    display: block;
    padding: 5px 20px 5px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
}

.nav-section li a:hover,
.nav-section li a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-left-color: var(--accent-gold);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-footer p {
    margin: 2px 0;
}

/* ===== MAIN CONTENT ===== */
.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 0;
    max-width: 1000px;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1c2333 100%);
    padding: 60px 48px 40px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212,168,67,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent-gold);
    letter-spacing: -0.03em;
    line-height: 1.2;
    position: relative;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 400;
}

.beta-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-gold-dim), var(--accent-gold));
    color: #000;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 12px;
    letter-spacing: 0.02em;
}

/* ===== SECTIONS ===== */
section {
    padding: 32px 48px;
}

section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    max-width: 700px;
}

/* ===== QUICK INFO CARDS ===== */
.quick-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.2s;
}

.info-card:hover {
    border-color: var(--accent-gold-dim);
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.class-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.class-icon {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.class-icon.bard { background: rgba(230,204,119,0.15); color: var(--bard-color); }
.class-icon.paladin { background: rgba(244,197,66,0.15); color: var(--paladin-color); }
.class-icon.enchanter { background: rgba(200,106,255,0.15); color: var(--enchanter-color); }
.class-icon.cleric { background: rgba(255,255,255,0.1); color: var(--cleric-color); }
.class-icon.necromancer { background: rgba(107,219,128,0.15); color: var(--necromancer-color); }
.class-icon.wizard { background: rgba(106,175,255,0.15); color: var(--wizard-color); }

.plus {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.1rem;
}

.info-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--accent-gold-dim);
    color: #000;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--accent-gold);
}

/* ===== FEATURE GRID ===== */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    transition: border-color 0.2s;
}

.feature-card:hover {
    border-color: var(--accent-blue);
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== LINKS GRID ===== */
.links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.link-card {
    display: block;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s;
    text-align: center;
}

.link-card:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: var(--bg-hover);
}

/* ===== PAGE CONTENT ===== */
.page-content {
    padding: 32px 48px;
}

.page-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.page-content .page-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.page-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-top: 40px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.page-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 28px;
    margin-bottom: 10px;
}

.page-content p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.7;
}

.page-content ul,
.page-content ol {
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-left: 24px;
}

.page-content li {
    margin-bottom: 6px;
    line-height: 1.6;
}

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

/* ===== TABLES ===== */
.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 0.88rem;
}

.page-content th {
    background: var(--bg-hover);
    color: var(--text-primary);
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    border: 1px solid var(--border);
}

.page-content td {
    padding: 8px 14px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.page-content tr:nth-child(even) {
    background: rgba(255,255,255,0.02);
}

.page-content tr:hover {
    background: var(--bg-hover);
}

/* ===== STAT BARS ===== */
.stat-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.stat-label {
    width: 100px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.stat-fill {
    height: 10px;
    background: var(--accent-blue);
    border-radius: 5px;
    transition: width 0.3s;
}

.stat-value {
    font-size: 0.82rem;
    color: var(--text-muted);
    width: 30px;
    text-align: right;
}

/* ===== INFO BOXES ===== */
.info-box {
    background: rgba(88,166,255,0.08);
    border: 1px solid rgba(88,166,255,0.2);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 16px 0;
}

.info-box.tip {
    background: rgba(63,185,80,0.08);
    border-color: rgba(63,185,80,0.2);
}

.info-box.warning {
    background: rgba(210,153,34,0.08);
    border-color: rgba(210,153,34,0.2);
}

.info-box h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.info-box p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* ===== CODE ===== */
code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--accent-cyan);
}

pre {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}

pre code {
    background: none;
    padding: 0;
    font-size: 0.82rem;
    color: var(--accent-cyan);
    line-height: 1.5;
}

/* ===== CLASS PAGE HEADER ===== */
.class-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.class-header .class-badge {
    font-size: 2rem;
    font-weight: 800;
    padding: 12px 24px;
    border-radius: 10px;
}

.class-header .role-tags {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.role-tag {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-hover);
    color: var(--text-secondary);
}

/* ===== STANDINGS TABLE ===== */
.standings-table {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin: 12px 0;
}

.standing-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: right;
}

.standing-value {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ===== COMBO PAGE SPECIAL ===== */
.combo-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
}

.combo-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.combo-stat h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.combo-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

/* ===== FOOTER ===== */
.page-footer {
    padding: 24px 48px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.page-footer p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.page-footer .disclaimer {
    font-style: italic;
    font-size: 0.72rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .content { margin-left: 0; }
    .quick-info,
    .combo-summary { grid-template-columns: 1fr; }
    .feature-grid,
    .links-grid { grid-template-columns: 1fr 1fr; }
    .hero { padding: 40px 24px; }
    section,
    .page-content { padding: 24px; }
}

@media (max-width: 600px) {
    .feature-grid,
    .links-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
}
