/* styles.css (cleaned: removed chat UI rules to avoid conflicts with /css/chat.css)
   Keep this file for site-wide layout + components only.
   Chat UI (header/messages/input/settings) lives in chat.css. */

:root{
  /* ===== DESIGN TOKENS ===== */
  
  /* Typography Scale */
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 42px;
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;
  
  /* Spacing Scale (8px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  
  /* Border Radius Scale */
  --radius-sm: 0;
  --radius: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-full: 9999px; /* Keep full for circles like avatars */
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.45);
  
  /* Transitions */
  --transition-fast: 0.12s ease;
  --transition: 0.15s ease;
  --transition-smooth: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 9999;
  --z-modal: 10000;
  --z-popover: 10001;
  --z-tooltip: 10002;
  
  /* Layout */
  --chatExpanded: 380px;
  --chatCollapsed: 40px;
  --container-max: 1400px;
  
  /* Status Colors */
  --success: #10b981;
  --success-hover: #059669;
  --success-bg: rgba(16, 185, 129, 0.1);
  --success-border: rgba(16, 185, 129, 0.3);
  
  --warning: #f59e0b;
  --warning-hover: #d97706;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --warning-border: rgba(245, 158, 11, 0.3);
  
  --error: #ef4444;
  --error-hover: #dc2626;
  --error-bg: rgba(239, 68, 68, 0.1);
  --error-border: rgba(239, 68, 68, 0.3);
  
  --info: #3b82f6;
  --info-hover: #2563eb;
  --info-bg: rgba(59, 130, 246, 0.1);
  --info-border: rgba(59, 130, 246, 0.3);
  
  /* Gradient Presets */
  --gradient-primary: linear-gradient(135deg, var(--primary, #9146ff) 0%, var(--accent, #a970ff) 100%);
  --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-rainbow: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  
  /* Theme colors are loaded from database in header.php */
}

/* Light Theme Override */
body.light-theme {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel2: #fafafa;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --border: rgba(0,0,0,.12);
}

body.light-theme .brand {
  color: #1d1d1f !important;
}

body.light-theme .nav-btn {
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.15);
  color: #1d1d1f;
}

body.light-theme .nav-btn:hover {
  background: rgba(0,0,0,.1);
  border-color: rgba(0,0,0,.25);
}

body.light-theme .nav-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

*{ box-sizing:border-box; }

html, body{
  height: 100%;
  width: 100%;
}

body{
  margin:0;
  min-height: 100vh;
  display:flex;
  flex-direction:column;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Header */
header{
  position: sticky;
  top:0;
  z-index:10000;
  background: rgba(14,14,16,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--text);
  min-width: 180px;
}

.logo{
  width: 34px;
  height: 34px;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,.12);
  object-fit: cover;
  display:block;
}

.brand span{
  font-weight: 700;
  letter-spacing:.2px;
}

