/* 1. Variables & Reset */
:root {
  --bg: #050505;
  --panel: #121212;
  --panel-hover: #1a1a1a;
  --text: #f0ede8;
  --muted: #a9b0b6;
  --accent: #ce422b; /* Rust Red */
  --accent-glow: rgba(206, 66, 43, 0.4);
  --accent-2: #f39c12; /* Rust Orange */
  --ok: #8bc34a;
  --warn: #f1c40f;
  --border: #2a2a2a;
  --radius: 8px;
  --shadow: 0 20px 50px rgba(0,0,0,0.7);
  --focus: 0 0 0 3px rgba(206, 66, 43, 0.4);
  
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-head: 'Roboto Condensed', sans-serif;
  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
  /* Fix for layout shift when scrollbar appears */
  scrollbar-gutter: stable;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  /* Subtle noise and vignette */
  background-image: 
    radial-gradient(circle at 50% 0%, #1e1e1e 0%, var(--bg) 80%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
  background-attachment: fixed;
  background-size: cover, auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Scanline Overlay - Performant CSS-only effect */
body::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
  background-size: 100% 4px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.3;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1.2;
}

/* Global Centering for Page Titles */
section h1, 
section h2 {
  text-align: center;
  margin-bottom: 3rem; /* Increased space to prevent hover overlaps */
}

/* Center introductory paragraphs that follow headers */
section h1 + p,
section h2 + p {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 700px;
  margin-top: -1.5rem; /* Pull closer to the header */
  margin-bottom: 3rem; /* Ensure space after the paragraph */
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

ul {
  list-style: none;
}

/* 2. Utilities & Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), 
              transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition: none !important; }
}

main {
  flex: 1;
  padding-top: 4rem;
  padding-bottom: 6rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  position: relative;
  z-index: 1;
}

/* 3. Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.nav__brand {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none; /* Prevents text selection click glitch */
  -webkit-user-select: none;
  transform-origin: left center;
}

.nav__brand:active {
  transform: scale(0.98); /* Controlled click effect */
}

.nav__brand::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--accent);
}

.nav__links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav__links a:not(.btn) {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.5px;
  padding: 0.5rem 0;
}

.nav__links a:not(.btn):hover,
.nav__links a:not(.btn).is-active {
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
}

/* Animated Underline */
.nav__links a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 8px var(--accent);
}

.nav__links a:not(.btn):hover::after,
.nav__links a:not(.btn).is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 1001;
}

.nav__burger::before,
.nav__burger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  transition: transform 0.3s ease;
}

.nav__burger::before { top: 10px; }
.nav__burger::after { bottom: 10px; }

/* 4. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 4px; /* More angular for gaming */
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  font-size: 0.9rem;
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  border: 1px solid transparent;
}

.btn--primary:hover {
  background: #e04830;
  box-shadow: 0 0 25px var(--accent-glow);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}

.btn--ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

/* 5. Hero & Sections */
section {
  margin-bottom: 8rem;
  position: relative;
}

#hero {
  text-align: center;
  padding: 6rem 0 4rem;
  position: relative;
}

/* Hero Glow Background */
#hero::before {
  content: '';
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(206, 66, 43, 0.12) 0%, transparent 60%);
  z-index: -1;
  filter: blur(80px);
  pointer-events: none;
}

#hero h1 {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to bottom, #ffffff 40%, #999 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 20px 40px rgba(0,0,0,0.8);
}

#hero p {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 300;
}

.hero__ctas {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* 6. Components: Cards & Panels */
.mode-card, .queue__card, .store__item, .board__item, .howto__path, .board__list, .form-panel, .stat-card, .chart-container {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Card Link behavior */
a.mode-card {
    display: flex;
    text-decoration: none;
    cursor: pointer;
}

/* Card Hover Effect */
.mode-card:hover, .queue__card:hover, .store__item:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  background-color: var(--panel-hover);
  box-shadow: 0 15px 40px -10px rgba(206, 66, 43, 0.15);
}

/* Modes Grid */
#modes, .queues__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem; /* Increased gap for better spacing */
}

.mode-card {
  font-family: var(--font-head);
  font-size: 1.75rem;
  text-align: center;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--panel) 0%, #0a0a0a 100%);
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  gap: 1rem;
}

/* Placeholder for mode image */
.mode-card::before {
  content: '';
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  margin-bottom: 0.5rem;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

/* How To Play */
#howto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.howto__path {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centered content per user request */
    text-align: center;
}

.howto__path h2 {
    color: var(--accent-2);
    margin-bottom: 2.5rem;
}

.howto__path pre {
  background: #080808;
  padding: 1.5rem;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  margin: 1.5rem 0;
  width: 100%;
  overflow-x: auto;
  color: var(--ok);
  border: 1px solid #222;
  font-size: 1rem;
  text-align: left; /* Keep code left aligned for readability */
}

/* Leaderboards Preview */
#boardsPreview {
  text-align: center;
}

.boards__row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
  text-align: left; /* Reset text align for items inside centered section */
}

.board__item {
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  background: rgba(255,255,255,0.02);
}
.board__item span:first-child {
    color: #fff;
    font-size: 1.1rem;
}
.board__item span:last-child {
    color: var(--accent);
    font-family: var(--font-head);
    font-weight: 700;
}

/* Store Layout */
.store__section {
  margin-bottom: 5rem;
}
.store__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}
.store__item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 300px;
    max-width: 380px;
}
.store__item h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.store__price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 1.5rem;
  display: block;
  text-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}
