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

:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,.3);
    --transition: .2s ease;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }

.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}
.container-nav { max-width: 1800px; }

.site-shell {
    width: 100%;
    padding: 0 1.25rem;
    box-sizing: border-box;
}

/* ── Navbar ── */
.navbar {
    position: sticky; top: 0; z-index: 200;
    background: rgba(15,23,42,.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    overflow: visible;
}

.nav-inner {
    display: flex; align-items: center; gap: .75rem;
    height: 64px;
    overflow: visible;
}

.nav-brand {
    display: flex; align-items: center; gap: .5rem;
    font-weight: 700; font-size: 1.1rem; color: var(--text);
    white-space: nowrap; flex-shrink: 0;
}
.nav-brand:hover { color: var(--primary); }
.nav-logo { height: 32px; border-radius: 6px; }

.nav-links {
    display: flex; align-items: center; gap: .125rem;
    flex: 1 1 auto; min-width: 0; justify-content: center;
    overflow: visible;
}

.nav-link {
    padding: .45rem .6rem; border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: .8125rem; font-weight: 500;
    white-space: nowrap; transition: all var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--bg-hover); }

.nav-dropdown { position: relative; z-index: 210; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 180px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    padding: .5rem 0;
    z-index: 220;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 6px;
}
.nav-dropdown-menu a {
    display: block; padding: .5rem 1rem; color: var(--text-muted); font-size: .875rem;
}
.nav-dropdown-menu a:hover { background: var(--bg-hover); color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: .375rem; margin-left: auto; flex-shrink: 0; }
.nav-user {
    display: flex; align-items: center; gap: .375rem;
    color: var(--text); font-size: .8125rem; font-weight: 500;
}

.nav-toggle {
    display: none; flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer; padding: .5rem;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px; transition: var(--transition);
}

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .625rem 1.25rem; border-radius: var(--radius-sm);
    font-size: .875rem; font-weight: 600; font-family: var(--font);
    border: none; cursor: pointer; transition: all var(--transition);
    text-decoration: none; line-height: 1.4;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-steam { background: linear-gradient(90deg, #1b2838, #2a475e); color: #fff; }
.btn-steam:hover { opacity: .9; color: #fff; }
.btn-sm { padding: .375rem .75rem; font-size: .8125rem; }
.btn-block { width: 100%; }

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color var(--transition);
}
.card:hover { border-color: rgba(99,102,241,.3); }

/* ── Hero ── */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
}
.hero-gradient {
    background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(139,92,246,.1), rgba(6,182,212,.08));
    border-bottom: 1px solid var(--border);
}
.hero-content h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: .75rem; }
.hero-content p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ── Layout grid (home m.fl. med sidebar; ellers fuld bredde) ── */
.page-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding: 2rem 0;
}
.page-grid:not(:has(.page-sidebar)),
.page-grid--single {
    display: block;
    grid-template-columns: 1fr;
}
.page-main { min-width: 0; width: 100%; }
.page-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.main-content { flex: 1; min-width: 0; width: 100%; }

/* Ensartet sideindhold */
.page-content { padding: 2rem 0 3rem; }
.page-header-block {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.page-header-block h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; width: 100%; }
.page-header-block .breadcrumb { width: 100%; }
.page-content > .page-header-block,
.page-header {
    margin-bottom: 1.5rem;
}
.page-content .card,
.container > .card { width: 100%; }
.page-content .table { width: 100%; }

/* Profile */
.page-profile .container.profile-page { padding: 2rem 0 3rem; }
.profile-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.page-profile .achievement-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.page-header {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: 2rem 0 1rem;
}
.page-header h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
.breadcrumb { color: var(--text-muted); font-size: .875rem; width: 100%; }
.breadcrumb:hover { color: var(--accent); }

