/* ============================================
   DayZ Portal — WARZONE COMMAND
   Cinematic AAA Gaming UI
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Rubik:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap&subset=cyrillic');

/* ── Variables ── */
:root {
    --void: #050507;
    --bg: #08080b;
    --surface: #0d0d12;
    --surface-2: #111118;
    --surface-3: #16161f;
    --glass: rgba(11,11,17,0.65);
    --glass-thick: rgba(11,11,17,0.85);
    --input-bg: #0a0a0f;

    --line: rgba(255,255,255,0.05);
    --line-2: rgba(255,255,255,0.08);
    --line-accent: rgba(232,93,47,0.35);

    --text: #9a9ab0;
    --text-dim: #55556a;
    --text-sub: #6e6e88;
    --text-hi: #e8e8f0;

    /* Ember orange — warm, aggressive, survival-themed */
    --accent: #e85d2f;
    --accent-bright: #ff7043;
    --accent-glow: rgba(232,93,47,0.45);
    --accent-dim: rgba(232,93,47,0.08);

    --cyan: #4dd0e1;
    --cyan-glow: rgba(77,208,225,0.25);
    --green: #66bb6a;
    --red: #ef5350;
    --gold: #ffa726;

    --font-display: 'Oswald', sans-serif;
    --font-body: 'Rubik', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --r: 10px;
    --r-lg: 14px;
    --r-xl: 18px;
    --speed: 0.28s;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--void);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Ambient World Light ── */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 900px 700px at 5% 95%, rgba(232,93,47,0.05) 0%, transparent 60%),
        radial-gradient(ellipse 700px 900px at 95% 5%, rgba(77,208,225,0.03) 0%, transparent 60%),
        radial-gradient(ellipse 500px 500px at 50% 40%, rgba(255,167,38,0.015) 0%, transparent 50%);
}

/* ── Grain ── */
body::after {
    content: '';
    position: fixed; inset: 0; z-index: 9999; pointer-events: none;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

a { color: var(--accent); text-decoration: none; transition: color var(--speed) var(--ease); }
a:hover { color: var(--accent-bright); }
img { max-width: 100%; height: auto; display: block; }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-hi);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
h1 { font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: 2rem; }
h3 { font-size: 1.55rem; }
h4 { font-size: 1.2rem; }
.mono { font-family: var(--font-mono); }

/* ── Glitch ── */
.glitch { position: relative; display: inline-block; }
.glitch::before,.glitch::after {
    content: attr(data-text); position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; overflow: hidden;
}
.glitch::before { color: var(--accent); z-index: -1; animation: gA 5s infinite; }
.glitch::after { color: var(--cyan); z-index: -2; animation: gB 3s infinite; }
@keyframes gA {
    0%,93% { clip-path: inset(0 0 100% 0); }
    94% { clip-path: inset(10% 0 50% 0); transform: translateX(-5px); }
    96% { clip-path: inset(60% 0 5% 0); transform: translateX(5px); }
    100% { clip-path: inset(0 0 100% 0); }
}
@keyframes gB {
    0%,91% { clip-path: inset(0 0 100% 0); }
    92% { clip-path: inset(40% 0 20% 0); transform: translateX(4px); }
    95% { clip-path: inset(5% 0 65% 0); transform: translateX(-4px); }
    100% { clip-path: inset(0 0 100% 0); }
}

/* ── Layout ── */
.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.page-content { padding: 40px 0; }

.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:1024px){ .grid-4,.grid-3{grid-template-columns:repeat(2,1fr);} }
@media(max-width:640px){ .grid-2,.grid-3,.grid-4{grid-template-columns:1fr;} }

/* ═══════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════ */
.nav {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(5,5,7,0.55);
    backdrop-filter: blur(40px) saturate(1.8);
    -webkit-backdrop-filter: blur(40px) saturate(1.8);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.4s ease;
}
/* Glow line at bottom */
.nav::after {
    content: ''; position: absolute; bottom: -1px; left: 5%; right: 5%; height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-glow) 30%, var(--accent) 50%, var(--accent-glow) 70%, transparent 100%);
    opacity: 0.3;
}
/* On scroll — becomes more solid (JS adds .nav-scrolled) */
.nav.nav-scrolled {
    background: rgba(5,5,7,0.88);
}

.nav-inner {
    display: flex; align-items: center; justify-content: space-between; height: 64px;
    overflow: visible;
}

/* Brand / Logo */
.nav-brand {
    display: flex; align-items: center; position: relative;
}
.nav-logo {
    height: 36px; width: auto;
    filter: brightness(0) invert(1) sepia(1) saturate(4) hue-rotate(345deg) brightness(0.85);
    transition: all var(--speed) var(--ease);
}
.nav-brand:hover .nav-logo {
    filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(345deg) brightness(1.1);
    transform: scale(1.06);
}