.store__perks {
  margin: 0 0 2rem 0;
  color: var(--muted);
  flex-grow: 1;
}
.store__perks li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}
.store__perks li::before {
  content: '✓';
  font-weight: bold;
  color: var(--accent);
  position: absolute;
  left: 0;
}
.store__item .btn {
    width: 100%;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #fff;
  font-weight: 500;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid var(--border);
  color: #fff;
  padding: 1rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(206, 66, 43, 0.2);
  background: #0f0f0f;
}

/* Leaderboards Page */
.tabs {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  justify-content: center; /* Center tabs */
}
.tab {
  background: none;
  border: none;
  color: var(--muted);
  padding: 1rem 0.5rem;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 1.25rem;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tab:hover {
    color: #fff;
}
.tab.is-active {
  color: #fff;
  border-bottom-color: var(--accent);
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
.board__list {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 0;
  border: 1px solid var(--border);
}
.board__row {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.board__row:hover {
    background: rgba(255,255,255,0.03);
}
.board__row:last-child { border-bottom: none; }

/* 7. Footer */
.site-footer {
  background: #020202;
  padding: 4rem 2rem;
  text-align: center;
  margin-top: auto;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
}
.footer__brand {
  font-family: var(--font-head);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #fff;
  letter-spacing: 2px;
  opacity: 0.8;
}
.footer__links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.footer__links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer__links a:hover { color: var(--accent); }
.footer__legal {
  color: #444;
  font-size: 0.85rem;
}

/* 8. Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}
.modal[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
}
.modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
}
.modal__panel {
  position: relative;
  background: #161616;
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  width: 90%;
  max-width: 420px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2001;
}
.modal[aria-hidden="false"] .modal__panel {
  transform: scale(1) translateY(0);
}
.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.5rem;
}
.modal__panel h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

/* 9. Responsive Mobile */
@media (max-width: 768px) {
  :root { --nav-height: 70px; }
  #hero h1 { font-size: 3.5rem; }
  
  .nav__burger { display: block; }
  
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
    border-bottom: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 999;
  }
  
  .nav__links.is-open {
    transform: translateX(0);
  }
  
  .nav__links a:not(.btn) {
      font-size: 1.5rem;
  }

  .nav__burger[aria-expanded="true"]::before {
    transform: rotate(45deg);
    top: 15px;
  }
  
  .nav__burger[aria-expanded="true"]::after {
    transform: rotate(-45deg);
    bottom: 15px;
  }
  
  #howto { grid-template-columns: 1fr; }
  
  /* Mobile Notification Adjustment */
  #notification-bell {
    bottom: 20px;
    right: 20px;
  }
  
  #notification-panel {
    bottom: 90px; /* Above bell */
    right: 20px;
    width: calc(100% - 40px); /* Full width with margins */
    max-width: 320px;
  }

  .store__item {
      max-width: 100%; /* Use full width on mobile for stacking */
  }
}

/* --- 10. Badges --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
  margin-left: 0.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.badge--gold {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #000;
  text-shadow: none;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.badge--diamond {
  background: linear-gradient(135deg, #00ffff, #0088ff);
  color: #000;
  text-shadow: none;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.badge--platinum {
  background: linear-gradient(135deg, #e0e0e0, #a0a0a0);
  color: #000;
  text-shadow: none;
}

.badge--red {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(206, 66, 43, 0.4);
}

/* --- 11. Notification Center --- */
#notification-bell {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 56px;
  height: 56px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  /* Centered shadow, tighter to element */
  box-shadow: 0 0 20px rgba(0,0,0,0.5); 
  cursor: pointer;
  z-index: 3000;
  transition: all 0.2s ease;
}

#notification-bell:hover {
  background: var(--panel-hover);
  transform: scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(206, 66, 43, 0.2);
}

#notification-bell svg {
  width: 24px;
  height: 24px;
  fill: var(--text);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
  display: none; /* Hidden by default */
}

.notification-badge.active {
  display: block;
}

/* Bell Shake Animation */
.shaking {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
  animation-delay: 1.5s; /* Delayed Start */
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Inbox Panel */
#notification-panel {
  position: fixed;
  bottom: 110px; /* Raised to match new bell position */
  right: 40px;
  width: 320px;
  max-height: 400px;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 2999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: scaleIn 0.2s ease-out;
}

#notification-panel.is-open {
  display: flex;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.notification-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-head);
  background: rgba(0,0,0,0.2);
}

.notification-header h4 {
  font-size: 1rem;
  margin: 0;
}

.dismiss-all-btn {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 0.2s;
}

.dismiss-all-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.notification-list {
  overflow-y: auto;
  padding: 0;
  margin: 0;
  max-height: 320px;
}

.notification-item {
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: relative;
  transition: background 0.2s;
}

.notification-item:hover {
  background: rgba(255,255,255,0.03);
}

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

.notif-title {
  display: block;
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.notif-msg {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.notif-dismiss {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.notif-dismiss:hover {
  color: var(--accent);
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* Profile Styles in Modal */
.profile-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0; /* Prevent squishing */
  background: #2a2a2a;
  border-radius: 12px; /* Rounded square */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--muted);
  border: 2px solid var(--border);
  overflow: hidden;
}

.profile-details {
  text-align: left;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.profile-stats {
  margin-top: 1.5rem;
  background: rgba(0,0,0,0.2);
  padding: 1rem;
  border-radius: 4px;
  text-align: left;
}

/* --- 12. Affiliate Dashboard --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.stat-card h3 {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.chart-container {
  margin-bottom: 2rem;
  padding: 2rem;
  height: 400px;
  display: flex;
  flex-direction: column;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.data-table th, .data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.data-table td {
  color: #fff;
}

.data-table tr:last-child td {
  border-bottom: none;
}
