/* The site's design language, set by the landing page: near-black ground, gold accent, Exo 2 heavy type, sharp corners,
   game imagery in the page header. Loaded right after styles.css on every page, so it restyles without touching layouts.
   Data pages stay dense: this changes how controls and tables look, not how much they hold. */
:root { --wd-bg: #070a13; --wd-surface: #0d1322; --wd-control: #0b101d; --wd-line: rgba(255,255,255,.12); --wd-gold: #ffb240; --wd-gold-hi: #ffdc9f; --wd-ink: #f4f1ea; --wd-dim: #c6ccd8; }
body, html { background-color: var(--wd-bg); }
a { color: var(--wd-gold); }
a:hover { color: var(--wd-gold-hi); }
:focus-visible { outline-color: var(--wd-gold); }

/* ---- Header and footer ---- */
#site-header, #site-header #server-status { background: #05070f; }
#main-nav, #main-nav.nav-scrolled { background: #05070f; border-bottom: 1px solid rgba(255,255,255,.08); box-shadow: none; }
#main-nav .nav-link { font-family: 'Exo 2', sans-serif; font-weight: 700; letter-spacing: .04em; }
#main-nav .nav-link::after { background: var(--wd-gold); }
#main-nav .dropdown-menu { background: #0b101d; border: 1px solid rgba(255,255,255,.16); border-top: 2px solid var(--wd-gold); border-radius: 0; box-shadow: 0 14px 34px rgba(0,0,0,.6); }
#main-nav .dropdown-item:hover, #main-nav .dropdown-item:focus { background: rgba(255,178,64,.14); color: #fff; }
#site-footer { background: #05070f; border-top: 1px solid rgba(255,255,255,.08); }
.footer-heading { font-family: 'Exo 2', sans-serif; font-weight: 800; font-size: 13px; color: var(--wd-gold); }
.footer-tagline { color: var(--wd-dim); font-size: 15px; }
.footer-links a { color: var(--wd-dim); font-size: 15px; }
.footer-links a:hover { color: var(--wd-gold); }
.cd-top { border-radius: 2px; }

/* ---- Page header: heavy left-aligned title over a game still ---- */
#panel-header { --wd-art: url('../img/landing/collections.webp'); position: relative; isolation: isolate; overflow: hidden; padding: 136px 0 44px; text-align: left; border-bottom: 0 !important; background: var(--wd-bg) !important; }
body.category-server #panel-header { --wd-art: url('../img/landing/pvp.webp'); }
body.category-community #panel-header { --wd-art: url('../img/landing/harbor.webp'); }
body.category-wiki #panel-header { --wd-art: url('../img/landing/lagoon.webp'); }
body.category-download #panel-header { --wd-art: url('../img/landing/gonryun.webp'); }
#panel-header::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--wd-art) center 40% / cover no-repeat; }
#panel-header::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to right, rgba(7,10,19,.94) 0, rgba(7,10,19,.72) 45%, rgba(7,10,19,.35) 100%), linear-gradient(to bottom, rgba(7,10,19,.2) 55%, var(--wd-bg) 100%); }
#panel-header h1 { margin-bottom: 8px; color: var(--wd-ink) !important; font: 900 clamp(32px, 4.6vw, 72px)/1 'Exo 2', sans-serif; letter-spacing: -.005em; overflow-wrap: break-word; }
#panel-header h1 i { margin-right: .3em; font-size: .72em; color: var(--wd-gold) !important; }
#panel-header .panel-subtitle { max-width: 44em; color: #e5e8ef; font-size: clamp(17px, 1.3vw, 21px); font-weight: 500; line-height: 1.3; }
@media (max-width: 767px) {
    #panel-header { padding: 118px 0 28px; }
}

/* ---- Ground and surfaces ---- */
body.section-backdrop { background: var(--wd-bg); }
body.section-backdrop :is(.panel-card, .db-table, .cd-summary-card, .cd-filter-bar,
    .cd-personal-bar, .ach-summary-card, .ach-card, .pet-summary-card, .pet-card,
    .stats-card, .stats-chart-card, .econ-card, .econ-chart-card, .mvp-card,
    .wr-overview-card, .wr-realm-card, .wr-rank-card, .wr-castle-card,
    .download-card, .media-mgr-card, .fm-cat-card, .fm-guild-card, .rc-app-card) { background-color: var(--wd-surface); background-image: none; border-color: var(--wd-line); }
[class*="-card"]:not(.home-tile), .db-table, .modal-content, .media-tile, .table { border-radius: 2px; }
#panel-content h2, #panel-content h3, .panel-card-title { font-family: 'Exo 2', sans-serif; font-weight: 800; }

/* ---- Controls ---- */
.btn, .btn-wro, .btn-char-action, .btn-auth-submit, .collection-tab, .db-tab, .db-page-btn, .cd-filter-btn, .cd-slot-btn, .ach-group-btn, .ach-rarity-btn, .media-filter-btn, .rank-tab { border-radius: 2px; }
.form-control, .custom-select, input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], select, textarea { border-radius: 2px; }
body.section-backdrop :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), select, textarea) { background-color: var(--wd-control); }
input:focus, select:focus, textarea:focus, .form-control:focus { border-color: var(--wd-gold) !important; box-shadow: 0 0 0 1px var(--wd-gold) !important; }
.collection-tab, .db-tab, .cd-filter-btn, .cd-slot-btn, .ach-group-btn, .ach-rarity-btn, .media-filter-btn, .rank-tab { font-family: 'Exo 2', sans-serif; font-weight: 700; }
body.section-backdrop :is(.collection-tab, .db-tab, .cd-filter-btn, .cd-slot-btn, .ach-group-btn, .ach-rarity-btn, .db-page-btn, .media-filter-btn, .rank-tab).active { background: var(--wd-gold); border-color: var(--wd-gold); color: #120d06; }
body.section-backdrop :is(.collection-tab, .db-tab, .cd-filter-btn, .cd-slot-btn, .ach-group-btn, .ach-rarity-btn, .db-page-btn, .media-filter-btn, .rank-tab).active :is(i, span, small) { color: inherit; }
.btn-auth-submit, .btn-primary { background: linear-gradient(180deg, #ffc65e, #ff9d1c); border-color: #ff9d1c; color: #17110a; font-family: 'Exo 2', sans-serif; font-weight: 800; }
.btn-auth-submit:hover, .btn-primary:hover { background: #ffc974; border-color: #ffc974; color: #17110a; }

/* ---- Tables: same density, the new headings ---- */
.db-table thead th, .table thead th { font-family: 'Exo 2', sans-serif; font-weight: 800; color: var(--wd-gold); letter-spacing: .06em; }
.db-table tbody tr:hover td { background-color: rgba(255,178,64,.07); }

/* ---- The media lightbox's buttons, on /media/ and the landing page ---- */
/* Above the picture: a wide image otherwise sits over them and takes their clicks. */
#media-lb-close, #media-lb-prev, #media-lb-next { z-index: 2; }
#media-lb-close:hover, #media-lb-prev:hover, #media-lb-next:hover { background: var(--wd-gold); color: #120d06; }
#media-lb-close:focus-visible, #media-lb-prev:focus-visible, #media-lb-next:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---- Login, register and forgot password ---- */
.auth-modal { background: var(--wd-surface); border: 1px solid var(--wd-line); border-top: 3px solid var(--wd-gold); border-radius: 2px; box-shadow: 0 24px 70px rgba(0,0,0,.75); }
.modal-backdrop.show { background: #02040a; opacity: .82; }
.auth-close:hover { color: var(--wd-gold); }
.auth-tabs { background: var(--wd-control); border-radius: 2px; }
.auth-tab { border-radius: 2px; font-family: 'Exo 2', sans-serif; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--wd-dim); }
.auth-tab.active { background: linear-gradient(180deg, #ffc65e, #ff9d1c); color: #17110a; }
.auth-tab:hover:not(.active) { color: var(--wd-gold); }
.auth-form label { color: var(--wd-dim); font-size: 15px; }
.auth-form label i { color: var(--wd-gold); }
.auth-form .form-control, .auth-form .form-control:focus { background-color: var(--wd-control); border: 1px solid rgba(255,255,255,.2); border-radius: 2px; color: #fff; }
.auth-form .form-control::placeholder { color: rgba(255,255,255,.45); }
.btn-auth-submit { border-radius: 2px; letter-spacing: .1em; text-transform: uppercase; box-shadow: 0 10px 28px rgba(255,150,20,.25); }
.auth-switch, .auth-form-desc { color: var(--wd-dim); font-size: 15px; }
.auth-alert { background: rgba(216,31,38,.16); border: 1px solid rgba(216,31,38,.6); border-left: 3px solid #d81f26; border-radius: 2px; color: #ffc9c9; font-size: 15px; }
.auth-alert.auth-success { background: rgba(60,180,110,.14); border-color: rgba(60,180,110,.55); border-left-color: #3cb46e; color: #bff0d2; }

body .btn-auth-submit:disabled { background: #3a2f1c; border-color: #3a2f1c; color: #cdbf9f; box-shadow: none; }
body .btn-auth-submit:focus { color: #17110a; }
/* Turnstile takes the form's width on the dark theme, and leaves no gap when the site has no sitekey. */
#reg-turnstile { margin: 4px 0 16px; }
#reg-turnstile > div { width: 100%; }
#reg-turnstile:empty { display: none !important; }
