/**
 * RaVarKon CMS v3 — Hellish Theme
 * Colors: Blood reds, fire oranges, lava glow, ember pulse
 * Dark, moody, hellish aesthetic
 * RESPONSIVE: Auto-fit to any screen size using clamp(), fluid grid, viewport units
 * Tested: 320px (phone) → 1920px+ (full HD) → 3840px (4K)
 */

/* ============================================
   CSS RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-darkest: #0a0000;
    --bg-dark: #1a0505;
    --bg-medium: #2a0a0a;
    --bg-card: #1f0808;
    --bg-card-hover: #2d0c0c;
    --border-dark: #3a1010;
    --border-medium: #551515;
    --border-bright: #8b0000;
    --text-primary: #f0e0e0;
    --text-secondary: #c0a0a0;
    --text-muted: #886666;
    --blood-red: #8b0000;
    --bright-red: #cc0000;
    --fire-orange: #ff4500;
    --fire-light: #ff6600;
    --lava: #ff2200;
    --ember: #ffa500;
    --ember-glow: #ff8c00;
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --blue-accent: #4488ff;
    --green-accent: #44cc44;
    --yellow-pending: #ffcc00;

    /* Fluid layout variables — scale with viewport */
    --sidebar-width: clamp(180px, 14vw, 260px);
    --admin-sidebar-width: clamp(160px, 12vw, 220px);
    --portal-sidebar-width: clamp(150px, 11vw, 200px);
    --nav-height: clamp(48px, 5.5vh, 56px);
    --radius: 8px;
    --radius-sm: 4px;
    --shadow-fire: 0 0 15px rgba(255,69,0,0.3);
    --shadow-blood: 0 0 15px rgba(139,0,0,0.4);
    --transition: all 0.3s ease;

    /* Fluid spacing — scales between min and max */
    --sp-xs: clamp(4px, 0.5vw, 8px);
    --sp-sm: clamp(8px, 1vw, 16px);
    --sp-md: clamp(12px, 1.5vw, 24px);
    --sp-lg: clamp(16px, 2vw, 32px);
    --sp-xl: clamp(24px, 3vw, 48px);

    /* Fluid font sizes — scale smoothly with viewport */
    --fs-xs: clamp(0.625rem, 0.7vw, 0.75rem);
    --fs-sm: clamp(0.75rem, 0.85vw, 0.85rem);
    --fs-base: clamp(0.85rem, 1vw, 0.95rem);
    --fs-md: clamp(0.95rem, 1.1vw, 1.05rem);
    --fs-lg: clamp(1.05rem, 1.3vw, 1.2rem);
    --fs-xl: clamp(1.2rem, 1.8vw, 1.6rem);
    --fs-2xl: clamp(1.5rem, 2.5vw, 2.2rem);
    --fs-3xl: clamp(2rem, 3.5vw, 3rem);
    --fs-hero: clamp(1.6rem, 4vw, 3rem);
}

html {
    scroll-behavior: smooth;
    font-size: 100%; /* 16px base — all rem units scale from here */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-darkest);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent layout shift from scrollbar */
    scrollbar-gutter: stable;
}

a {
    color: var(--fire-light);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--ember);
    text-shadow: 0 0 8px rgba(255,140,0,0.5);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   TOP NAVIGATION — Fluid auto-fit
   ============================================ */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: linear-gradient(180deg, #1a0505 0%, #0a0000 100%);
    border-bottom: 1px solid var(--border-bright);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(139,0,0,0.3);
}

