/* =========================================================================
   AI ADMIN BAN LIST — Insurgency: Sandstorm Theme
   ========================================================================= */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --bg-header: #0d0d0d;
    --bg-input: #1e1e1e;
    --border-color: #2a2a2a;
    --border-accent: #3a3a3a;
    --border-highlight: #c4975a;
    --text-primary: #e8e8e8;
    --text-secondary: #999999;
    --text-muted: #666666;
    --text-accent: #c4975a;
    --accent-gold: #c4975a;
    --accent-gold-light: #d4a76a;
    --accent-gold-dark: #a07840;
    --color-danger: #d93636;
    --color-warning: #e8a020;
    --color-success: #2eaa40;
    --color-info: #3a8fd4;
    --color-critical: #ff2020;
    --color-severe: #e04020;
    --color-medium: #e8a020;
    --color-minor: #60a0d0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
    --shadow-glow: 0 0 20px rgba(196,151,90,0.15);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --font-main: 'Roboto', 'Segoe UI', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    --font-military: 'Teko', 'Oswald', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(196,151,90,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(196,151,90,0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* HEADER */
.site-header {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, var(--bg-header) 0%, rgba(13,13,13,0.95) 100%);
    border-bottom: 2px solid var(--border-highlight);
    box-shadow: var(--shadow-lg), 0 2px 20px rgba(196,151,90,0.1);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.header-accent-bar {
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-gold-dark) 20%, var(--accent-gold) 50%, var(--accent-gold-dark) 80%, transparent 100%);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 16px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    width: 56px; height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
    border-radius: var(--radius-md);
    font-size: 28px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
}

.header-icon::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: sheen 4s ease-in-out infinite;
}

@keyframes sheen {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.header-titles h1 {
    font-family: var(--font-military);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.2;
}

.header-titles h1 span { color: var(--accent-gold); }

.header-titles .subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 2px;
}

.header-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.header-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-link:hover {
    background: var(--bg-card-hover);
    color: var(--accent-gold);
    border-color: var(--border-highlight);
    transform: translateY(-1px);
}

.header-link.appeal-link {
    background: linear-gradient(135deg, rgba(196,151,90,0.15), rgba(196,151,90,0.05));
    border-color: var(--accent-gold-dark);
    color: var(--accent-gold);
    font-weight: 500;
}

.header-link.appeal-link:hover {
    background: linear-gradient(135deg, rgba(196,151,90,0.25), rgba(196,151,90,0.1));
    box-shadow: 0 0 12px rgba(196,151,90,0.2);
}

/* MAIN */
.main-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-gold);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card:hover::before { opacity: 1; }

.stat-icon { font-size: 28px; margin-bottom: 8px; }

.stat-value {
    font-family: var(--font-military);
    font-size: 36px;
    font-weight: 600;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card.stat-danger .stat-value { color: var(--color-danger); }
.stat-card.stat-warning .stat-value { color: var(--color-warning); }
.stat-card.stat-info .stat-value { color: var(--color-info); }

/* CONTROLS */
.controls-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-main);
    transition: all 0.2s ease;
    outline: none;
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
    border-color: var(--accent-gold-dark);
    box-shadow: 0 0 0 2px rgba(196,151,90,0.15);
}

.filter-group {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 3px;
    border: 1px solid var(--border-color);
}