/* Links container */
.nav-links {
    display: flex; align-items: center; gap: 4px; list-style: none;
}
.nav-links a {
    padding: 8px 20px;
    font-family: var(--font-body); font-size: 0.85rem;
    font-weight: 600; color: var(--text-dim); text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 6px;
    transition: all var(--speed) var(--ease);
    position: relative;
}
.nav-links a:hover {
    color: var(--text-hi);
    background: rgba(255,255,255,0.04);
}
.nav-links a.active {
    color: var(--text-hi);
    background: rgba(232,93,47,0.1);
    border: 1px solid rgba(232,93,47,0.12);
}
.nav-links a.active::after {
    content: ''; position: absolute;
    bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px;
    background: var(--accent); border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Admin button */
.nav-admin-btn {
    margin-left: 8px !important; padding: 8px 20px !important;
    background: linear-gradient(135deg, var(--accent), #c04020) !important;
    border: none !important;
    color: #fff !important; border-radius: 8px !important;
    font-size: 0.85rem !important; font-weight: 600 !important;
    box-shadow: 0 2px 12px rgba(232,93,47,0.25) !important;
    transition: all var(--speed) var(--ease) !important;
}
.nav-admin-btn:hover {
    box-shadow: 0 4px 24px rgba(232,93,47,0.4) !important;
    transform: translateY(-1px) !important;
}

/* Mobile toggle */
.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 10px;
}
.nav-toggle span {
    display: block; width: 20px; height: 2px;
    background: var(--text); border-radius: 1px;
    transition: all var(--speed) var(--ease);
}

@media(max-width:768px){
    .nav-toggle { display: flex; }
    .nav-links {
        display: none; position: absolute; top: 64px; left: 12px; right: 12px;
        flex-direction: column; gap: 4px;
        background: rgba(5,5,7,0.95);
        backdrop-filter: blur(30px);
        border: 1px solid var(--line);
        border-radius: var(--r-lg);
        padding: 12px;
        box-shadow: 0 16px 48px rgba(0,0,0,0.6);
    }
    .nav-links.open { display: flex; }
    .nav-links a { border-radius: var(--r); }
}

/* ═══════════════════════════════════
   HERO — Cinematic
   ═══════════════════════════════════ */
.hero {
    position: relative; min-height: 520px; display: flex; align-items: center;
    overflow: hidden;
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: var(--void);
}

/* Dark cinematic overlay — left side dark for text readability */
.hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(90deg, rgba(5,5,7,0.93) 0%, rgba(5,5,7,0.75) 35%, rgba(5,5,7,0.35) 65%, rgba(5,5,7,0.2) 100%),
        linear-gradient(0deg, rgba(5,5,7,1) 0%, rgba(5,5,7,0) 25%),
        linear-gradient(180deg, rgba(5,5,7,0.7) 0%, rgba(5,5,7,0) 15%);
}

/* Color accent glows over image */
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background:
        radial-gradient(ellipse 500px 400px at 5% 90%, rgba(232,93,47,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 300px 300px at 85% 25%, rgba(77,208,225,0.04) 0%, transparent 60%);
}

/* Diagonal scan lines */
.hero::after {
    content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 80px,
        rgba(232,93,47,0.006) 80px,
        rgba(232,93,47,0.006) 81px
    );
}

.hero-corners {
    position: absolute; inset: 32px; z-index: 2; pointer-events: none;
}
.hero-corners::before,.hero-corners::after {
    content: ''; position: absolute; width: 60px; height: 60px;
    border-color: rgba(232,93,47,0.12); border-style: solid;
}
.hero-corners::before { top: 0; left: 0; border-width: 2px 0 0 2px; }
.hero-corners::after { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* Hero title — pinned bottom-left, cinematic */
.hero-title {
    position: absolute; bottom: 60px; left: 48px;
    z-index: 3;
}
.hero-title h1 {
    font-size: clamp(3.5rem, 7vw, 6.5rem); font-weight: 700;
    line-height: 0.9; margin: 0;
    text-shadow: 0 4px 40px rgba(0,0,0,0.7), 0 0 80px rgba(232,93,47,0.06);
}
.hero-accent {
    color: var(--accent);
    text-shadow: 0 0 50px var(--accent-glow), 0 4px 40px rgba(0,0,0,0.5);
}

/* Info strip — bottom-right */
.hero-info {
    position: absolute; bottom: 68px; right: 48px;
    z-index: 3; text-align: right;
}
.hero-info-tag {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: 0.65rem; color: var(--accent);
    text-transform: uppercase; letter-spacing: 0.25em;
    padding: 5px 14px;
    border: 1px solid rgba(232,93,47,0.12);
    border-radius: var(--r);
    background: rgba(5,5,7,0.5);
    backdrop-filter: blur(16px);
    margin-bottom: 10px;
}
.hero-dot {
    width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-glow);
    animation: hero-blink 2s ease-in-out infinite;
}
@keyframes hero-blink { 0%,100%{opacity:1} 50%{opacity:0.15} }

.hero-info-text {
    font-family: var(--font-mono); font-size: 0.65rem;
    color: rgba(255,255,255,0.25); letter-spacing: 0.03em;
}

/* Scroll indicator — bottom center */
.hero-scroll {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    z-index: 3;
}
.hero-scroll-line {
    width: 1px; height: 36px;
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
    animation: scroll-breathe 2.5s ease-in-out infinite;
}
@keyframes scroll-breathe {
    0%,100% { opacity: 0.2; transform: scaleY(0.8); }
    50% { opacity: 0.7; transform: scaleY(1.15); }
}

@media(max-width:768px){
    .hero-title { bottom: 70px; left: 20px; right: 20px; }
    .hero-title h1 { font-size: 2.8rem; }
    .hero-info { display: none; }
}

/* ═══════════════════════════════════
   ANIMATED BORDER CARD COMPONENT
   Used by server-card and news card
   ═══════════════════════════════════ */
@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes spin-border { to { --border-angle: 360deg; } }

/* Fallback for browsers without @property support */
@keyframes spin-border-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.glow-card {
    position: relative; border-radius: var(--r-lg); overflow: hidden;
    background: var(--surface); transition: all var(--speed) var(--ease);
}
/* Animated rotating gradient border — visible on hover */
.glow-card::before {
    content: ''; position: absolute; inset: -1px;
    border-radius: var(--r-lg);
    background: conic-gradient(from var(--border-angle), transparent 40%, var(--accent) 50%, transparent 60%);
    animation: spin-border 4s linear infinite;
    opacity: 0; transition: opacity 0.4s ease;
    z-index: -1;
}
.glow-card::after {
    content: ''; position: absolute; inset: 1px;
    border-radius: calc(var(--r-lg) - 1px);
    background: var(--surface);
    z-index: -1;
}
.glow-card:hover::before { opacity: 1; }
.glow-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 40px rgba(232,93,47,0.06);
}

/* Static border (non-hover) */
.glow-card { border: 1px solid var(--line); }
.glow-card:hover { border-color: transparent; }

