/* ============================================
   UNIVERSAL ELEMENTS — v8 "Elemental Runes"
   Core Layout + Components
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Cinzel:wght@400;500;600;700&display=swap');

/* === GLOBAL === */
html, body { font-size: var(--font-size-base); font-family: 'Inter', sans-serif; }
.grecaptcha-badge { visibility: hidden !important; }

body {
    margin: 0; min-height: 100vh; overflow-x: hidden;
    background: var(--void);
    color: var(--text-mid);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Noise grain texture */
body::before {
    content: ''; position: fixed; inset: 0; opacity: 0.022;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 0;
}

.hidden { display: none !important; }

a { color: var(--water) !important; cursor: pointer; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--ice) !important; }

/* === MAIN LAYOUT — Alt A Cinematic === */
.nk-main {
    background: var(--void);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* ============================================
   HERO — Alt A Cinematic (single source of truth)
   ============================================ */
.home-hero {
    position: relative;
    min-height: 340px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0;
    background: url('../../assets/images/wallpaper.jpg') top center / 100% auto no-repeat;
    z-index: 0;
}

.home-hero::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 65%;
    background: linear-gradient(to top, var(--void) 0%, rgba(7,7,12,0.6) 50%, transparent 100%);
    z-index: 1;
}

.hero-content {
    position: relative; z-index: 2;
    display: flex; flex-direction: column;
    align-items: center; gap: 6px;
    padding: 30px 24px 40px;
}

.logo-box { width: 573px; height: 210px; }
.logo {
    background: url('../../assets/images/logo_esteso.png') no-repeat center center;
    width: 573px; height: 210px; background-size: contain;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
}

.hero-rune { width: 260px; margin-top: 4px; }

.hero-ctas { display: flex; gap: 12px; margin-top: 14px; }

/* Hero button size — just makes standard btn larger for the hero CTA */
.hero-btn {
    height: 48px !important;
    padding: 0 32px !important;
    font-size: 13px !important;
    letter-spacing: 2px !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px) !important;
}
.hero-btn i { margin-right: 8px; }

/* Horizontal status bar */
.status-bar {
    display: flex; align-items: center; justify-content: center;
    gap: 20px; padding: 10px 24px;
    border-bottom: 1px solid var(--edge);
    font-size: 12px; flex-wrap: wrap;
}
.status-bar .stat { display: flex; align-items: center; gap: 5px; color: var(--text-dim); }
.status-bar .stat-val { color: var(--text-mid); font-weight: 600; font-variant-numeric: tabular-nums; }
.status-bar .stat-sep { width: 1px; height: 14px; background: var(--edge); }

.status-dot-indicator {
    width: 6px; height: 6px; border-radius: 50%;
    display: inline-block; margin-right: 4px; background: var(--text-dim);
}
.status-dot-indicator.online { background: var(--verdant); box-shadow: 0 0 4px var(--verdant-glow); }
.status-dot-indicator.offline { background: var(--ember); box-shadow: 0 0 4px var(--ember-glow); }

/* Quick links */
.ql-link {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 16px; color: var(--text-mid) !important;
    text-decoration: none !important; font-size: 13px; font-weight: 500;
    transition: all 0.2s ease;
}
.ql-link + .ql-link { border-top: 1px solid rgba(28,28,44,0.4); }
.ql-link:hover { color: var(--text-bright) !important; background: rgba(255,255,255,0.008); }

.ql-diamond {
    width: 5px; height: 5px; transform: rotate(45deg);
    opacity: 0.5; flex-shrink: 0; transition: all 0.2s ease; display: inline-block;
}
.ql-link:hover .ql-diamond { opacity: 0.9; }

/* Main spacer when no hero */
.main-spacer { height: 24px; }

/* Transactional layout — sticky footer */
.nk-transactional { min-height: auto; display: flex; flex-direction: column; flex: 1; }
.nk-transactional > div:nth-child(2) { flex: 1; }
body:has(.nk-transactional) { display: flex; flex-direction: column; min-height: 100vh; }

@media (max-width: 992px) {
    .logo-box { height: 90px; max-width: 100%; }
    .logo { max-width: 100%; }
    .home-hero { min-height: 260px; }
    .hero-content { padding: 40px 16px 30px; }
    .hero-ctas { flex-direction: column; align-items: center; }
}

/* === HORIZONTAL STATUS BAR === */
.status-bar {
    display: flex; align-items: center; justify-content: center; gap: 20px;
    padding: 10px 24px; border-bottom: 1px solid var(--edge);
    font-size: 12px; flex-wrap: wrap;
}
.status-bar .stat { display: flex; align-items: center; gap: 5px; color: var(--text-dim); }
.status-bar .stat-val { color: var(--text-mid); font-weight: 600; font-variant-numeric: tabular-nums; }
.status-bar .stat-sep { width: 1px; height: 14px; background: var(--edge); }