nav{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Nav buttons */
.nav-btn{
  border:1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 9px var(--space-3);
  border-radius: var(--radius);
  font-weight: var(--font-semibold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: transform var(--transition-fast), filter var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
}

.nav-btn:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
  transform: translateY(-1px);
}

.nav-btn:active{
  transform: translateY(0px);
  filter: brightness(.98);
}

.nav-btn.active{
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.nav-btn.active:hover{
  filter: brightness(1.1);
}

.nav-btn.primary{
  border-color: transparent;
  background: var(--primary);
  color: white;
}

.nav-btn.primary:hover{ background: var(--primary-hover); }

.nav-btn.danger{
  border-color: transparent;
  background: var(--danger);
  color: #fff;
}

.nav-btn.danger:hover{ filter: brightness(1.08); }

/* Dropdown navigation */
.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-dropdown .dropdown-arrow {
  font-size: 10px;
  margin-left: 4px;
  transition: transform var(--transition-fast);
}

.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 1000;
  overflow: hidden;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  transition: background-color var(--transition-fast);
  font-size: 14px;
  font-weight: var(--font-medium);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.dropdown-item.active {
  background: var(--primary);
  color: #fff;
}

.dropdown-item.active:hover {
  background: var(--primary-hover);
}

/* Light theme adjustments */
body.light-theme .nav-dropdown .dropdown-menu {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body.light-theme .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Layout */
main{
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 16px;
  display: flex;
}

/* Full-width break out */
main.full-bleed{
  flex: 1 1 auto;
  min-height: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0;
  display: flex;
  flex-direction: column;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Cards */
.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow:hidden;
  box-shadow: var(--shadow-md);
}

/* =========================================================
   Layout authority: FLEX for the stream + chat columns
   (Chat UI styles are in chat.css)
   ========================================================= */
#layoutGrid.grid{
  flex: 1 1 auto;
  min-height: calc(100vh - var(--header-height, 70px) - 40px); /* Account for banner */
  width: 100%;
  display: flex !important;
  align-items: stretch;
  gap: 0;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Stream consumes remaining width */
#layoutGrid .stream-card{
  flex: 1 1 0;
  min-width: 0;
  min-height: 600px !important;
  display:flex !important;
  flex-direction:column;
}

/* iframe fill */
#layoutGrid .stream-card iframe{
  flex: 1 1 auto;
  width: 100% !important;
  height: 100% !important;
  min-height: 500px !important;
  border: 0;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Chat column sizing only (UI inside is in chat.css) */
#layoutGrid .chat-card{
  flex: 0 0 var(--chatExpanded);
  min-width: var(--chatCollapsed);
  min-height: 600px !important;
  display:flex !important;
  flex-direction:column;
  overflow:hidden;
  transition: flex-basis 0.25s ease;
  position: relative; /* settings overlay positioning */
}

/* Optional legacy collapsed rail class (if used anywhere) */
#layoutGrid.chat-collapsed .chat-card{
  flex: 0 0 var(--chatCollapsed);
}

/* Hide chat entirely when toggled from footer (grid toggles .chat-hidden) */
#layoutGrid.chat-hidden #chatPanel{
  display:none !important;
}

/* Events/Activity card sizing and visibility */
#layoutGrid .events-card{
  flex: 0 0 280px !important;
  min-width: 280px !important;
  min-height: 600px !important;
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
}

/* Hide activity entirely when toggled (grid toggles .events-hidden) */
#layoutGrid.events-hidden .events-card{
  display: none !important;
}

/* Responsive */
@media (max-width: 980px){
  #layoutGrid .chat-card{ flex-basis: 320px; }
  .brand{ min-width: unset; }
}

/* ===== MOBILE RESPONSIVE ENHANCEMENTS ===== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  /* Header adjustments */
  .header-inner {
    padding: var(--space-2, 8px) var(--space-3, 12px);
    gap: var(--space-2, 8px);
    flex-wrap: wrap;
  }
  
  .brand span {
    display: none; /* Hide brand text on mobile, keep logo */
  }
  
  nav {
    gap: var(--space-2, 8px);
    flex-wrap: wrap;
  }
  
  .nav-btn {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  /* Main content */
  main {
    padding: var(--space-2, 8px);
  }
  
  /* Stream layout - stack vertically on mobile */
  #layoutGrid.grid {
    flex-direction: column;
    gap: var(--space-2, 8px);
  }
  
  #layoutGrid .chat-card {
    flex: 0 0 auto;
    width: 100%;
    max-height: 400px;
    order: 2; /* Move chat below stream */
  }
  
  #layoutGrid .stream-card {
    flex: 0 0 auto;
    width: 100%;
    min-height: 250px;
    order: 1;
  }
  
  /* Cards */
  .card {
    border-radius: var(--radius, 12px);
  }
  
  /* Container padding */
  .container {
    padding: 0 var(--space-3, 12px);
  }
  
  /* Footer adjustments */
  .footer-inner {
    padding: var(--space-2, 8px) var(--space-3, 12px);
    flex-direction: column;
    gap: var(--space-2, 8px);
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Mobile (640px and below) */
@media (max-width: 640px) {
  /* Smaller typography */
  h1 { font-size: var(--text-2xl, 24px); }
  h2 { font-size: var(--text-xl, 18px); }
  h3 { font-size: var(--text-lg, 16px); }
  
  /* Tighter spacing */
  main {
    padding: var(--space-2, 8px);
  }
  
  .container {
    padding: 0 var(--space-2, 8px);
  }
  
  /* Header - more compact */
  .header-inner {
    padding: var(--space-2, 8px);
  }
  
  .logo {
    width: 28px;
    height: 28px;
  }
  
  .nav-btn {
    padding: 6px 8px;
    font-size: 12px;
    gap: 4px;
  }
  
  /* Hide nav button text, keep icons */
  .nav-btn span:not(.material-icons) {
    display: none;
  }
  
  /* Stream smaller on small mobile */
  #layoutGrid .stream-card {
    min-height: 200px;
  }
  
  #layoutGrid .chat-card {
    max-height: 300px;
  }
  
  /* Store grid - single column */
  .store-grid {
    grid-template-columns: 1fr;
  }
  
  /* XP bar popovers adjust */
  .footer-xp-pop,
  .footer-claim-pop {
    width: 240px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets */
  .nav-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  button,
  .btn {
    min-height: 44px;
    padding: var(--space-3, 12px) var(--space-4, 16px);
  }
  
  /* Remove hover effects on touch */
  .hover-lift:hover {
    transform: none;
  }
  
  .hover-scale:hover {
    transform: none;
  }
  
  /* But add active states */
  .nav-btn:active {
    transform: scale(0.96);
  }
  
  button:active,
  .btn:active {
    transform: scale(0.98);
  }
}