.nav-inner {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 var(--sp-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

.nav-brand {
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.5vw, 8px);
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    font-weight: 800;
    color: var(--fire-orange) !important;
    text-shadow: 0 0 10px rgba(255,69,0,0.5);
    letter-spacing: 2px;
    white-space: nowrap;
}
.brand-link:hover {
    color: var(--ember) !important;
    text-shadow: 0 0 20px rgba(255,140,0,0.8);
}

.brand-icon {
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    animation: firePulse 2s ease-in-out infinite;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(2px, 0.3vw, 6px);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar on nav */
}
.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-link {
    padding: clamp(4px, 0.5vw, 8px) clamp(6px, 0.8vw, 14px);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: clamp(0.75rem, 0.9vw, 0.95rem);
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-link:hover {
    color: var(--fire-light);
    background: rgba(255,69,0,0.1);
}

.admin-link {
    color: var(--bright-red) !important;
    font-weight: 700;
}
.admin-link:hover {
    background: rgba(204,0,0,0.15);
}

.nav-login, .nav-signup {
    padding: clamp(4px, 0.5vw, 6px) clamp(8px, 1vw, 16px);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: clamp(0.75rem, 0.9vw, 0.95rem);
}
.nav-login {
    border: 1px solid var(--border-bright);
    color: var(--fire-light);
}
.nav-signup {
    background: linear-gradient(135deg, var(--blood-red), var(--fire-orange));
    color: #fff;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--fire-light);
    transition: var(--transition);
}

/* ============================================
   MAIN LAYOUT (3-Column) — Fluid auto-fit
   ============================================ */
.main-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-width);
    gap: 0;
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
    max-width: 2560px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   SIDEBARS — Fluid auto-fit
   ============================================ */
.sidebar {
    padding: var(--sp-md) var(--sp-xs);
    overflow-y: auto;
    max-height: calc(100vh - var(--nav-height));
    position: sticky;
    top: var(--nav-height);
}

.sidebar-left {
    background: linear-gradient(180deg, #120404 0%, #0a0000 100%);
    border-right: 1px solid var(--border-dark);
}

.sidebar-right {
    background: linear-gradient(180deg, #120404 0%, #0a0000 100%);
    border-left: 1px solid var(--border-dark);
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: clamp(10px, 1.2vw, 16px);
    margin-bottom: clamp(8px, 1vw, 16px);
}

.widget-title {
    color: var(--ember);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: clamp(6px, 0.7vw, 12px);
}

/* User Widget */
.user-info {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.6vw, 10px);
    margin-bottom: clamp(6px, 0.7vw, 12px);
}
.user-avatar {
    width: clamp(32px, 3.5vw, 42px);
    height: clamp(32px, 3.5vw, 42px);
    border-radius: 50%;
    border: 2px solid var(--fire-orange);
}
.user-avatar-placeholder {
    width: clamp(32px, 3.5vw, 42px);
    height: clamp(32px, 3.5vw, 42px);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blood-red), var(--fire-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: clamp(0.85rem, 1vw, 1.1rem);
    color: #fff;
}
.user-details {
    display: flex;
    flex-direction: column;
}
.user-name {
    font-weight: 600;
    font-size: clamp(0.8rem, 0.9vw, 0.95rem);
}
.user-role {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.user-actions {
    display: flex;
    gap: clamp(4px, 0.5vw, 8px);
}

.login-prompt {
    text-align: center;
}
.login-prompt .btn {
    margin-top: 6px;
}

/* Live Status */
.live-indicator {
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.5vw, 8px);
    padding: clamp(4px, 0.5vw, 8px) 0;
}
.live-dot {
    width: clamp(8px, 0.8vw, 10px);
    height: clamp(8px, 0.8vw, 10px);
    border-radius: 50%;
}
.is-live .live-dot {
    background: var(--green-accent);
    animation: livePulseGreen 1.5s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(68,204,68,0.9), 0 0 24px rgba(68,204,68,0.4);
}
.is-offline .live-dot {
    background: var(--bright-red);
    animation: livePulseRed 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(204,0,0,0.6), 0 0 16px rgba(204,0,0,0.3);
}
.live-text {
    font-weight: 700;
    font-size: var(--fs-sm);
    letter-spacing: 1px;
}
.is-live .live-text {
    color: var(--green-accent);
    text-shadow: 0 0 10px rgba(68,204,68,0.6), 0 0 20px rgba(68,204,68,0.3);
}
.is-offline .live-text {
    color: var(--bright-red);
    text-shadow: 0 0 8px rgba(204,0,0,0.5), 0 0 16px rgba(204,0,0,0.2);
}

/* Live indicator glow for the whole widget */
.is-live {
    text-shadow: none;
}
.is-offline {
    text-shadow: none;
}
.live-widget .is-live {
    background: rgba(68,204,68,0.05);
    border: 1px solid rgba(68,204,68,0.2);
    border-radius: 6px;
    padding: 6px 10px;
}
.live-widget .is-offline {
    background: rgba(204,0,0,0.05);
    border: 1px solid rgba(204,0,0,0.15);
    border-radius: 6px;
    padding: 6px 10px;
}

/* Time Widget */
.time-display {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 700;
    color: var(--ember);
    text-align: center;
    text-shadow: 0 0 10px rgba(255,165,0,0.3);
    font-variant-numeric: tabular-nums;
}
.date-display {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}

/* Quick Links */
.quick-link {
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.5vw, 8px);
    padding: clamp(4px, 0.5vw, 8px) clamp(6px, 0.7vw, 10px);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    transition: var(--transition);
}
.quick-link:hover {
    background: rgba(255,69,0,0.08);
    color: var(--fire-light);
}
.ql-icon {
    font-size: clamp(0.85rem, 1vw, 1rem);
}

/* ============================================
   MINI CALENDAR — Fluid
   ============================================ */
.mini-calendar {
    width: 100%;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(6px, 0.7vw, 10px);
}
.cal-month {
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--ember);
}
.cal-nav-btn {
    background: none;
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--fs-sm);
}
.cal-nav-btn:hover {
    background: rgba(255,69,0,0.1);
    color: var(--fire-light);
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 8px;
}

.cal-day-header {
    text-align: center;
    font-size: clamp(0.55rem, 0.6vw, 0.65rem);
    color: var(--text-muted);
    padding: clamp(2px, 0.3vw, 4px) 0;
    font-weight: 600;
}

.cal-day {
    text-align: center;
    padding: clamp(2px, 0.3vw, 4px) 1px;
    min-height: clamp(22px, 2.5vw, 28px);
    border-radius: 3px;
    cursor: default;
}
.cal-day.empty {
    background: transparent;
}
.cal-day.today {
    background: rgba(255,69,0,0.15);
    border: 1px solid var(--fire-orange);
}
.cal-day.has-events {
    cursor: pointer;
}
.cal-day:hover {
    background: rgba(255,69,0,0.08);
}

.day-number {
    font-size: clamp(0.55rem, 0.65vw, 0.7rem);
    color: var(--text-secondary);
    display: block;
}

.day-dots {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 2px;
}

.event-dot {
    width: clamp(4px, 0.4vw, 5px);
    height: clamp(4px, 0.4vw, 5px);
    border-radius: 50%;
    display: inline-block;
}

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(4px, 0.5vw, 8px);
    margin-bottom: clamp(6px, 0.7vw, 10px);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: clamp(0.55rem, 0.6vw, 0.65rem);
    color: var(--text-muted);
}
.legend-item .event-dot {
    width: 6px;
    height: 6px;
}

.cal-events-list {
    border-top: 1px solid var(--border-dark);
    padding-top: 8px;
}
.cal-event-item {
    padding: clamp(3px, 0.4vw, 5px) clamp(4px, 0.5vw, 8px);
    margin-bottom: 4px;
    border-radius: 3px;
    background: rgba(255,69,0,0.05);
    display: flex;
    gap: clamp(4px, 0.5vw, 8px);
    font-size: clamp(0.6rem, 0.65vw, 0.7rem);
}
.cal-event-date {
    color: var(--text-muted);
    white-space: nowrap;
}
.cal-event-title {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   WEATHER WIDGET (Enhanced) — Fluid
   ============================================ */
.weather-display {
    text-align: center;
}
.weather-loading {
    color: var(--text-muted);
    font-size: var(--fs-sm);
}
.weather-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.weather-main {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.7vw, 10px);
}
.weather-icon {
    font-size: clamp(1.8rem, 2.5vw, 2.5rem);
    line-height: 1;
}
.weather-temp-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.weather-temp {
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 700;
    color: var(--ember);
    line-height: 1.1;
}
.weather-feels {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}
.weather-desc {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    text-transform: capitalize;
}
.weather-details {
    display: flex;
    gap: clamp(8px, 1vw, 12px);
    margin: 4px 0;
}
.weather-detail {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}
.weather-location {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-bottom: 6px;
}
.weather-forecast {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    justify-content: center;
    width: 100%;
    border-top: 1px solid var(--border-dark);
    padding-top: 8px;
}
.weather-forecast-day {
    text-align: center;
    font-size: clamp(0.55rem, 0.6vw, 0.65rem);
    flex: 1;
    min-width: 0;
}
.forecast-day-name {
    color: var(--text-muted);
    display: block;
}
.forecast-icon {
    font-size: clamp(0.8rem, 1vw, 1rem);
    display: block;
}
.forecast-temps {
    display: flex;
    justify-content: center;
    gap: 2px;
}
.forecast-high {
    color: var(--text-secondary);
    font-weight: 600;
}
.forecast-low {
    color: var(--text-muted);
    font-size: clamp(0.5rem, 0.55vw, 0.6rem);
}