/* === TWO-COLUMN LAYOUT === */
.main-content { display: flex; gap: 20px; margin-top: 20px; }
.side-wrapper { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; }
.mid-wrapper { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.main-spacer { height: 20px; }

@media (max-width: 992px) {
    .main-content { flex-direction: column-reverse; }
    .side-wrapper { width: 100%; }
}

/* ============================================
   ELEMENTAL PANEL — v7 diamond corners
   ============================================ */
.ep, .ue-card, .mid-dark, .side-light, .side-dark {
    background: var(--panel);
    border: 1px solid var(--edge);
    border-radius: 2px;
    position: relative;
    overflow: visible;
    --el: var(--water);
    --elg: var(--water-glow);
    margin-bottom: 0;
}

/* Top-left corner diamond */
.ep::before, .ue-card::before, .mid-dark::before, .side-light::before, .side-dark::before {
    content: ''; position: absolute; top: -4px; left: -4px;
    width: 7px; height: 7px; background: var(--el);
    transform: rotate(45deg); opacity: 0.5; z-index: 2;
    transition: all 0.3s ease; pointer-events: none;
}

/* Top-left extending lines */
.corner-tl { position: absolute; top: -1px; left: -1px; pointer-events: none; z-index: 1; }
.corner-tl::before { content: ''; position: absolute; top: 0; left: 3px; width: 20px; height: 1px; background: linear-gradient(90deg, var(--el), transparent); opacity: 0.4; }
.corner-tl::after { content: ''; position: absolute; top: 3px; left: 0; width: 1px; height: 20px; background: linear-gradient(180deg, var(--el), transparent); opacity: 0.4; }

/* Bottom-right corner diamond */
.ep::after, .ue-card::after, .mid-dark::after, .side-light::after, .side-dark::after {
    content: ''; position: absolute; bottom: -4px; right: -4px;
    width: 6px; height: 6px; background: var(--el);
    transform: rotate(45deg); opacity: 0.3; z-index: 2;
    transition: all 0.3s ease; pointer-events: none;
}

/* Bottom-right extending lines */
.corner-br { position: absolute; bottom: -1px; right: -1px; pointer-events: none; z-index: 1; }
.corner-br::before { content: ''; position: absolute; bottom: 0; right: 3px; width: 20px; height: 1px; background: linear-gradient(270deg, var(--el), transparent); opacity: 0.25; }
.corner-br::after { content: ''; position: absolute; bottom: 3px; right: 0; width: 1px; height: 20px; background: linear-gradient(0deg, var(--el), transparent); opacity: 0.25; }

/* Hover glow on corners */
.ep:hover::before, .ue-card:hover::before, .mid-dark:hover::before, .side-light:hover::before, .side-dark:hover::before { opacity: 0.75; box-shadow: 0 0 8px var(--elg); }
.ep:hover::after, .ue-card:hover::after, .mid-dark:hover::after, .side-light:hover::after, .side-dark:hover::after { opacity: 0.5; box-shadow: 0 0 6px var(--elg); }

/* Element variants */
.water { --el: var(--water); --elg: var(--water-glow); }
.arcane { --el: var(--arcane); --elg: var(--arcane-glow); }
.fire { --el: var(--fire); --elg: var(--fire-glow); }
.ice { --el: var(--ice); --elg: var(--ice-glow); }
.chrono { --el: var(--chrono); --elg: var(--chrono-glow); }
.verdant { --el: var(--verdant); --elg: var(--verdant-glow); }
.ember { --el: var(--ember); --elg: var(--ember-glow); }

.epb { padding: 16px; }

/* ============================================
   V8 DESIGN SYSTEM SHORT CLASSES
   These match the styleguide_v8.html exactly.
   Templates should use these, not old names.
   ============================================ */

/* Form group */
.fg { margin-bottom: 16px; }

/* Form label */
.fl { display: block; font-size: 12px; font-weight: 500; color: var(--text-mid); margin-bottom: 6px; }

/* Form hint */
.fh { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* Input field */
.inp {
    width: 100%; height: 40px; padding: 0 14px;
    background: var(--stone); border: 1px solid var(--edge); border-radius: 2px;
    color: var(--text-bright); font-size: 13px; font-family: 'Inter', sans-serif;
    outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.inp:focus { border-color: rgba(64,144,224,0.4); box-shadow: 0 0 0 2px rgba(64,144,224,0.08); }
.inp::placeholder { color: var(--text-dim); }

/* Textarea */
.inp-area {
    width: 100%; min-height: 80px; padding: 10px 14px; resize: vertical;
    background: var(--stone); border: 1px solid var(--edge); border-radius: 2px;
    color: var(--text-bright); font-size: 13px; font-family: 'Inter', sans-serif;
    outline: none; transition: border-color 0.2s ease;
}
.inp-area:focus { border-color: rgba(64,144,224,0.4); box-shadow: 0 0 0 2px rgba(64,144,224,0.08); }

/* Select */
.sel {
    width: 100%; height: 40px; padding: 0 14px;
    background: var(--stone); border: 1px solid var(--edge); border-radius: 2px;
    color: var(--text-bright); font-size: 13px; font-family: 'Inter', sans-serif;
    outline: none; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%237c7f94' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 10px;
    padding-right: 30px; cursor: pointer; transition: border-color 0.2s ease;
}
.sel:focus { border-color: rgba(64,144,224,0.4); }

/* Checkbox */
.chk-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-mid); }
.chk {
    width: 16px; height: 16px; appearance: none; -webkit-appearance: none;
    background: var(--stone); border: 1px solid var(--edge); border-radius: 2px;
    cursor: pointer; position: relative; transition: all 0.15s ease; flex-shrink: 0;
}
.chk:checked { background: var(--water); border-color: var(--water); }
.chk:checked::after { content: '\2713'; position: absolute; top: -1px; left: 2px; color: var(--void); font-size: 11px; font-weight: 700; }
.chk:focus { box-shadow: 0 0 0 2px rgba(64,144,224,0.12); outline: none; }

/* Radio */
.radio {
    width: 16px; height: 16px; appearance: none; -webkit-appearance: none;
    background: var(--stone); border: 1px solid var(--edge); border-radius: 50%;
    cursor: pointer; position: relative; transition: all 0.15s ease; flex-shrink: 0;
}
.radio:checked { border-color: var(--water); }
.radio:checked::after { content: ''; position: absolute; top: 4px; left: 4px; width: 6px; height: 6px; background: var(--water); border-radius: 50%; }
.radio:focus { box-shadow: 0 0 0 2px rgba(64,144,224,0.12); outline: none; }

/* V8 Button variants — placed here so they override .btn base below */
/* IMPORTANT: actual styles moved after .btn base rule for specificity */

/* ============================================
   SECTION HEADER — Stone slab with rune diamond
   ============================================ */
.shdr,
.side-wrapper .title,
.side-light .title,
.side-dark .title,
.toplist .title,
.mid-dark .title,
.card-header {
    height: 42px;
    padding: 0 16px;
    background: linear-gradient(180deg, var(--panel-light), var(--panel));
    border-top: 1px solid var(--edge);
    border-bottom: 1px solid rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    position: relative;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-mid);
}