.section { margin-bottom: 2.5rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.section-header h2 { font-size: 1.25rem; font-weight: 700; }

/* ── News Grid ── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

.twitch-live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.twitch-live-card { padding: 0; overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.twitch-live-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(145, 70, 255, .25); }
.twitch-live-thumb { position: relative; aspect-ratio: 16/9; background: #1a1a2e; overflow: hidden; }
.twitch-live-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.twitch-live-badge { position: absolute; top: .5rem; left: .5rem; background: #eb0400; color: #fff; font-size: .7rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px; letter-spacing: .05em; }
.twitch-viewer-count { position: absolute; bottom: .5rem; left: .5rem; background: rgba(0,0,0,.75); color: #fff; font-size: .75rem; padding: .2rem .45rem; border-radius: 4px; }
.twitch-live-body { padding: 1rem; }
.twitch-live-streamer { display: flex; align-items: center; gap: .65rem; margin-bottom: .5rem; }
.twitch-live-streamer strong { display: block; font-size: .95rem; }
.twitch-live-streamer .text-muted { font-size: .8rem; }
.twitch-live-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.twitch-live-title { font-size: .875rem; margin: .35rem 0 .5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.twitch-sidebar-card h3 { margin-bottom: .75rem; }
.twitch-sidebar-list { display: flex; flex-direction: column; gap: .85rem; }
.twitch-sidebar-item { display: flex; gap: .75rem; text-decoration: none; color: inherit; border-radius: var(--radius); padding: .35rem; margin: -.35rem; transition: background .15s; }
.twitch-sidebar-item:hover { background: rgba(145, 70, 255, .08); }
.twitch-sidebar-thumb { position: relative; width: 96px; flex-shrink: 0; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: #1a1a2e; }
.twitch-sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.twitch-sidebar-thumb .twitch-live-badge { top: .25rem; left: .25rem; font-size: .6rem; padding: .1rem .3rem; }
.twitch-sidebar-meta { min-width: 0; flex: 1; }
.twitch-sidebar-streamer { display: flex; align-items: center; gap: .45rem; margin-bottom: .25rem; }
.twitch-sidebar-streamer strong { display: block; font-size: .85rem; line-height: 1.2; }
.twitch-sidebar-streamer .text-muted { font-size: .72rem; }
.twitch-sidebar-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; font-size: .7rem; display: flex; align-items: center; justify-content: center; }
.twitch-sidebar-title { font-size: .78rem; margin: 0 0 .35rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-muted); }
.badge-sm { font-size: .65rem; padding: .1rem .35rem; }

.profile-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-bottom: .25rem; }
.profile-name-row h1 { margin: 0; }
.profile-twitch-live-badge { display: inline-flex; align-items: center; gap: .4rem; background: #9146ff; color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .05em; padding: .25rem .55rem; border-radius: 999px; text-decoration: none; transition: background .15s, transform .15s; }
.profile-twitch-live-badge:hover { background: #7c3aed; transform: scale(1.03); color: #fff; }
.profile-twitch-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: twitch-pulse 1.4s ease-in-out infinite; }
@keyframes twitch-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.85); } }
.profile-twitch-live-card { margin-top: .75rem; padding: .85rem; max-width: 360px; }
.profile-twitch-live-card-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.profile-twitch-live-thumb { width: 100%; border-radius: 6px; aspect-ratio: 16/9; object-fit: cover; display: block; margin-bottom: .5rem; }
.profile-twitch-live-title { font-size: .875rem; margin: 0 0 .35rem; }
.profile-twitch-live-title a { color: inherit; text-decoration: none; }
.profile-twitch-live-title a:hover { color: #9146ff; }

.news-card { overflow: hidden; padding: 0; }
.news-card-img { width: 100%; height: 180px; object-fit: cover; }
.news-card-body { padding: 1.25rem; }
.news-card-body time { font-size: .75rem; color: var(--text-muted); }
.news-card-body h3 { margin: .5rem 0; font-size: 1.05rem; }
.news-card-body h3 a { color: var(--text); }
.news-card-body h3 a:hover { color: var(--primary); }
.news-card-body p { color: var(--text-muted); font-size: .875rem; margin-bottom: .75rem; }

/* ── Forum ── */
.forum-category-card {
    display: flex; align-items: center; gap: 1.25rem;
    margin-bottom: 1rem; padding: 1.25rem 1.5rem;
}
.forum-cat-icon { font-size: 2rem; width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.forum-cat-icon-img { width: 2rem; height: 2rem; object-fit: contain; display: block; border-radius: 6px; }
.forum-cat-info { flex: 1; }
.forum-cat-info h3 a { color: var(--text); font-size: 1.05rem; }
.forum-cat-info p { color: var(--text-muted); font-size: .875rem; }
.forum-cat-stats { text-align: right; font-size: .8125rem; color: var(--text-muted); }

/* ── Shop ── */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.shop-card { display: flex; flex-direction: column; }
.shop-card-img { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.shop-card h3 { font-size: 1rem; margin-bottom: .5rem; }
.shop-card p { color: var(--text-muted); font-size: .875rem; flex: 1; }
.shop-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.price { font-weight: 700; font-size: 1.1rem; color: var(--accent); }
.points-card { text-align: center; }
.points-amount { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin: .5rem 0; }

/* ── Tables ── */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; }
.table tr.clickable { cursor: pointer; transition: background var(--transition); }
.table tr.clickable:hover { background: var(--bg-hover); }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .375rem; color: var(--text-muted); }
.form-control {
    width: 100%; padding: .625rem .875rem;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-family: var(--font); font-size: .875rem;
    transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; font-size: .875rem; margin-bottom: 1rem; cursor: pointer; }
select.form-control { appearance: auto; }

/* ── Auth ── */
.auth-page { display: flex; justify-content: center; padding: 3rem 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-muted); font-size: .8125rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: .875rem; color: var(--text-muted); }