/* ═══════════════════════════════════
   SERVER CARDS — Tactical HUD
   ═══════════════════════════════════ */
.server-card {
    position: relative; border-radius: var(--r-lg); overflow: hidden;
    background: var(--surface); border: 1px solid var(--line);
    transition: all var(--speed) var(--ease);
}
.server-card::before {
    content: ''; position: absolute; inset: -2px;
    border-radius: var(--r-lg);
    background: conic-gradient(from var(--border-angle), transparent 30%, var(--accent) 50%, var(--cyan) 65%, transparent 80%);
    animation: spin-border 6s linear infinite;
    opacity: 0; transition: opacity 0.4s ease;
    z-index: 0;
}
.server-card::after {
    content: ''; position: absolute; inset: 1px;
    border-radius: calc(var(--r-lg) - 1px);
    background: var(--surface);
    z-index: 0;
}
.server-card > * { position: relative; z-index: 1; }
.server-card:hover::before { opacity: 0.8; }
.server-card:hover { border-color: transparent; }

.server-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(232,93,47,0.03) 0%, transparent 100%);
}
.server-name {
    font-family: var(--font-display); font-size: 1.1rem; font-weight: 600;
    color: var(--text-hi); text-transform: uppercase; letter-spacing: 0.04em;
}
.server-status {
    display: flex; align-items: center; gap: 7px;
    font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase;
}

.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
}
.status-dot.online {
    background: var(--green);
    box-shadow: 0 0 10px var(--green), 0 0 3px var(--green);
    animation: glow-pulse 2s ease-in-out infinite;
}
.status-dot.offline {
    background: var(--red);
    box-shadow: 0 0 8px rgba(239,83,80,0.4);
}
@keyframes glow-pulse {
    0%,100% { box-shadow: 0 0 10px currentColor, 0 0 3px currentColor; }
    50% { box-shadow: 0 0 4px currentColor, 0 0 1px currentColor; opacity: 0.5; }
}

.server-body { padding: 20px; }
.server-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.server-stat { text-align: center; }
.server-stat-label {
    font-family: var(--font-mono); font-size: 0.58rem;
    color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.2em;
    margin-bottom: 4px;
}
.server-stat-value {
    font-family: var(--font-display); font-size: 1.6rem; font-weight: 600;
    color: var(--text-hi);
}
.server-stat-value .highlight {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.server-players-bar {
    margin-top: 16px; height: 3px;
    background: rgba(255,255,255,0.03); border-radius: 2px; overflow: hidden;
}
.server-players-bar-fill {
    height: 100%; border-radius: 2px;
    transition: width 0.8s var(--ease);
    background: linear-gradient(90deg, rgba(102,187,106,0.6), var(--green));
    box-shadow: 0 0 10px rgba(102,187,106,0.3);
}
.server-players-bar-fill.high {
    background: linear-gradient(90deg, rgba(255,167,38,0.6), var(--gold));
    box-shadow: 0 0 10px rgba(255,167,38,0.3);
}
.server-players-bar-fill.full {
    background: linear-gradient(90deg, rgba(239,83,80,0.6), var(--red));
    box-shadow: 0 0 10px rgba(239,83,80,0.3);
}

.server-footer {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--line);
    font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-dim);
}

/* Copy IP button — matches crown button height */
.copy-ip-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px;
    padding: 0 14px;
    font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600;
    color: var(--text-hi);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line-2);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--speed) var(--ease);
    white-space: nowrap;
    box-sizing: border-box;
    flex-shrink: 0;
}
.copy-ip-btn:hover {
    color: var(--cyan);
    border-color: rgba(77,208,225,0.25);
    background: rgba(77,208,225,0.04);
}
.copy-ip-btn svg { opacity: 0.5; transition: opacity var(--speed) ease; flex-shrink: 0; }
.copy-ip-btn:hover svg { opacity: 1; }

.copy-ip-done {
    display: none;
    color: var(--green);
}
.copy-ip-btn.copied .copy-ip-text { display: none; }
.copy-ip-btn.copied .copy-ip-done { display: inline; }
.copy-ip-btn.copied {
    color: var(--green);
    border-color: rgba(102,187,106,0.25);
    background: rgba(102,187,106,0.06);
}
.copy-ip-btn.copied svg { stroke: var(--green); opacity: 1; }

.copy-ip-sm { height: 32px; padding: 0 10px; font-size: 0.6rem; }

/* ═══════════════════════════════════
   NEWS CARDS — Cinematic
   ═══════════════════════════════════ */
.card {
    position: relative; border-radius: var(--r-lg); overflow: hidden;
    background: var(--surface); border: 1px solid var(--line);
    transition: all var(--speed) var(--ease);
    display: flex; flex-direction: column;
}
.card::before {
    content: ''; position: absolute; inset: -2px;
    border-radius: var(--r-lg);
    background: conic-gradient(from var(--border-angle), transparent 35%, var(--accent) 50%, transparent 65%);
    animation: spin-border 6s linear infinite;
    opacity: 0; transition: opacity 0.4s ease;
    z-index: 0;
}
.card::after {
    content: ''; position: absolute; inset: 1px;
    border-radius: calc(var(--r-lg) - 1px);
    background: var(--surface);
    z-index: 0;
}
.card > * { position: relative; z-index: 1; }
.card:hover::before { opacity: 0.6; }
.card:hover { border-color: transparent; }

