/* =========================================================================
   FEROCITYRO FLUXCP THEME — COMPLETE STYLESHEET
   Dark gaming aesthetic. Crimson brand. Zero clutter.
   ========================================================================= */

/* --- RESET & VARIABLES --- */
:root {
    --bg-deep:       #0a0a0f;
    --bg-surface:    #12121a;
    --bg-card:       #1a1a26;
    --bg-hover:      #22222f;
    --border:        #2a2a3a;
    --border-light:  #353548;
    --crimson:       #c41e3a;
    --crimson-light: #e63950;
    --crimson-dark:  #8b1528;
    --crimson-glow:  rgba(196,30,58,0.15);
    --gold:          #d4a843;
    --gold-dim:      rgba(212,168,67,0.15);
    --green:         #00d4aa;
    --green-dim:     rgba(0,212,170,0.12);
    --blue:          #4a9ef5;
    --blue-dim:      rgba(74,158,245,0.12);
    --red:           #e63950;
    --text-primary:  #e8e8f0;
    --text-secondary:#a0a0b8;
    --text-muted:    #5a5a7a;
    --font-body:     'DM Sans', 'Segoe UI', sans-serif;
    --font-display:  'Rajdhani', 'Oswald', sans-serif;
    --font-mono:     'JetBrains Mono', 'Fira Code', monospace;
    --max-width:     1140px;
    --radius:        8px;
    --radius-lg:     12px;
    --shadow:        0 2px 12px rgba(0,0,0,0.4);
    --shadow-lg:     0 8px 32px rgba(0,0,0,0.5);
    --transition:    all 0.2s ease;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: var(--crimson-light); text-decoration: none; transition: var(--transition); }
a:hover { color: #fff; }

/* --- TYPOGRAPHY --- */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; letter-spacing: 0.01em; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
h4 { font-size: 16px; }

/* --- BUTTONS --- */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius); font-family: var(--font-display);
    font-weight: 600; font-size: 14px; letter-spacing: 0.03em; text-transform: uppercase;
    cursor: pointer; border: none; transition: var(--transition); text-decoration: none;
}
.btn-primary { background: var(--crimson); color: #fff; }
.btn-primary:hover { background: var(--crimson-light); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(196,30,58,0.4); }
.btn-secondary { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--crimson); color: var(--text-primary); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* --- NAVIGATION --- */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(12px);
}
.nav-container {
    max-width: var(--max-width); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; height: 56px;
}
.nav-brand { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--crimson-light); letter-spacing: 0.05em; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
    color: var(--text-secondary); font-size: 13px; font-weight: 500;
    padding: 8px 12px; border-radius: 6px; transition: var(--transition);
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-links .active { color: var(--crimson-light); }
.nav-cta { display: flex; gap: 8px; align-items: center; }

/* --- STATUS BAR --- */
.status-bar {
    background: var(--bg-card); border-bottom: 1px solid var(--border);
    padding: 6px 0; font-size: 12px;
}
.status-container {
    max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.status-item { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.status-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.offline { background: var(--text-muted); }

/* --- HERO SECTION --- */
.hero {
    text-align: center; padding: 80px 24px 64px;
    background: radial-gradient(ellipse at center top, rgba(196,30,58,0.08) 0%, transparent 70%);
}
.hero h1 { font-size: 48px; font-weight: 800; margin-bottom: 16px; letter-spacing: 0.02em; }
.hero h1 span { color: var(--crimson-light); }
.hero p { font-size: 16px; color: var(--text-secondary); max-width: 600px; margin: 0 auto 32px; line-height: 1.7; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- RATES BAR --- */
.rates-bar {
    display: flex; justify-content: center; gap: 32px;
    padding: 24px; max-width: var(--max-width); margin: 0 auto;
}
.rate-item { text-align: center; }
.rate-value { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--gold); }
.rate-value .x { font-size: 16px; color: var(--text-muted); }
.rate-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }

/* --- CARDS (generic) --- */
.card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3, .card-header h4 { margin: 0; }
.card-body { padding: 20px; }

/* --- MINI STATS GRID (homepage) --- */
.mini-stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
    max-width: var(--max-width); margin: 0 auto; padding: 0 24px 32px;
}
.mini-stat {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; text-align: center;
}
.mini-stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--text-primary); }
.mini-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