.filter-btn {
    padding: 7px 14px;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.filter-btn.active {
    background: var(--accent-gold-dark);
    color: #fff;
    font-weight: 500;
}

.results-count {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: auto;
}

.results-count strong { color: var(--accent-gold); }

/* TABLE */
.table-wrapper {
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.ban-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ban-table thead { position: sticky; top: 0; z-index: 5; }

.ban-table thead th {
    padding: 14px 16px;
    background: linear-gradient(180deg, #1e1e1e 0%, #181818 100%);
    border-bottom: 2px solid var(--border-highlight);
    color: var(--accent-gold);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: left;
    white-space: nowrap;
}

.ban-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.ban-table tbody tr:hover { background: rgba(196,151,90,0.04); }
.ban-table tbody tr:last-child { border-bottom: none; }
.ban-table td { padding: 12px 16px; vertical-align: middle; }

.cell-player { min-width: 180px; }

.player-name {
    font-weight: 500;
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

.player-steam {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.player-steam a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.player-steam a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

.cell-type { white-space: nowrap; }

.punishment-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.punishment-warning {
    background: rgba(232,160,32,0.12);
    color: var(--color-warning);
    border: 1px solid rgba(232,160,32,0.25);
}

.punishment-kick {
    background: rgba(58,143,212,0.12);
    color: var(--color-info);
    border: 1px solid rgba(58,143,212,0.25);
}

.punishment-ban {
    background: rgba(217,54,54,0.12);
    color: var(--color-danger);
    border: 1px solid rgba(217,54,54,0.25);
}

.punishment-ban-long {
    background: rgba(224,64,32,0.15);
    color: var(--color-severe);
    border: 1px solid rgba(224,64,32,0.3);
}

.punishment-perma {
    background: rgba(255,32,32,0.15);
    color: var(--color-critical);
    border: 1px solid rgba(255,32,32,0.3);
    animation: pulse-perma 3s ease-in-out infinite;
}

@keyframes pulse-perma {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 8px rgba(255,32,32,0.2); }
}

.cell-duration {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.cell-reason { max-width: 300px; color: var(--text-secondary); font-size: 13px; line-height: 1.4; }

.cell-reason .reason-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cell-time { white-space: nowrap; font-size: 13px; }
.time-full { color: var(--text-secondary); display: block; }
.time-ago { color: var(--text-muted); font-size: 11px; display: block; margin-top: 2px; }

.cell-status { white-space: nowrap; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: rgba(217,54,54,0.12);
    color: var(--color-danger);
    border: 1px solid rgba(217,54,54,0.2);
}

.status-active .status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--color-danger);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-expired {
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.status-unbanned {
    background: rgba(46,170,64,0.1);
    color: var(--color-success);
    border: 1px solid rgba(46,170,64,0.2);
}

.cell-actions { white-space: nowrap; }

.btn-details {
    padding: 6px 12px;
    background: rgba(196,151,90,0.1);
    border: 1px solid rgba(196,151,90,0.25);
    border-radius: 3px;
    color: var(--accent-gold);
    font-size: 12px;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-details:hover {
    background: rgba(196,151,90,0.2);
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(196,151,90,0.15);
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px; height: 38px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(.active):not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--accent-gold-dark);
    border-color: var(--accent-gold);
    color: #fff;
    font-weight: 600;
}

.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-info { font-size: 13px; color: var(--text-muted); margin: 0 12px; }

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.show { display: flex; }

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-family: var(--font-military);
    font-size: 22px;
    color: var(--accent-gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.modal-close {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(217,54,54,0.15);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

.modal-body { padding: 24px; }

.violation-item {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    border-left: 3px solid var(--border-color);
    transition: border-color 0.2s;
}

.violation-item:hover { border-left-color: var(--accent-gold); }

.violation-item .vi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.violation-item .vi-message {
    font-size: 14px;
    color: var(--text-primary);
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 3px;
    margin-top: 8px;
    word-break: break-word;
    border-left: 2px solid var(--text-muted);
}

.violation-item .vi-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 12px;
    color: var(--text-secondary);
}

.confidence-bar {
    display: inline-block;
    width: 40px; height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    overflow: hidden;
}

.confidence-bar-fill {
    height: 100%;
    border-radius: 2px;
}

.violation-item.severity-critical { border-left-color: var(--color-critical); }
.violation-item.severity-severe { border-left-color: var(--color-severe); }
.violation-item.severity-medium { border-left-color: var(--color-medium); }
.violation-item.severity-minor { border-left-color: var(--color-minor); }

/* APPEAL BANNER */
.appeal-banner {
    margin-top: 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(196,151,90,0.08), rgba(196,151,90,0.02));
    border: 1px solid rgba(196,151,90,0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.appeal-banner .appeal-icon { font-size: 32px; flex-shrink: 0; }

.appeal-banner .appeal-text { flex: 1; }

.appeal-banner .appeal-text h3 {
    font-family: var(--font-military);
    font-size: 18px;
    color: var(--accent-gold);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.appeal-banner .appeal-text p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

.appeal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-gold));
    color: #0a0a0a;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.appeal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(196,151,90,0.3);
}

/* FOOTER */
.site-footer {
    position: relative;
    z-index: 1;
    margin-top: 40px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.site-footer p { font-size: 12px; color: var(--text-muted); }
.site-footer a { color: var(--accent-gold-dark); text-decoration: none; }
.site-footer a:hover { color: var(--accent-gold); text-decoration: underline; }

/* LOADING */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    gap: 16px;
}

.spinner-ring {
    width: 40px; height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state .empty-text { font-size: 16px; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-accent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .header-content { flex-direction: column; align-items: flex-start; }
    .header-links { width: 100%; }
    .controls-bar { flex-direction: column; align-items: stretch; }
    .search-wrapper { min-width: unset; }
    .filter-group { justify-content: center; }
    .results-count { text-align: center; margin-left: 0; }
}

@media (max-width: 768px) {
    .main-content { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .header-titles h1 { font-size: 22px; }
    .ban-table { font-size: 13px; }
    .ban-table thead th { padding: 10px 12px; font-size: 10px; }
    .ban-table td { padding: 10px 12px; }
    .cell-reason { max-width: 200px; }
    .appeal-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px 10px; }
    .stat-value { font-size: 28px; }
    .header-link { flex: 1; justify-content: center; }
}