.card-image-wrap {
    position: relative; overflow: hidden; height: 210px;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.card-image-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
    filter: brightness(0.85) saturate(0.9);
}
.card:hover .card-image-wrap img {
    transform: scale(1.1);
    filter: brightness(1) saturate(1.1);
}
/* Cinematic gradient over image */
.card-image-wrap::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(0deg,
        var(--surface) 0%,
        rgba(13,13,18,0.6) 30%,
        rgba(13,13,18,0) 60%
    );
    pointer-events: none;
}

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.card-meta {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-family: var(--font-mono); font-size: 0.66rem;
    color: var(--text-dim); margin-bottom: 10px;
}
.card-meta .tag {
    padding: 2px 10px; background: var(--accent-dim);
    border: 1px solid rgba(232,93,47,0.12); border-radius: 5px;
    color: var(--accent); font-size: 0.6rem; text-transform: uppercase;
    letter-spacing: 0.06em;
}

.card-title {
    font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
    color: var(--text-hi); margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.2;
}

.card-excerpt {
    font-size: 0.88rem; color: var(--text-sub); line-height: 1.6;
    font-weight: 400;
}

/* ═══════════════════════════════════
   BUTTONS
   ═══════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; font-family: var(--font-display); font-size: 1rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
    border: none; cursor: pointer; border-radius: var(--r);
    transition: all var(--speed) var(--ease); position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #c04020 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(232,93,47,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover {
    box-shadow: 0 8px 35px rgba(232,93,47,0.45), inset 0 1px 0 rgba(255,255,255,0.15), 0 0 20px rgba(232,93,47,0.15);
    transform: translateY(-2px); color: #fff;
}

.btn-secondary {
    background: rgba(255,255,255,0.03); color: var(--text);
    border: 1px solid var(--line-2);
    backdrop-filter: blur(8px);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.06); color: var(--text-hi);
    border-color: rgba(255,255,255,0.12);
}

.btn-sm { padding: 7px 16px; font-size: 0.85rem; }
.btn-gold { background: linear-gradient(135deg, var(--gold), #e09000); color: #000; }
.btn-gold:hover { box-shadow: 0 4px 25px rgba(255,167,38,0.35); }

.btn-danger {
    background: transparent; color: var(--red);
    border: 1px solid rgba(239,83,80,0.15);
}
.btn-danger:hover { background: rgba(239,83,80,0.08); box-shadow: 0 0 15px rgba(239,83,80,0.08); }

/* ═══════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════ */
.section-header {
    display: flex; align-items: center; gap: 16px; margin-bottom: 36px;
}
.section-header::before {
    content: ''; width: 4px; height: 30px;
    background: linear-gradient(180deg, var(--accent), rgba(232,93,47,0.1));
    border-radius: 2px; flex-shrink: 0;
    box-shadow: 0 0 10px var(--accent-glow);
}
.section-header h2 { font-size: 1.8rem; margin: 0; }
.section-header .section-line {
    flex: 1; height: 1px;
    background: linear-gradient(90deg, var(--line-2), transparent 80%);
}

/* ═══════════════════════════════════
   FOOTER
   ═══════════════════════════════════ */
.footer {
    padding: 0; margin-top: 60px;
    background: var(--surface);
    position: relative; z-index: 1;
}
.footer-glow-line {
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, var(--accent-glow) 30%, var(--accent) 50%, var(--accent-glow) 70%, transparent 95%);
    opacity: 0.4;
}
.footer-grid {
    display: grid; grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px; padding: 48px 0 40px;
}
@media(max-width:768px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

.footer-col-brand { max-width: 380px; }

.footer-logo {
    height: 36px; width: auto;
    filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(345deg) brightness(0.8);
    margin-bottom: 16px;
    transition: filter var(--speed) var(--ease);
}
.footer-logo:hover { filter: brightness(0) invert(1) sepia(1) saturate(4) hue-rotate(345deg) brightness(1); }

.footer-desc {
    font-size: 0.88rem; color: var(--text-dim); line-height: 1.65; margin-bottom: 20px;
}
.footer-heading {
    font-family: var(--font-display); font-size: 1rem; font-weight: 600;
    color: var(--text); text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 16px; position: relative; padding-bottom: 10px;
}
.footer-heading::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 24px; height: 2px; background: var(--accent); border-radius: 1px;
}
.footer-links {
    list-style: none; display: flex; flex-direction: column; gap: 10px;
}
.footer-links a {
    font-size: 0.88rem; color: var(--text-dim);
    transition: all var(--speed) var(--ease);
    display: inline-flex; align-items: center; gap: 6px;
}
.footer-links a::before {
    content: ''; width: 0; height: 1px; background: var(--accent);
    transition: width var(--speed) var(--ease);
}
.footer-links a:hover { color: var(--text-hi); }
.footer-links a:hover::before { width: 12px; }

.footer-social { display: flex; gap: 8px; }
.social-icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.02); border: 1px solid var(--line);
    border-radius: 8px; color: var(--text-dim);
    transition: all var(--speed) var(--ease);
}
.social-icon-btn svg { width: 18px; height: 18px; }
.social-icon-btn:hover {
    color: var(--accent); border-color: rgba(232,93,47,0.25);
    background: var(--accent-dim);
    box-shadow: 0 0 16px rgba(232,93,47,0.08);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 0; border-top: 1px solid var(--line);
    font-size: 0.78rem; color: var(--text-dim);
}
.footer-powered { font-family: var(--font-mono); font-size: 0.7rem; }
@media(max-width:640px) { .footer-bottom { flex-direction: column; gap: 8px; text-align: center; } }

/* ═══════════════════════════════════
   FORMS
   ═══════════════════════════════════ */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block; font-family: var(--font-display); font-size: 0.95rem;
    font-weight: 500; color: var(--text-sub); text-transform: uppercase;
    letter-spacing: 0.06em; margin-bottom: 6px;
}
.form-input,.form-textarea,.form-select {
    width: 100%; padding: 12px 16px; font-family: var(--font-body); font-size: 0.92rem;
    color: var(--text); background: var(--input-bg);
    border: 1px solid var(--line); border-radius: var(--r);
    transition: all var(--speed) var(--ease);
}
.form-input:focus,.form-textarea:focus,.form-select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232,93,47,0.08), 0 0 20px rgba(232,93,47,0.04);
}
.form-textarea { min-height: 120px; resize: vertical; }