/* Links (used elsewhere) */
.subline a,
.subline a:visited{
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.subline a:hover{
  color: #a970ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== Footer ===== */
footer{
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--panel2);
}

.footer-inner{
  max-width: 1400px;
  margin: 0 auto;
  padding: 5px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.footer-links{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-links a,
.footer-links a:visited{
  color: var(--muted);
  text-decoration:none;
}

.footer-links a:hover{ color: var(--text); }

.footer-chat-toggle{
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 7px;
  font-size: 10px;
  border-radius: 0;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
}

.footer-chat-toggle:hover{
  color: var(--text);
  border-color: var(--accent);
}

.footer-pill{
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 7px;
  font-size: 10px;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
}

.footer-pill:hover{
  color: var(--text);
  border-color: var(--accent);
}

/* Store (unchanged) */
.store-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;}
.store-item{border:1px solid var(--border);border-radius:0;overflow:hidden;background:var(--panel);}
.store-img{width:100%;height:160px;object-fit:cover;background:var(--panel2);}
.store-meta{padding:12px;}
.store-title{font-weight:700;margin-bottom:6px;}
.store-desc{color:var(--muted);font-size:14px;min-height:38px;margin-bottom:10px;}
.store-row{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.store-price{font-weight:700;}
.btn{background:var(--accent);border:0;color:#fff;padding:8px 12px;border-radius:0;cursor:pointer;font-weight:700;}
.btn[disabled]{opacity:.6;cursor:not-allowed;}

/* Guilds (unchanged) */
.guilds-card{ padding: 16px; max-width: 1100px; margin: 0 auto; }
.guilds-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.guilds-head h1{ margin:0; font-size: 20px; }

.current-guild{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: rgba(255,255,255,0.02);
}
.current-guild .dot{ width: 10px; height: 10px; border-radius: 50%; }
.current-guild .label{ font-size: 11px; color: var(--muted); }
.current-guild .value{ font-size: 13px; color: var(--text); font-weight: 600; }
.current-guild .sub{ font-size: 11px; color: var(--muted); margin-top: 2px; }

.notice{
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  font-size: 12px;
}
.notice.error{ border-color: #ff4d4d55; }

.guild-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px){
  .guild-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .guilds-card { padding: var(--space-3, 12px); }
  .guild-tile { padding: 10px; }
}

.guild-tile{
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
}
.guild-tile .guild-top{ display:flex; justify-content:space-between; align-items:center; }
.guild-tile .badge{
  display:inline-flex; align-items:center; gap: 8px;
  padding: 6px 8px;
  border-radius: 0;
  border: 1px solid var(--border);
}
.guild-tile .badge .dot{
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--g);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.guild-tile .badge .name{ font-size: 12px; font-weight: 700; }

.guild-tile .desc{ margin: 10px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.35; }

.guild-actions{ display:flex; align-items:center; gap: 10px; }
.guild-btn{
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 0;
  cursor: pointer;
  font-size: 12px;
}
.guild-btn:hover{ border-color: var(--g); }
.guild-btn:disabled{ opacity: .55; cursor: not-allowed; }
.guild-actions .hint{ font-size: 11px; color: var(--muted); }

/* ===== Level / XP bar (profiles) ===== */
.xp-wrap{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

.xp-top{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 8px;
}

.xp-level{
  font-weight: 800;
  font-size: 13px;
}

.xp-meta{
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.xp-total{
  margin-left: 8px;
  opacity: .9;
}

.xp-bar{
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  overflow:hidden;
}

.xp-fill{
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,0,0,.0) inset;
}

/* =========================================================
   Events panel (keep here; chat header lives in chat.css)
   Make Events header match Chat header height/padding.
   ========================================================= */
.events-card{
  display:flex;
  flex-direction:column;
  min-height: 0;
  width: 220px;
}

/* Match chat header sizing */
.events-header{
  display:flex;
  align-items:center;
  justify-content:space-between;

  height: 25px;           /* same header height */
  padding: 0 8px;         /* reduced padding */
  border-bottom:1px solid var(--border);

  /* optional: match chat header feel */
  background: rgba(24,24,27,.80);
  backdrop-filter: blur(10px);
}

.events-title{
  font-weight: 700;
  letter-spacing:.2px;
  font-size: 12px;        /* match chat title */
  line-height: 1;         /* prevents extra vertical height */
  margin: 0;
}

.events-body{
  flex:1;
  min-height:0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.events-shell{
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.events-shell::-webkit-scrollbar {
  width: 6px;
}
.events-shell::-webkit-scrollbar-track {
  background: transparent;
}
.events-shell::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 0;
}
.events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.activity-settings-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.activity-settings-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Activity Settings Modal */
.activity-settings-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.activity-settings-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.activity-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.activity-settings-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.activity-settings-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.2s;
}

.activity-settings-close:hover {
  color: #fff;
}

.activity-settings-body {
  padding: 20px;
}

.settings-section {
  margin-bottom: 24px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.settings-hint {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: var(--muted);
}

.settings-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px;
  border-radius: 0;
  transition: background 0.2s;
}

.toggle-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.toggle-item input[type=\"checkbox\"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

.toggle-label {
  font-size: 13px;
  color: #fff;
  user-select: none;
}

.settings-refresh {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.refresh-interval {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 26px;
}

.refresh-interval label {
  font-size: 12px;
  color: var(--muted);
}

.refresh-interval select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}

.refresh-interval select:focus {
  border-color: rgba(100, 65, 165, 0.6);
}

.events-empty{
  color: var(--muted);
  font-size: 13px;
  padding: 20px 0;
  text-align: center;
}

/* Activity feed starter */
.events-feed { 
  display:flex; 
  flex-direction:column; 
  gap:8px; 
}

.events-shell {
  scroll-behavior: smooth;
}

.activity-item{
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius: 0;
  padding: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.activity-item:hover {
  transform: translateY(-2px) translateX(2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  background: rgba(255,255,255,.06);
  border-color: rgba(var(--primary-rgb, 139, 92, 246), 0.5);
}

/* New activity item animation */
.activity-item.is-new {
  animation: activitySlideIn 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes activitySlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Loading old activity items */
.activity-item.is-old {
  animation: activitySlideInTop 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes activitySlideInTop {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Spotify Now Playing */
.activity-spotify {
  background: linear-gradient(135deg, rgba(30, 215, 96, 0.15) 0%, rgba(30, 215, 96, 0.05) 100%);
  border-left: 3px solid #1ed760;
  border-top: 1px solid rgba(30, 215, 96, 0.3);
  border-right: 1px solid rgba(30, 215, 96, 0.3);
  border-bottom: 1px solid rgba(30, 215, 96, 0.3);
  padding: 0;
  overflow: hidden;
}

.activity-spotify:hover {
  border-color: rgba(30, 215, 96, 0.6);
  box-shadow: 0 6px 20px rgba(30, 215, 96, 0.3);
  transform: translateY(-3px) scale(1.01);
}

.spotify-link {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: inherit;
}

.spotify-content {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}

.spotify-album-art {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.spotify-info {
  flex: 1;
  min-width: 0;
}

.spotify-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.spotify-icon {
  font-size: 14px;
  line-height: 1;
}

.spotify-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1DB954;
}

.spotify-track {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotify-artist {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-spotify .activity-meta {
  padding-left: 60px;
}

.activity-spotify .activity-time {
  font-size: 11px;
  color: rgba(30, 215, 96, 0.8);
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.activity-icon {
  font-size: 14px;
  line-height: 1;
}

.activity-type-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.activity-msg{ 
  font-size: 13px;
  line-height: 1.4;
  margin: 4px 0;
}

.activity-meta{ 
  margin-top: 4px; 
  font-size: 11px; 
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* Event category styles */
.activity-stream {
  border-left: 3px solid #ef4444;
}

.activity-community {
  border-left: 3px solid #a855f7;
}

.activity-interactive {
  border-left: 3px solid #3b82f6;
}

.activity-system {
  border-left: 3px solid #64748b;
}

/* Activity Command Cards */
.activity-command {
  border-left: 3px solid var(--primary);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(59, 130, 246, 0.05));
}

.command-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.command-icon {
  font-size: 16px;
}

.command-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
}

.command-content {
  font-size: 13px;
  line-height: 1.4;
  margin-top: 4px;
  color: var(--text);
}

.command-content.command-empty {
  color: var(--muted);
  font-style: italic;
  font-size: 12px;
}

.command-link {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
  transition: opacity 0.2s ease;
}

.command-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.command-author {
  font-weight: 600;
  color: var(--text);
}

.command-time {
  color: var(--muted);
  margin-left: 8px;
}

.command-time::before {
  content: '•';
  margin-right: 8px;
}
/* ========== ACTIVITY LAYOUT ==========  */

/* Important Section (Live + Pinned) */
.activity-important {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

/* Hide important section when empty */
.activity-important:empty {
  display: none;
  margin-bottom: 0;
}

/* Live Status Card */
.live-status {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(239, 68, 68, 0.1));
  border: 2px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 16px;
  animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.95; }
}

.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #ef4444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.live-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.live-duration {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.live-game {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.live-game-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.live-game-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.live-game-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(145, 70, 255, 0.4);
}

.live-viewer-count {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Activity Feed - takes remaining space */
.activity-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* When important section is empty, feed takes full space */
.activity-important:empty + .activity-feed {
  margin-top: 0;
}

/* Old activity context - kept for backwards compatibility but hidden */
.activity-context {
  display: none !important;
}

.activity-context.context-hidden {
  display: none !important;
}

.live-status-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.live-status-live {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  animation: livePulse 2s ease-in-out infinite;
}

.live-status-break {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid #fbbf24;
}

.live-status-afk {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  border: 1px solid #94a3b8;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Pinned Activity */
#activityPinned {
  display: none;
  margin-bottom: 10px;
}

.pinned-container {
  position: relative;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(249, 115, 22, 0.1));
  border: 2px solid #eab308;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 3px 10px rgba(234, 179, 8, 0.2);
  animation: pinnedPulse 3s ease-in-out infinite;
}

@keyframes pinnedPulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(234, 179, 8, 0.2); }
  50% { box-shadow: 0 6px 16px rgba(234, 179, 8, 0.4); }
}

.pinned-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.pinned-close-btn:hover {
  background: rgba(0, 0, 0, 0.5);
}

.pinned-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.pinned-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.pinned-message {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 6px;
}

.pinned-timer {
  font-size: 12px;
  font-weight: 600;
  color: #eab308;
  margin-top: 8px;
}

/* Pinned Poll */
.pinned-poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.pinned-poll-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text);
  font-size: 14px;
}

.pinned-poll-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  transform: translateX(4px);
}

.poll-option-text {
  font-weight: 500;
}

.poll-option-votes {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* Pinned Giveaway */
.pinned-giveaway {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pinned-giveaway .pinned-content {
  flex: 1;
}

.pinned-action-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.pinned-action-btn:hover {
  transform: scale(1.05);
}

.pinned-action-btn:disabled,
.pinned-action-btn.entered {
  background: linear-gradient(135deg, #64748b, #475569);
  cursor: not-allowed;
  opacity: 0.7;
}

/* Pinned Announcement */
.pinned-announcement {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pinned-announcement .pinned-content {
  flex: 1;
}

/* Activity Command Input */
.activity-input-container {
  position: relative;
  border-top: 1px solid var(--border);
  padding: 2px;
  background: rgba(24, 24, 27, 0.8);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.activity-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.02)
  );
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
}

.activity-input-row:focus-within {
  border-color: rgba(255,255,255,0.12);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
}

.activity-command-input {
  flex: 1;
  resize: none;
  overflow: hidden;
  min-height: 18px;
  line-height: 1.35;
  height: auto;
  max-height: calc(1.35em * 3 + 8px);
  background: transparent;
  border: none;
  outline: none;
  padding: 0 4px;
  margin: 0;
  color: var(--text);
  font-size: 12px;
}

.activity-command-input::placeholder {
  color: var(--muted);
}

.activity-command-input:disabled {
  opacity: 0.6;
}

.activity-command-submit {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary);
  border: none;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 150ms ease;
  flex-shrink: 0;
  padding: 0;
}

.activity-command-submit:hover:not(:disabled) {
  background: rgba(124, 58, 237, 0.25);
  transform: scale(1.05);
}

.activity-command-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Activity Autocomplete */
.activity-autocomplete {
  position: absolute;
  bottom: 100%;
  left: 12px;
  right: 12px;
  margin-bottom: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}

.autocomplete-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid var(--border);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: rgba(124, 58, 237, 0.1);
}

.autocomplete-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.autocomplete-content {
  flex: 1;
  min-width: 0;
}

.autocomplete-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.autocomplete-command {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  font-family: 'Courier New', monospace;
}

.autocomplete-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.autocomplete-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 4px;
}

.autocomplete-example {
  font-size: 11px;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  opacity: 0.7;
}

/* Activity Reactions - Small inline in header */
.activity-reactions {
  display: none; /* Disabled */
  /* display: flex;
  gap: 2px;
  align-items: center; */
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text);
  opacity: 0.6;
}

.reaction-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

.reaction-btn.reacted {
  opacity: 1;
  filter: drop-shadow(0 0 3px var(--primary));
}

.reaction-count {
  font-size: 9px;
  font-weight: 600;
  color: var(--text);
}

.reaction-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@keyframes reactionPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.reaction-btn.reaction-pulse {
  animation: reactionPulse 0.6s ease;
}

/* Activity hidden by default */
.grid.events-hidden .events-card {
  display: none !important;
}

/* When banner is hidden, expand main content area */
#layoutGrid.banner-hidden {
  /* Grid already has flex: 1, this ensures it takes available space */
  min-height: calc(100vh - var(--header-height, 70px));
}

/* Admin pages should scroll independently */
body.admin main{
  overflow-y: auto;
}
/* ===== Admin scrolling fix ===== */
.admin-main{
  flex: 1 1 auto;
  min-height: 0;            /* critical inside flex layouts */
  width: 100%;
  display: block;           /* stop flex from interfering */
  padding: 16px;
}

.admin-scroll{
  height: 100%;
  max-height: calc(100vh - 70px); /* header height safety */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;       /* keeps scrollbar off the edge */
}

/* Container for logo */
.logo-container {
  display: flex;
  justify-content: center; /* Default to center */
  align-items: center;
  width: 100%;
}

.logo-container.left {
  justify-content: flex-start; /* Align to the left */
}

.logo-container.right {
  justify-content: flex-end; /* Align to the right */
}

/* Logo should scale responsively */
.logo {
  max-width: 100%;
  height: auto;
}

/* ========================================
   LANGUAGE SWITCHER
   ======================================== */
.language-switcher-container {
  position: relative;
  display: inline-block;
}

.language-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
}

.language-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.language-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: var(--text-base);
}

.language-dropdown-item:hover {
  background: var(--panel2);
}

.language-dropdown-item.active {
  background: rgba(145, 70, 255, 0.1);
  color: var(--accent);
}

.language-flag {
  font-size: 20px;
  line-height: 1;
}

.language-name {
  flex: 1;
  font-weight: var(--font-medium);
}

.language-check {
  font-size: 14px;
  color: var(--accent);
  font-weight: var(--font-bold);
}

#languageSwitcherBtn .icon {
  font-size: 18px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .language-dropdown-menu {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
  }
  
  .language-dropdown-menu.show {
    transform: translateX(-50%) translateY(0);
  }
}