/* ============================================
   SERVER STATUS WIDGET
   ============================================ */
.server-status {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-sm);
}
.status-label {
    color: var(--text-muted);
}
.status-value {
    color: var(--text-secondary);
    font-weight: 600;
}
.status-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-online {
    background: rgba(68,204,68,0.12);
    color: var(--green-accent);
    border: 1px solid rgba(68,204,68,0.3);
}

/* ============================================
   STREAM / DONATIONS SIDEBAR
   ============================================ */
.stream-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-dark);
    font-size: var(--fs-sm);
}
.stream-date {
    color: var(--ember);
    font-weight: 600;
    white-space: nowrap;
}
.stream-title {
    color: var(--text-secondary);
    max-width: clamp(80px, 8vw, 120px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.donation-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-dark);
    font-size: var(--fs-sm);
}
.donation-name {
    color: var(--text-secondary);
}
.donation-amount {
    color: var(--ember);
    font-weight: 700;
}

/* ============================================
   TOP DONORS WIDGET
   ============================================ */
.top-donors {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.top-donor-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-dark);
    font-size: var(--fs-sm);
}
.donor-rank {
    width: 24px;
    text-align: center;
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
}
.rank-top {
    font-size: 1rem;
}
.donor-name {
    flex: 1;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.donor-total {
    color: var(--ember);
    font-weight: 700;
}

/* ============================================
   SIDEBAR BLOG LIST
   ============================================ */
.sidebar-blog-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sidebar-blog-item {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: rgba(255,69,0,0.03);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.sidebar-blog-item:hover {
    background: rgba(255,69,0,0.08);
    border-color: var(--border-medium);
}
.sidebar-blog-title {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--fire-light);
    line-height: 1.3;
    margin-bottom: 2px;
}
.sidebar-blog-date {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* ============================================
   SOCIAL LINKS WIDGET
   ============================================ */
.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}
.social-link {
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.5vw, 6px);
    padding: clamp(6px, 0.7vw, 8px) clamp(6px, 0.7vw, 10px);
    background: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    transition: var(--transition);
}
.social-link:hover {
    transform: translateY(-1px);
}
.social-icon {
    font-size: clamp(0.85rem, 1vw, 1rem);
}
.social-name {
    font-weight: 600;
}

.social-twitch:hover {
    background: rgba(145,70,255,0.1);
    border-color: #9146ff;
    color: #9146ff;
}
.social-kick:hover {
    background: rgba(83,234,83,0.1);
    border-color: #53ea53;
    color: #53ea53;
}
.social-youtube:hover {
    background: rgba(255,0,0,0.1);
    border-color: #ff0000;
    color: #ff0000;
}
.social-discord:hover {
    background: rgba(88,101,242,0.1);
    border-color: #5865f2;
    color: #5865f2;
}
.social-twitter:hover {
    background: rgba(29,161,242,0.1);
    border-color: #1da1f2;
    color: #1da1f2;
}
.social-tiktok:hover {
    background: rgba(255,0,80,0.1);
    border-color: #ff0050;
    color: #ff0050;
}

.muted-text {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    font-style: italic;
}

/* ============================================
   CENTER CONTENT — Fluid auto-fit
   ============================================ */
.content-area {
    padding: var(--sp-md) var(--sp-sm);
    max-width: 100%;
    min-width: 0; /* Prevent grid blowout */
}

/* Hero Section */
.hero {
    position: relative;
    padding: clamp(30px, 5vw, 60px) clamp(20px, 3vw, 40px);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #1a0505 0%, #2a0a0a 30%, #0a0000 100%);
    border: 1px solid var(--border-bright);
    margin-bottom: clamp(16px, 2vw, 24px);
    overflow: hidden;
    text-align: center;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,69,0,0.08) 0%, transparent 60%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}
.hero-title {
    font-size: var(--fs-hero);
    font-weight: 900;
    color: var(--fire-orange);
    text-shadow: 0 0 30px rgba(255,69,0,0.4);
    position: relative;
    letter-spacing: 2px;
}
.hero-subtitle {
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: var(--text-secondary);
    margin-top: 10px;
    position: relative;
}
.hero-actions {
    margin-top: clamp(16px, 2vw, 24px);
    position: relative;
    display: flex;
    gap: clamp(6px, 0.8vw, 12px);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   CARDS — Fluid auto-fit
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover {
    border-color: var(--border-medium);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-fire);
}
.card-header {
    padding: clamp(10px, 1.2vw, 16px) clamp(12px, 1.5vw, 20px);
    border-bottom: 1px solid var(--border-dark);
}
.card-body {
    padding: clamp(12px, 1.5vw, 20px);
}
.card-footer {
    padding: clamp(8px, 1vw, 12px) clamp(12px, 1.5vw, 20px);
    border-top: 1px solid var(--border-dark);
}

.section-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--fire-light);
    margin-bottom: clamp(10px, 1.2vw, 16px);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-bright), transparent);
}