/* Inner bevel highlight */
.shdr::before,
.side-wrapper .title::before,
.side-light .title::before,
.side-dark .title::before,
.toplist .title::before,
.mid-dark .title::before,
.card-header::before {
    content: ''; position: absolute; top: 1px; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(255,255,255,0.03) 50%, transparent 95%);
}

/* Rune diamond in header */
.shdr .rune,
.side-wrapper .title .rune {
    width: 6px; height: 6px;
    background: var(--sel, var(--water));
    transform: rotate(45deg); opacity: 0.7;
    margin-right: 12px;
    box-shadow: 0 0 6px var(--selg, var(--water-glow));
    flex-shrink: 0;
}

/* Header right-side content */
.shdr .right,
.side-wrapper .title .right {
    margin-left: auto;
    display: flex; align-items: center; gap: 6px;
    font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
}

/* Header text */
.shdr .txt { font-family: 'Cinzel', serif; }

/* Header icons */
.card-header i,
.mid-dark .title i,
.side-wrapper .title i:not(.kr) {
    color: var(--text-dim); font-size: 12px; margin-right: 8px;
}

/* Hide old kr icons — replaced by rune diamonds */
.kr.login, .kr.event, .kr.basic, .kr.top5 { display: none; }

/* Old sidebar title overrides */
.side-wrapper .title .session-name {
    color: var(--ice); font-size: 12px; margin-left: 8px; letter-spacing: 0.5px;
}

.side-wrapper .title span { margin-left: auto; font-size: 11px; color: var(--text-dim); }
.side-wrapper .title span a {
    color: var(--text-mid) !important; text-decoration: none; font-weight: 600;
    padding: 5px 12px; border-radius: 2px; background: var(--panel);
    border: 1px solid var(--edge); font-size: 11px; display: inline-block;
    transition: all 0.2s ease;
}
.side-wrapper .title span a:hover { color: var(--text-bright) !important; border-color: var(--edge-light); }

/* Content separator — hidden, handled by header borders */
.content-separator,
.side-light .content-separator,
.side-dark .content-separator { display: none; }

/* Content areas */
.side-light .content, .side-dark .content,
.ue-card .content, .mid-dark .content { padding: 16px; }

/* ============================================
   RUNE DIVIDER — Animated for hero/important
   ============================================ */
@keyframes rune-breathe {
    0%, 100% { opacity: 0.6; box-shadow: 0 0 6px var(--g); }
    50%      { opacity: 1;   box-shadow: 0 0 14px var(--g), 0 0 24px var(--g); }
}