/* ── Profile ── */
.profile-header { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { text-align: center; padding: 1.25rem; }
.stat-value { display: block; font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: .8125rem; color: var(--text-muted); }
.profile-status-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.profile-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
    background: color-mix(in srgb, var(--badge-color) 18%, transparent);
    color: var(--badge-color); border: 1px solid color-mix(in srgb, var(--badge-color) 35%, transparent);
}
.profile-badge-icon { font-size: .85rem; line-height: 1; }
.inline-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1rem; height: 1rem; margin-left: .2rem; border-radius: 50%;
    font-size: .65rem; font-weight: 700; vertical-align: middle;
}
.inline-badge-verified { background: rgba(6,182,212,.2); color: #06b6d4; }
.inline-badge-owner { background: rgba(251,191,36,.25); font-size: .55rem; width: auto; border-radius: .25rem; padding: 0 .2rem; }
.inline-badge-donor { background: rgba(239,68,68,.2); font-size: .55rem; width: auto; border-radius: .25rem; padding: 0 .2rem; }
.inline-badge-admin { background: rgba(99,102,241,.2); font-size: .55rem; width: auto; border-radius: .25rem; padding: 0 .2rem; }
.achievement-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem;
}
.achievement-card {
    display: flex; align-items: flex-start; gap: .75rem; padding: 1rem;
    border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
    position: relative; transition: border-color .15s, opacity .15s;
}
.achievement-card.earned { border-color: color-mix(in srgb, var(--badge-color) 40%, var(--border)); }
.achievement-card.locked { opacity: .45; filter: grayscale(.6); }
.achievement-icon {
    width: 2.5rem; height: 2.5rem; border-radius: .75rem; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
    background: color-mix(in srgb, var(--badge-color) 15%, transparent);
}
.achievement-body strong { display: block; font-size: .875rem; margin-bottom: .15rem; }
.achievement-body p { margin: 0; font-size: .75rem; color: var(--text-muted); line-height: 1.4; }
.achievement-check {
    position: absolute; top: .5rem; right: .5rem; width: 1.25rem; height: 1.25rem;
    border-radius: 50%; background: var(--success); color: #fff; font-size: .7rem;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* ── Avatars ── */
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; font-weight: 700; font-size: 1.5rem;
}

/* ── Posts / Comments ── */
.post-content { margin-bottom: 1rem; }
.post-author { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; font-size: .875rem; }
.post-author time { color: var(--text-muted); }
.post-body { line-height: 1.7; }
.reply-post { margin-left: 1rem; border-left: 3px solid var(--primary); }
.admin-reply { border-left-color: var(--accent); }
.comment-card { margin-bottom: .75rem; padding: 1rem; }
.comment-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; font-size: .875rem; }
.comment-header time { color: var(--text-muted); margin-left: auto; }

