/* ==========================================================================
   Theme2 ("Aether") — original design system for DragonCMS
   Dark obsidian ground, violet + cyan accent, glass surfaces.
   Component classes below are the theme's shared vocabulary — every page
   template should compose UI from these instead of inventing new ones.
   ========================================================================== */

:root {
    --bg: #08080d;
    --bg-soft: #0d0d16;
    --surface: #13131e;
    --surface-2: #191925;
    --border: rgba(255,255,255,.08);
    --border-strong: rgba(255,255,255,.14);
    --text: #e8e8f2;
    --text-dim: #9494ab;
    --text-faint: #64647a;
    --accent: #8b5cf6;
    --accent-soft: rgba(139,92,246,.14);
    --accent-2: #22d3ee;
    --accent-2-soft: rgba(34,211,238,.14);
    --gold: #fbbf24;
    --gold-soft: rgba(251,191,36,.14);
    --success: #34d399;
    --success-soft: rgba(52,211,153,.14);
    --danger: #f87171;
    --danger-soft: rgba(248,113,113,.14);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 20px 40px -12px rgba(0,0,0,.55);
    --font-display: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 900px 500px at 15% -10%, rgba(139,92,246,.16), transparent 60%),
        radial-gradient(ellipse 700px 500px at 100% 0%, rgba(34,211,238,.10), transparent 55%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; color: #fff; }
p { margin: 0; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-c { display: flex; align-items: center; }
.flex-s { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (min-width: 601px) and (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); } }

.eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-2); }
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(8,8,13,.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.topbar-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: #fff; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
    display: block; padding: 9px 14px; border-radius: 999px;
    font-size: 13px; font-weight: 600; color: var(--text-dim);
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.nav a:hover, .nav a.active { color: #fff; background: rgba(255,255,255,.06); }
.nav .dropdown { position: relative; }
.nav .dropdown > a::after { content: '▾'; margin-left: 5px; font-size: 10px; opacity: .6; }
.nav .dropdown-menu {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 180px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 6px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(4px);
    transition: opacity .15s, transform .15s, visibility .15s;
    z-index: 60;
}
.nav .dropdown:hover .dropdown-menu, .nav .dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav .dropdown-menu a { border-radius: 6px; padding: 8px 12px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.lang-switch a:hover { color: var(--text); }
.lang-switch span { color: var(--border-strong); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.mobile-toggle {
    display: none; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: -8px; padding: 0;
    background: none; border: none; border-radius: var(--radius-sm);
    color: #fff; font-size: 18px; cursor: pointer;
}
.mobile-toggle:hover, .mobile-toggle:active { background: rgba(255,255,255,.08); }
.mobile-nav { display: none; }

@media (max-width: 880px) {
    .nav { display: none; }
    .mobile-toggle { display: flex; }
    .mobile-nav.open {
        display: block; position: fixed; inset: 76px 0 0 0; background: var(--bg-soft);
        padding: 20px; overflow-y: auto; z-index: 51;
    }
    .mobile-nav a { display: block; padding: 14px 6px; border-bottom: 1px solid var(--border); font-weight: 600; }
    /* the language switcher already lives inside .mobile-nav below 880px — drop the
       topbar-actions copy so brand + login/register + toggle don't fight for space */
    .topbar-actions .lang-switch { display: none; }
}

@media (max-width: 420px) {
    .topbar-actions { gap: 8px; }
    .user-chip { gap: 6px; }
    .user-chip .btn-sm { padding: 8px 12px; font-size: 10px; }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 999px; border: none; cursor: pointer;
    font-family: var(--font-body); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
    transition: transform .15s, box-shadow .15s, filter .15s, background .15s;
    background: var(--surface-2); color: var(--text);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #6d28d9); color: #fff; box-shadow: 0 8px 24px -8px rgba(139,92,246,.6); }
.btn-cyan { background: linear-gradient(135deg, var(--accent-2), #0891b2); color: #04222a; box-shadow: 0 8px 24px -8px rgba(34,211,238,.55); }
.btn-outline { background: transparent; border: 1px solid var(--border-strong); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 11px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 90px 0 70px; overflow: hidden; text-align: center; }
.hero-compact { padding: 50px 0 40px; text-align: left; }
.hero::before {
    content: ''; position: absolute; inset: -20% -10% auto -10%; height: 480px;
    background: radial-gradient(ellipse at center, rgba(139,92,246,.28), transparent 65%);
    pointer-events: none; z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 44px; letter-spacing: -.02em; line-height: 1.05; }
.hero-compact h1 { font-size: 30px; }
.hero p.lede { color: var(--text-dim); font-size: 15px; max-width: 560px; margin: 14px auto 0; }
.hero-compact p.lede { margin: 10px 0 0; max-width: none; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.hero-compact .hero-actions { justify-content: flex-start; }

.stat-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.stat-pill {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 22px; min-width: 120px; text-align: center;
}
.stat-pill b { display: block; font-family: var(--font-display); font-size: 22px; color: #fff; }
.stat-pill span { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }

/* ---------- Cards / sections ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px;
}
.card-glow { box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.card-header h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .03em; }
.card-header a.more, .card-header .more { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--accent-2); }
.section-title { font-family: var(--font-display); font-size: 24px; color: #fff; margin-bottom: 6px; }
.section-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }

/* ---------- Rows / lists (rankings, characters, notifications...) ---------- */
.row-list { display: flex; flex-direction: column; gap: 8px; }
.row-item {
    display: flex; align-items: center; gap: 14px; padding: 12px 14px;
    background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: border-color .15s, background .15s;
}
.row-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.row-rank { width: 26px; text-align: center; font-weight: 800; color: var(--text-faint); font-size: 12px; flex-shrink: 0; }
.row-rank.top1 { color: var(--gold); }
.row-rank.top2 { color: #cbd5e1; }
.row-rank.top3 { color: #d18a4a; }
.row-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 700; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 11px; color: var(--text-faint); }
.row-value { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--accent-2); white-space: nowrap; }

.list-head { display: flex; padding: 0 14px 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); border-bottom: 1px solid var(--border); margin-bottom: 10px; }

/* ---------- Tabs ---------- */
.tabs-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.tab-btn { padding: 8px 16px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-dim); background: transparent; border: 1px solid transparent; cursor: pointer; }
.tab-btn.active { background: var(--accent-soft); color: var(--accent-2); border-color: rgba(139,92,246,.35); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Badges / pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.badge-accent { background: var(--accent-soft); color: #c4b5fd; }
.badge-cyan { background: var(--accent-2-soft); color: var(--accent-2); }
.badge-gold { background: var(--gold-soft); color: var(--gold); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: rgba(255,255,255,.06); color: var(--text-faint); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 8px; }
.field input, .field select, .field textarea {
    width: 100%; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 12px 14px; color: var(--text); font-family: var(--font-body); font-size: 13px; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.18); }
.field textarea { min-height: 110px; resize: vertical; }
.field-hint { font-size: 10px; color: var(--text-faint); margin-top: 6px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); margin-bottom: 12px; }
.checkbox-row input { width: auto; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; margin-bottom: 18px; border-left: 3px solid; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

.auth-shell { max-width: 420px; margin: 0 auto; padding: 60px 20px; }
.auth-shell .card { padding: 36px; }
.auth-shell h1 { font-size: 22px; text-align: center; margin-bottom: 26px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.auth-links a:hover { color: var(--accent-2); }

/* ---------- Pricing / package cards ---------- */
.pkg-card { position: relative; cursor: pointer; display: block; }
.pkg-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pkg-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: border-color .15s, background .15s; height: 100%; }
.pkg-card input:checked ~ .pkg-box { border-color: var(--accent); background: var(--accent-soft); }
.pkg-price { font-family: var(--font-display); font-size: 26px; color: #fff; }
.pkg-price sup { font-size: 12px; color: var(--text-faint); margin-right: 3px; }

/* ---------- Item / equipment tiles ---------- */
.item-slot {
    aspect-ratio: 1; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; padding: 6px; position: relative;
}
.item-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.item-slot .empty-label { font-size: 7px; text-transform: uppercase; color: var(--text-faint); text-align: center; font-weight: 700; }
.item-grid { display: grid; gap: 8px; }

/* ---------- Sidebar (user panel) ---------- */
.panel-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; padding: 34px 0 60px; }
@media (max-width: 880px) { .panel-layout { grid-template-columns: 1fr; } }
.panel-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; position: sticky; top: 96px; }
.panel-account { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.panel-account .avatar-circle { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-family: var(--font-display); }
.panel-account h4 { font-size: 13px; text-transform: uppercase; }
.panel-account .status { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.panel-group-label { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); padding: 14px 10px 8px; }
.panel-group-label:first-child { padding-top: 0; }
.panel-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; color: var(--text-dim); }
.panel-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.panel-link.active { background: var(--accent-soft); color: #c4b5fd; }
.panel-link i { width: 16px; text-align: center; color: var(--accent-2); }
.panel-content { min-width: 0; }

/* ---------- Tables ---------- */
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); padding: 10px 14px; border-bottom: 1px solid var(--border); }
table.data-table td { padding: 12px 14px; font-size: 12px; border-bottom: 1px solid var(--border); color: var(--text-dim); }
table.data-table tr:last-child td { border-bottom: none; }

/* ---------- Ticket / chat ---------- */
.chat-msg { display: flex; gap: 12px; margin-bottom: 16px; }
.chat-msg .avatar-circle { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); flex-shrink: 0; }
.chat-bubble { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; max-width: 80%; font-size: 12px; color: var(--text-dim); }
.chat-msg.mine { flex-direction: row-reverse; }
.chat-msg.mine .chat-bubble { background: var(--accent-soft); color: #ede9fe; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 700; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); }
.pagination a:hover { color: #fff; border-color: var(--border-strong); }
.pagination .active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Progress bars ---------- */
.progress { height: 6px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(3,3,8,.72); backdrop-filter: blur(3px); z-index: 999; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 28px; max-width: 420px; width: 100%; position: relative; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text-faint); font-size: 16px; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 50px 0 26px; background: var(--bg-soft); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 36px; }
@media (max-width: 800px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
.footer-cols h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 14px; }
.footer-cols a { display: block; font-size: 12px; color: var(--text-dim); padding: 5px 0; }
.footer-cols a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.social-row { display: flex; gap: 8px; }
.social-row a { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.05); display: flex; align-items: center; justify-content: center; color: var(--text-dim); }
.social-row a:hover { background: var(--accent); color: #fff; }

.hidden { display: none !important; }
.text-center { text-align: center; }
.empty-note { text-align: center; padding: 40px 0; color: var(--text-faint); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 600px) {
    .wrap { padding: 0 16px; }
    .hero h1 { font-size: 30px; }
}

/* ---------- Item tooltip (assets/css/item-tooltip.css is shared across all
   themes and ships its own navy/blue palette — override it here so it
   matches this theme's violet/cyan/gold identity instead). ---------- */
.item-tooltip.item-tooltip {
    background: linear-gradient(180deg, var(--surface-2), var(--bg-soft));
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}
.item-tooltip__name.item-tooltip__name { color: var(--gold); }
.item-tooltip__line.item-tooltip__line { color: var(--text-dim); }
.item-tooltip__line--bonus.item-tooltip__line--bonus { color: var(--accent-2); }
.item-tooltip__empty.item-tooltip__empty { color: var(--text-faint); }