/* ============================================
   BUTTONS — Fluid auto-fit
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 0.4vw, 6px);
    padding: clamp(6px, 0.8vw, 10px) clamp(12px, 1.5vw, 20px);
    border: none;
    border-radius: var(--radius);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover {
    transform: translateY(-1px);
}

.btn-fire {
    background: linear-gradient(135deg, var(--blood-red), var(--fire-orange));
    color: #fff;
    box-shadow: 0 2px 10px rgba(255,69,0,0.3);
}
.btn-fire:hover {
    box-shadow: 0 4px 20px rgba(255,69,0,0.5);
    color: #fff;
}

.btn-ember {
    background: linear-gradient(135deg, var(--fire-orange), var(--ember));
    color: #000;
}
.btn-ember:hover {
    box-shadow: 0 2px 15px rgba(255,165,0,0.4);
    color: #000;
}

.btn-lava {
    background: linear-gradient(135deg, var(--lava), var(--fire-orange));
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
}
.btn-ghost:hover {
    background: rgba(255,69,0,0.08);
    color: var(--fire-light);
}

.btn-danger {
    background: linear-gradient(135deg, #660000, var(--bright-red));
    color: #fff;
}

.btn-sm {
    padding: clamp(4px, 0.4vw, 6px) clamp(8px, 0.8vw, 12px);
    font-size: var(--fs-xs);
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: clamp(4px, 0.5vw, 8px);
    flex-wrap: wrap;
}

/* ============================================
   FORMS — Fluid auto-fit
   ============================================ */
.form-group {
    margin-bottom: clamp(10px, 1.2vw, 16px);
}
.form-label {
    display: block;
    margin-bottom: clamp(4px, 0.4vw, 6px);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-secondary);
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: clamp(6px, 0.8vw, 10px) clamp(8px, 1vw, 14px);
    background: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--fs-base);
    transition: var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--fire-orange);
    box-shadow: 0 0 10px rgba(255,69,0,0.2);
}
.form-textarea {
    min-height: 100px;
    resize: vertical;
}
.form-select {
    cursor: pointer;
}
.form-hint {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 4px;
}
.form-error {
    color: var(--bright-red);
    font-size: var(--fs-sm);
    margin-top: 4px;
}

.fivem-fields {
    display: none;
    padding: 12px;
    background: rgba(255,69,0,0.05);
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-sm);
    margin-top: 8px;
}
.fivem-fields.visible {
    display: block;
}

/* ============================================
   BLOG CARDS — Fluid grid
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: clamp(12px, 1.5vw, 20px);
}
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.blog-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-fire);
    transform: translateY(-2px);
}
.blog-card-thumb {
    height: clamp(120px, 14vw, 180px);
    background: linear-gradient(135deg, var(--bg-medium), var(--bg-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(2rem, 3vw, 3rem);
    overflow: hidden;
}
.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-card-body {
    padding: clamp(10px, 1.2vw, 16px);
}
.blog-card-title {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--fire-light);
    margin-bottom: 8px;
}
.blog-card-title a {
    color: inherit;
}
.blog-card-excerpt {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}
.blog-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: var(--text-muted);
}
.blog-card-category {
    color: var(--ember);
    font-weight: 600;
}

/* Blog Post Full */
.blog-post {
    max-width: 800px;
}
.blog-post-title {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--fire-light);
    margin-bottom: 12px;
}
.blog-post-meta {
    display: flex;
    gap: clamp(8px, 1vw, 16px);
    color: var(--text-muted);
    font-size: var(--fs-sm);
    margin-bottom: clamp(16px, 2vw, 24px);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-dark);
    flex-wrap: wrap;
}
.blog-post-content {
    font-size: var(--fs-base);
    line-height: 1.8;
    color: var(--text-secondary);
}
.blog-post-content h1, .blog-post-content h2, .blog-post-content h3 {
    color: var(--fire-light);
    margin-top: 24px;
    margin-bottom: 12px;
}
.blog-post-content p {
    margin-bottom: 16px;
}
.blog-post-content code {
    background: var(--bg-dark);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--ember);
}
.blog-post-content pre {
    background: var(--bg-darkest);
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin-bottom: 16px;
    border: 1px solid var(--border-dark);
}
.blog-post-content blockquote {
    border-left: 3px solid var(--fire-orange);
    padding-left: 16px;
    color: var(--text-muted);
    margin: 16px 0;
}

/* Search Box */
.search-box {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: clamp(10px, 1.2vw, 16px);
}

/* Category Filter Tabs */
.category-tabs {
    display: flex;
    gap: clamp(4px, 0.5vw, 6px);
    flex-wrap: wrap;
}
.category-tab {
    padding: clamp(6px, 0.7vw, 8px) clamp(12px, 1.2vw, 18px);
    border-radius: var(--radius);
    font-size: var(--fs-sm);
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}
.category-tab:hover {
    border-color: var(--border-medium);
    color: var(--fire-light);
    background: rgba(255,69,0,0.08);
}
.category-tab.active {
    background: linear-gradient(135deg, var(--blood-red), var(--fire-orange));
    color: #fff;
    border-color: var(--fire-orange);
    box-shadow: 0 2px 10px rgba(255,69,0,0.3);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255,69,0,0.12);
    color: var(--ember);
    border: 1px solid rgba(255,69,0,0.2);
}
.badge-success {
    background: rgba(68,204,68,0.12);
    color: var(--green-accent);
    border-color: rgba(68,204,68,0.3);
}
.badge-warning {
    background: rgba(255,204,0,0.12);
    color: var(--yellow-pending);
    border-color: rgba(255,204,0,0.3);
}
.badge-danger {
    background: rgba(204,0,0,0.12);
    color: var(--bright-red);
    border-color: rgba(204,0,0,0.3);
}
.badge-info {
    background: rgba(68,136,255,0.12);
    color: var(--blue-accent);
    border-color: rgba(68,136,255,0.3);
}

/* ============================================
   FORUMS — Fluid auto-fit
   ============================================ */