/* ── Badges ── */
.badge {
    display: inline-block; padding: .2rem .6rem;
    border-radius: 999px; font-size: .75rem; font-weight: 600;
    background: var(--bg-hover); color: var(--text-muted);
}
.badge-points { background: rgba(99,102,241,.15); color: var(--primary); }
.badge-success { background: rgba(34,197,94,.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.15); color: #f59e0b; }
.badge-error { background: rgba(239,68,68,.15); color: var(--error); }
.badge-ghost { background: var(--bg-hover); color: var(--text-muted); }
.badge-muted { background: var(--bg-hover); color: var(--text-muted); }

/* ── Alerts ── */
.alert { padding: .875rem 1.25rem; border-radius: var(--radius-sm); margin: 1rem 0; font-size: .875rem; }
.alert-success { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: var(--success); }
.alert-error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: var(--error); }
.alert-info { background: rgba(6,182,212,.1); border: 1px solid rgba(6,182,212,.3); color: var(--accent); }

/* ── FAQ ── */
.faq-item { margin-bottom: .5rem; cursor: pointer; }
.faq-item summary { font-weight: 600; padding: .25rem 0; list-style: none; }
.faq-item summary::before { content: '▸ '; color: var(--primary); }
.faq-item[open] summary::before { content: '▾ '; }
.faq-answer { padding: .75rem 0; color: var(--text-muted); font-size: .875rem; }

/* ── Poll ── */
.poll-option {
    display: flex; align-items: center; gap: .75rem;
    padding: .625rem; border-radius: var(--radius-sm);
    cursor: pointer; transition: background var(--transition);
    margin-bottom: .375rem;
}
.poll-option:hover { background: var(--bg-hover); }

/* ── Countdown ── */
.countdown-card { text-align: center; margin-bottom: 1.5rem; }
.countdown-timer { display: flex; justify-content: center; gap: 1.5rem; margin-top: 1rem; }
.countdown-timer div { text-align: center; }
.countdown-timer span { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); }
.countdown-timer small { font-size: .75rem; color: var(--text-muted); }

/* ── Progress ── */
.progress-bar { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: .75rem 0; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width .5s ease; }

