/* =====================================================
   SOCIALHUB - MAIN STYLESHEET
   Design System: "Local Pulse"
   Palette: Cream/Beige base, Bold Red + Yellow accents
   ===================================================== */

:root {
  /* === NEW BRAND COLOR THEME === */
  --color-bg: #F3EBDD;
  --color-surface: #FFFDF8;
  --color-ink: #1a0a08;
  --color-ink-soft: #7a5c50;
  --color-border: #E5D9C8;
  --color-primary: #F62B22;
  --color-primary-dark: #c41e16;
  --color-primary-light: #FEE9E8;
  --color-saffron: #F9F025;
  --color-teal: #FF6B4A;
  --color-danger: #E74C3C;
  --color-success: #27ae60;
  --color-warning: #FDB833;

  /* Button colors */
  --btn-think: #FF6B4A;
  --btn-write: #F6E952;
  --btn-code: #59A6F7;
  --btn-plan: #F988D4;
  --btn-format: #FDB833;
  --btn-claudecode: #E74C3C;

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #F62B22 0%, #FF6B4A 50%, #FDB833 100%);
  --grad-saffron-teal: linear-gradient(120deg, #F9F025 0%, #FF6B4A 100%);

  /* Typography */
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* Radius & Shadow */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(246,43,34,0.08);
  --shadow-md: 0 8px 24px rgba(246,43,34,0.12);
  --shadow-lg: 0 16px 40px rgba(246,43,34,0.18);

  /* Layout */
  --max-width: 1200px;
  --topbar-height: 64px;
}

/* =====================================================
   DARK MODE
   ===================================================== */
[data-theme="dark"] {
  --color-bg: #1a0f0c;
  --color-surface: #261510;
  --color-ink: #f5ede8;
  --color-ink-soft: #c4907f;
  --color-border: #3d2218;
  --color-primary: #FF6B4A;
  --color-primary-dark: #FDB833;
  --color-primary-light: #3d1a12;
  --color-saffron: #F9F025;
  --color-teal: #FF6B4A;
  --color-danger: #E74C3C;
  --color-success: #2ecc71;
  --color-warning: #FDB833;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.65);
}

[data-theme="dark"] .topbar { background: rgba(38,21,16,0.95); }
[data-theme="dark"] .post-media { background: #0d0604; }
[data-theme="dark"] .admin-sidebar { background: #120a07; }
[data-theme="dark"] .form-control { color: var(--color-ink); }
[data-theme="dark"] .alert-success { background: rgba(46,204,113,0.12); }
[data-theme="dark"] .alert-danger { background: rgba(231,76,60,0.12); }
[data-theme="dark"] .alert-warning { background: rgba(253,184,51,0.12); }
[data-theme="dark"] .alert-info { background: rgba(255,107,74,0.12); }
[data-theme="dark"] .badge-success { background: rgba(46,204,113,0.15); color: #2ecc71; }
[data-theme="dark"] .badge-danger { background: rgba(231,76,60,0.15); color: #E74C3C; }
[data-theme="dark"] .badge-warning { background: rgba(253,184,51,0.15); color: #FDB833; }
[data-theme="dark"] .badge-info { background: rgba(255,107,74,0.15); color: #FF6B4A; }

body, .topbar, .card, .content-card, .post-card, .admin-sidebar, .form-control, .stat-card {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 0.5em;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-outline { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-ink); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

.btn-saffron { background: var(--grad-saffron-teal); color: #222; font-weight: 700; }

.btn-danger { background: var(--color-danger); color: #fff; }
.btn-success { background: var(--color-success); color: #fff; }

/* Named action buttons */
.btn-think  { background: var(--btn-think); color: #fff; }
.btn-write  { background: var(--btn-write); color: #333; }
.btn-code   { background: var(--btn-code); color: #fff; }
.btn-plan   { background: var(--btn-plan); color: #fff; }
.btn-format { background: var(--btn-format); color: #fff; }
.btn-claudecode { background: var(--btn-claudecode); color: #fff; }

.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; border-radius: 50%; }

.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 6px;
  color: var(--color-ink);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14.5px;
  background: var(--color-surface);
  color: var(--color-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
textarea.form-control { resize: vertical; min-height: 100px; }

.form-hint { font-size: 12.5px; color: var(--color-ink-soft); margin-top: 4px; }
.form-error { font-size: 12.5px; color: var(--color-danger); margin-top: 4px; }

.input-group { display: flex; gap: 10px; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .input-row { grid-template-columns: 1fr; } }

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  border-left: 4px solid transparent;
}
.alert-success { background: #e8f8ef; color: #1a6b3a; border-color: var(--color-success); }
.alert-danger  { background: #fdeae8; color: #a31432; border-color: var(--color-danger); }
.alert-warning { background: #fef7e0; color: #8a5700; border-color: var(--color-warning); }
.alert-info    { background: var(--color-primary-light); color: var(--color-primary-dark); border-color: var(--color-primary); }

/* =====================================================
   CARD
   ===================================================== */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.card-body { padding: 22px; }
.card-header { padding: 18px 22px; border-bottom: 1px solid var(--color-border); font-weight: 700; }

/* =====================================================
   TOPBAR / NAVIGATION (User site)
   ===================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-height);
  background: rgba(243,235,221,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
}
.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(15px, 4vw, 21px);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-logo {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(246,43,34,0.35), 0 0 0 2px var(--color-surface);
  flex-shrink: 0;
}
.brand-name {
  position: relative;
  display: inline-block;
}
.brand-roll-logo {
  position: absolute;
  top: 50%;
  right: -14px;
  width: 12px;
  height: 12px;
  min-width: 12px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  animation: brand-logo-roll 5.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes brand-logo-roll {
  0%   { right: -14px; left: auto; transform: translateY(-50%) rotate(0deg);    opacity: 1; }
  38%  { right: 100%;  left: auto; transform: translateY(-50%) rotate(-430deg); opacity: 1; }
  42%  { opacity: 0; }
  100% { opacity: 0; right: -14px; left: auto; transform: translateY(-50%) rotate(0deg); }
}
.brand-name {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.auth-box .brand .brand-logo { width: 40px; height: 40px; min-width: 40px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--color-ink-soft);
  font-weight: 600;
  font-size: 14.5px;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.nav-right { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  background: none; border: none; cursor: pointer; font-size: 17px;
  color: var(--color-ink-soft); width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--color-primary-light); color: var(--color-primary); }

.lang-switch {
  display: flex; align-items: center; background: var(--color-primary-light);
  border-radius: 99px; padding: 3px; gap: 2px;
}
.lang-switch .lang-opt {
  padding: 4px 10px; font-size: 12.5px; font-weight: 700; border-radius: 99px;
  color: var(--color-ink-soft); text-decoration: none; transition: background 0.15s, color 0.15s;
}
.lang-switch .lang-opt.active { background: var(--color-primary); color: #fff; }
.lang-switch .lang-opt:hover:not(.active) { color: var(--color-primary); }
@media (max-width: 640px) { .lang-switch:not(.lang-switch-drawer) { display: none; } }

.translated-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  color: var(--color-ink-soft); background: var(--color-primary-light);
  padding: 5px 12px; border-radius: 99px; margin-bottom: 14px;
}
.translated-badge a { color: var(--color-primary); font-weight: 600; text-decoration: underline; }

.newsletter-box {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; padding: 20px 24px; margin-bottom: 28px;
}
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form .form-control { min-width: 220px; }
@media (max-width: 560px) { .newsletter-box { flex-direction: column; align-items: stretch; } .newsletter-form { flex-direction: column; } }

.trending-widget { margin-bottom: 20px; }
.trending-widget-title {
  font-size: 15px; font-weight: 800; margin-bottom: 10px; color: var(--color-ink);
  display: flex; align-items: center; gap: 8px;
}
.trending-widget-title i { color: #f97316; }
.trending-scroll {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity;
}
.trending-scroll::-webkit-scrollbar { height: 6px; }
.trending-scroll::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 99px; }
.trending-card {
  flex: 0 0 150px; scroll-snap-align: start; text-decoration: none; color: inherit;
}
.trending-card-img {
  position: relative; width: 150px; height: 100px; border-radius: 12px; overflow: hidden;
  background: var(--color-bg-soft); margin-bottom: 8px;
}
.trending-card-img img { width: 100%; height: 100%; object-fit: cover; }
.trending-card-noimg {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--color-ink-soft); font-size: 22px; background: var(--color-primary-light);
}
.trending-badge {
  position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,0.65); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px;
}
.trending-card-title {
  font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--color-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Current Affairs Daily — card style box */
.current-affairs-widget {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 16px; padding: 16px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.current-affairs-title {
  font-size: 15px; font-weight: 800; margin-bottom: 12px; color: var(--color-ink);
  display: flex; align-items: center; gap: 8px;
}
.current-affairs-title i { color: var(--color-primary); }
.current-affairs-date {
  margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--color-ink-soft);
  background: var(--color-bg-soft); padding: 3px 10px; border-radius: 99px;
}
.current-affairs-list { display: flex; flex-direction: column; gap: 12px; }
.current-affairs-item {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit;
  padding-bottom: 12px; border-bottom: 1px solid var(--color-border);
}
.current-affairs-item:last-child { border-bottom: none; padding-bottom: 0; }
.current-affairs-thumb {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: 0 0 56px;
  background: var(--color-bg-soft);
}
.current-affairs-noimg {
  display: flex; align-items: center; justify-content: center; color: var(--color-ink-soft); font-size: 18px;
}
.current-affairs-text { min-width: 0; }
.current-affairs-item-title {
  font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--color-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.current-affairs-time { font-size: 11.5px; color: var(--color-ink-soft); margin-top: 3px; }

/* History of the Day — reuses current-affairs card look, own accent + share buttons */
.history-widget {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 16px; padding: 16px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.history-widget .current-affairs-title i { color: var(--color-primary); }
.history-share-all-btn {
  background: var(--color-bg-soft); border: none; color: var(--color-ink-soft);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.history-share-all-btn:hover { background: var(--color-primary); color: #fff; }
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--color-border);
}
.history-item:last-child { border-bottom: none; padding-bottom: 0; }
.history-year {
  font-size: 11.5px; font-weight: 800; color: var(--color-primary); margin-bottom: 2px;
}
.history-share-btn {
  background: none; border: none; color: var(--color-ink-soft); cursor: pointer;
  font-size: 14px; padding: 6px; flex: 0 0 auto;
}
.history-share-btn:hover { color: var(--color-primary); }

/* Today's Panchang — data-card grid style */
.panchang-widget {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 16px; padding: 16px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.panchang-widget .current-affairs-title i { color: var(--color-primary); }
.panchang-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (min-width: 640px) { .panchang-grid { grid-template-columns: repeat(4, 1fr); } }
.panchang-item {
  background: var(--color-bg-soft, var(--color-bg)); border: 1px solid var(--color-border);
  border-radius: 12px; padding: 10px 12px;
}
.panchang-label {
  font-size: 11.5px; font-weight: 700; color: var(--color-ink-soft);
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.2px;
}
.panchang-label i { color: var(--color-primary); width: 14px; text-align: center; }
.panchang-value { font-size: 13.5px; font-weight: 700; color: var(--color-ink); line-height: 1.3; }
.panchang-value small { font-weight: 500; color: var(--color-ink-soft); font-size: 11px; }

/* AI Chatbot Widget */
.chatbot-fab {
  position: fixed; right: 20px; bottom: 24px; width: 54px; height: 54px; border-radius: 50%;
  background: var(--grad-brand); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; box-shadow: var(--shadow-lg); z-index: 200; transition: transform 0.2s, opacity 0.2s;
}
.chatbot-fab:hover { transform: scale(1.06); }
.chatbot-fab.hide { opacity: 0; pointer-events: none; transform: scale(0.7); }
@media (max-width: 640px) { .chatbot-fab { bottom: 78px; right: 16px; width: 48px; height: 48px; font-size: 19px; } }

.chatbot-panel {
  position: fixed; right: 20px; bottom: 24px; width: 340px; max-width: calc(100vw - 32px);
  height: 460px; max-height: 70vh; background: var(--color-surface); border-radius: 16px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); z-index: 201;
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; pointer-events: none; transform: translateY(16px); transition: opacity 0.2s, transform 0.2s;
}
.chatbot-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
@media (max-width: 640px) { .chatbot-panel { right: 16px; bottom: 78px; width: calc(100vw - 32px); } }

.chatbot-header {
  background: var(--grad-brand); color: #fff; padding: 14px 16px; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.chatbot-header button { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; opacity: 0.85; }
.chatbot-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chatbot-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.chatbot-msg-bot { align-self: flex-start; background: var(--color-bg-soft); color: var(--color-ink); border-bottom-left-radius: 4px; }
.chatbot-msg-user { align-self: flex-end; background: var(--color-primary); color: #fff; border-bottom-right-radius: 4px; }
.chatbot-msg-typing { opacity: 0.6; font-style: italic; }
.chatbot-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--color-border); }
.chatbot-input-row input {
  flex: 1; border: 1px solid var(--color-border); border-radius: 99px; padding: 9px 14px;
  font-size: 13.5px; background: var(--color-bg); color: var(--color-ink); outline: none;
}
.chatbot-input-row button {
  width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--color-primary);
  color: #fff; cursor: pointer; flex-shrink: 0;
}

/* Live News Ticker */
.news-ticker {
  display: flex; align-items: center; background: #1a0f0c; color: #fff;
  border-radius: 10px; overflow: hidden; margin-bottom: 18px; height: 40px;
}
.news-ticker-label {
  flex-shrink: 0; background: var(--color-primary); color: #fff; font-size: 12px; font-weight: 800;
  letter-spacing: 0.03em; text-transform: uppercase; padding: 0 16px; height: 100%;
  display: flex; align-items: center; gap: 6px;
}
.news-ticker-track-wrap { flex: 1; overflow: hidden; position: relative; height: 100%; }
.news-ticker-track {
  position: absolute; white-space: nowrap; display: flex; align-items: center; height: 100%;
  animation: ticker-scroll 40s linear infinite;
}
.news-ticker-track:hover { animation-play-state: paused; }
.news-ticker-track a {
  color: #fff; text-decoration: none; font-size: 13px; font-weight: 500; padding: 0 28px;
  border-right: 1px solid rgba(255,255,255,0.15); white-space: nowrap;
}
.news-ticker-track a:hover { color: var(--color-saffron); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Weather Widget */
.weather-widget {
  background: linear-gradient(135deg, #2563eb, #0ea5e9); color: #fff; border-radius: 14px;
  padding: 16px 18px; margin-bottom: 18px;
}
.weather-main { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.weather-icon { font-size: 34px; line-height: 1; }
.weather-temp { font-size: 24px; font-weight: 800; line-height: 1.1; }
.weather-condition { font-size: 12.5px; opacity: 0.9; }
.weather-city-tabs { display: flex; gap: 8px; overflow-x: auto; }
.weather-city-tabs a {
  color: rgba(255,255,255,0.85); text-decoration: none; font-size: 12px; font-weight: 600;
  padding: 4px 11px; border-radius: 99px; background: rgba(255,255,255,0.15); white-space: nowrap; flex-shrink: 0;
}
.weather-city-tabs a.active { background: #fff; color: #2563eb; }

/* Cricket Score Widget */
.cricket-widget { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; }
.cricket-widget-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; font-weight: 800; font-size: 15px; }
.cricket-widget-header i { color: #16a34a; }
.cricket-tabs { display: flex; gap: 4px; background: var(--color-bg-soft); border-radius: 99px; padding: 3px; }
.cricket-tab { border: none; background: none; padding: 5px 12px; font-size: 12px; font-weight: 700; border-radius: 99px; cursor: pointer; color: var(--color-ink-soft); }
.cricket-tab.active { background: var(--color-primary); color: #fff; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; margin-left: 3px; animation: live-pulse 1.4s infinite; }
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.cricket-pane { display: none; }
.cricket-pane.active { display: block; }
.cricket-match-card { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.cricket-match-card:last-child { border-bottom: none; }
.cricket-match-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.cricket-match-type { font-size: 10.5px; font-weight: 600; color: var(--color-primary); background: var(--color-primary-light); padding: 1px 7px; border-radius: 99px; margin-left: 4px; }
.cricket-scores { font-size: 12.5px; color: var(--color-ink); line-height: 1.6; }
.cricket-status { font-size: 12px; color: var(--color-ink-soft); margin-top: 3px; }
.cricket-date { font-size: 11.5px; color: var(--color-ink-soft); margin-top: 3px; }

/* Video News embed */
.video-embed-wrap { position: relative; width: 100%; padding-top: 56.25%; border-radius: 14px; overflow: hidden; margin-bottom: 24px; background: #000; }
.video-embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.video-badge {
  position: absolute; top: 8px; left: 8px; background: rgba(220,38,38,0.9); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; z-index: 2;
  display: flex; align-items: center; gap: 4px;
}

/* Photo Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gallery-item { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: #fff; font-size: 11.5px; padding: 16px 8px 6px; line-height: 1.3;
}
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 500; display: none;
  align-items: center; justify-content: center; flex-direction: column;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 80vh; border-radius: 6px; }
.lightbox-caption { color: #fff; margin-top: 12px; font-size: 13.5px; text-align: center; max-width: 80vw; }
.lightbox-close { position: absolute; top: 18px; right: 22px; background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); border: none;
  color: #fff; font-size: 20px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 16px; } .lightbox-next { right: 16px; }
@media (max-width: 600px) { .lightbox-nav { width: 36px; height: 36px; font-size: 16px; } }

/* Comment System */
.comments-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--color-border); }
.comments-heading { font-size: 17px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.comment-form { display: flex; gap: 10px; margin-bottom: 22px; align-items: flex-end; }
.comment-form textarea, .reply-box textarea {
  flex: 1; border: 1px solid var(--color-border); border-radius: 12px; padding: 10px 14px;
  font-size: 13.5px; background: var(--color-bg-soft); color: var(--color-ink); resize: vertical; font-family: inherit;
}
.comment-form button, .reply-box button {
  width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--color-primary); color: #fff;
  cursor: pointer; flex-shrink: 0;
}
.comment-item { display: flex; gap: 12px; margin-bottom: 16px; }
.comment-item.comment-reply { margin-top: 12px; margin-bottom: 0; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-body { flex: 1; }
.comment-author { font-weight: 700; font-size: 13.5px; }
.comment-text { font-size: 13.5px; line-height: 1.6; margin: 2px 0 6px; white-space: pre-wrap; }
.comment-meta { display: flex; gap: 14px; font-size: 12px; color: var(--color-ink-soft); }
.comment-meta button { background: none; border: none; color: var(--color-ink-soft); cursor: pointer; font-size: 12px; font-weight: 600; padding: 0; }
.comment-meta button:hover { color: var(--color-primary); }
.reply-box { margin-top: 10px; padding-left: 4px; }
.reply-box form { display: flex; gap: 8px; margin-bottom: 4px; }
.replies-wrap { padding-left: 8px; border-left: 2px solid var(--color-border); margin-top: 4px; }

.search-expand-bar {
  max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  border-top: 1px solid transparent; background: var(--color-surface);
}
.search-expand-bar.open { max-height: 80px; border-top-color: var(--color-border); }
.search-expand-bar form { padding-top: 0 !important; padding-bottom: 0 !important; max-width: var(--max-width); margin: 0 auto; }
.search-expand-bar .input-group { padding: 10px 0; }

/* Notification bell dropdown */
.notif-dot {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
  background: var(--color-danger); border-radius: 50%; border: 2px solid var(--color-surface);
}
.notif-dropdown {
  position: absolute; top: calc(100% + 12px); right: -10px; width: 340px; max-width: 90vw;
  background: var(--color-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border); z-index: 300; display: none; overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-dropdown-header {
  padding: 14px 16px; border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between; font-size: 14px;
}
.notif-dropdown-header a { font-size: 12.5px; font-weight: 600; }
.notif-dropdown-body { max-height: 380px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--color-border);
  color: var(--color-ink); align-items: flex-start;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--color-bg); }
.notif-item.unread { background: var(--color-primary-light); }
.notif-icon {
  width: 36px; height: 36px; border-radius: 50%; background: var(--grad-brand); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px;
}
.notif-title { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.notif-message { font-size: 12.5px; color: var(--color-ink-soft); margin-top: 2px; }
.notif-time { font-size: 11px; color: var(--color-ink-soft); margin-top: 4px; }

@media (max-width: 480px) {
  .notif-dropdown { position: fixed; top: var(--topbar-height); right: 8px; left: 8px; width: auto; }
}
@media (max-width: 380px) {
  .drawer-menu-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .btn-outline { background: var(--color-surface); box-shadow: 0 1px 5px rgba(0,0,0,0.08); }
  .btn { box-shadow: 0 1px 5px rgba(0,0,0,0.08); }
}

.avatar-sm {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--color-border);
}
.hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--color-ink);
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
}

/* Mobile drawer -> app-style popup (bottom sheet) */
.mobile-drawer {
  position: fixed; left: 50%; bottom: 0; right: auto; top: auto;
  width: min(480px, 100%);
  max-height: 82vh;
  transform: translate(-50%, 100%);
  background: var(--color-surface); z-index: 200;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.25);
  transition: transform 0.28s ease;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
}
.mobile-drawer.open { transform: translate(-50%, 0); }
.drawer-handle {
  width: 42px; height: 4px; border-radius: 999px; background: var(--color-border);
  margin: 6px auto 14px;
}
.drawer-menu-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding-bottom: 4px;
}
.drawer-menu-grid a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center;
  background: var(--color-bg-soft); border: 1px solid var(--color-border);
  border-radius: 14px; padding: 14px 6px;
  color: var(--color-ink); font-weight: 600; font-size: 12px;
  min-height: 78px;
}
.drawer-menu-grid a i {
  font-size: 19px; color: var(--color-primary);
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-light);
}
.drawer-menu-grid a:active { transform: scale(0.96); }
.drawer-menu-grid a.drawer-danger i { color: var(--color-danger); background: rgba(220,53,69,0.12); }
.drawer-menu-grid a.drawer-danger { color: var(--color-danger); }
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 199;
  display: none;
}
.drawer-overlay.open { display: block; }

/* Bottom nav for mobile */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  background: var(--color-surface);
  border-top: 2px solid var(--color-primary);
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  overflow-x: auto;
  -ms-overflow-style: none; scrollbar-width: none;
}
.bottom-nav::-webkit-scrollbar { display: none; }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; color: var(--color-ink-soft); font-weight: 600;
  flex: 0 0 auto; min-width: 58px; padding: 0 4px;
}
.bottom-nav a.active { color: var(--color-primary); }
.bottom-nav i { font-size: 19px; }

@media (max-width: 720px) {
  .bottom-nav { display: flex; }
  body { padding-bottom: 64px; }
  footer.site-footer { display: none !important; }
}

/* =====================================================
   FEED / POSTS (Instagram style)
   ===================================================== */
.feed { max-width: 560px; margin: 28px auto; padding: 0 16px; }

/* =====================================================
   HOME PAGE — HERO, QUICK LINKS, WIDGET STACK
   ===================================================== */
.home-hero {
  background: var(--grad-brand);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  margin-bottom: 18px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.home-hero::after {
  content: "";
  position: absolute; right: -30px; top: -30px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.home-hero-text { position: relative; z-index: 1; }
.home-hero-eyebrow { font-size: 12.5px; font-weight: 700; opacity: 0.92; letter-spacing: 0.2px; margin-bottom: 4px; }
.home-hero-title { font-size: 21px; font-weight: 800; margin: 0 0 4px; line-height: 1.2; }
.home-hero-sub { font-size: 13.5px; opacity: 0.92; margin: 0; }
.home-hero-btn {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.18); color: #fff; border: 1.5px solid rgba(255,255,255,0.4);
  font-weight: 700; font-size: 13px; padding: 10px 16px; border-radius: var(--radius-pill);
  white-space: nowrap; backdrop-filter: blur(2px);
}
.home-hero-btn:hover { background: rgba(255,255,255,0.28); }

.home-quicklinks { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-bottom: 20px; }
.home-quicklinks .category-card { padding: 14px 8px; }
.home-quicklinks .category-card-icon { width: 42px; height: 42px; font-size: 17px; }
.home-quicklinks .category-card strong { font-size: 12px; }

.home-widget-stack > * { margin-bottom: 18px; }
.home-widget-stack > *:last-child { margin-bottom: 0; }

.home-feed-divider {
  display: flex; align-items: center; text-align: center;
  margin: 26px 0 16px; color: var(--color-ink-soft); font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
}
.home-feed-divider::before, .home-feed-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--color-border);
}
.home-feed-divider span { padding: 0 12px; white-space: nowrap; }

.post-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.post-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
}
.post-header .name { font-weight: 700; font-size: 14.5px; }
.post-header .meta { font-size: 12px; color: var(--color-ink-soft); }
.post-media { width: 100%; background: #1a0a08; max-height: 600px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.post-media img, .post-media video { width: 100%; max-height: 600px; object-fit: cover; }

/* Carousel (multi-image posts) */
.post-media.carousel { position: relative; display: block; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel-slide img, .carousel-slide video { width: 100%; max-height: 600px; object-fit: cover; display: block; }
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 32px; height: 32px; border-radius: 50%; background: rgba(246,43,34,0.7);
  color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: background 0.15s;
}
.carousel-nav:hover { background: rgba(246,43,34,0.9); }
.carousel-nav.prev { left: 10px; }
.carousel-nav.next { right: 10px; }
.carousel-counter {
  position: absolute; top: 10px; right: 10px; z-index: 10;
  background: rgba(246,43,34,0.75); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: var(--radius-pill);
}
.carousel-dots {
  position: absolute; bottom: 10px; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: center; gap: 5px;
}
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); transition: background 0.15s, transform 0.15s; }
.carousel-dot.active { background: var(--color-primary); transform: scale(1.3); }

@media (max-width: 600px) {
  .carousel-nav { display: none; }
}
.post-actions { display: flex; align-items: center; gap: 16px; padding: 12px 16px 6px; }
.post-actions button {
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: var(--color-ink); display: flex; align-items: center; gap: 6px;
  transition: transform 0.15s;
}
.post-actions button:active { transform: scale(1.2); }
.post-actions .liked { color: var(--color-danger); }
.post-actions .saved { color: var(--color-saffron); }
.post-actions { justify-content: flex-start; }
.post-actions .save-btn-wrap { margin-left: auto; }
.post-likes-count { padding: 0 16px; font-weight: 700; font-size: 14px; }
.post-caption { padding: 6px 16px 4px; font-size: 14px; }
.post-caption .name { font-weight: 700; margin-right: 6px; }
.post-comments-preview { padding: 0 16px; font-size: 13.5px; color: var(--color-ink-soft); }
.post-comments-preview a { color: var(--color-ink-soft); font-weight: 600; }
.post-time { padding: 6px 16px 14px; font-size: 11.5px; color: var(--color-ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }

.comment-box { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--color-border); align-items: center; }
.comment-box input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; color: var(--color-ink); }
.comment-box button { background: none; border: none; color: var(--color-primary); font-weight: 700; cursor: pointer; }

/* Sponsored ad cards in feed */
.post-card.ad-card { border: 1.5px solid var(--color-warning); position: relative; }
.post-card.ad-card::before {
  content: 'AD';
  position: absolute; top: 12px; right: 14px; z-index: 5;
  background: var(--color-primary); color: #fff; font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 6px; letter-spacing: 0.05em;
}

/* Poll cards in feed */
.post-card.poll-card { border: 1.5px solid var(--color-teal); }
.poll-card-body { padding: 16px; }
.poll-question { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--color-primary); }
.poll-description { font-size: 13.5px; color: var(--color-ink-soft); margin-bottom: 14px; }
.poll-options { display: flex; flex-direction: column; gap: 10px; }
.poll-option-btn {
  display: block; width: 100%; text-align: left; padding: 12px 16px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-surface); font-size: 14px; font-weight: 600; color: var(--color-ink);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.poll-option-btn:hover { border-color: var(--color-primary); background: var(--color-primary-light); }
.poll-result-row { margin-bottom: 4px; }
.poll-result-label { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.poll-result-row.selected .poll-result-label { color: var(--color-primary); }
.poll-result-row.selected .poll-result-label i { color: var(--color-primary); }
.poll-bar-track { background: var(--color-bg); border-radius: var(--radius-pill); height: 10px; overflow: hidden; }
.poll-bar-fill { background: var(--grad-brand); height: 100%; border-radius: var(--radius-pill); transition: width 0.4s ease; }
.poll-meta-row { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12px; color: var(--color-ink-soft); }

/* Battle cards in feed */
.post-card.battle-card { border: 1.5px solid var(--color-danger); }
.battle-card-body { padding: 16px; }
.battle-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; text-align: center; color: var(--color-primary); }
.battle-vs-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.battle-side {
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden;
  cursor: pointer; text-align: center; transition: border-color 0.15s, transform 0.15s; position: relative;
}
.battle-side:hover { transform: translateY(-2px); }
.battle-side.a:hover, .battle-side.a.chosen { border-color: var(--color-primary); }
.battle-side.b:hover, .battle-side.b.chosen { border-color: var(--color-danger); }
.battle-side img { width: 100%; height: 110px; object-fit: cover; }
.battle-side-label { padding: 10px 8px; font-size: 13.5px; font-weight: 700; }
.battle-pct { display: none; font-size: 18px; font-weight: 800; padding-bottom: 6px; color: var(--color-primary); }
.voted .battle-pct { display: block; }
.battle-bar-track { height: 4px; background: var(--color-bg); }
.battle-bar { height: 100%; width: 0%; transition: width 0.4s ease; }
.battle-bar.a { background: var(--color-primary); }
.battle-bar.b { background: var(--color-danger); }
.battle-vs-label {
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad-brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex-shrink: 0;
}
.battle-meta-row { text-align: center; margin-top: 14px; font-size: 12px; color: var(--color-ink-soft); }

.comments-list { padding: 4px 16px 12px; max-height: 220px; overflow-y: auto; }
.comment-item { font-size: 13.5px; margin-bottom: 8px; }
.comment-item .name { font-weight: 700; margin-right: 6px; }
.comment-item .time { color: var(--color-ink-soft); font-size: 11px; margin-left: 6px; }

/* =====================================================
   GRID LAYOUTS (News / Business / Education cards)
   ===================================================== */
.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.content-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex; flex-direction: column;
}
.content-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.content-card .thumb { width: 100%; height: 180px; object-fit: cover; background: var(--color-primary-light); }
.content-card .body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.content-card .tag, .tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--color-primary-light); color: var(--color-primary);
  text-transform: uppercase; letter-spacing: 0.03em; width: fit-content;
}
.content-card h3 { font-size: 16.5px; line-height: 1.35; margin: 0; }
.content-card .desc { font-size: 13.5px; color: var(--color-ink-soft); flex: 1; }
.content-card .footer-meta { font-size: 12px; color: var(--color-ink-soft); display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

/* =====================================================
   BUSINESS DIRECTORY SPECIFIC
   ===================================================== */
.biz-card .logo-row { display: flex; align-items: center; gap: 12px; padding: 16px 16px 0; }
.biz-card .logo {
  width: 54px; height: 54px; border-radius: var(--radius-sm);
  object-fit: cover; border: 1px solid var(--color-border);
}
.biz-card .rating { color: var(--color-warning); font-size: 13px; font-weight: 700; }
.biz-card .location-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--color-ink-soft); }
.biz-card .call-btn { margin-top: 4px; }

.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px;
  align-items: center;
}
.filter-chip {
  padding: 8px 16px; border-radius: var(--radius-pill); font-size: 13px;
  font-weight: 600; background: var(--color-surface); border: 1.5px solid var(--color-border);
  cursor: pointer; color: var(--color-ink-soft); white-space: nowrap;
}
.filter-chip.active { background: var(--grad-brand); color: #fff; border-color: transparent; }

.category-card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  margin-bottom: 24px;
}
.category-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--color-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.category-card:hover, .category-card:active {
  transform: translateY(-3px); box-shadow: var(--shadow-md);
  color: var(--color-ink); border-color: var(--color-primary);
}
.category-card.active { background: var(--grad-brand); border-color: transparent; color: #fff; }
.category-card.active .category-card-icon { background: rgba(255,255,255,0.22); color: #fff; }
.category-card.active .category-card-count { color: rgba(255,255,255,0.85); }
.category-card-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--color-primary-light); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  overflow: hidden; flex-shrink: 0;
}
.category-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.category-card strong { font-size: 13px; line-height: 1.25; }
.category-card-count { font-size: 11px; color: var(--color-ink-soft); }

/* =====================================================
   POPUP IMAGE AD (site-wide modal, admin controlled)
   ===================================================== */
.popup-ad-overlay { z-index: 900; }
.popup-ad-box {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  max-width: 380px; width: 100%;
  padding: 0; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.popup-ad-box img { width: 100%; display: block; max-height: 55vh; object-fit: contain; background: var(--color-primary-light); }
.popup-ad-body { padding: 16px 18px 18px; }
.popup-ad-title { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: var(--color-ink); margin-bottom: 6px; }
.popup-ad-desc { font-size: 13.5px; color: var(--color-ink-soft); line-height: 1.5; margin-bottom: 4px; }
.popup-ad-close {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(26,10,8,0.65); color: #fff; font-size: 15px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.popup-ad-close:hover { background: rgba(26,10,8,0.85); }
.popup-ad-cta { display: block; margin: 6px 0 0; text-align: center; }

/* =====================================================
   GLOBAL IMAGE LIGHTBOX (click any content image to zoom)
   ===================================================== */
.img-lightbox-overlay {
  display: none; position: fixed; inset: 0; z-index: 950;
  background: rgba(15, 8, 6, 0.92);
  align-items: center; justify-content: center; padding: 24px;
}
.img-lightbox-overlay.open { display: flex; }
.img-lightbox-overlay img {
  max-width: 100%; max-height: 90vh; border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); object-fit: contain;
}
.img-lightbox-close {
  position: absolute; top: 18px; right: 18px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.img-lightbox-close:hover { background: rgba(255,255,255,0.25); }
[data-lightbox] img, .content-card .thumb, .gallery-item img { cursor: zoom-in; }

/* =====================================================
   PROFILE PAGE
   ===================================================== */
.profile-header {
  background: var(--grad-brand);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.profile-header .avatar-lg {
  width: 96px; height: 96px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.5); object-fit: cover;
}
.profile-header h2 { color: #fff; margin-bottom: 4px; }
.profile-header p { opacity: 0.85; margin: 0; font-size: 13.5px; }

@media (max-width: 600px) {
  .profile-header { flex-direction: column; text-align: center; padding: 28px 20px; }
}

/* =====================================================
   AUTH PAGES (Login / Register)
   ===================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-brand);
  padding: 24px;
}
.auth-box {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
}
.auth-box .brand { justify-content: center; margin-bottom: 6px; font-size: 26px; }
.auth-box .subtitle { text-align: center; color: var(--color-ink-soft); font-size: 13.5px; margin-bottom: 26px; }
.auth-switch { text-align: center; font-size: 14px; margin-top: 16px; color: var(--color-ink-soft); }
.auth-switch a { font-weight: 700; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--color-ink-soft); font-size: 12.5px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--color-border); }

/* =====================================================
   ADMIN PANEL LAYOUT
   ===================================================== */
.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 250px;
  background: #1a0a08;
  color: #d4b5a8;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: margin-left 0.25s ease;
  border-right: 2px solid var(--color-primary);
}
.admin-sidebar .brand { color: #fff; padding: 22px 20px; font-size: 19px; }
.admin-sidebar .brand span { color: var(--color-saffron); }
.sidebar-section-label {
  padding: 18px 20px 8px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; color: #7a5042; font-weight: 700;
}
.admin-sidebar a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; color: #d4b5a8; font-size: 14px; font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.admin-sidebar a:hover { background: rgba(246,43,34,0.12); color: #fff; }
.admin-sidebar a.active { background: rgba(246,43,34,0.2); color: #fff; border-color: var(--color-primary); }
.admin-sidebar i { width: 20px; text-align: center; }

.admin-main { flex: 1; min-width: 0; background: var(--color-bg); }
.admin-topbar {
  height: 64px; background: var(--color-surface); border-bottom: 2px solid var(--color-primary);
  display: flex; align-items: center; justify-content: space-between; padding: 0 26px;
  position: sticky; top: 0; z-index: 50;
}
.admin-content { padding: 26px; }

.admin-sidebar-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; }

@media (max-width: 900px) {
  .admin-sidebar { position: fixed; left: 0; z-index: 300; margin-left: -250px; }
  .admin-sidebar.open { margin-left: 0; box-shadow: var(--shadow-lg); }
  .admin-sidebar-toggle { display: block; }
}

/* Stat cards */
.stat-card {
  background: var(--color-surface); border-radius: var(--radius-md);
  padding: 22px; border: 1px solid var(--color-border);
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm);
}
.stat-card .icon-box {
  width: 50px; height: 50px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 21px; color: #fff;
  flex-shrink: 0;
}
.stat-card .value { font-size: 26px; font-weight: 800; line-height: 1; color: var(--color-primary); }
.stat-card .label { font-size: 12.5px; color: var(--color-ink-soft); margin-top: 3px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 26px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; }
table.data-table th, table.data-table td {
  padding: 13px 16px; text-align: left; font-size: 13.5px; border-bottom: 1px solid var(--color-border);
}
table.data-table th { background: var(--color-bg); font-weight: 700; color: var(--color-primary); text-transform: uppercase; font-size: 11.5px; letter-spacing: 0.03em; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: rgba(246,43,34,0.03); }
table.data-table img.thumb-sm { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }

.badge { padding: 4px 12px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 700; display: inline-block; }
.badge-success { background: #e8f8ef; color: #1a6b3a; }
.badge-danger  { background: #fdeae8; color: #a31432; }
.badge-warning { background: #fef7e0; color: #8a5700; }
.badge-info    { background: var(--color-primary-light); color: var(--color-primary-dark); }
.badge-secondary { background: #eef0f2; color: #5a6672; }

.action-icons { display: flex; gap: 8px; }
.action-icons a, .action-icons button {
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-ink-soft); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.action-icons a:hover, .action-icons button:hover { background: var(--color-primary-light); color: var(--color-primary); border-color: var(--color-primary); }

/* =====================================================
   UTILITIES
   ===================================================== */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-10 { gap: 10px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.text-muted { color: var(--color-ink-soft); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--color-ink-soft); }
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.page-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.section-title { font-size: 22px; margin-bottom: 4px; }
.section-subtitle { color: var(--color-ink-soft); font-size: 14px; margin-bottom: 24px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--color-border); font-size: 13.5px; font-weight: 600; color: var(--color-ink);
}
.pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination .active { background: var(--grad-brand); color: #fff; border-color: transparent; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(26,10,8,0.6); z-index: 500;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--color-surface); border-radius: var(--radius-lg); max-width: 480px; width: 100%;
  padding: 28px; max-height: 90vh; overflow-y: auto;
}

footer.site-footer {
  background: #1a0a08; color: #9d7566; padding: 50px 0 24px; margin-top: 60px;
}
footer.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
footer.site-footer a { color: #9d7566; font-size: 13.5px; line-height: 2.1; }
footer.site-footer a:hover { color: var(--color-saffron); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 30px; }
.footer-bottom { text-align: center; padding-top: 30px; margin-top: 30px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 12.5px; }

.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   FEATURE GRID (Explore Features popup, Profile Quick Links,
   Premium Features) — card-style tile buttons
   ===================================================== */
.feature-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.feature-tile {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px 10px;
  text-align: center;
  text-decoration: none;
  color: var(--color-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.feature-tile:hover, .feature-tile:active {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
  color: var(--color-ink);
}
.feature-tile .feature-icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--color-primary-light); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  flex-shrink: 0;
}
.feature-tile strong { font-size: 13px; line-height: 1.25; }
.feature-tile small { font-size: 11px; color: var(--color-ink-soft); }

/* =====================================================
   GAMES ZONE — card-style game picker tabs
   ===================================================== */
.game-tabs {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  margin-bottom: 22px;
}
.game-tabs button {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 10px;
  text-align: center;
  color: var(--color-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.game-tabs button i {
  font-size: 20px;
  color: var(--color-primary);
}
.game-tabs button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.game-tabs button.active {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
}
.game-tabs button.active i { color: #fff; }
.game-tabs a.btn { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 640px) {
  .game-tabs { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}