.rd { display: flex; align-items: center; height: 24px; --c: var(--ice); --g: var(--ice-glow); }
.rd .l { flex: 1; height: 1px; }
.rd .ll { background: linear-gradient(90deg, transparent, var(--edge) 30%, var(--c)); opacity: 0.45; }
.rd .lr { background: linear-gradient(90deg, var(--c), var(--edge) 70%, transparent); opacity: 0.45; }
.rd .t { width: 4px; height: 4px; background: var(--c); transform: rotate(45deg); opacity: 0.3; margin: 0 6px; flex-shrink: 0; }
.rd .i { width: 5px; height: 5px; background: var(--c); transform: rotate(45deg); opacity: 0.55; margin: 0 4px; flex-shrink: 0; }
.rd .core { width: 8px; height: 8px; background: var(--c); transform: rotate(45deg); opacity: 0.75; margin: 0 3px; flex-shrink: 0; box-shadow: 0 0 8px var(--g); }
.rd.animated .core { animation: rune-breathe 3.5s ease-in-out infinite; }

.rd.water { --c: var(--water); --g: var(--water-glow); }
.rd.arcane { --c: var(--arcane); --g: var(--arcane-glow); }
.rd.fire { --c: var(--fire); --g: var(--fire-glow); }
.rd.ice { --c: var(--ice); --g: var(--ice-glow); }
.rd.chrono { --c: var(--chrono); --g: var(--chrono-glow); }
.rd.verdant { --c: var(--verdant); --g: var(--verdant-glow); }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1 { font-family: 'Cinzel', serif; font-size: var(--font-size-xl); color: var(--text-bright); font-weight: 500; margin: 0; }

.news-title { color: var(--text-bright); font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; margin: 0; font-family: 'Cinzel', serif; }

.boxHeadline > h1, .sidebarBox .boxHeadline > h2 {
    font-family: 'Cinzel', serif; font-size: 11px; font-weight: 600;
    color: var(--text-mid); letter-spacing: 3px; text-transform: uppercase; margin: 0;
}

.ue-card-title { font-family: 'Cinzel', serif; font-size: 11px; font-weight: 600; color: var(--text-mid); letter-spacing: 3px; text-transform: uppercase; margin: 0; display: flex; align-items: center; gap: 8px; }
.ue-card-title .korean-accent { font-family: 'korean', serif; font-size: 1.8rem; color: var(--water); margin-right: 12px; }

/* ============================================
   BUTTONS — Angular clip-path (shard cut)
   ============================================ */
.btn-main,
.mid-dark input[type=submit]:not(.forum-tags),
.mid-dark input[type=file],
input[type=submit],
input[type=file] {
    display: inline-flex; align-items: center; justify-content: center;
    height: 40px; padding: 0 24px;
    font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    cursor: pointer; text-decoration: none; gap: 8px;
    transition: all 0.2s ease; border: none;
    background: var(--water); color: var(--void);
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    margin: 4px 0; outline: none; line-height: 40px; text-align: center;
    width: auto;
}

.btn-main:hover, input[type=submit]:hover, input[type=file]:hover {
    background: #4a9eee; box-shadow: 0 0 20px var(--water-glow);
}

.btn-no-size { width: auto; height: auto; line-height: normal; padding: 10px 24px; }

.btn, button:not(.close):not(.hamburger):not(.acc-trigger):not(.tab-item):not(.htab) {
    display: inline-flex; align-items: center; justify-content: center;
    height: 36px; padding: 0 18px;
    font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    cursor: pointer; text-decoration: none; gap: 6px;
    transition: all 0.2s ease; border: none;
    background: var(--panel-light); color: var(--text-mid);
    border: 1px solid var(--edge-light);
    clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
    border-radius: 0;
    margin: 0 4px 4px 0;
}

.btn:hover, button:not(.close):not(.hamburger):hover {
    color: var(--text-bright); background: var(--edge);
}