/* ========================================
   CHAT MESSAGE TRANSLATION (PREMIUM)
   ======================================== */

/* Translate button in chat messages */
.translate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.translate-btn:hover {
  opacity: 1;
  background: var(--panel2);
  border-color: var(--accent);
}

.translate-btn:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.translate-btn.translated {
  background: rgba(145, 70, 255, 0.1);
  border-color: var(--accent);
  opacity: 1;
}

.translate-btn.premium-locked {
  border-color: #f59e0b;
  color: #f59e0b;
}

.translate-btn.premium-locked:hover {
  background: rgba(245, 158, 11, 0.1);
}

/* Translation quota display */
.translation-quota {
  padding: 8px 12px;
  background: var(--panel2);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin: 8px 0;
}

.quota-label {
  font-weight: var(--font-semibold);
  margin-bottom: 4px;
  color: var(--text);
}

.quota-bar {
  width: 100%;
  height: 4px;
  background: var(--panel);
  border-radius: 2px;
  overflow: hidden;
  margin: 4px 0;
}

.quota-fill {
  height: 100%;
  transition: width 0.3s ease, background 0.3s ease;
}

.quota-text {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 4px;
}

/* Premium modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text);
}

.modal-header {
  padding: 24px 24px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.modal-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
}

.modal-body {
  padding: 24px;
}

.modal-body p {
  margin: 0 0 16px;
  line-height: 1.5;
}

.modal-body ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.modal-body ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.modal-body ul li:last-child {
  border-bottom: none;
}

.modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-footer .btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.modal-footer .btn-primary {
  background: var(--accent);
  color: white;
  border: none;
}

.modal-footer .btn-primary:hover {
  background: var(--primary-hover);
}

.modal-footer .btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.modal-footer .btn-secondary:hover {
  background: var(--panel2);
}

/* Notification toast */
.notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 400px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification-info {
  border-left: 4px solid #3b82f6;
}

.notification-success {
  border-left: 4px solid #10b981;
}

.notification-warning {
  border-left: 4px solid #f59e0b;
}

.notification-error {
  border-left: 4px solid #dc2626;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== CINEMA MODE ===== */
body.cinema-mode {
  background: #000 !important;
  overflow: hidden !important;
}

body.cinema-mode header,
body.cinema-mode footer,
body.cinema-mode #eventsPanel,
body.cinema-mode #channel-banner-top,
body.cinema-mode .leaderboard-card,
body.cinema-mode .guild-card {
  display: none !important;
}

body.cinema-mode #layoutGrid {
  grid-template-columns: 1fr 400px !important;
  grid-template-rows: 1fr !important;
  grid-template-areas: "stream chat" !important;
  gap: 0 !important;
  min-height: 100vh !important;
  max-height: 100vh !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.cinema-mode .stream-card,
body.cinema-mode .chat-card {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

body.cinema-mode .stream-card {
  height: 100vh !important;
}

body.cinema-mode .chat-card {
  height: 100vh !important;
  max-height: 100vh !important;
}