/* --- GRAPH SECTION --- */
.graphs-section {
    max-width: var(--max-width); margin: 0 auto; padding: 0 24px 48px;
}
.graph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.graph-card {
    max-height: 320px;
    overflow: hidden;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px;
}
.graph-card-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}
.graph-card-header h4 { margin: 0; font-size: 15px; color: var(--text-secondary); }
.graph-badge {
    font-size: 11px; font-weight: 600; color: var(--crimson-light);
    background: var(--crimson-glow); padding: 3px 10px; border-radius: 12px;
}
.graph-toggle {
    display: flex; gap: 4px;
}
.graph-toggle button {
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
    padding: 4px 12px; border-radius: 4px; font-size: 11px; font-weight: 600;
    cursor: pointer; transition: var(--transition); font-family: var(--font-body);
}
.graph-toggle button.active { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.graph-toggle button:hover:not(.active) { border-color: var(--crimson); color: var(--text-primary); }
canvas { width: 100% !important; max-height: 220px !important; }% !important; }

/* --- HOT MAPS --- */
.hot-maps { list-style: none; }
.hot-map-item {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 0; border-bottom: 1px solid var(--border);
}
.hot-map-item:last-child { border-bottom: none; }
.hot-map-name { font-size: 13px; font-weight: 500; min-width: 100px; }
.hot-map-bar-bg { flex: 1; height: 6px; background: var(--bg-card); border-radius: 3px; overflow: hidden; }
.hot-map-bar { height: 100%; background: linear-gradient(90deg, var(--crimson-dark), var(--crimson-light)); border-radius: 3px; }
.hot-map-count { font-size: 12px; color: var(--text-muted); min-width: 50px; text-align: right; font-family: var(--font-mono); }

/* --- FEATURES GRID --- */
.features-section { max-width: var(--max-width); margin: 0 auto; padding: 0 24px 48px; }
.features-section h3 { text-align: center; font-size: 24px; margin-bottom: 8px; }
.features-section .section-subtitle { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px;
    transition: var(--transition);
}
.feature-card:hover { border-color: var(--crimson); transform: translateY(-2px); }
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h4 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* --- RANKINGS TABLE --- */
.rank-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rank-table thead { background: var(--bg-card); }
.rank-table th { padding: 10px 16px; text-align: left; font-weight: 600; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
.rank-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.rank-table tbody tr:hover { background: var(--bg-hover); }
.rank-number { font-family: var(--font-display); font-weight: 700; color: var(--crimson-light); }

/* --- STEPS (Get Started) --- */
.steps-section { max-width: var(--max-width); margin: 0 auto; padding: 0 24px 64px; text-align: center; }
.steps-section h3 { font-size: 24px; margin-bottom: 32px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 24px; }
.step-number { font-family: var(--font-display); font-size: 36px; font-weight: 700; color: var(--crimson); margin-bottom: 12px; }
.step-card h4 { font-size: 16px; margin-bottom: 8px; }
.step-card p { font-size: 13px; color: var(--text-secondary); }

/* --- DOWNLOAD CTA --- */
.download-section {
    max-width: var(--max-width); margin: 0 auto; padding: 48px 24px;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(196,30,58,0.06) 0%, transparent 70%);
}
.download-section h3 { font-size: 24px; margin-bottom: 8px; }
.download-section p { color: var(--text-secondary); margin-bottom: 24px; }
.download-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.download-meta { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

/* --- FOOTER --- */
.site-footer {
    background: var(--bg-surface); border-top: 1px solid var(--border);
    padding: 24px; text-align: center; font-size: 12px; color: var(--text-muted);
}
.footer-links { display: flex; gap: 16px; justify-content: center; margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text-primary); }