/* ═══════════════════════════════════
   TABLES
   ═══════════════════════════════════ */
.table-wrap {
    overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg);
    background: var(--surface);
}
table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface-2); }
th {
    font-family: var(--font-display); font-size: 0.88rem; font-weight: 500;
    color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.06em;
    padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line);
}
td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
tr:hover td { background: rgba(232,93,47,0.015); }

/* ═══════════════════════════════════
   BADGES / ALERTS / PAGINATION
   ═══════════════════════════════════ */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; font-family: var(--font-mono); font-size: 0.66rem;
    text-transform: uppercase; border-radius: 6px;
}
.badge-success { background: rgba(102,187,106,0.08); color: var(--green); border: 1px solid rgba(102,187,106,0.12); }
.badge-danger { background: rgba(239,83,80,0.08); color: var(--red); border: 1px solid rgba(239,83,80,0.12); }
.badge-warning { background: rgba(255,167,38,0.08); color: var(--gold); border: 1px solid rgba(255,167,38,0.12); }

.alert {
    padding: 14px 20px 14px 28px; border: 1px solid var(--line);
    border-radius: var(--r); margin-bottom: 20px;
    font-size: 0.9rem; position: relative; background: var(--surface);
}
.alert::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; border-radius: 3px 0 0 3px;
}
.alert-success::before { background: var(--green); box-shadow: 0 0 8px rgba(102,187,106,0.3); }
.alert-danger::before { background: var(--red); box-shadow: 0 0 8px rgba(239,83,80,0.3); }
.alert-warning::before { background: var(--gold); box-shadow: 0 0 8px rgba(255,167,38,0.3); }

.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 36px; }
.pagination a,.pagination span {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; font-family: var(--font-mono); font-size: 0.88rem;
    border: 1px solid var(--line); background: var(--surface);
    color: var(--text-sub); border-radius: var(--r); transition: all var(--speed) var(--ease);
}
.pagination a:hover { border-color: var(--line-2); color: var(--text-hi); background: var(--surface-2); }
.pagination .active {
    background: var(--accent); color: #fff; border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* News detail */
.news-content { font-size: 1.05rem; line-height: 1.85; color: var(--text); font-weight: 400; }
.news-content p { margin-bottom: 16px; }
.news-content h2,.news-content h3 { margin: 36px 0 16px; }
.news-content img { border: 1px solid var(--line); border-radius: var(--r); margin: 24px 0; }

/* ═══════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════ */
.fade-in { opacity: 0; transform: translateY(24px); animation: fadeUp 0.7s var(--ease) forwards; }
.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.28s; }
.fade-in-delay-4 { animation-delay: 0.36s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════
   ADMIN
   ═══════════════════════════════════ */
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

/* Sleek sidebar with subtle accent line on left */
.admin-sidebar {
    background: #0a0a0e;
    border-right: 1px solid rgba(255,255,255,0.04);
    padding: 0;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column;
}
/* Brand area with bottom border */
.admin-sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-hi);
    display: flex; align-items: center; gap: 10px;
}
.admin-sidebar-brand .brand-dot {
    width: 9px; height: 9px; background: #e85d2f; border-radius: 50%;
    box-shadow: 0 0 10px rgba(232,93,47,0.5);
}
/* Nav links — clean, with left accent on active, icon support */
.admin-nav { list-style: none; }
.admin-nav a {
    padding: 10px 24px;
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    border-left: 3px solid transparent;
    transition: all 0.25s ease;
    display: flex; align-items: center; gap: 10px;
}
.admin-nav a:hover { background: rgba(255,255,255,0.02); color: #e8e8f0; }
.admin-nav a.active {
    border-left-color: #e85d2f;
    background: rgba(232,93,47,0.06);
    color: #e8e8f0;
}
/* Nav section dividers */
.admin-nav-section {
    padding: 16px 24px 6px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.2);
    font-family: var(--font-mono);
}
/* Bottom bar in sidebar */
.admin-sidebar-bottom {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: auto;
}
.admin-sidebar-bottom a { font-size: 0.8rem; color: rgba(255,255,255,0.35); transition: color 0.2s ease; }
.admin-sidebar-bottom a:hover { color: #e8e8f0; }
.admin-sidebar-bottom .admin-user-info {
    font-size: 0.75rem; color: rgba(255,255,255,0.25);
    margin-bottom: 10px; font-family: var(--font-mono);
}

.admin-main { padding: 36px; overflow-y: auto; }
/* Admin header */
.admin-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 28px; padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.admin-header h2 { font-size: 1.5rem; }

/* Stat cards improved */
.stat-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 20px;
    display: flex; align-items: center; gap: 16px;
    transition: all var(--speed) var(--ease);
}
.stat-card:hover { border-color: rgba(232,93,47,0.1); box-shadow: 0 0 25px rgba(232,93,47,0.03); }
.stat-icon {
    width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; background: var(--accent-dim);
    border: 1px solid rgba(232,93,47,0.08); border-radius: 10px;
}
.stat-value {
    font-family: var(--font-display); font-size: 2.2rem; font-weight: 700;
    color: var(--text-hi); line-height: 1;
}
.stat-label {
    font-family: var(--font-mono); font-size: 0.66rem;
    color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.12em;
}

/* Better aligned tables */
.table-wrap { border-radius: 12px; overflow: hidden; }
.admin-main table { width: 100%; border-collapse: collapse; }
.admin-main thead { background: rgba(255,255,255,0.02); }
.admin-main th { padding: 14px 16px; font-size: 0.78rem; font-weight: 600; text-align: left; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid rgba(255,255,255,0.04); }
.admin-main td { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.03); vertical-align: middle; }
.admin-main tr:last-child td { border-bottom: none; }