.forum-categories {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vw, 12px);
}
.forum-category {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: clamp(10px, 1.2vw, 16px) clamp(12px, 1.5vw, 20px);
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.2vw, 16px);
    transition: var(--transition);
}
.forum-category:hover {
    border-color: var(--border-medium);
    background: var(--bg-card-hover);
}
.forum-cat-icon {
    font-size: clamp(1.5rem, 2vw, 2rem);
    width: clamp(36px, 3.5vw, 50px);
    text-align: center;
}
.forum-cat-info {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}
.forum-cat-name {
    font-weight: 700;
    color: var(--fire-light);
    font-size: var(--fs-base);
}
.forum-cat-desc {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}
.forum-cat-stats {
    text-align: right;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    white-space: nowrap;
}

.forum-topics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.forum-topic {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    padding: clamp(8px, 1vw, 12px) clamp(10px, 1.2vw, 16px);
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 12px);
}
.forum-topic.pinned {
    border-left: 3px solid var(--ember);
}
.forum-topic-info {
    flex: 1;
    min-width: 0;
}
.forum-topic-title {
    font-weight: 600;
    color: var(--fire-light);
}
.forum-topic-title a {
    color: inherit;
}
.forum-topic-meta {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 4px;
}

.forum-reply {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    padding: clamp(10px, 1.2vw, 14px) clamp(12px, 1.5vw, 18px);
    margin-bottom: 10px;
}
.forum-reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: var(--fs-sm);
    flex-wrap: wrap;
    gap: 4px;
}
.forum-reply-author {
    color: var(--ember);
    font-weight: 600;
}
.forum-reply-date {
    color: var(--text-muted);
}
.forum-reply-content {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   SPONSORS — Fluid grid
   ============================================ */
.sponsor-tiers {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 24px);
}
.sponsor-tier {
    border-radius: var(--radius);
    overflow: hidden;
}
.sponsor-tier-header {
    padding: clamp(10px, 1.2vw, 16px) clamp(12px, 1.5vw, 20px);
    font-weight: 700;
    font-size: var(--fs-md);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.sponsor-tier-gold .sponsor-tier-header {
    background: linear-gradient(135deg, #4a3000, #6b4400);
    color: var(--gold);
    border: 1px solid #8b6914;
}
.sponsor-tier-silver .sponsor-tier-header {
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
    color: var(--silver);
    border: 1px solid #666;
}
.sponsor-tier-bronze .sponsor-tier-header {
    background: linear-gradient(135deg, #2a1a0a, #3a2510);
    color: var(--bronze);
    border: 1px solid #8b5a2b;
}

.sponsor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: clamp(10px, 1.2vw, 16px);
    padding: clamp(10px, 1.2vw, 16px);
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-top: none;
}
.sponsor-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    padding: clamp(10px, 1.2vw, 16px);
    text-align: center;
}
.sponsor-card-name {
    font-weight: 700;
    color: var(--ember);
    margin-bottom: 4px;
}
.sponsor-card-website {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

/* ============================================
   ADMIN PORTAL — Fluid auto-fit
   ============================================ */
.admin-layout {
    display: grid;
    grid-template-columns: var(--admin-sidebar-width) 1fr;
    min-height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
}

.admin-sidebar {
    background: var(--bg-dark);
    border-right: 1px solid var(--border-bright);
    padding: clamp(12px, 1.2vw, 20px) 0;
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
}
.admin-sidebar-title {
    padding: 0 clamp(12px, 1.5vw, 20px) clamp(10px, 1vw, 16px);
    font-size: var(--fs-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--border-dark);
    margin-bottom: 8px;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.7vw, 10px);
    padding: clamp(6px, 0.7vw, 10px) clamp(12px, 1.5vw, 20px);
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    transition: var(--transition);
    white-space: nowrap;
}
.admin-nav-item:hover, .admin-nav-item.active {
    background: rgba(255,69,0,0.1);
    color: var(--fire-light);
    border-right: 3px solid var(--fire-orange);
}

.admin-content {
    padding: clamp(12px, 1.5vw, 24px);
    overflow-y: auto;
    min-width: 0; /* Prevent grid blowout */
}

/* Admin Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
    gap: clamp(10px, 1.2vw, 16px);
    margin-bottom: clamp(16px, 2vw, 24px);
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: clamp(12px, 1.5vw, 20px);
}
.stat-card-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.stat-card-value {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--ember);
    margin-top: 4px;
}

/* Admin Tables — horizontally scrollable on small screens */
.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    min-width: 600px; /* Ensures table doesn't crush on small screens */
}
.admin-table th {
    text-align: left;
    padding: clamp(6px, 0.7vw, 10px) clamp(8px, 0.8vw, 12px);
    background: var(--bg-medium);
    border-bottom: 1px solid var(--border-medium);
    color: var(--text-muted);
    font-weight: 600;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}
.admin-table td {
    padding: clamp(6px, 0.7vw, 10px) clamp(8px, 0.8vw, 12px);
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-secondary);
}
.admin-table tr:hover td {
    background: rgba(255,69,0,0.03);
}

/* ============================================
   USER PORTAL — Fluid auto-fit
   ============================================ */
.portal-layout {
    display: grid;
    grid-template-columns: var(--portal-sidebar-width) 1fr;
    min-height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
}

.portal-sidebar {
    background: var(--bg-dark);
    border-right: 1px solid var(--border-dark);
    padding: clamp(12px, 1.2vw, 20px) 0;
}

