/* CenkBey-inspired design system — dark casino/streamer theme */
:root {
  --bg-body: #0a0a0a;
  --bg-panel: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --bg-sidebar: #0d0d0d;
  --border: #222222;
  --border-light: #2a2a2a;
  --red: #e11d2e;
  --red-bright: #ff2d3f;
  --red-dim: #9b1b26;
  --red-glow: rgba(225, 29, 46, 0.35);
  --text: #f0f0f0;
  --text-muted: #8a8a8a;
  --text-dim: #5a5a5a;
  --green: #22c55e;
  --gold: #eab308;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 220px;
  --right-w: 280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg-body);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--red-bright); text-decoration: none; transition: color .15s; }
a:hover { color: #ff6b7a; }
img { max-width: 100%; display: block; }

.topbar {
  height: 56px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.topbar-logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: var(--text);
}
.topbar-logo span { color: var(--red); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-bright); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--red); color: var(--red-bright); }
.btn-white { background: #fff; color: #111; }
.btn-white:hover { background: #e5e5e5; color: #111; }

.shell { display: flex; flex: 1; min-height: calc(100vh - 56px); }

.sidebar-left {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 16px 10px;
  flex-shrink: 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--bg-card); color: var(--text); }
.nav-item.active {
  background: rgba(225, 29, 46, 0.12);
  color: var(--red-bright);
  border-left: 3px solid var(--red);
  padding-left: 11px;
}
.nav-section {
  margin-top: 20px;
  padding: 0 14px 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.main-area {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 60px;
  background: var(--bg-body);
}

.sidebar-right {
  width: var(--right-w);
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-header .dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
}
.chat-body { flex: 1; padding: 12px; overflow-y: auto; font-size: 0.82rem; }
.chat-msg { margin-bottom: 10px; line-height: 1.4; }
.chat-msg .user { color: var(--red-bright); font-weight: 600; }
.chat-msg .user.green { color: var(--green); }
.chat-msg .user.gold { color: var(--gold); }
.chat-msg .text { color: var(--text-muted); }
.chat-input-wrap { padding: 12px; border-top: 1px solid var(--border); }
.chat-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
}
.chat-input:focus { border-color: var(--red-dim); }

.hero-block {
  background: linear-gradient(145deg, #141414 0%, #0e0e0e 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.hero-block::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero-block h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.hero-block h1 .red { color: var(--red); }
.hero-block p.lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-card .num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--red-bright);
  display: block;
}
.stat-card .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.section-title a:hover { color: var(--red-bright); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color .15s, background .15s, transform .12s;
}
.card:hover {
  border-color: var(--red-dim);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--red-bright); }
.card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
}
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
  text-align: left;
  padding: 12px 16px;
  background: #1a1a1a;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }
td.highlight { color: var(--text); font-weight: 600; }
td.red { color: var(--red-bright); font-weight: 700; }
td.green { color: var(--green); }

.page-header { margin-bottom: 28px; }
.page-header h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.page-header .meta { color: var(--text-muted); font-size: 0.85rem; }
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--red-bright); }

.article-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 28px;
}
.article-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.article-content h2:first-child { margin-top: 0; }
.article-content h3 { font-size: 1.1rem; margin: 20px 0 10px; }
.article-content p { margin-bottom: 14px; color: var(--text-muted); }
.article-content ul, .article-content ol {
  margin: 12px 0 16px 22px;
  color: var(--text-muted);
}
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--text); }
.article-content a { color: var(--red-bright); }

.info-box {
  background: rgba(225, 29, 46, 0.08);
  border: 1px solid rgba(225, 29, 46, 0.25);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.info-box strong { color: var(--red-bright); }

.site-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  padding: 40px 32px 24px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto 28px;
}
.footer-brand { font-weight: 800; font-size: 1.15rem; margin-bottom: 10px; }
.footer-brand span { color: var(--red); }
.footer-desc { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }
.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--red-bright); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .sidebar-right { display: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .sidebar-left { display: none; }
  .main-area { padding: 20px 16px 40px; }
  .hero-block { padding: 32px 24px; }
  .hero-block h1 { font-size: 1.7rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
}

/* ========== MOBILE IMPROVEMENTS ========== */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
}
.mobile-toggle:hover { border-color: var(--red); color: var(--red-bright); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 150;
}

@media (max-width: 1100px) {
  .sidebar-right { display: none !important; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .mobile-toggle { display: inline-flex; }

  .sidebar-left {
    position: fixed;
    left: 0;
    top: 56px;
    bottom: 0;
    width: min(280px, 85vw);
    z-index: 160;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    height: calc(100vh - 56px);
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar-left.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }

  .main-area {
    padding: 20px 16px 48px;
  }

  .hero-block {
    padding: 28px 20px;
    border-radius: 12px;
  }
  .hero-block h1 {
    font-size: 1.55rem;
    letter-spacing: -0.5px;
  }
  .hero-block p.lead {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-card {
    padding: 16px 12px;
  }
  .stat-card .num { font-size: 1.35rem; }
  .stat-card .label { font-size: 0.75rem; }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table { min-width: 480px; }
  th, td { padding: 10px 12px; font-size: 0.8rem; }

  .article-content {
    padding: 22px 16px;
    border-radius: 10px;
  }
  .page-header h1 { font-size: 1.45rem; }
  .section-title { font-size: 1.1rem; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .site-footer { padding: 32px 16px 20px; }
}

@media (max-width: 520px) {
  .topbar { padding: 0 12px; height: 52px; }
  .topbar-logo { font-size: 1.05rem; }
  .topbar-actions .btn-outline { display: none; }
  .btn { padding: 8px 14px; font-size: 0.8rem; }

  .stats-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-block h1 { font-size: 1.35rem; }

  table { min-width: 400px; }
  .chat-header, .nav-section { font-size: 0.75rem; }
}

/* Touch-friendly nav items on mobile */
@media (max-width: 900px) {
  .nav-item {
    padding: 12px 14px;
    font-size: 0.95rem;
  }
}