/* Custom checkbox */
.custom-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.custom-check input[type="checkbox"] { display: none; }
.custom-check .check-box {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: rgba(255,255,255,0.02);
}
.custom-check input:checked + .check-box {
    background: #e85d2f;
    border-color: #e85d2f;
    box-shadow: 0 0 12px rgba(232,93,47,0.3);
}
.custom-check input:checked + .check-box::after {
    content: '\2713';
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}
.custom-check .check-label {
    font-size: 0.9rem;
    color: #9a9ab0;
}
.custom-check:hover .check-box { border-color: rgba(255,255,255,0.2); }

/* Custom select */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e88' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Admin unified item cards */
.admin-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    gap: 16px;
}
.admin-item:hover {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.07);
}
.admin-item-info { flex: 1; min-width: 0; }
.admin-item-title { font-weight: 600; color: #e8e8f0; font-size: 0.92rem; }
.admin-item-meta { font-size: 0.72rem; color: #55556a; margin-top: 3px; font-family: 'IBM Plex Mono', monospace; }
.admin-item-actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: 12px; }

/* Admin two-column form layout */
.admin-split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media(max-width:1024px) { .admin-split { grid-template-columns: 1fr; } }
.admin-split-list h3, .admin-split-form h3 {
    font-size: 1.1rem; margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Module card */
.module-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}
.module-card:hover {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.07);
}
.module-info { flex: 1; }
.module-name { font-weight: 700; color: #e8e8f0; font-size: 1rem; }
.module-desc { font-size: 0.82rem; color: #6e6e88; margin-top: 4px; }
.module-meta { font-size: 0.7rem; color: #3e3e50; margin-top: 4px; font-family: 'IBM Plex Mono', monospace; }

/* Nav login button */
.nav-login-btn {
    display: flex !important; align-items: center; gap: 7px;
    padding: 7px 18px !important;
    background: linear-gradient(135deg, #1b2838, #171a21) !important;
    border: 1px solid rgba(102,192,244,0.15) !important;
    border-radius: 8px !important;
    color: #66c0f4 !important;
    font-size: 0.85rem !important; font-weight: 600 !important;
    transition: all 0.25s ease !important;
}
.nav-login-btn:hover {
    border-color: rgba(102,192,244,0.35) !important;
    box-shadow: 0 0 16px rgba(102,192,244,0.1) !important;
    color: #fff !important;
}

/* Steam login button */
.steam-login-btn {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; padding: 14px 24px;
    font-family: var(--font-display); font-size: 1.1rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(135deg, #1b2838, #171a21);
    border: 1px solid rgba(102,192,244,0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}
.steam-login-btn:hover {
    background: linear-gradient(135deg, #2a475e, #1b2838);
    border-color: rgba(102,192,244,0.4);
    box-shadow: 0 4px 24px rgba(102,192,244,0.15);
    color: #66c0f4;
    transform: translateY(-2px);
}
.steam-login-btn svg { opacity: 0.8; }
.steam-login-btn:hover svg { opacity: 1; }

/* ═══════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════ */
.settings-group {
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}
.settings-group-header {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.015);
    border-bottom: 1px solid var(--line);
}
.settings-group-header h3 {
    font-size: 1rem; font-weight: 600; margin: 0;
    letter-spacing: 0.03em;
}
.settings-group-icon {
    font-size: 1rem; opacity: 0.5;
}
.settings-group-body {
    padding: 8px 0;
}
.settings-field {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: start;
    padding: 14px 20px;
    gap: 20px;
    transition: background 0.2s ease;
}
.settings-field:hover {
    background: rgba(255,255,255,0.01);
}
.settings-field-label {
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
    color: var(--text-sub);
    padding-top: 10px;
}
.settings-field-input {
    min-width: 0;
}
.settings-field-input .form-input,
.settings-field-input .form-textarea {
    max-width: 500px;
}

@media (max-width: 768px) {
    .settings-field {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .settings-field-label { padding-top: 0; }
}

/* ═══════════════════════════════════
   INSTALL WIZARD
   ═══════════════════════════════════ */
.install-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 36px;
    background: radial-gradient(ellipse at 50% 50%, var(--surface) 0%, var(--void) 70%);
}
.install-card {
    width: 100%; max-width: 540px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-xl); padding: 48px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 60px rgba(232,93,47,0.03);
}
.install-steps { display: flex; gap: 6px; margin-bottom: 36px; }
.install-step { flex: 1; height: 3px; background: var(--line); border-radius: 2px; transition: all 0.4s ease; }
.install-step.active { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.install-step.done { background: var(--green); }
.install-title { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 24px; text-align: center; }
.req-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem;
}
.req-ok { color: var(--green); }
.req-fail { color: var(--red); }

/* ═══════════════════════════════════
   VIDEO SECTION
   ═══════════════════════════════════ */
.video-section {
    padding: 48px 0 56px;
    position: relative; z-index: 1;
}

/* Features + Video layout */
.features-video-layout {
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 24px;
    align-items: stretch;
}
@media (max-width: 1100px) {
    .features-video-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .features-video-layout .video-center { order: -1; }
}

.features-col {
    display: flex; flex-direction: column; gap: 12px;
}

.feature-item {
    display: flex; gap: 12px; align-items: center;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    transition: all var(--speed) var(--ease);
    flex: 1;
    cursor: pointer;
}
.feature-item:hover {
    border-color: rgba(232,93,47,0.18);
    background: var(--surface-2);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 0 12px rgba(232,93,47,0.04);
}

.feature-icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    background: var(--accent-dim);
    border: 1px solid rgba(232,93,47,0.08);
    border-radius: 8px;
}

.feature-text { min-width: 0; }

.feature-title {
    font-family: var(--font-display); font-size: 0.95rem; font-weight: 600;
    color: var(--text-hi); text-transform: uppercase;
    letter-spacing: 0.02em; line-height: 1.2;
}

.feature-desc {
    font-size: 0.8rem; color: var(--text-sub); line-height: 1.45;
    font-weight: 400; margin-top: 2px;
}

.video-center {
    display: flex; align-items: center;
}

.video-wrapper {
    position: relative; width: 100%;
}

/* Ambient glow behind video */
.video-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.15;
    border-radius: 30px;
    filter: blur(40px);
    z-index: 0;
    animation: video-glow-pulse 5s ease-in-out infinite;
}
@keyframes video-glow-pulse {
    0%, 100% { opacity: 0.12; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(1.03); }
}

.video-frame {
    position: relative; z-index: 1;
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid var(--line-2);
    background: var(--surface);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(232,93,47,0.04);
    aspect-ratio: 16 / 9;
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* Animated border on hover */
.video-frame::before {
    content: ''; position: absolute; inset: -2px;
    border-radius: var(--r-xl);
    background: conic-gradient(from var(--border-angle), transparent 30%, var(--accent) 50%, var(--cyan) 65%, transparent 80%);
    animation: spin-border 6s linear infinite;
    opacity: 0; transition: opacity 0.5s ease;
    z-index: -1;
}
.video-frame::after {
    content: ''; position: absolute; inset: 1px;
    border-radius: calc(var(--r-xl) - 1px);
    background: var(--surface);
    z-index: -1;
}
.video-wrapper:hover .video-frame::before { opacity: 0.5; }
.video-wrapper:hover .video-frame { border-color: transparent; }

/* ═══════════════════════════════════
   MONITOR VIEW TOGGLE + GRID/LIST
   ═══════════════════════════════════ */
/* Live auto-refresh badge */
.auto-refresh-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 14px;
    font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
    color: var(--green);
    background: rgba(76,175,80,0.06);
    border: 1px solid rgba(76,175,80,0.15);
    border-radius: 8px;
    letter-spacing: 0.1em;
    cursor: default;
}
.auto-refresh-dot {
    width: 7px; height: 7px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(76,175,80,0.6);
    animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(76,175,80,0.6); }
    50% { opacity: 0.4; box-shadow: 0 0 3px rgba(76,175,80,0.3); }
}

/* Grid view — forced row */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.servers-grid .server-card { width: 100%; }
@media (min-width: 1200px) {
    .servers-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .servers-grid { grid-template-columns: 1fr; }
}

/* List view — full width rows */
.servers-list {
    display: flex; flex-direction: column; gap: 8px;
}

.server-row {
    display: grid;
    grid-template-columns: 36px 1fr 160px 90px 80px 140px auto;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: all var(--speed) var(--ease);
    position: relative;
}
.server-row::before {
    content: ''; position: absolute; inset: -2px;
    border-radius: var(--r-lg);
    background: conic-gradient(from var(--border-angle), transparent 30%, var(--accent) 50%, var(--cyan) 65%, transparent 80%);
    animation: spin-border 6s linear infinite;
    opacity: 0; transition: opacity 0.4s ease; z-index: -1;
}
.server-row::after {
    content: ''; position: absolute; inset: 1px;
    border-radius: calc(var(--r-lg) - 1px);
    background: var(--surface); z-index: -1;
}
.server-row:hover::before { opacity: 0.6; }
.server-row:hover { border-color: transparent; }

.server-row-status { display: flex; align-items: center; justify-content: center; }

.server-row-name {
    font-family: var(--font-display); font-size: 1.1rem; font-weight: 600;
    color: var(--text-hi); text-transform: uppercase; letter-spacing: 0.02em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.server-row-players {
    display: flex; flex-direction: column; gap: 4px;
}
.server-row-bar {
    height: 3px; background: rgba(255,255,255,0.03);
    border-radius: 2px; overflow: hidden;
}

.server-row-label {
    font-family: var(--font-mono); font-size: 0.55rem;
    color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.15em;
}
.server-row-value {
    font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
    color: var(--text-hi);
}
.server-row-value.highlight {
    color: var(--accent); text-shadow: 0 0 15px var(--accent-glow);
}

.server-row-ip {
    font-size: 0.68rem; color: var(--text-dim); text-align: right;
}

/* Vote button — crown icon */
.server-vote-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    color: var(--gold);
    background: rgba(255,167,38,0.06);
    border: 1px solid rgba(255,167,38,0.15);
    border-radius: 8px;
    transition: all var(--speed) var(--ease);
    flex-shrink: 0;
}
.server-vote-btn:hover {
    color: #fff; background: var(--gold);
    box-shadow: 0 0 20px rgba(255,167,38,0.3);
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    .server-row {
        grid-template-columns: 30px 1fr 140px auto;
    }
    .server-row-rank, .server-row-ip, .server-row-map { display: none; }
}
@media (max-width: 640px) {
    .server-row {
        grid-template-columns: 30px 1fr auto;
    }
    .server-row-players { display: none; }
    .servers-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════
   SERVER MODAL
   ═══════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(3,3,5,0.8);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.open {
    opacity: 1; visibility: visible;
}
.modal-overlay.open .modal-card {
    transform: translateY(0) scale(1); opacity: 1;
}

.modal-card {
    width: 100%; max-width: 640px; max-height: 85vh;
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: var(--r-xl);
    box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 60px rgba(232,93,47,0.05);
    display: flex; flex-direction: column;
    transform: translateY(20px) scale(0.97); opacity: 0;
    transition: transform 0.35s var(--ease), opacity 0.35s ease;
}

.modal-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--line);
}
.modal-header h3 {
    font-size: 1.5rem; font-weight: 600; margin: 0;
    line-height: 1.2;
}
.modal-meta {
    display: flex; gap: 12px; margin-top: 8px;
    font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim);
}
.modal-meta .meta-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line);
    border-radius: 6px;
}
.modal-meta .meta-tag.online { color: var(--green); border-color: rgba(102,187,106,0.15); }
.modal-meta .meta-tag.offline { color: var(--red); border-color: rgba(239,83,80,0.15); }