.portal-content {
    padding: clamp(12px, 1.5vw, 24px);
    min-width: 0; /* Prevent grid blowout */
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash-message {
    position: fixed;
    top: calc(var(--nav-height) + 10px);
    right: clamp(10px, 1.5vw, 20px);
    padding: clamp(8px, 1vw, 12px) clamp(16px, 2vw, 24px);
    border-radius: var(--radius);
    font-size: var(--fs-sm);
    font-weight: 600;
    z-index: 2000;
    animation: flashSlide 0.3s ease-out;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    max-width: calc(100vw - 20px);
}
.flash-success {
    background: linear-gradient(135deg, #1a3a1a, #0a200a);
    border: 1px solid var(--green-accent);
    color: var(--green-accent);
}
.flash-error {
    background: linear-gradient(135deg, #3a0a0a, #200505);
    border: 1px solid var(--bright-red);
    color: var(--bright-red);
}

/* ============================================
   STREAM / CHAT / VODS (Main Page) — Fluid
   ============================================ */
.live-embed {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-dark);
}
.live-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.chat-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    height: clamp(280px, 35vh, 400px);
    display: flex;
    flex-direction: column;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
.chat-msg {
    padding: 4px 0;
    font-size: var(--fs-sm);
    line-height: 1.4;
}
.chat-msg-user {
    font-weight: 700;
    color: var(--ember);
}
.chat-msg-text {
    color: var(--text-secondary);
}

.vod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: clamp(10px, 1.2vw, 16px);
}
.vod-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.vod-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-fire);
}
.vod-thumb {
    aspect-ratio: 16/9;
    background: var(--bg-dark);
    position: relative;
}
.vod-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vod-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.8);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: var(--fs-xs);
    color: var(--text-secondary);
}
.vod-info {
    padding: 10px;
}
.vod-title {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.vod-date {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* Game List */
.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(130px, 100%), 1fr));
    gap: clamp(8px, 0.8vw, 12px);
}
.game-item {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: clamp(8px, 1vw, 14px);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}
.game-item:hover {
    border-color: var(--fire-orange);
    box-shadow: var(--shadow-fire);
    transform: translateY(-2px);
}
.game-item-name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--fire-light);
}

/* Donate Section */
.donate-section {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-medium));
    border: 1px solid var(--border-bright);
    border-radius: var(--radius);
    padding: clamp(16px, 2vw, 24px);
    text-align: center;
}
.donate-amounts {
    display: flex;
    gap: clamp(4px, 0.5vw, 8px);
    justify-content: center;
    flex-wrap: wrap;
    margin: clamp(10px, 1.2vw, 16px) 0;
}
.donate-amount-btn {
    padding: clamp(6px, 0.7vw, 8px) clamp(10px, 1.2vw, 18px);
    background: var(--bg-dark);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius);
    color: var(--ember);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--fs-sm);
}
.donate-amount-btn:hover, .donate-amount-btn.active {
    background: linear-gradient(135deg, var(--blood-red), var(--fire-orange));
    color: #fff;
    border-color: var(--fire-orange);
}

/* ============================================
   PAGINATION — Fluid
   ============================================ */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: clamp(12px, 1.5vw, 20px);
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: clamp(4px, 0.5vw, 6px) clamp(8px, 0.8vw, 12px);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
}
.pagination a:hover {
    background: rgba(255,69,0,0.1);
    color: var(--fire-light);
}
.pagination .active {
    background: linear-gradient(135deg, var(--blood-red), var(--fire-orange));
    color: #fff;
    border-color: var(--fire-orange);
}

/* ============================================
   FOOTER — Fluid auto-fit
   ============================================ */
.site-footer {
    background: var(--bg-darkest);
    border-top: 1px solid var(--border-bright);
    padding: clamp(24px, 3vw, 40px) clamp(12px, 1.5vw, 20px) clamp(12px, 1.5vw, 20px);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
    gap: clamp(16px, 2vw, 24px);
    margin-bottom: clamp(16px, 2vw, 24px);
}
.footer-title {
    color: var(--fire-orange);
    font-size: var(--fs-md);
    margin-bottom: 8px;
}
.footer-section h4 {
    color: var(--fire-light);
    margin-bottom: 10px;
    font-size: var(--fs-sm);
}
.footer-section a {
    display: block;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    padding: 3px 0;
}
.footer-section p {
    color: var(--text-muted);
    font-size: var(--fs-sm);
}
.footer-bottom {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-dark);
    color: var(--text-muted);
    font-size: var(--fs-xs);
}

/* ============================================
   AUTH PAGES — Fluid auto-fit
   ============================================ */
.auth-container {
    max-width: 420px;
    width: calc(100% - 40px);
    margin: clamp(30px, 5vh, 60px) auto;
    padding: clamp(20px, 2.5vw, 32px);
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
}
.auth-title {
    text-align: center;
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--fire-light);
    margin-bottom: clamp(16px, 2vw, 24px);
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: var(--fs-sm);
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-dark);
}
.twitch-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: clamp(8px, 1vw, 12px);
    background: #6441a5;
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: var(--fs-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.twitch-login-btn:hover {
    background: #7b5fbe;
    transform: translateY(-1px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes firePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes livePulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(204,0,0,0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(204,0,0,0.8), 0 0 30px rgba(204,0,0,0.4);
    }
}

@keyframes livePulseGreen {
    0%, 100% {
        box-shadow: 0 0 8px rgba(68,204,68,0.6);
    }
    50% {
        box-shadow: 0 0 16px rgba(68,204,68,0.9), 0 0 32px rgba(68,204,68,0.4);
    }
}

@keyframes livePulseRed {
    0%, 100% {
        box-shadow: 0 0 5px rgba(204,0,0,0.4);
    }
    50% {
        box-shadow: 0 0 12px rgba(204,0,0,0.7), 0 0 24px rgba(204,0,0,0.3);
    }
}

@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5%, 5%); }
}

@keyframes flashSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes emberGlow {
    0%, 100% { text-shadow: 0 0 5px rgba(255,165,0,0.3); }
    50% { text-shadow: 0 0 15px rgba(255,165,0,0.6), 0 0 30px rgba(255,69,0,0.3); }
}

.ember-text {
    animation: emberGlow 3s ease-in-out infinite;
}

/* ============================================
   RESPONSIVE — Multi-breakpoint auto-fit
   ============================================ */

/* ---- Large screens (1440px+) — wider sidebars, more breathing room ---- */
@media (min-width: 1440px) {
    :root {
        --sidebar-width: clamp(220px, 14vw, 280px);
        --admin-sidebar-width: clamp(200px, 12vw, 240px);
    }
    .content-area {
        padding: clamp(20px, 2.5vw, 32px) clamp(24px, 3vw, 40px);
    }
}