/* V8 elemental button variants — !important to beat button:not() specificity */
.btn-water, button.btn-water { background: var(--water) !important; color: #fff !important; border: none !important; }
.btn-water:hover, button.btn-water:hover { background: #4a9eee !important; box-shadow: 0 0 20px var(--water-glow); }
.btn-fire, button.btn-fire { background: var(--fire) !important; color: #fff !important; border: none !important; }
.btn-fire:hover, button.btn-fire:hover { background: #e88040 !important; box-shadow: 0 0 20px var(--fire-glow); }
.btn-arcane, button.btn-arcane { background: var(--arcane) !important; color: #fff !important; border: none !important; }
.btn-arcane:hover, button.btn-arcane:hover { background: #9966ee !important; box-shadow: 0 0 20px var(--arcane-glow); }
.btn-verdant, button.btn-verdant { background: var(--verdant) !important; color: #fff !important; border: none !important; }
.btn-verdant:hover, button.btn-verdant:hover { background: #4dbb72 !important; box-shadow: 0 0 20px var(--verdant-glow); }
.btn-ember, button.btn-ember { background: var(--ember) !important; color: #fff !important; border: none !important; }
.btn-ember:hover, button.btn-ember:hover { background: #dd5555 !important; box-shadow: 0 0 20px var(--ember-glow); }
.btn-chrono, button.btn-chrono { background: var(--chrono) !important; color: #fff !important; border: none !important; }
.btn-chrono:hover, button.btn-chrono:hover { background: #ddbb55 !important; box-shadow: 0 0 20px var(--chrono-glow); }

.btn-sec, button.btn-sec { background: var(--panel-light) !important; color: var(--text-mid) !important; border: 1px solid var(--edge-light) !important; }
.btn-sec:hover, button.btn-sec:hover { color: var(--text-bright) !important; background: var(--edge) !important; }

.btn-ghost, button.btn-ghost { background: transparent !important; color: var(--text-dim) !important; clip-path: none; border: none !important; }
.btn-ghost:hover, button.btn-ghost:hover { color: var(--text-mid) !important; }

.btn-sm, button.btn-sm { height: 32px !important; padding: 0 16px !important; font-size: 11px !important; clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); }

.btn-success, .btn-verdant { background: var(--verdant); color: #fff; border: none; }
.btn-success:hover, .btn-verdant:hover { background: #4dbb72; box-shadow: 0 0 16px var(--verdant-glow); }
.btn-danger, .btn-ember { background: var(--ember); color: #fff; border: none; }
.btn-danger:hover, .btn-ember:hover { background: #dd5555; box-shadow: 0 0 16px var(--ember-glow); }
.btn-warning { background: var(--chrono); color: #fff; border: none; }
.btn-warning:hover { background: #ddbb55; box-shadow: 0 0 16px var(--chrono-glow); }
.btn-info { background: var(--water); color: #fff; border: none; }
.btn-info:hover { background: #4a9eee; box-shadow: 0 0 16px var(--water-glow); }

/* Download CTA */
.download {
    display: flex; align-items: center; justify-content: center;
    height: 54px; background: var(--water); color: var(--void);
    font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    text-decoration: none; transition: all 0.2s ease;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    cursor: pointer;
}
.download:hover { background: #4a9eee; box-shadow: 0 0 25px var(--water-glow); text-decoration: none; color: var(--void); }

/* ============================================
   FORM CONTROLS
   ============================================ */
input[type=text], input[type=email], input[type=password],
input[type=date], input[type=number], input[type=tel],
input[type=url], input[type=search],
.form-group .form-control, select {
    width: 100%; height: 40px; padding: 0 14px;
    background: var(--stone); border: 1px solid var(--edge); border-radius: 2px;
    color: var(--text-bright); font-size: 13px; font-family: 'Inter', sans-serif;
    outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-top: 4px; box-shadow: none;
}

input[type=text]:focus, input[type=email]:focus, input[type=password]:focus,
input[type=date]:focus, input[type=number]:focus, input[type=tel]:focus,
input[type=url]:focus, input[type=search]:focus,
.form-group .form-control:focus, select:focus {
    border-color: rgba(64,144,224,0.4); box-shadow: 0 0 0 2px rgba(64,144,224,0.08);
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }

select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%237c7f94' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 10px;
    padding-right: 30px; cursor: pointer;
}

input[type="checkbox"] {
    width: 16px; height: 16px; appearance: none; -webkit-appearance: none;
    background: var(--stone); border: 1px solid var(--edge); border-radius: 2px;
    position: relative; cursor: pointer; transition: all 0.15s ease;
}
input[type="checkbox"]:checked { background: var(--water); border-color: var(--water); }
input[type="checkbox"]:checked::after { content: '\2713'; position: absolute; top: -1px; left: 2px; color: var(--void); font-size: 11px; font-weight: 700; }
input[type="checkbox"]:focus { box-shadow: 0 0 0 2px rgba(64,144,224,0.12); outline: none; }

input[type="radio"] {
    width: 16px; height: 16px; appearance: none; -webkit-appearance: none;
    background: var(--stone); border: 1px solid var(--edge); border-radius: 50%;
    position: relative; cursor: pointer; transition: all 0.15s ease;
}
input[type="radio"]:checked { border-color: var(--water); }
input[type="radio"]:checked::after { content: ''; position: absolute; top: 4px; left: 4px; width: 6px; height: 6px; background: var(--water); border-radius: 50%; }
input[type="radio"]:focus { box-shadow: 0 0 0 2px rgba(64,144,224,0.12); outline: none; }

textarea {
    width: 100%; min-height: 80px; padding: 10px 14px; resize: vertical;
    background: var(--stone); border: 1px solid var(--edge); border-radius: 2px;
    color: var(--text-bright); font-size: 13px; font-family: 'Inter', sans-serif;
    outline: none; transition: border-color 0.2s ease;
}
textarea:focus { border-color: rgba(64,144,224,0.4); box-shadow: 0 0 0 2px rgba(64,144,224,0.08); }

input:disabled, select:disabled, textarea:disabled, button:disabled {
    background: var(--stone); color: var(--text-dim); border-color: var(--edge); cursor: not-allowed; opacity: 0.5;
}

.form-group { margin-bottom: 14px; }
.form-group label, .form-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-mid); margin-bottom: 5px; }
.form-text.text-muted { font-size: 11px; color: var(--text-dim); display: block; margin-top: 4px; }
.form-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.form-footer { display: flex; justify-content: center; margin-top: 0; }
.form-links { font-size: 11px; display: flex; flex-direction: column; align-items: flex-start; }
.form-link {
    color: var(--text-mid) !important; font-weight: 600; padding: 5px 12px;
    display: inline-block; border-radius: 2px; background: var(--panel);
    border: 1px solid var(--edge); font-size: 11px; transition: all 0.2s ease;
}
.form-link:hover { color: var(--text-bright) !important; border-color: var(--edge-light); }

.login-form input[type=text], .login-form input[type=password] { width: 100%; height: 40px; }

/* ============================================
   TABS BAR — Horizontal content switching
   ============================================ */
.content-tabs-container, .tabs-bar {
    display: flex; align-items: center; gap: 2px;
    height: 42px; padding: 0 8px;
    background: linear-gradient(180deg, var(--panel-light), var(--panel));
    border-top: 1px solid var(--edge);
    border-bottom: 1px solid rgba(0,0,0,0.4);
    position: relative; width: 100%; margin: 0;
    border-radius: 0;
}
.content-tabs-container::before, .tabs-bar::before {
    content: ''; position: absolute; top: 1px; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(255,255,255,0.03) 50%, transparent 95%);
}

input[name=tab] + label, .tab-item {
    padding: 5px 14px; height: 30px;
    font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--text-dim); background: transparent; border: none;
    border-radius: 2px; cursor: pointer; display: flex; align-items: center; gap: 5px;
    font-family: 'Inter', sans-serif; transition: all 0.15s ease;
    margin: 0 2px; min-width: auto;
}
input[name=tab] + label:hover, .tab-item:hover { color: var(--text-mid); background: rgba(255,255,255,0.015); }
input[name=tab]:checked + label, .tab-item.active { color: var(--text-bright); background: rgba(255,255,255,0.03); transform: none; box-shadow: none; }

input[name=tab] + label i { font-size: 11px; color: var(--text-dim); }
input[name=tab]:checked + label i { color: var(--water); }

input[type=radio][name=tab] { display: none; }

.content-container { padding: 16px; }

/* ============================================
   TICKER / STAT ROWS
   ============================================ */
.forum-ticker { display: flex; flex-direction: column; gap: 0; }
.forum-ticker-item {
    display: flex; align-items: center; padding: 9px 16px;
    background: transparent; border: none; font-size: 12px;
    text-decoration: none; color: inherit; transition: background 0.1s ease;
}
.forum-ticker-item:nth-child(even) { background: rgba(255,255,255,0.004); }
.forum-ticker-item:hover { background: rgba(255,255,255,0.008); }

.ticker-content { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.ticker-left { flex: 1; display: flex; justify-content: space-between; align-items: center; }
.thread-title { font-size: 12px; color: var(--text-mid); }
.topic-item-latestDate { color: var(--text-dim); font-size: 11px; }
.text-ue-accent { color: var(--water) !important; }
.text-ue-muted { color: var(--text-dim) !important; font-size: 11px; }

/* ============================================
   UCP SIDEBAR BUTTONS
   ============================================ */
.side-wrapper .ucp { list-style: none; padding: 0; }
.side-wrapper .ucp li { display: flex; padding: 4px; width: 100%; }
.side-wrapper .ucp li a { display: block; width: 100%; }

.side-wrapper .btn-ucp {
    display: flex; align-items: center; text-align: left;
    color: var(--text-mid); height: 40px;
    background: var(--panel); border: 1px solid var(--edge);
    border-radius: 2px; transition: all 0.2s ease;
    font-weight: 600; font-size: 13px; letter-spacing: 0.5px; text-decoration: none;
}
.side-wrapper .btn-ucp:hover, .side-wrapper .btn-ucp.active {
    color: var(--text-bright); background: var(--panel-light); border-color: var(--edge-light);
}
.side-wrapper .btn-ucp .icon {
    min-width: 40px; text-align: center; margin-right: 8px; line-height: 40px;
    border-right: 1px solid var(--edge);
}
.side-wrapper .btn-ucp .icon i, .side-wrapper .btn-ucp .svg-inline--fa {
    color: var(--text-dim); filter: none; text-shadow: none;
}
.side-wrapper .btn-ucp:hover .icon i, .side-wrapper .btn-ucp:hover .svg-inline--fa { color: var(--water); }

/* ============================================
   QUICK LINKS
   ============================================ */
.quick-link-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; color: var(--text-mid); text-decoration: none !important;
    font-size: 13px; font-weight: 500; transition: all 0.2s ease;
}
.quick-link-item + .quick-link-item { border-top: 1px solid rgba(28,28,44,0.4); }
.quick-link-item:hover { color: var(--text-bright) !important; background: rgba(255,255,255,0.008); }

.quick-link-icon { display: none; }
.quick-link-label { color: inherit !important; text-shadow: none !important; }

/* ============================================
   STATUS INDICATORS
   ============================================ */
.server-status { font-size: 11px; display: flex; align-items: center; gap: 5px; }
.server-status i { font-size: 6px; }
.server-status.online i { color: var(--verdant); }
.server-status.offline i { color: var(--ember); }

/* ============================================
   AUTHOR / AVATAR
   ============================================ */
.author-avatar { border-radius: 50%; border: 2px solid var(--edge); transition: border-color 0.2s ease; }
.author-avatar:hover { border-color: var(--edge-light); }

/* ============================================
   ALERTS — outline style, gentle
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: 2px;
    font-size: 13px;
    border: 1px solid;
    background: transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.alert > i { margin-top: 2px; flex-shrink: 0; }
.alert > div, .alert > span { flex: 1; min-width: 0; }

.alert-info { color: var(--water) !important; border-color: rgba(64,144,224,0.25) !important; background: transparent !important; }
.alert-success { color: var(--verdant) !important; border-color: rgba(68,170,102,0.25) !important; background: transparent !important; }
.alert-warning { color: var(--chrono) !important; border-color: rgba(204,170,68,0.25) !important; background: transparent !important; }
.alert-danger { color: var(--ember) !important; border-color: rgba(204,68,68,0.25) !important; background: transparent !important; }

.alert ul { margin: 0; padding-left: 20px; }

/* ============================================
   V8 TABLES
   ============================================ */

/* Generic table */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-family: 'Cinzel', serif; font-size: 10px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); padding: 10px 14px; border-bottom: 1px solid var(--edge); }
.tbl td { padding: 10px 14px; font-size: 13px; color: var(--text-mid); border-bottom: 1px solid rgba(28,28,44,0.5); }
.tbl tbody tr { transition: background 0.15s ease; }
.tbl tbody tr:hover { background: rgba(255,255,255,0.008); }

/* Ranking table — podium colors for top 3 */
.table-rank { width: 100%; border-collapse: collapse; color: var(--text-mid); }
.table-rank thead th { background: linear-gradient(180deg, var(--panel-light), var(--panel)); color: var(--text-mid); border-bottom: 1px solid var(--edge); padding: 12px 15px; font-family: 'Cinzel', serif; font-size: 10px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; text-align: left; }
.table-rank tbody tr { border-left: 3px solid transparent; transition: background 0.2s ease; }
.table-rank tbody tr:nth-child(even) { background: rgba(16,16,26,0.5); }
.table-rank tbody tr:hover { background: rgba(64,144,224,0.04); }
.table-rank tbody td { padding: 10px 15px; border-bottom: 1px solid rgba(28,28,44,0.3); vertical-align: middle; font-size: 13px; color: var(--text-mid); }
.table-rank tbody tr:nth-child(1) { border-left-color: var(--chrono); }
.table-rank tbody tr:nth-child(2) { border-left-color: var(--text-dim); }
.table-rank tbody tr:nth-child(3) { border-left-color: #8a5a30; }

/* Ranking helpers */
.rank-number { font-weight: bold; color: var(--water); }
.player-link { color: var(--water) !important; text-decoration: none !important; font-weight: bold; }
.player-link:hover { text-decoration: underline !important; }
.level-value, .exp-value { font-weight: bold; color: var(--water); }
.last-level-date { font-size: 11px; color: var(--text-dim); }
.team-name { font-weight: bold; color: var(--text-bright); margin-bottom: 5px; }
.team-players { display: flex; flex-wrap: wrap; gap: 8px; }
.team-player { display: flex; align-items: center; gap: 3px; font-size: 12px; }
.team-player a { color: var(--water) !important; text-decoration: none; }
.mmr-display { display: flex; align-items: center; gap: 8px; }
.mmr-text { font-weight: bold; color: var(--text-bright); }
.time-score, .damage-score, .numeric-score { font-family: 'JetBrains Mono', monospace; font-weight: bold; color: var(--text-bright); }

/* ============================================
   ACCORDION — from styleguide v8
   ============================================ */
.accordion { display: flex; flex-direction: column; gap: 6px; }

.acc-item { border: 1px solid var(--edge); border-radius: 2px; overflow: hidden; }

.acc-trigger {
    width: 100%; display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: var(--panel);
    border: none; color: var(--text-mid); font-size: 13px; font-weight: 600;
    font-family: 'Inter', sans-serif; cursor: pointer;
    transition: all 0.2s ease; text-align: left;
    height: auto; line-height: 1.4; margin: 0;
    clip-path: none;
}
.acc-trigger:hover { background: var(--panel-light); color: var(--text-bright); }
.acc-trigger.open { background: var(--panel-light); color: var(--text-bright); }
.acc-trigger:focus, .acc-trigger:active,
button[data-toggle="collapse"]:focus, button[data-toggle="collapse"]:active,
button:focus, a:focus, [data-toggle]:focus {
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.acc-trigger .acc-rune {
    width: 5px; height: 5px; transform: rotate(45deg); flex-shrink: 0;
    background: var(--acc-el, var(--water)); opacity: 0.5;
    transition: all 0.2s ease;
}
.acc-trigger:hover .acc-rune,
.acc-trigger.open .acc-rune { opacity: 0.8; box-shadow: 0 0 4px var(--acc-elg, var(--water-glow)); }

.acc-trigger .acc-icon { width: 18px; text-align: center; color: var(--text-dim); font-size: 13px; flex-shrink: 0; }
.acc-trigger:hover .acc-icon { color: var(--text-mid); }

.acc-trigger .acc-arrow { margin-left: auto; font-size: 10px; color: var(--text-dim); transition: transform 0.2s ease; }
.acc-trigger.open .acc-arrow { transform: rotate(90deg); }

.acc-body { background: var(--stone); border-top: 1px solid var(--edge); }
.acc-body.hidden { display: none; }

/* Accordion sub-items (ranking list etc) */
.acc-link {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 14px; color: var(--text-mid) !important; text-decoration: none !important;
    font-size: 12px; font-weight: 500; transition: all 0.15s ease;
    border-bottom: 1px solid rgba(28,28,44,0.3);
}
.acc-link:last-child { border-bottom: none; }
.acc-link:hover { background: rgba(255,255,255,0.01); color: var(--text-bright) !important; text-decoration: none !important; }
.acc-link.active { color: var(--water); background: rgba(64,144,224,0.04); }

.acc-link .al-rune { width: 4px; height: 4px; transform: rotate(45deg); background: var(--text-dim); opacity: 0.4; flex-shrink: 0; }
.acc-link.active .al-rune { background: var(--water); opacity: 0.7; }
.acc-link .al-icon { width: 16px; text-align: center; color: var(--text-dim); font-size: 11px; }
.acc-link.active .al-icon { color: var(--water); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination-container { display: flex; justify-content: center; margin: 16px 0; }
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination-link {
    min-width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    padding: 0 8px; background: var(--panel); border: 1px solid var(--edge);
    color: var(--text-dim); font-size: 11px; font-weight: 600;
    transition: all 0.2s ease; cursor: pointer;
    clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}
.pagination-link:hover:not(.disabled):not(.active) { color: var(--text-mid); background: var(--panel-light); border-color: var(--edge-light); }
.pagination-link.active { background: var(--water); color: var(--void); border-color: var(--water); font-weight: 700; }
.pagination-link.disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-dots { min-width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text-dim); cursor: pointer; }

/* ============================================
   V8 BADGES — from styleguide
   ============================================ */
.bg { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; font-size: 10px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; border: 1px solid; border-radius: 2px; }
.bg .br { width: 4px; height: 4px; transform: rotate(45deg); background: currentColor; opacity: 0.7; flex-shrink: 0; }
.bg-w { color: var(--water); border-color: rgba(64,144,224,0.3); background: rgba(64,144,224,0.07); }
.bg-a { color: var(--arcane); border-color: rgba(136,85,221,0.3); background: rgba(136,85,221,0.07); }
.bg-v { color: var(--verdant); border-color: rgba(68,170,102,0.3); background: rgba(68,170,102,0.07); }
.bg-f { color: var(--fire); border-color: rgba(221,119,51,0.3); background: rgba(221,119,51,0.07); }
.bg-c { color: var(--chrono); border-color: rgba(204,170,68,0.3); background: rgba(204,170,68,0.07); }
.bg-e { color: var(--ember); border-color: rgba(204,68,68,0.3); background: rgba(204,68,68,0.07); }

/* Legacy badge compat */
.bg-main-4 { color: var(--water); border: 1px solid rgba(64,144,224,0.25); background: rgba(64,144,224,0.06); padding: 2px 8px; border-radius: 2px; font-size: 10px; }
.bg-main-5 { color: var(--verdant); border: 1px solid rgba(68,170,102,0.25); background: rgba(68,170,102,0.06); padding: 2px 8px; border-radius: 2px; }
.bg-main-1 { color: var(--text-bright); border: 1px solid var(--edge); background: var(--panel); padding: 2px 8px; border-radius: 2px; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer, .page-footer-modern {
    border-top: 1px solid var(--edge);
    margin-top: 40px; padding: 20px 0;
    color: var(--text-dim) !important; text-align: center; font-size: 11px;
    background: transparent !important;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--edge); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--edge-light); }
* { scrollbar-width: thin; scrollbar-color: var(--edge) var(--void); }

/* ============================================
   UTILITY
   ============================================ */
.text-ue-primary { color: var(--text-bright) !important; }
.text-ue-secondary { color: var(--text-mid) !important; }
.text-ue-accent { color: var(--water) !important; }
.text-ue-muted { color: var(--text-dim) !important; }

.text-success { color: var(--verdant) !important; }
.text-danger { color: var(--ember) !important; }
.text-warning, .text-info { color: var(--chrono) !important; }

/* Discord widget */
#discord { transition: all 0.3s ease; border-radius: 2px; overflow: hidden; }
#discord:hover { box-shadow: 0 8px 24px rgba(88,101,242,0.15); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .ue-card, .ep { border-radius: 2px; }
    .news-grid { grid-template-columns: 1fr; }
}

/* ============================================
   ANIMATIONS — minimal
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.4s ease-out; }