.modal-close {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--line);
    border-radius: var(--r);
    color: var(--text-sub); font-size: 1.3rem;
    cursor: pointer; transition: all var(--speed) var(--ease);
    flex-shrink: 0;
}
.modal-close:hover { color: var(--red); background: rgba(239,83,80,0.06); border-color: rgba(239,83,80,0.15); }

.modal-body {
    padding: 20px 28px 28px;
    overflow-y: auto;
    flex: 1;
}

/* Loader */
.modal-loader {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 40px; color: var(--text-dim);
    font-family: var(--font-mono); font-size: 0.8rem;
}
.loader-spinner {
    width: 32px; height: 32px;
    border: 2px solid var(--line-2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mods list */
.mods-count {
    font-family: var(--font-display); font-size: 1.1rem; font-weight: 500;
    color: var(--text-sub); margin-bottom: 16px;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.mods-count span { color: var(--accent); }

.mod-list { display: flex; flex-direction: column; gap: 6px; }

.mod-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255,255,255,0.015);
    border: 1px solid var(--line);
    border-radius: var(--r);
    transition: all var(--speed) var(--ease);
}
.mod-item:hover {
    background: var(--accent-dim);
    border-color: rgba(232,93,47,0.12);
    transform: translateX(4px);
}
.mod-item-name {
    font-family: var(--font-body); font-size: 0.9rem; font-weight: 500;
    color: var(--text-hi);
}
.mod-item-num {
    font-family: var(--font-mono); font-size: 0.65rem;
    color: var(--text-dim); min-width: 24px; text-align: center;
    margin-right: 10px;
}
.mod-item-link {
    font-family: var(--font-mono); font-size: 0.68rem;
    color: var(--accent); opacity: 0.6;
    transition: opacity var(--speed) ease;
}
.mod-item:hover .mod-item-link { opacity: 1; }

.mod-item-left {
    display: flex; align-items: center; gap: 8px;
    min-width: 0; flex: 1;
}

/* Server info grid in modal */
.modal-server-info {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 12px; margin-bottom: 20px;
    padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.modal-info-item { text-align: center; }
.modal-info-label {
    font-family: var(--font-mono); font-size: 0.58rem;
    color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.15em;
    margin-bottom: 4px;
}
.modal-info-value {
    font-family: var(--font-display); font-size: 1.2rem; font-weight: 600;
    color: var(--text-hi);
}

/* ═══════════════════════════════════
   TOOLTIP
   ═══════════════════════════════════ */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
/* Tooltip bubble */
[data-tooltip]::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 10px);
    left: 50%; transform: translateX(-50%) translateY(6px);
    padding: 8px 14px;
    font-family: var(--font-body); font-size: 0.78rem; font-weight: 500;
    color: var(--text-hi);
    background: var(--surface-3);
    border: 1px solid var(--line-2);
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 15px rgba(232,93,47,0.05);
    backdrop-filter: blur(12px);
}
/* Arrow */
[data-tooltip]::before {
    content: '';
    bottom: calc(100% + 4px);
    left: 50%; transform: translateX(-50%) translateY(6px);
    border: 6px solid transparent;
    border-top-color: var(--surface-3);
}
/* Show on hover */
[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Position: bottom */
[data-tooltip-pos="bottom"]::after {
    bottom: auto; top: calc(100% + 10px);
    transform: translateX(-50%) translateY(-6px);
}
[data-tooltip-pos="bottom"]::before {
    bottom: auto; top: calc(100% + 4px);
    border-top-color: transparent;
    border-bottom-color: var(--surface-3);
    transform: translateX(-50%) translateY(-6px);
}
[data-tooltip-pos="bottom"]:hover::before,
[data-tooltip-pos="bottom"]:hover::after {
    transform: translateX(-50%) translateY(0);
}

/* Position: left */
[data-tooltip-pos="left"]::after {
    bottom: auto; top: 50%; left: auto;
    right: calc(100% + 10px);
    transform: translateY(-50%) translateX(6px);
}
[data-tooltip-pos="left"]::before {
    bottom: auto; top: 50%; left: auto;
    right: calc(100% + 4px);
    border: 6px solid transparent;
    border-left-color: var(--surface-3);
    transform: translateY(-50%) translateX(6px);
}
[data-tooltip-pos="left"]:hover::before,
[data-tooltip-pos="left"]:hover::after {
    transform: translateY(-50%) translateX(0);
}

/* Position: right */
[data-tooltip-pos="right"]::after {
    bottom: auto; top: 50%; left: calc(100% + 10px);
    transform: translateY(-50%) translateX(-6px);
}
[data-tooltip-pos="right"]::before {
    bottom: auto; top: 50%; left: calc(100% + 4px);
    border: 6px solid transparent;
    border-right-color: var(--surface-3);
    transform: translateY(-50%) translateX(-6px);
}
[data-tooltip-pos="right"]:hover::before,
[data-tooltip-pos="right"]:hover::after {
    transform: translateY(-50%) translateX(0);
}

/* ═══════════════════════════════════
   UTILITIES
   ═══════════════════════════════════ */
.text-center{text-align:center} .text-right{text-align:right}
.text-muted{color:var(--text-dim)} .text-red{color:var(--red)}
.text-green{color:var(--green)} .text-gold{color:var(--gold)}
.mt-1{margin-top:16px} .mt-2{margin-top:24px} .mt-3{margin-top:36px}
.mb-1{margin-bottom:16px} .mb-2{margin-bottom:24px} .mb-3{margin-bottom:36px}
.flex{display:flex} .items-center{align-items:center}
.justify-between{justify-content:space-between}
.gap-1{gap:16px} .gap-2{gap:24px}

@media(max-width:768px){
    .admin-layout{grid-template-columns:1fr}
    .admin-sidebar{position:fixed;left:-260px;z-index:100;transition:left var(--speed) var(--ease)}
    .admin-sidebar.open{left:0}
}