/* =========================================================================
   DASHBOARD (Account Page)
   ========================================================================= */
.dashboard { max-width: var(--max-width); margin: 0 auto; padding: 24px; }

.dash-header {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.dash-header h2 { margin: 0; }
.dash-subtitle { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.dash-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.dash-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px;
}
.dash-stat-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px; text-align: center;
}
.dash-stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--crimson-light); }
.dash-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

/* --- Section headers --- */
.dash-section { margin-bottom: 24px; }
.section-header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.section-header h3 { font-size: 18px; margin: 0; }
.section-badge {
    font-size: 11px; font-weight: 600; background: var(--bg-card);
    border: 1px solid var(--border); color: var(--text-muted);
    padding: 3px 10px; border-radius: 12px;
}

/* --- Character Cards --- */
.char-cards { display: flex; flex-direction: column; gap: 8px; }

.char-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition);
}
.char-card:hover { border-color: var(--border-light); }
.char-card.expanded { border-color: var(--crimson); }
.char-card.char-online { border-left: 3px solid var(--green); }

.char-summary {
    display: grid; grid-template-columns: 220px 1fr 32px;
    align-items: center; padding: 16px 20px; cursor: pointer;
    transition: var(--transition);
}
.char-summary:hover { background: var(--bg-hover); }