/* ---- Medium-large screens (1024px-1439px) — slightly narrower sidebars ---- */
@media (max-width: 1439px) {
    :root {
        --sidebar-width: clamp(180px, 16vw, 240px);
    }
}

/* ---- Tablets and small laptops (below 1024px) — collapse 3-column to 1 ---- */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .sidebar-left, .sidebar-right {
        position: static;
        max-height: none;
        border: none;
    }
    .sidebar-left {
        order: -1;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px;
        border-bottom: 1px solid var(--border-dark);
    }
    .sidebar-left .sidebar-widget {
        flex: 1;
        min-width: min(200px, 100%);
        margin-bottom: 0;
    }
    .sidebar-right {
        order: 99;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px;
        border-top: 1px solid var(--border-dark);
    }
    .sidebar-right .sidebar-widget {
        flex: 1;
        min-width: min(250px, 100%);
        margin-bottom: 0;
    }
    .admin-layout, .portal-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar, .portal-sidebar {
        position: static;
        height: auto;
        display: flex;
        overflow-x: auto;
        padding: 10px;
        gap: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .admin-sidebar-title, .mod-sidebar-title {
        display: none;
    }
    .admin-nav-item, .mod-nav-item {
        white-space: nowrap;
        padding: 8px 14px;
        border-right: none !important;
        border-left: none !important;
        border-bottom: 3px solid transparent;
        border-radius: var(--radius-sm);
    }
    .admin-nav-item.active {
        border-bottom-color: var(--fire-orange);
        border-right: none !important;
    }
    /* Mod panel sidebar horizontal scroll */
    .mod-sidebar {
        flex-direction: row !important;
        overflow-x: auto;
    }
}

/* ---- Phones landscape / small tablets (below 768px) ---- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-bright);
        z-index: 999;
        overflow-y: auto;
        max-height: calc(100vh - var(--nav-height));
    }
    .nav-links.open {
        display: flex;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .hero-title {
        font-size: var(--fs-2xl);
    }
    .hero {
        padding: clamp(20px, 4vw, 30px) clamp(12px, 3vw, 20px);
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .vod-grid {
        grid-template-columns: 1fr;
    }
    .game-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Admin table horizontal scroll */
    .admin-table-wrap {
        margin: 0 -12px;
        padding: 0 12px;
    }
    /* Forum categories stack */
    .forum-category {
        flex-wrap: wrap;
    }
    .forum-cat-stats {
        text-align: left;
        width: 100%;
        padding-left: calc(clamp(36px, 3.5vw, 50px) + clamp(10px, 1.2vw, 16px));
    }
}

/* ---- Small phones (below 480px) ---- */
@media (max-width: 480px) {
    .game-list {
        grid-template-columns: 1fr 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .donate-amounts {
        flex-direction: column;
        align-items: stretch;
    }
    .brand-link {
        font-size: clamp(1rem, 4vw, 1.3rem);
        letter-spacing: 1px;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-actions .btn {
        width: 100%;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darkest);
}
::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--blood-red);
}

/* ============================================
   MISC — Utility classes
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-2 { padding: 16px; }
.flex { display: flex; }
.gap-2 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
}
.badge-pending { background: rgba(255,204,0,0.15); color: var(--yellow-pending); }
.badge-approved { background: rgba(68,204,68,0.15); color: var(--green-accent); }
.badge-declined { background: rgba(204,0,0,0.15); color: var(--bright-red); }
.badge-live { background: rgba(204,0,0,0.2); color: var(--bright-red); animation: livePulse 1.5s infinite; }
.badge-admin { background: rgba(255,69,0,0.2); color: var(--fire-orange); }

.search-box {
    display: flex;
    gap: 8px;
}
.search-box .form-input {
    flex: 1;
}

/* ============================================
   FORUM CATEGORY CARDS (with subcategories)
   ============================================ */
.forum-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.forum-category-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-fire);
}
.forum-category-main {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.2vw, 16px);
    padding: clamp(10px, 1.2vw, 16px) clamp(12px, 1.5vw, 20px);
    transition: var(--transition);
}
.forum-category-main:hover {
    background: var(--bg-card-hover);
}

/* Forum Subcategories */
.forum-subcategories {
    border-top: 1px solid var(--border-dark);
    padding: 8px clamp(10px, 1.2vw, 16px) 12px;
    background: rgba(0,0,0,0.15);
}
.forum-subcategory {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-left: 2px solid var(--border-dark);
    margin-bottom: 4px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: var(--transition);
}
.forum-subcategory:hover {
    background: rgba(255,69,0,0.05);
    border-left-color: var(--fire-orange);
}
.forum-sub-icon {
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
}
.forum-sub-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.forum-sub-name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--fire-light);
}
.forum-sub-desc {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}
.forum-sub-stat {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

/* Forum Last Post */
.forum-last-post {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-top: 1px solid var(--border-dark);
    background: rgba(0,0,0,0.1);
    font-size: var(--fs-sm);
}

/* Forum Stats Bar */
.forum-stats-bar {
    display: flex;
    gap: clamp(12px, 2vw, 24px);
    padding: clamp(10px, 1.2vw, 16px) clamp(12px, 1.5vw, 24px);
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    margin-bottom: clamp(16px, 2vw, 24px);
    justify-content: center;
    flex-wrap: wrap;
}
.forum-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.forum-stat-value {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: var(--ember);
}
.forum-stat-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   STREAMERS PAGE — Fluid grid
   ============================================ */
.streamers-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: clamp(12px, 1.5vw, 20px);
    margin-bottom: 12px;
}
.streamers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: clamp(10px, 1.2vw, 16px);
}

.streamer-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: clamp(14px, 1.5vw, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(8px, 1vw, 12px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.streamer-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-fire);
    transform: translateY(-3px);
}

.streamer-featured {
    border-color: var(--border-medium);
    background: linear-gradient(180deg, #2a0808 0%, var(--bg-card) 100%);
}
.streamer-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blood-red), var(--fire-orange), var(--ember));
}