/* ── Servers ── */
.server-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.server-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: .875rem;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.server-filter-btn:hover {
    border-color: var(--primary);
}
.server-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.server-filter-count {
    font-size: .75rem;
    opacity: .85;
}
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.server-card { text-align: center; }
.server-map-preview {
    position: relative;
    width: 160px;
    height: 90px;
    margin: 0 auto .75rem;
    border-radius: .4rem;
    background: var(--bg);
    overflow: hidden;
    border: 1px solid var(--border);
}
.server-map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.server-map-label {
    position: absolute;
    left: .35rem;
    bottom: .35rem;
    right: .35rem;
    padding: .15rem .35rem;
    border-radius: .25rem;
    background: rgba(0, 0, 0, .75);
    color: #fff;
    font-size: .625rem;
    font-weight: 600;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.server-ip { font-family: monospace; color: var(--accent); margin: .5rem 0; }
.server-status { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: .75rem; font-size: .875rem; }
.server-map { margin-top: .5rem; font-size: .875rem; color: var(--text-muted); }
.server-players { margin-top: 1rem; text-align: left; border-top: 1px solid var(--border); padding-top: .75rem; }
.server-players h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .5rem; font-weight: 600; }
.server-player-list { list-style: none; margin: 0; padding: 0; max-height: 180px; overflow-y: auto; }
.server-player-row { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; font-size: .8125rem; border-bottom: 1px solid var(--border); }
.server-player-row:last-child { border-bottom: none; }
.server-player-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.server-player-score { color: var(--accent); font-variant-numeric: tabular-nums; font-size: .75rem; }
.server-player-time { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: .75rem; margin-left: auto; }
.server-players-empty { font-size: .8125rem; margin: 0; text-align: center; }
.server-join { margin-top: .75rem; }
.server-join + .server-join { margin-left: .35rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.online { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.offline { background: var(--error); }

/* ── Crew ── */
.crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.crew-card { text-align: center; padding: 2rem 1.5rem; }
.crew-card h3 { margin: .75rem 0 .5rem; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); padding: 2.5rem 0; margin-top: auto; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-brand p { color: var(--text-muted); font-size: .875rem; margin-top: .25rem; }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { color: var(--text-muted); font-size: .875rem; }
.footer-copy { width: 100%; text-align: center; color: var(--text-muted); font-size: .8125rem; margin-top: 1rem; }

/* ── Error ── */
.error-page { display: flex; justify-content: center; padding: 4rem 0; }
.error-card { text-align: center; max-width: 400px; }
.error-card h1 { font-size: 4rem; font-weight: 800; color: var(--primary); margin-bottom: .5rem; }

/* ── Misc ── */
.text-muted { color: var(--text-muted); }
.link-list { list-style: none; }
.link-list li { margin-bottom: .5rem; }
.link-list a { color: var(--text-muted); font-size: .875rem; }
.link-list a:hover { color: var(--accent); }
.pagination { display: flex; gap: .375rem; justify-content: center; margin: 2rem 0; }
.article-content { line-height: 1.8; }
.article-content a { color: var(--accent); text-decoration: underline; word-break: break-word; }
.article-content a:hover { color: var(--primary); }
.article-content h2, .article-content h3 { margin: 1.5rem 0 .75rem; }
.search-form {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    max-width: 100%;
    width: 100%;
}
.search-form .form-control { flex: 1; min-width: min(280px, 100%); }

/* Legacy: hide removed right-side search button if cached HTML still has it */
a.nav-search-page-link { display: none !important; }

/* ── Site search (/search page) ── */
.nav-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: .35rem;
    flex: 0 0 auto;
    width: min(220px, 28vw);
    min-width: 140px;
    margin: 0 .5rem 0 0;
    flex-shrink: 0;
}
.nav-search-input {
    width: 100%;
    padding: .4rem .65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: .875rem;
}
.nav-search-input:focus {
    outline: none;
    border-color: var(--primary);
}
.nav-search-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    padding: .25rem;
    line-height: 1;
}
.nav-search-suggest {
    position: absolute;
    top: calc(100% + .35rem);
    left: 0;
    right: 0;
    z-index: 230;
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}
.nav-search-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .75rem;
    color: inherit;
    text-decoration: none;
}
.nav-search-item:hover { background: rgba(99, 102, 241, 0.12); }
.nav-search-item span { display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; }
.nav-search-all, .nav-search-empty {
    display: block;
    padding: .55rem .75rem;
    font-size: .8rem;
    color: var(--accent);
    text-decoration: none;
    border-top: 1px solid var(--border);
}
.nav-search-empty { color: var(--text-muted); }
.search-page { margin-bottom: 2rem; }
.search-page-form {
    display: flex;
    gap: .75rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.search-page-form .form-control { flex: 1; min-width: 220px; }
.search-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}
.search-tab {
    padding: .4rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: .875rem;
}
.search-tab.active, .search-tab:hover {
    border-color: var(--primary);
    color: var(--text);
    background: rgba(99, 102, 241, 0.12);
}
.search-section { margin-bottom: 1rem; padding: 1.25rem; }
.search-section h2 { margin: 0 0 1rem; font-size: 1.1rem; }
.search-user-list { list-style: none; padding: 0; margin: 0; }
.search-user-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 0;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}
.search-user-row:last-child { border-bottom: none; }
.search-user-meta { display: flex; flex-direction: column; gap: .15rem; font-size: .875rem; }
.search-link-list { list-style: none; padding: 0; margin: 0; }
.search-link-list li { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.search-link-list li:last-child { border-bottom: none; }
.search-link-list a { color: var(--accent); font-weight: 500; }
.search-empty, .search-hint { margin-top: 1rem; }

@media (max-width: 1100px) {
    .nav-search-wrap { width: min(180px, 22vw); min-width: 120px; }
}

@media (max-width: 900px) {
    .nav-search-wrap {
        order: 5;
        width: 100%;
        min-width: 0;
        max-width: none;
        margin: 0;
        flex: 1 1 100%;
    }
    .nav-inner { flex-wrap: wrap; height: auto; padding: .5rem 0; }
    .nav-links { order: 10; }
    .nav-actions { order: 6; margin-left: 0; width: 100%; justify-content: flex-end; }
}
.permissions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .5rem; margin: 1rem 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.admin-table th, .admin-table td { padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--border); }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.color-grid input[type=color] { width: 100%; height: 40px; border: none; border-radius: var(--radius-sm); cursor: pointer; }
.menu-form-card { max-width: 820px; }
.menu-picker-block { padding: 1rem; margin: 1rem 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-hover); }
.menu-picker-hint { font-size: .8125rem; margin-top: .35rem; }
.icon-picker { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; max-height: 160px; overflow-y: auto; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.icon-picker-btn {
    width: 2.25rem; height: 2.25rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg-card); font-size: 1.1rem; cursor: pointer; transition: border-color .15s, transform .1s;
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.icon-picker-btn:hover { border-color: var(--primary); transform: scale(1.08); }
.icon-picker-btn.active { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent); background: color-mix(in srgb, var(--primary) 12%, var(--bg-card)); }
.icon-picker-custom { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.icon-picker-custom .form-control { max-width: 5rem; text-align: center; font-size: 1.25rem; }
.icon-picker-custom .text-muted { font-size: .8125rem; }

/* ── CS2 Ranks page ── */
.ranks-page { display: grid; gap: 1.25rem; margin-bottom: 2rem; }
.ranks-my-stats h2, .ranks-ladder-card h2 { margin: 0 0 1rem; font-size: 1.1rem; }
.ranks-my-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    align-items: center;
}
.ranks-my-name { margin: .35rem 0 0; font-weight: 600; }
.ranks-stat-block { display: flex; flex-direction: column; gap: .15rem; }
.ranks-stat-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.ranks-search-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.ranks-search-form .form-control { flex: 1; min-width: 220px; }
.ranks-search-result { margin-top: .85rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.rank-badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}
.rank-none { background: #4b5563; color: #fff; }
.rank-silver { background: #94a3b8; color: #111; }
.rank-gn { background: #fbbf24; color: #111; }
.rank-mg { background: #34d399; color: #111; }
.rank-eagle { background: #60a5fa; color: #111; }
.rank-supreme { background: #c084fc; color: #111; }
.rank-global { background: linear-gradient(90deg, #fde047, #f97316); color: #111; }
.ranks-table .ranks-pos { width: 3rem; font-weight: 700; color: var(--text-muted); }
.ranks-ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.ranks-ladder-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--border); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .page-grid { grid-template-columns: 1fr; }
    .page-sidebar { order: -1; }
    .form-row { grid-template-columns: 1fr; }
    .profile-stats-grid { grid-template-columns: 1fr; }
}

@media (min-width: 901px) and (max-width: 1100px) {
    .profile-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .site-shell { padding: 0 1rem; }
    .card { padding: 1.1rem; }
    .page-content { padding: 1.25rem 0 2rem; }

    .nav-toggle { display: flex; }
    .nav-links {
        display: none; position: absolute; top: 64px; left: 0; right: 0;
        flex-direction: column; background: var(--bg-card);
        border-bottom: 1px solid var(--border); padding: 1rem;
        box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; overflow: visible; z-index: 205; }
    .nav-dropdown { z-index: auto; }
    .nav-dropdown-menu {
        position: static;
        display: none;
        margin-top: .35rem;
        margin-left: .5rem;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, 0.04);
        border-radius: var(--radius-sm);
    }
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
    .nav-actions { gap: .375rem; }
    .nav-user span:not(.badge) { display: none; }
    .forum-category-card { flex-direction: column; text-align: center; }
    .forum-cat-stats { text-align: center; }
    .profile-header { flex-direction: column; text-align: center; }
    .table { font-size: .8125rem; }
    .table th, .table td { padding: .5rem; }
    .hero { padding: 2.5rem 0 2rem; }
    .countdown-timer { gap: .75rem; }
    .countdown-timer span { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .news-grid, .shop-grid, .server-grid, .crew-grid { grid-template-columns: 1fr; }
    .nav-actions .btn-outline { display: none; }
    .btn { padding: .55rem .95rem; }
    .btn-sm { padding: .35rem .65rem; }
    .nav-inner { gap: .5rem; }
    .nav-brand span { font-size: 1rem; }
    .nav-search-btn { padding: .4rem .55rem; }
}

@media (max-width: 640px) {
    .table-wrap {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .table-wrap .table {
        min-width: 0;
    }

    .table-wrap .table th,
    .table-wrap .table td {
        white-space: normal;
        word-break: break-word;
    }
}

/* ── Cookie consent ── */
.cookie-consent {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity .35s ease, transform .35s ease;
}

.cookie-consent.is-visible {
    display: block;
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.cookie-consent-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.cookie-consent-text p {
    margin: 0;
    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cookie-consent-text a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-consent-actions {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .cookie-consent-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}