.char-identity {}
.char-name-row { display: flex; align-items: center; gap: 8px; }
.char-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.char-class { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.char-guild { font-size: 12px; color: var(--gold); margin-top: 3px; }

.char-quick-stats { display: flex; gap: 20px; }
.qs-item { display: flex; flex-direction: column; align-items: center; }
.qs-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.qs-value { font-family: var(--font-display); font-size: 18px; font-weight: 700; }

.char-expand-icon {
    color: var(--text-muted); font-size: 12px; transition: transform 0.2s;
    text-align: center;
}
.char-card.expanded .char-expand-icon { transform: rotate(180deg); }

/* --- Character Details (expanded) --- */
.char-details { padding: 0 20px 20px; border-top: 1px solid var(--border); }

.char-bars-section { padding: 16px 0; }
.char-bar-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; margin-bottom: 6px; }
.bar-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.bar-bg { height: 8px; background: var(--bg-card); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.bar-hp { background: linear-gradient(90deg, #8b1528, #e63950); }
.bar-sp { background: linear-gradient(90deg, #1a4a8b, #4a9ef5); }
.bar-text { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); min-width: 120px; text-align: right; }

.char-base-stats {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
    padding: 12px 0; border-bottom: 1px solid var(--border);
}
.bs-item { text-align: center; padding: 8px; background: var(--bg-card); border-radius: 6px; }
.bs-label { font-size: 10px; font-weight: 700; color: var(--text-muted); display: block; }
.bs-value { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-primary); }

.char-meta-row { display: flex; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.meta-tag { font-size: 12px; color: var(--text-secondary); background: var(--bg-card); padding: 4px 10px; border-radius: 4px; }

/* --- Detail Sections (Equipment/Inventory/Storage) --- */
.detail-section { padding: 12px 0; border-top: 1px solid var(--border); }
.detail-section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px; flex-wrap: wrap; gap: 8px;
}
.detail-section-header h4 { font-size: 14px; color: var(--text-secondary); margin: 0; }

.item-search {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
    padding: 6px 12px; font-size: 12px; color: var(--text-primary);
    font-family: var(--font-body); width: 200px; transition: var(--transition);
}
.item-search:focus { outline: none; border-color: var(--crimson); }
.item-search::placeholder { color: var(--text-muted); }

.item-grid { display: flex; flex-direction: column; gap: 2px; }
.item-row {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-radius: 4px; font-size: 13px;
    transition: var(--transition);
}
.item-row:hover { background: var(--bg-hover); }
.item-name { flex: 1; color: var(--text-primary); }
.item-amount { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.card-badge {
    font-size: 10px; font-weight: 600; background: var(--gold-dim);
    color: var(--gold); padding: 1px 6px; border-radius: 8px;
}

.equip-row { border-bottom: 1px solid var(--border); padding: 8px 10px; }
.equip-row:last-child { border-bottom: none; }
.equip-slot {
    font-size: 11px; color: var(--text-muted); min-width: 100px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}

.storage-grid { max-height: 400px; overflow-y: auto; }
.storage-grid::-webkit-scrollbar { width: 4px; }
.storage-grid::-webkit-scrollbar-track { background: var(--bg-card); }
.storage-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* --- Two Column Layout --- */
.dash-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

/* --- Detail List (Account Details) --- */
.detail-list { padding: 12px 20px; }
.dl-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.dl-row:last-child { border-bottom: none; }
.dl-label { font-size: 13px; color: var(--text-muted); }
.dl-value { font-size: 13px; font-weight: 500; color: var(--text-primary); }

/* --- Mini Table --- */
.mini-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mini-table thead { background: var(--bg-card); }
.mini-table th { padding: 8px 12px; text-align: left; font-weight: 600; color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.mini-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.mini-table tbody tr:hover { background: var(--bg-hover); }
.mono-text { font-family: var(--font-mono); font-size: 11px; }
.status-ok { color: var(--green); font-weight: 600; }
.status-fail { color: var(--red); font-weight: 600; }

/* --- Empty States --- */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state p { color: var(--text-muted); font-style: italic; }
.empty-inline { padding: 12px; color: var(--text-muted); font-style: italic; font-size: 13px; }

/* --- FluxCP Default Override (for inherited pages) --- */
.vertical-table { width: 100%; border-collapse: collapse; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.vertical-table th { background: var(--bg-card); color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.vertical-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.horizontal-table { width: 100%; border-collapse: collapse; background: var(--bg-surface); }
.horizontal-table th { background: var(--bg-card); color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.horizontal-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.horizontal-table tbody tr:hover { background: var(--bg-hover); }

/* FluxCP forms */
input[type="text"], input[type="password"], input[type="email"], select, textarea {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 10px 14px; font-size: 14px; color: var(--text-primary);
    font-family: var(--font-body); width: 100%; transition: var(--transition);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--crimson); }
input[type="submit"], button[type="submit"] {
    background: var(--crimson); color: #fff; border: none; border-radius: var(--radius);
    padding: 10px 24px; font-family: var(--font-display); font-weight: 600;
    font-size: 14px; letter-spacing: 0.03em; cursor: pointer; transition: var(--transition);
}
input[type="submit"]:hover, button[type="submit"]:hover { background: var(--crimson-light); }
label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; font-weight: 500; }
.red, .error { color: var(--red); }
.green, .success { color: var(--green); }

/* FluxCP pagination */
.pages { display: flex; gap: 4px; justify-content: center; padding: 16px; }
.pages a, .pages span { padding: 6px 12px; border-radius: 4px; font-size: 13px; }
.pages a { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); }
.pages a:hover { border-color: var(--crimson); color: var(--text-primary); }
.pages .current { background: var(--crimson); color: #fff; }

/* Generic content wrapper for non-themed pages */
.content { max-width: var(--max-width); margin: 0 auto; padding: 24px; }
#content { max-width: var(--max-width); margin: 0 auto; padding: 24px; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 900px) {
    .graph-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .dash-two-col { grid-template-columns: 1fr; }
    .mini-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-container { padding: 0 16px; }
    .nav-links { display: none; }
    .hero { padding: 48px 16px 40px; }
    .hero h1 { font-size: 32px; }
    .rates-bar { flex-wrap: wrap; gap: 16px; }
    .dash-header { flex-direction: column; gap: 12px; text-align: center; }
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .char-summary { grid-template-columns: 1fr; gap: 12px; }
    .char-quick-stats { justify-content: center; }
    .char-base-stats { grid-template-columns: repeat(3, 1fr); }
    .section-header { flex-direction: column; align-items: flex-start; }
}