/* Streamer is LIVE glow */
.streamer-is-live {
    border-color: var(--bright-red) !important;
    box-shadow: 0 0 20px rgba(204,0,0,0.4), 0 0 40px rgba(204,0,0,0.2) !important;
    animation: liveGlow 2s ease-in-out infinite alternate;
}

@keyframes liveGlow {
    from { box-shadow: 0 0 15px rgba(204,0,0,0.3), 0 0 30px rgba(204,0,0,0.15); }
    to { box-shadow: 0 0 25px rgba(204,0,0,0.5), 0 0 50px rgba(204,0,0,0.25); }
}

.streamer-avatar-wrap {
    position: relative;
    width: clamp(60px, 7vw, 80px);
    height: clamp(60px, 7vw, 80px);
}
.streamer-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-medium);
    transition: var(--transition);
}
.streamer-card:hover .streamer-avatar {
    border-color: var(--fire-orange);
}
.streamer-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blood-red), var(--fire-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: #fff;
    border: 3px solid var(--border-medium);
}

.streamer-platform {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: clamp(22px, 2.5vw, 26px);
    height: clamp(22px, 2.5vw, 26px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.6rem, 0.7vw, 0.75rem);
    border: 2px solid var(--bg-card);
}
.platform-twitch { background: #9146ff; color: #fff; }
.platform-kick { background: #53ea53; color: #000; }
.platform-youtube { background: #ff0000; color: #fff; }

.streamer-live-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    padding: 2px 6px;
    background: var(--bright-red);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: livePulse 1.5s ease-in-out infinite;
    z-index: 2;
}
.streamer-live-badge.is-live {
    display: inline-block !important;
}

.streamer-info {
    flex: 1;
}
.streamer-name {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--fire-light);
}
.streamer-channel {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 2px;
}
.streamer-bio {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 4px;
}

.streamer-watch-btn {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255,69,0,0.1);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--fire-light);
    transition: var(--transition);
}
.streamer-card:hover .streamer-watch-btn {
    background: linear-gradient(135deg, var(--blood-red), var(--fire-orange));
    color: #fff;
    border-color: var(--fire-orange);
}

/* ============================================
   AD SYSTEM — Public Display & Responsive
   ============================================ */

/* Ad zone containers */
.ad-zone {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.header-banner-ads {
    flex-direction: column;
    gap: 10px;
}

/* Ad item base */
.ad-item {
    position: relative;
    overflow: hidden;
}

/* Sponsored label */
.ad-sponsored-label,
.sponsored-label {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.55rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.5);
    padding: 1px 5px;
    border-radius: 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

/* Sidebar sponsored ads */
.sponsored-ads-widget .sponsored-ad-item {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
    transition: var(--transition);
}
.sponsored-ads-widget .sponsored-ad-item:hover {
    border-color: var(--border-medium);
    background: var(--bg-card-hover);
}
.sponsored-ad-link {
    display: block;
    text-decoration: none;
}
.sponsored-ad-image {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    display: block;
}
.sponsored-ad-title {
    padding: 6px 10px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--fire-light);
    line-height: 1.3;
}

/* ===== RESPONSIVE: Hide oversized banners on mobile ===== */
@media (max-width: 768px) {
    /* Leaderboard (728x90) — too wide for mobile, hide entirely */
    .ad-size-leaderboard {
        display: none !important;
    }
    /* Skyscraper (160x600) — too tall/narrow, hide */
    .ad-size-skyscraper {
        display: none !important;
    }
    /* Banner (468x60) — too wide, hide */
    .ad-size-banner {
        display: none !important;
    }
    /* Header banner zone — collapse if empty after hiding */
    .header-banner-ads:empty {
        display: none;
    }
    /* Footer ads — hide footer ad zone on mobile */
    .footer-ads {
        display: none !important;
    }
    /* Content inline — still show, they're responsive */
    .content-inline-ads {
        grid-template-columns: 1fr !important;
    }
    /* Sidebar ads — still show, they fit mobile sidebar */
    .sponsored-ad-image {
        max-height: 120px;
    }

    /* Portal stream + chat: stack vertically on mobile */
    .portal-content div[style*="grid-template-columns:1.5fr 1fr"],
    .portal-content div[style*="grid-template-columns: 1.5fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    .portal-content div[style*="grid-template-columns:2fr 1fr"],
    .portal-content div[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    .portal-content div[style*="grid-template-columns:1.4fr 1fr"],
    .portal-content div[style*="grid-template-columns: 1.4fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Hide large ad images on mobile in portal */
    .portal-content .sponsored-ad-image {
        max-height: 100px;
    }

    /* Donate amount buttons: wrap on mobile */
    .donate-amounts {
        flex-wrap: wrap !important;
    }
    .donate-amount-btn {
        min-width: 45px !important;
        padding: 6px 12px !important;
        font-size: 0.85rem !important;
    }
}

/* Small phones */
@media (max-width: 480px) {
    /* Stream embed takes full width */
    #dashStreamContainer,
    #streamEmbedContainer {
        padding-bottom: 75% !important; /* 4:3 on small screens */
    }

    /* Chat panels: shorter on mobile */
    #dashSiteChatPanel,
    #dashTwitchChatPanel,
    #dashKickChatPanel,
    #siteChatPanel,
    #twitchChatPanel,
    #kickChatPanel {
        height: 280px !important;
        min-height: 280px !important;
    }

    /* Donate amounts stack */
    .donate-amounts {
        flex-direction: column !important;
        align-items: stretch !important;
    }
}

/* Rectangle (300x250) — show everywhere, fits mobile too */
.ad-size-rectangle {
    max-width: 100%;
}

/* ============================================
   PRINT STYLES — clean output when printing
   ============================================ */
@media print {
    .top-nav, .sidebar, .admin-sidebar, .portal-sidebar,
    .mod-sidebar, .site-footer, .mobile-menu-btn,
    .flash-message, .chat-panel, .live-embed {
        display: none !important;
    }
    .main-layout, .admin-layout, .portal-layout {
        grid-template-columns: 1fr !important;
    }
    body {
        background: #fff;
        color: #000;
    }
    .content-area, .admin-content, .portal-content {
        padding: 0;
    }
}
