/* NatMedias Web — Modern News Portal */
:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface2: #F1F5F9;
  --text: #0F172A;
  --text2: #475569;
  --text3: #94A3B8;
  --border: #E2E8F0;
  --primary: #6366F1;
  --primary-light: #EEF2FF;
  --accent: #EC4899;
  --success: #10B981;
  --podcast-accent: #DC2626;
  --podcast-accent-hover: #EF4444;
  --podcast-accent-dark: #991B1B;
  --podcast-accent-2: #7C3AED;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.08);
  --max-w: 1280px;
  --transition: .2s ease;
}

[data-theme="dark"] {
  --bg: #0F172A;
  --surface: #1E293B;
  --surface2: #334155;
  --text: #F1F5F9;
  --text2: #94A3B8;
  --text3: #64748B;
  --border: #334155;
  --primary-light: #312E81;
  --shadow: 0 1px 3px rgba(0,0,0,.2);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.3);
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
  overflow-x: hidden;
  width: 100%;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===================== NAVBAR ===================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.navbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar-logo img {
  height: 36px;
  width: auto;
}

.navbar-logo span {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 24px;
  list-style: none;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  transition: all var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  color: #ffffff;
  background: var(--primary-light);
}
.nav-whatsapp, .nav-telegram { display: inline-flex; align-items: center; justify-content: center; padding: 8px !important; }
.nav-whatsapp { color: #25D366 !important; }
.nav-whatsapp:hover { background: rgba(37,211,102,.1) !important; color: #1da851 !important; }
.nav-telegram { color: #0088cc !important; }
.nav-telegram:hover { background: rgba(0,136,204,.1) !important; color: #006daa !important; }

.navbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form {
  position: relative;
  width: 260px;
}

.search-form input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
}

.search-form input::placeholder { color: var(--text3); }
.search-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }

.search-form .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  pointer-events: none;
}

.search-suggest {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 1000;
  max-height: 380px;
  overflow-y: auto;
}
.search-suggest.open { display: block; }

.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  color: var(--text1);
}
.suggest-item:hover, .suggest-item.active { background: var(--bg2, #f1f5f9); }
[data-theme="dark"] .suggest-item:hover, [data-theme="dark"] .suggest-item.active { background: var(--surface2, #1e293b); }

.suggest-item img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.suggest-item .suggest-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: var(--bg2, #f1f5f9);
  flex-shrink: 0;
}

.suggest-info { flex: 1; min-width: 0; }
.suggest-info .suggest-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suggest-info .suggest-meta {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

.suggest-all {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  border-top: 1px solid var(--border);
}
.suggest-all:hover { background: var(--bg2, #f1f5f9); }

.search-bar-mobile .search-suggest {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* ===================== LANGUAGE PICKER ===================== */
.lang-picker {
  position: relative;
}

#lang-toggle {
  width: auto;
  padding: 0 12px;
  gap: 4px;
  display: flex;
  font-size: 14px;
  border-radius: 19px;
}

.lang-code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.lang-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--text2);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  width: 100%;
}

.lang-option:hover { background: var(--surface2); color: var(--text); }

.lang-option.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.lang-flag { font-size: 18px; }

/* ===================== EXTERNAL SOURCE BADGE ===================== */
.external-source-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 14px;
  background: var(--surface2);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}

/* Mobile nav */
#nav-toggle { display: none; }
#search-toggle { display: none; }

.search-bar-mobile {
  display: none;
  padding: 0 20px 12px;
  background: var(--surface);
}

.search-bar-mobile.open { display: block; }

.search-bar-mobile form { width: 100%; }
.search-bar-mobile input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface2);
  color: var(--text);
  font-size: 15px;
  outline: none;
}

/* ===================== PROMOTIONS CAROUSEL ===================== */
#promo-carousel {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 20px 0;
  position: relative;
}

.promo-track {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 320px;
  background: var(--surface2);
}

.promo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
}

.promo-slide.active { opacity: 1; }

.promo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-slide .promo-multi-img {
  position: absolute;
  inset: 0;
}

.promo-multi-img {
  position: relative;
  overflow: hidden;
}
.promo-multi-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation-name: promoCrossfade;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
@keyframes promoCrossfade {
  0% { opacity: 0; }
  8% { opacity: 1; }
  28% { opacity: 1; }
  36% { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .promo-multi-img img { animation: none; opacity: 1; }
  .promo-multi-img img:not(:first-child) { display: none; }
}

.promo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.promo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,.7));
  z-index: 1;
}

.promo-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  z-index: 2;
  color: #fff;
}

.promo-content h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.promo-content h2 a:hover { text-decoration: underline; }
.promo-content p { font-size: 15px; opacity: .85; }

.hero-cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 8px;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255,255,255,.8);
}

.hero-source { font-weight: 600; }

.hero-views {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-views svg { opacity: .85; }

.promo-link {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 16px;
  background: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  transition: background var(--transition);
}

.promo-link:hover { background: #4F46E5; }

.promo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.promo-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--text3);
  cursor: pointer;
  transition: all var(--transition);
}

.promo-dots .dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}
.promo-dots .dot.dot-promo { background: #F59E0B; opacity: .5; }
.promo-dots .dot.dot-promo.active { background: #F59E0B; opacity: 1; }

/* ===================== CATEGORY NAV ===================== */
.cat-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cat-nav::-webkit-scrollbar { display: none; }

.cat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
}

.cat-chip:hover { border-color: var(--primary); color: var(--primary); }

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

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===================== FEED LAYOUT ===================== */
.feed-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

/* ===================== FEED GRID ===================== */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* ===================== ARTICLE CARD ===================== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all .25s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 60%;
  background: var(--surface2);
  overflow: hidden;
}

.card-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.card:hover .card-img-wrap img { transform: scale(1.03); }

.card-video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
  transition: background .2s;
}

.card:hover .card-video-badge { background: rgba(0,0,0,.75); }

.card-video-badge-hero {
  width: 56px;
  height: 56px;
}

.card-audio-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(99,102,241,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
  transition: background .2s;
}
.card:hover .card-audio-badge { background: rgba(99,102,241,1); }
.card-audio-badge-hero { width: 42px; height: 42px; }

.card-no-img {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
}

.card-body {
  padding: 16px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.card-cat-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text2);
  margin-bottom: 10px;
}

.card-body h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  width: fit-content;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-excerpt {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text3);
}

.card-source { font-weight: 600; color: var(--primary); }

.card-views {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}

.card-views svg { opacity: .7; }

/* Hero Card */
.card-hero {
  grid-column: 1 / -1;
}

.card-hero .card-img-wrap {
  padding-top: 45%;
  min-height: 340px;
}

.card-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,.75));
  z-index: 1;
}

.card-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px;
  z-index: 2;
  color: #fff;
}

.card-hero-content h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.card-hero-content .card-meta { color: rgba(255,255,255,.75); }
.card-hero-content .card-source { color: #fff; }
.card-hero-content .card-cat { margin-bottom: 10px; }

/* ===================== TRENDING SIDEBAR ===================== */
.trending-sidebar {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.sidebar-title svg { color: var(--accent); }

.trend-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

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

.trend-item:hover { opacity: .8; }

.trend-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text3);
  line-height: 1;
  min-width: 28px;
  padding-top: 2px;
}

.trend-item:nth-child(-n+3) .trend-num { color: var(--accent); }

.trend-text h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trend-meta {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
  display: block;
}

/* ===================== PROMO BANNERS ===================== */
/* Promo Sidebar Slider */
.promo-sidebar-slider {
  position: relative;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
}

.promo-sidebar-track {
  position: relative;
  min-height: 100px;
}

.promo-sidebar-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
}

.promo-sidebar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--text3);
  cursor: pointer;
  transition: all .2s;
  padding: 0;
}

.promo-sidebar-dot.active {
  background: #F59E0B;
  width: 20px;
  border-radius: 4px;
}

/* Promo Banner Sidebar Cards */
.promo-banner-card {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  animation: promoSlideIn .4s ease;
}

.promo-banner-card.active {
  display: block;
}

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

a.promo-banner-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.promo-banner-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.promo-multi-img.promo-banner-img {
  display: block;
}

.promo-banner-body {
  padding: 12px 14px;
}
.promo-sidebar-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #F59E0B;
  color: #fff;
  margin-bottom: 6px;
}

.promo-banner-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.promo-banner-body p {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 8px;
  line-height: 1.4;
}

.promo-banner-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.promo-banner-link:hover {
  text-decoration: underline;
}

/* ===================== ARTICLE LAYOUT (2-column with sidebar) ===================== */
.article-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
}

.article-sidebar {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  min-width: 0;
}

.article-sidebar .sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
  margin: 24px 0;
}

.related-article-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity var(--transition);
}

.related-article-item:last-child { border-bottom: none; }
.related-article-item:hover { opacity: .8; }

.related-article-thumb {
  width: 80px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface2);
}

.related-article-info h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-article-info .related-meta {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
}

/* ===================== ARTICLE DETAIL ===================== */
.article-detail {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.article-layout .article-detail {
  max-width: none;
  min-width: 0;
  width: 100%;
  padding: 32px 0 60px;
  box-sizing: border-box;
}

.article-header { margin-bottom: 24px; }

.article-header h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  margin: 8px 0 14px;
  letter-spacing: -0.5px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: var(--text2);
}

.author-name { font-weight: 600; color: var(--primary); }

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 14px;
  background: var(--primary-light);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
a.tag-badge:hover {
  background: var(--primary);
  color: #fff;
}

.article-hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.article-hero-img img { width: 100%; }

.article-media {
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.article-media.video {
  background: #000;
  aspect-ratio: 16/9;
}

.article-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.article-media video[poster] {
  object-fit: cover;
}

.article-media.audio {
  background: var(--surface);
  padding: 16px;
}

.article-media.audio audio {
  width: 100%;
}

.article-media.youtube {
  background: #000;
}
.video-embed-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.video-embed-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.admin-youtube-input {
  margin-top: 8px;
}
.admin-youtube-input input {
  width: 100%;
}

.article-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  text-align: justify;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  min-width: 0;
  max-width: 100%;
}

/* Kontni ekstrè soti nan sit ekstèn (via API/readability) ka gen
   style entèn (width fiks, elatriye) — fòse yo respekte lajè kadr la
   pou yo pa kraze layout la (pa egzanp yon <div style="width:1200px">). */
.article-body img,
.article-body table,
.article-body iframe,
.article-body video,
.article-body audio,
.article-body embed,
.article-body object,
.article-body > * {
  max-width: 100% !important;
}
.article-body table { display: block; overflow-x: auto; }

.article-body p,
.article-body > div { margin-bottom: 16px; }
.article-body h1 { font-size: 26px; font-weight: 800; margin: 32px 0 14px; text-align: left; }
.article-body h2 { font-size: 22px; font-weight: 700; margin: 28px 0 12px; text-align: left; }
.article-body h3 { font-size: 19px; font-weight: 700; margin: 24px 0 10px; text-align: left; }
.article-body h4 { font-size: 17px; font-weight: 600; margin: 20px 0 8px; text-align: left; }
.article-body h5, .article-body h6 { font-size: 16px; font-weight: 600; margin: 16px 0 6px; text-align: left; }
.article-body img { border-radius: var(--radius-sm); margin: 16px auto; max-width: 100%; height: auto; display: block; }
.article-body figure { margin: 20px 0; text-align: center; }
.article-body figure img { margin: 0 auto 8px; }
.article-body figcaption { font-size: 14px; color: var(--text2); font-style: italic; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 16px; text-align: left; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  margin: 16px 0;
  background: var(--surface2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text2);
  font-style: italic;
  text-align: left;
}
.article-body a { color: var(--primary); text-decoration: underline; }
.article-body pre {
  background: var(--surface2);
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 16px 0;
  text-align: left;
}
.article-body code {
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  text-align: left;
}
.article-body pre code { background: none; padding: 0; font-size: 14px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 16px 0; text-align: left; }
.article-body table th, .article-body table td { padding: 10px 14px; border: 1px solid var(--border); }
.article-body table th { background: var(--surface2); font-weight: 600; }
.article-body table tr:nth-child(even) { background: var(--surface2); }
.article-body iframe { max-width: 100%; border-radius: var(--radius-sm); margin: 16px 0; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.article-body .aligncenter { text-align: center; }
.article-body .alignleft { text-align: left; }
.article-body .alignright { text-align: right; }
.article-body [style*="text-align: center"], .article-body [style*="text-align:center"] { text-align: center; }
.article-body [style*="text-align: right"], .article-body [style*="text-align:right"] { text-align: right; }
.article-body video, .article-body audio { max-width: 100%; margin: 16px 0; display: block; }
.article-body embed, .article-body object { max-width: 100%; margin: 16px 0; }

.article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.article-gallery figure {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.article-gallery figure:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.article-gallery figure img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.article-gallery figcaption { font-size: 12px; color: var(--text3); padding: 6px; text-align: center; }

.article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-back, .btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  transition: all var(--transition);
}

.btn-back:hover, .btn-share:hover { border-color: var(--primary); color: var(--primary); }

.btn-tts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  transition: all var(--transition);
}
.btn-tts:hover { border-color: var(--primary); color: var(--primary); }
.btn-tts.tts-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  animation: tts-pulse 1.5s ease-in-out infinite;
}
@keyframes tts-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}

/* ===================== LOADER / EMPTY ===================== */
#loader {
  padding: 40px;
  justify-content: center;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.page-loader {
  text-align: center;
  padding: 20px;
  color: var(--text3);
  font-size: 14px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
  grid-column: 1 / -1;
}

.empty-state p { font-size: 16px; margin-bottom: 16px; }

.btn-load-more {
  display: block;
  margin: 20px auto;
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-load-more:hover { background: var(--primary); color: #fff; }

/* ===================== FOOTER ===================== */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand { font-size: 18px; font-weight: 700; color: var(--primary); }
.footer-text { font-size: 13px; color: var(--text3); }

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a { font-size: 13px; color: var(--text2); transition: color var(--transition); }
.footer-links a:hover { color: var(--primary); }

/* ===================== CONTACT & LEGAL PAGES ===================== */
.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.legal-page h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.legal-date {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 24px;
}

.legal-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.contact-info-card,
.contact-form-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.contact-info-card h3,
.contact-form-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.contact-row svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-label {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.contact-value {
  font-size: 15px;
  color: var(--text);
}

.contact-value.link {
  color: var(--primary);
  text-decoration: none;
}

.contact-value.link:hover {
  text-decoration: underline;
}

.contact-form-card input,
.contact-form-card textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 12px;
  outline: none;
  transition: border-color var(--transition);
}

.contact-form-card input:focus,
.contact-form-card textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.contact-form-card input::placeholder,
.contact-form-card textarea::placeholder {
  color: var(--text3);
}

.contact-form-card textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  width: 100%;
}

.btn-send:hover {
  background: #4F46E5;
}

.cf-message {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 12px;
}

.cf-error {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

[data-theme="dark"] .cf-error {
  background: #451A1A;
  color: #FCA5A5;
  border-color: #7F1D1D;
}

.cf-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  gap: 12px;
}

.cf-success h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--success);
}

.cf-success p {
  font-size: 15px;
  color: var(--text2);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .legal-page h1 {
    font-size: 22px;
  }

  .legal-page {
    padding: 20px 16px 40px;
  }
}

/* ===================== AUTH PAGES ===================== */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: calc(100vh - 150px);
  padding: 48px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px 36px 36px;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
}

[data-theme="dark"] .auth-card {
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card .auth-logo img {
  height: 44px;
  width: auto;
  max-width: 200px;
  margin: 0 auto;
}

.auth-logo-text {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
  text-align: center;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text3);
  margin-bottom: 24px;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
}

.auth-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  background: var(--surface);
}

.auth-field input::placeholder { color: var(--text3); }

.auth-field-password { position: relative; }
.auth-field-password input { padding-right: 44px; }
.auth-toggle-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-toggle-eye:hover { color: var(--text2); }

.auth-error {
  padding: 10px 14px;
  border-radius: 10px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  font-size: 13px;
  line-height: 1.4;
}

[data-theme="dark"] .auth-error {
  background: #450A0A;
  border-color: #7F1D1D;
  color: #FCA5A5;
}

.auth-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.auth-btn:hover { background: #4F46E5; box-shadow: 0 4px 12px rgba(99,102,241,.3); }
.auth-btn:active { transform: scale(.99); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

.auth-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0 20px;
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--text3);
}

.auth-switch a {
  color: var(--primary);
  font-weight: 600;
}

.auth-switch a:hover { text-decoration: underline; }

.auth-remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2, var(--text3));
  cursor: pointer;
  margin-top: -8px;
}
.auth-remember-me input {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.auth-forgot {
  text-align: right;
  margin-top: 8px;
  font-size: 13px;
}

.auth-forgot a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-forgot a:hover {
  text-decoration: underline;
}

.auth-success {
  padding: 10px 14px;
  border-radius: 10px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #16A34A;
  font-size: 13px;
  margin-bottom: 12px;
}

[data-theme="dark"] .auth-success {
  background: #052E16;
  border-color: #166534;
  color: #86EFAC;
}

@media (max-width: 480px) {
  .auth-card { padding: 32px 24px 28px; }
  .auth-page { padding: 24px 16px; }
}

/* ===================== NOTIFICATION BELL ===================== */
.notif-wrap {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  flex-direction: column;
}

/* ===================== SETTINGS DROPDOWN (lang + tèm + koneksyon) ===================== */
.settings-wrap { position: relative; }
.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  padding: 10px;
  animation: settingsIn .16s ease;
}
@keyframes settingsIn { from { opacity: 0; transform: translateY(-6px); } }
.settings-section { padding: 6px 6px 10px; }
.settings-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text3);
  margin-bottom: 8px;
}
.settings-langs { display: flex; flex-wrap: wrap; gap: 6px; }
.settings-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.settings-lang:hover { border-color: var(--primary); }
.settings-lang.active { background: var(--primary); color: #fff; }
.settings-divider { height: 1px; background: var(--border); margin: 6px 0; }
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 8px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.settings-item:hover { background: var(--surface2); }
.settings-item svg { flex-shrink: 0; color: var(--text2); }
.settings-item-left { display: flex; align-items: center; gap: 10px; }
.settings-logout { color: #e11d48; }
.settings-logout svg { color: #e11d48; }
.settings-account { padding: 6px 8px 10px; }
.settings-account-name { font-weight: 700; font-size: 14px; color: var(--text); }
.settings-account-name .verified-badge-icon { width: 14px; height: 14px; vertical-align: middle; }
.settings-account-email { font-size: 12px; color: var(--text3); word-break: break-all; }
/* Toggle switch pou tèm nan */
.settings-switch {
  position: relative;
  width: 38px;
  height: 22px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  flex-shrink: 0;
  transition: background .2s;
}
.settings-switch.on { background: var(--primary); border-color: var(--primary); }
.settings-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.settings-switch.on .settings-switch-knob { transform: translateX(16px); }

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.notif-mark-all {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background var(--transition);
}

.notif-mark-all:hover {
  background: var(--primary-light);
}

.notif-list {
  overflow-y: auto;
  max-height: 380px;
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.notif-item:hover {
  background: var(--surface2);
}

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

.notif-item.unread {
  background: var(--primary-light);
}

.notif-item.unread:hover {
  background: var(--primary-light);
  opacity: .9;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.notif-dot.active {
  background: var(--primary);
}

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

.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-body {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.4;
}

.notif-item-body-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-full {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

.notif-article-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.notif-article-link:hover {
  text-decoration: underline;
}

.notif-item-time {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
}

.notif-item-breaking {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #EF4444;
  margin-top: 4px;
}

.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text3);
  font-size: 14px;
}

@media (max-width: 480px) {
  .notif-dropdown {
    width: calc(100vw - 24px);
    right: -60px;
  }
}

/* ===================== USER MENU ===================== */
.user-menu-wrap {
  position: relative;
}

.btn-login {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition);
}

.btn-login:hover { background: #4F46E5; }

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.user-avatar:hover { transform: scale(1.08); box-shadow: 0 0 0 3px rgba(99,102,241,.25); }

.user-dropdown {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}

.user-dropdown-header {
  padding: 14px 16px;
}

.user-dropdown-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.user-dropdown-email {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
}

.user-role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  text-transform: capitalize;
}

.role-super_admin { background: #FEE2E2; color: #991B1B; }
.role-admin { background: #FEF3C7; color: #92400E; }
.role-editor { background: #DBEAFE; color: #1E40AF; }
.role-user { background: var(--surface2); color: var(--text3); }

[data-theme="dark"] .role-super_admin { background: #7F1D1D; color: #FCA5A5; }
[data-theme="dark"] .role-admin { background: #78350F; color: #FDE68A; }
[data-theme="dark"] .role-editor { background: #1E3A5F; color: #93C5FD; }

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text2);
  border: none;
  background: none;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.user-dropdown-item:hover { background: var(--surface2); color: var(--text); }

.logout-item:hover { background: #FEF2F2; color: #DC2626; }
[data-theme="dark"] .logout-item:hover { background: #450A0A; color: #FCA5A5; }

/* ===================== TOAST ===================== */
.toast {
  position: fixed;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px;
  background: var(--text);
  color: var(--bg);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 999;
  animation: toastIn .3s ease, toastOut .3s ease 2s forwards;
}

@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(20px); } }

/* Clickable toast (e.g. nouvo moun jwe enigma) — rete vizib pi lontan */
.toast.toast-clickable {
  cursor: pointer;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #0a0a0a;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  animation: toastIn .3s ease, toastOut .3s ease 6.5s forwards;
}
.toast.toast-clickable::after { content: ' ›'; font-weight: 800; }
.toast.toast-clickable:hover { filter: brightness(1.05); }

/* ===================== SCROLL TOP ===================== */
#scroll-top {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  transition: all var(--transition);
}

#scroll-top:hover { transform: scale(1.1); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .feed-layout { grid-template-columns: minmax(0, 1fr); }
  .trending-sidebar {
    position: static;
    max-height: none;
    border-top: 1px solid var(--border);
    padding-top: 24px;
  }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-sidebar {
    position: static;
    max-height: none;
    border-top: 1px solid var(--border);
    padding-top: 24px;
  }
  .article-layout .article-detail,
  .article-detail {
    padding: 20px 16px 40px;
  }
}

@media (max-width: 768px) {
  .article-layout .article-detail,
  .article-detail { padding: 20px 16px 48px; }
  .article-header h1 { font-size: 24px; line-height: 1.3; letter-spacing: -0.2px; }
  .article-body { font-size: 16px; line-height: 1.7; text-align: left; }
  .article-meta { font-size: 13px; gap: 8px 10px; }
  .article-hero-img { margin-bottom: 20px; }
  .article-body h1 { font-size: 22px; margin: 26px 0 12px; }
  .article-body h2 { font-size: 19px; margin: 22px 0 10px; }
  .article-body h3 { font-size: 17px; margin: 20px 0 8px; }
}

@media (max-width: 480px) {
  .article-layout .article-detail,
  .article-detail { padding: 16px 14px 40px; }
  .article-header h1 { font-size: 21px; }
  .article-body { font-size: 15.5px; line-height: 1.65; }
}

@media (max-width: 768px) {
  .navbar-inner { padding: 0 12px; gap: 12px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 6px 0;
    box-shadow: var(--shadow-lg);
    z-index: 99;
    animation: navDrop .18s ease;
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open li + li { border-top: 1px solid var(--border); }
  .nav-links.open a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 20px;
    border-radius: 0;
    font-size: 15px;
  }
  .nav-links.open a:not(.nav-whatsapp):not(.nav-telegram)::after {
    content: "\203A";
    color: var(--text2);
    font-size: 20px;
    opacity: .5;
  }
  /* social links sit side by side on one row */
  .nav-links.open #nav-whatsapp-li,
  .nav-links.open #nav-telegram-li { display: inline-flex; width: auto; }
  .nav-links.open #nav-whatsapp-li { border-top: 1px solid var(--border); }
  .nav-links.open #nav-telegram-li { border-top: 1px solid var(--border); }
  .nav-links.open .nav-whatsapp,
  .nav-links.open .nav-telegram { padding: 14px 20px !important; }

  @keyframes navDrop {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
    z-index: 90;
  }
  .nav-backdrop.show { opacity: 1; visibility: visible; }

  #nav-toggle.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
  #nav-toggle { display: flex; }
  #search-toggle { display: flex; }
  .search-form { display: none; }

  .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .card-hero .card-img-wrap { min-height: 220px; padding-top: 56%; }
  .card-hero-content h2 { font-size: 20px; }
  .card-hero-content { padding: 20px; }

  .promo-track { height: 220px; }
  .promo-content h2 { font-size: 18px; }

  .article-header h1 { font-size: 24px; }
  .article-body { font-size: 16px; }
  .article-detail { padding: 20px 16px 40px; }

  .site-footer {
    display: none !important;
  }
  body {
    padding-bottom: 0;
  }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .navbar-logo span { font-size: 18px; }
  .promo-track { height: 180px; }
  .card-hero .card-img-wrap { min-height: 180px; }
  .feed-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1200px) {
  .feed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-hero { grid-column: 1 / -1; }
}

/* ===================== ADMIN PANEL ===================== */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

.admin-sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  z-index: 30;
}

.admin-sidebar-header {
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.admin-logo-img { height: 36px; width: auto; }

.admin-nav {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
}

.admin-nav-item:hover { background: var(--surface2); color: var(--text); }

.admin-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.admin-sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--border);
}

.admin-content {
  flex: 1;
  padding: 24px;
  min-width: 0;
  background: var(--bg);
}

.admin-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-header h1 {
  font-size: 24px;
  font-weight: 700;
  flex: 1;
}

.admin-header-actions { display: flex; gap: 8px; }

.admin-mobile-toggle { display: none; }

/* Stats */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-stat-value { font-size: 28px; font-weight: 800; color: var(--text); }
.admin-stat-label { font-size: 13px; color: var(--text3); margin-top: 2px; }

/* Cards & Grids */
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.admin-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Table */
.admin-table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text3);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:hover td { background: var(--surface2); }

.admin-thumb {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
}

.admin-thumb-empty {
  width: 48px;
  height: 36px;
  background: var(--surface2);
  border-radius: 6px;
}

.admin-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.admin-user-avatar-empty {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar-upload {
  display: flex;
  align-items: center;
  gap: 14px;
}
.user-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-cover-upload {
  display: flex;
  align-items: center;
  gap: 14px;
}
.user-cover-preview {
  width: 100%;
  max-width: 320px;
  height: 90px;
  border-radius: 10px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.user-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-lang-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.bio-lang-tab {
  padding: 4px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text3);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
}
.bio-lang-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.bio-lang-textarea {
  width: 100%;
}

.admin-field-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
}
.admin-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.admin-field-hint {
  font-size: 12px;
  color: var(--text3);
}

.verified-badge-icon {
  vertical-align: middle;
  flex-shrink: 0;
}

.admin-link { color: var(--primary); font-weight: 500; }
.admin-link:hover { text-decoration: underline; }

.text-muted { color: var(--text3); }
.text-center { text-align: center; }
.text-nowrap { white-space: nowrap; }

/* Badges */
.admin-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.admin-badge-success { background: #D1FAE5; color: #065F46; }
.admin-badge-warning { background: #FEF3C7; color: #92400E; }
.admin-badge-danger { background: #FEE2E2; color: #991B1B; }
.admin-badge-primary { background: #EEF2FF; color: #4338CA; }
.admin-badge-muted { background: var(--surface2); color: var(--text3); }

[data-theme="dark"] .admin-badge-success { background: #064E3B; color: #6EE7B7; }
[data-theme="dark"] .admin-badge-warning { background: #78350F; color: #FCD34D; }
[data-theme="dark"] .admin-badge-danger { background: #7F1D1D; color: #FCA5A5; }
[data-theme="dark"] .admin-badge-primary { background: #312E81; color: #A5B4FC; }

/* Buttons */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.admin-btn:hover { border-color: var(--primary); color: var(--primary); }

.admin-btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-btn-primary:hover { background: #4F46E5; color: #fff; }

.admin-btn-ghost { background: transparent; border-color: transparent; }
.admin-btn-ghost:hover { background: var(--surface2); }

.admin-btn-full { width: 100%; justify-content: center; }

.admin-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text2);
}

.admin-btn-sm.admin-btn-ghost { border-color: transparent; background: transparent; }
.admin-btn-sm.admin-btn-ghost:hover { background: var(--surface2); color: var(--primary); }

.admin-btn-sm.admin-btn-danger { border-color: transparent; background: transparent; color: var(--text3); }
.admin-btn-sm.admin-btn-danger:hover { background: #FEE2E2; color: #DC2626; }
[data-theme="dark"] .admin-btn-sm.admin-btn-danger:hover { background: #7F1D1D; color: #FCA5A5; }

.admin-btn-sm.admin-btn-success { border-color: transparent; background: #D1FAE5; color: #059669; font-weight: 600; cursor: pointer; }
.admin-btn-sm.admin-btn-success:hover { background: #FEE2E2; color: #DC2626; }
[data-theme="dark"] .admin-btn-sm.admin-btn-success { background: #064E3B; color: #6EE7B7; }
[data-theme="dark"] .admin-btn-sm.admin-btn-success:hover { background: #7F1D1D; color: #FCA5A5; }
.admin-btn-sm.admin-btn-muted { border-color: transparent; background: #F1F5F9; color: #94A3B8; font-weight: 600; cursor: pointer; }
.admin-btn-sm.admin-btn-muted:hover { background: #D1FAE5; color: #059669; }
[data-theme="dark"] .admin-btn-sm.admin-btn-muted { background: #1E293B; color: #64748B; }
[data-theme="dark"] .admin-btn-sm.admin-btn-muted:hover { background: #064E3B; color: #6EE7B7; }
.admin-btn-sm.admin-btn-warning { border-color: transparent; background: #FEF3C7; color: #D97706; font-weight: 600; cursor: pointer; }
.admin-btn-sm.admin-btn-warning:hover { background: #FDE68A; color: #B45309; }
[data-theme="dark"] .admin-btn-sm.admin-btn-warning { background: #78350F; color: #FCD34D; }
[data-theme="dark"] .admin-btn-sm.admin-btn-warning:hover { background: #92400E; color: #FDE68A; }

.admin-actions-cell {
  display: flex;
  gap: 4px;
  white-space: nowrap;
}

/* Filters */
.admin-filters {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.admin-filter-btn {
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

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

.admin-select-inline {
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.admin-search-inline {
  margin-left: auto;
}
.admin-search-inline input {
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  width: 220px;
  outline: none;
  transition: border-color var(--transition);
}
.admin-search-inline input:focus {
  border-color: var(--primary);
}
@media (max-width: 600px) {
  .admin-filters { flex-wrap: wrap; }
  .admin-search-inline { margin-left: 0; width: 100%; }
  .admin-search-inline input { width: 100%; }
}

/* Pagination */
/* Users role tabs */
.admin-users-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.admin-users-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.admin-users-tab:hover { border-color: var(--primary); color: var(--primary); }
.admin-users-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.admin-users-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 12px;
  background: rgba(0,0,0,.1);
  font-size: 12px;
  font-weight: 700;
}
.admin-users-tab.active .admin-users-tab-count {
  background: rgba(255,255,255,.25);
}
[data-theme="dark"] .admin-users-tab-count {
  background: rgba(255,255,255,.1);
}
@media (max-width: 640px) {
  .admin-users-tabs { gap: 6px; }
  .admin-users-tab { padding: 8px 12px; font-size: 13px; }
}

.admin-pagination {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  justify-content: center;
}

.admin-page-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

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

/* Form */
.admin-form { display: flex; flex-direction: column; gap: 16px; }

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.admin-form-main { display: flex; flex-direction: column; gap: 16px; }
.admin-form-sidebar { display: flex; flex-direction: column; gap: 16px; }

.admin-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.admin-field textarea { resize: vertical; min-height: 60px; }

.admin-field input[type="file"] {
  padding: 8px;
  border-style: dashed;
}

.admin-field input[type="color"] {
  height: 38px;
  padding: 4px;
  cursor: pointer;
}

.admin-preview-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.admin-media-current {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 8px;
}

.admin-tag-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
}

.admin-tag-chip:has(input:checked) {
  background: var(--primary-light);
  color: var(--primary);
}

.admin-tag-chip input { display: none; }

.admin-tag-filter {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  margin-bottom: 8px;
}
.admin-tag-filter:focus {
  outline: none;
  border-color: var(--primary);
}

.admin-row-suspended td { opacity: .5; }
.admin-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.status-published { background: #D1FAE5; color: #065F46; }
.status-suspended { background: #FEE2E2; color: #991B1B; }
[data-theme="dark"] .status-published { background: rgba(16,185,129,.2); color: #6EE7B7; }
[data-theme="dark"] .status-suspended { background: rgba(239,68,68,.2); color: #FCA5A5; }

/* Inline forms */
.admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
}

.admin-inline-form input,
.admin-inline-form select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  flex: 1;
  min-width: 100px;
}

.admin-inline-form input:focus { border-color: var(--primary); }

.admin-inline-form-col { flex-direction: column; align-items: stretch; }
.admin-inline-form-col input,
.admin-inline-form-col textarea,
.admin-inline-form-col select { flex: none; width: 100%; }

.admin-inline-form textarea {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  width: 100%;
  resize: vertical;
  font-family: inherit;
}

.admin-color-dot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-block;
}

/* Notification history */
.admin-notif-history {
  max-height: 400px;
  overflow-y: auto;
}

.admin-notif-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.admin-notif-item-title { font-size: 14px; font-weight: 600; color: var(--text); }
.admin-notif-item-body { font-size: 13px; color: var(--text2); margin-top: 2px; }
.admin-notif-item-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--text3); }

/* Stats mini */
.admin-stats-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 12px;
}

.admin-stat-mini-item {
  text-align: center;
  padding: 12px 8px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
}

.admin-stat-mini-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.admin-stat-mini-item span:last-child {
  font-size: 11px;
  color: var(--text3);
}

/* Settings */
/* Chart containers */
.admin-chart-wrap {
  position: relative;
  height: 250px;
  width: 100%;
}

.admin-chart-wrap.admin-chart-sm { height: 200px; }

.admin-card-flex {
  display: flex;
  gap: 24px;
}

.admin-chart-half { flex: 1; min-width: 0; }

.admin-stat-sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
}

@media (max-width: 600px) {
  .admin-card-flex { flex-direction: column; }
}

.admin-settings-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.admin-settings-section:last-child { border-bottom: none; }

.admin-settings-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-settings-section h3 svg { opacity: 0.6; }

.admin-settings-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.admin-settings-section ol {
  padding-left: 20px;
  margin: 0;
  line-height: 1.8;
  font-size: 13px;
  color: var(--text3);
}

.admin-settings-section ol a { color: var(--primary); }

.admin-settings-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.admin-field-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-field-row > .admin-field { flex: 1; min-width: 220px; }

.admin-field small { display: block; margin-top: 4px; font-size: 12px; }
.admin-field small a { color: var(--primary); }
.admin-field small code {
  background: var(--surface2);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

.text-danger { color: #EF4444; }

.admin-help-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
}

.admin-btn-lg {
  padding: 12px 32px;
  font-size: 15px;
  margin-top: 8px;
}

/* Admin Contact Detail */
.admin-row-unread { background: var(--primary-light); }
.admin-contact-detail { padding: 20px; }
.admin-contact-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.admin-contact-body { white-space: pre-wrap; line-height: 1.6; font-size: 14px; color: var(--text); min-height: 80px; }

/* Admin User Search (Notification target) */
.admin-user-search-wrap { position: relative; }
.admin-user-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  max-height: 200px; overflow-y: auto; display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.admin-user-results.show { display: block; }
.admin-user-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; transition: background .15s;
}
.admin-user-result-item:hover { background: var(--surface2); }
.admin-user-result-name { font-weight: 600; font-size: 13px; color: var(--text); }
.admin-user-result-email { font-size: 12px; color: var(--text3); }
.admin-user-result-role { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--primary-light); color: var(--primary); }
.admin-user-results .no-results { padding: 14px; text-align: center; color: var(--text3); font-size: 13px; }
.admin-user-selected {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
  padding: 8px 12px; background: var(--primary-light); border-radius: 8px;
}
.admin-user-selected-info { flex: 1; font-size: 13px; }
.admin-user-selected-info strong { color: var(--text); }
.admin-user-selected-info span { color: var(--text3); margin-left: 6px; }
.admin-user-selected-remove {
  background: none; border: none; cursor: pointer; color: var(--text3);
  font-size: 18px; line-height: 1; padding: 0 4px;
}
.admin-user-selected-remove:hover { color: var(--danger); }

/* Rich Text Editor (TinyMCE) */
.admin-field .tox-tinymce {
  border-radius: 8px;
  border-color: var(--border);
}
.admin-field .tox .tox-edit-area__iframe { background: var(--surface); }
[data-theme="dark"] .admin-field .tox-tinymce { border-color: var(--border); }
[data-theme="dark"] .admin-field .tox .tox-toolbar,
[data-theme="dark"] .admin-field .tox .tox-toolbar__overflow,
[data-theme="dark"] .admin-field .tox .tox-toolbar__primary {
  background: var(--surface2);
}

/* Modal */
.admin-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  align-items: center;
  justify-content: center;
}

.admin-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}

.admin-modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.admin-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* Loader */
.admin-loader {
  display: flex;
  justify-content: center;
  padding: 60px;
}

.admin-error {
  padding: 20px;
  background: #FEE2E2;
  color: #991B1B;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

[data-theme="dark"] .admin-error {
  background: #7F1D1D;
  color: #FCA5A5;
}

/* Admin Responsive */
@media (max-width: 1024px) {
  .admin-grid-2 { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed;
    left: -260px;
    top: 64px;
    width: 250px;
    min-width: 250px;
    transition: left .3s ease;
    box-shadow: none;
  }

  .admin-sidebar.open {
    left: 0;
    box-shadow: 4px 0 20px rgba(0,0,0,.15);
  }

  .admin-mobile-toggle { display: flex; }

  .admin-content { padding: 16px; }

  .admin-header h1 { font-size: 20px; }

  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }

  .admin-modal-content { margin: 16px; max-width: calc(100vw - 32px); }
}

/* ==================== CONTENT SECTION ==================== */
.content-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.content-section .section-title {
  margin-bottom: 20px;
}

.loader-wrap {
  display: flex;
  justify-content: center;
  padding: 60px 20px;
}

.loader {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.empty-msg {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
  font-size: 16px;
}

/* ==================== PODCASTS — Spotify-style ==================== */

/* Logo palette: dark-red #991B1B, red #DC2626, purple #7C3AED, cyan #06B6D4 */

/* -- Browse page gradient header -- */
.podcasts-hero {
  background: linear-gradient(180deg, var(--podcast-accent-dark) 0%, var(--podcast-accent-2) 55%, var(--bg) 100%);
  margin: -32px -20px 0;
  padding: 52px 32px 36px;
  position: relative;
  overflow: hidden;
  color: #fff;
}
.podcasts-hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -.5px;
  position: relative;
  z-index: 1;
}
.podcasts-hero p {
  font-size: 14px;
  opacity: .8;
  margin: 0;
  position: relative;
  z-index: 1;
}
.podcasts-hero-icon {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .12;
  z-index: 0;
}

/* -- Podcast card grid -- */
.podcast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
  padding: 28px 0 0;
}

/* -- Card wrapper (Spotify-style padded card) -- */
.podcast-card-wrap {
  border-radius: 8px;
  background: var(--surface);
  padding: 16px 16px 18px;
  transition: background .3s ease, box-shadow .3s ease;
  position: relative;
  cursor: pointer;
}
.podcast-card-wrap:hover {
  background: var(--surface2);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.podcast-card-wrap.episode-row-active,
.podcast-card-wrap.podcast-card-active {
  box-shadow: 0 0 0 2px var(--podcast-accent), 0 8px 24px rgba(0,0,0,.15);
}

/* -- Inner card link -- */
.podcast-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transition: none;
}
.podcast-card:hover { transform: none; box-shadow: none; }

/* -- Card cover image -- */
.podcast-card-img-wrap {
  position: relative;
  margin-bottom: 16px;
}
.podcast-card-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface2);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  transition: transform .3s ease, box-shadow .3s ease;
}
.podcast-card-wrap:hover .podcast-card-img {
  transform: scale(1.03);
  box-shadow: 0 12px 28px rgba(0,0,0,.4);
}

/* -- Spotify-style floating play button -- */
.podcast-card-play-btn {
  position: absolute;
  bottom: -6px;
  right: 8px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: var(--podcast-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(153,27,27,.4);
  z-index: 3;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease, background .15s;
}
.podcast-card-wrap:hover .podcast-card-play-btn,
.podcast-card-wrap.podcast-card-active .podcast-card-play-btn {
  opacity: 1;
  transform: translateY(0);
}
.podcast-card-play-btn:hover {
  transform: scale(1.06);
  background: var(--podcast-accent-hover);
}

/* -- Card body -- */
.podcast-card-body { padding: 0; }
.podcast-card-body h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.podcast-card-author {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 2px;
}
.podcast-card-author a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.podcast-card-author .verified-badge-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.podcast-card-body p {
  font-size: 13px;
  color: var(--text3);
  margin: 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.podcast-card-footer { display: none; }
.podcast-card-meta {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.podcast-card-audio-badge { display: none; }

/* -- Cover placeholder -- */
.podcast-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--surface2) 100%);
  color: var(--primary);
}

/* ---- Podcast detail page (Spotify-style) ---- */
.podcast-detail { margin-top: 0; }

/* Detail hero with gradient */
.podcast-detail-hero {
  position: relative;
  background: linear-gradient(180deg, var(--podcast-accent-dark) 0%, var(--podcast-accent-2) 55%, var(--bg) 100%);
  margin: -32px -20px 0;
  padding: 44px 32px 36px;
  color: #fff;
  overflow: hidden;
}
.podcast-detail-hero.has-banner {
  background-size: cover;
  background-position: center;
}
.podcast-detail-hero.has-cover-backdrop::before {
  content: '';
  position: absolute;
  inset: -30px;
  background-image: var(--hero-bg-image);
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.5) saturate(1.3);
  transform: scale(1.1);
  z-index: 0;
}
.podcast-detail-hero.has-cover-backdrop > * {
  position: relative;
  z-index: 1;
}
.podcast-detail-header {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}
.podcast-detail-cover {
  width: 232px;
  height: 232px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}
.podcast-detail-cover.podcast-card-img-placeholder {
  width: 232px;
  height: 232px;
  border-radius: 6px;
  flex-shrink: 0;
}
.podcast-detail-info { flex: 1; min-width: 0; }
.podcast-detail-info .detail-type {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
  opacity: .9;
}
.podcast-detail-info h1 {
  font-size: 48px;
  font-weight: 900;
  margin: 0 0 12px;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: #fff;
}
.podcast-author {
  color: rgba(255,255,255,.7);
  font-size: 14px;
  margin: 0 0 4px;
}
.podcast-author strong { color: #fff; font-weight: 600; }
.podcast-description {
  font-size: 14px;
  color: rgba(255,255,255,.65);
  line-height: 1.5;
  margin: 8px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* -- Detail action bar (play, shuffle, etc.) -- */
.podcast-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 0 8px;
}
.podcast-play-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--podcast-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, background .15s;
  box-shadow: 0 4px 16px rgba(153,27,27,.35);
  flex-shrink: 0;
}
.podcast-play-lg:hover { transform: scale(1.06); background: var(--podcast-accent-hover); }
.podcast-play-lg svg { width: 24px; height: 24px; }
.podcast-meta-bar {
  font-size: 14px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.podcast-meta-bar strong { color: var(--text); font-weight: 600; }

/* -- Episode list (Spotify track-list style) -- */
.episode-list { margin-top: 8px; }
.episode-list-header {
  display: grid;
  grid-template-columns: 40px 1fr 100px;
  padding: 0 16px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.episode-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 2px;
  background: transparent;
  box-shadow: none;
  transition: background var(--transition), transform var(--transition);
}
.episode-row:hover { background: var(--surface2); transform: translateX(2px); }
.episode-row-active {
  background: var(--primary-light) !important;
}

/* Episode number / play button column */
.ep-num-col {
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--text3);
}
.ep-num-col .ep-play-icon {
  display: none;
  width: 16px;
  height: 16px;
  color: var(--text);
  cursor: pointer;
}
.ep-num-col .ep-eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  width: 14px;
  height: 14px;
  color: var(--podcast-accent);
}
.ep-num-col .ep-eq i {
  display: block;
  width: 3px;
  background: currentColor;
  border-radius: 1px;
  animation: ep-eq-bounce 0.9s ease-in-out infinite;
}
.ep-num-col .ep-eq i:nth-child(1) { height: 40%; animation-delay: -0.6s; }
.ep-num-col .ep-eq i:nth-child(2) { height: 100%; animation-delay: -0.3s; }
.ep-num-col .ep-eq i:nth-child(3) { height: 65%; animation-delay: 0s; }
@keyframes ep-eq-bounce {
  0%, 100% { transform: scaleY(.4); }
  50% { transform: scaleY(1); }
}
.episode-row:hover .ep-num-col .ep-num-text { display: none; }
.episode-row:hover .ep-num-col .ep-play-icon { display: block; }
.episode-row-active .ep-num-col .ep-num-text,
.episode-row-active .ep-num-col .ep-play-icon { display: none; }
.episode-row-active .ep-num-col .ep-eq { display: flex; }
.episode-row-active:hover .ep-num-col .ep-eq { display: none; }
.episode-row-active:hover .ep-num-col .ep-play-icon { display: block; color: var(--podcast-accent); }

.episode-info { flex: 1; min-width: 0; padding: 0 12px; }
.episode-number { display: none; }
.episode-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 2px;
  line-height: 1.3;
  color: var(--text);
  transition: color var(--transition);
}
.episode-row-active .episode-info h3 { color: var(--podcast-accent); }
.episode-info p {
  font-size: 13px;
  color: var(--text3);
  margin: 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.episode-meta {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--text3);
  margin-top: 4px;
}

/* Episode play button (used in old layout) */
.episode-play-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s, transform .15s, color .15s, background .15s;
  box-shadow: none;
  margin: 0;
}
.episode-play-btn:hover {
  border-color: var(--text);
  transform: scale(1.06);
  color: var(--text);
  background: transparent;
}
.episode-play-btn:disabled {
  background: transparent;
  color: var(--text3);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: .4;
}
.episode-row-active .episode-play-btn {
  background: var(--podcast-accent);
  color: #fff;
  border-color: var(--primary);
}

.ep-duration-col {
  width: 60px;
  text-align: right;
  font-size: 13px;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.ep-actions-col {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ep-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text3);
  transition: all var(--transition);
  cursor: pointer;
}

.ep-download-btn:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* -- Global persistent podcast player (Spotify-style, survives route changes) -- */
.global-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
  padding: 0 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}

.gp-track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 200px;
  overflow: hidden;
}
.gp-cover {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface2);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.gp-meta { min-width: 0; }
.gp-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gp-podcast {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-controls {
  flex: 2 1 360px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.gp-buttons { display: flex; align-items: center; gap: 16px; }
.gp-btn {
  background: transparent;
  border: none;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color .15s, transform .15s;
}
.gp-btn:hover { color: var(--text); transform: scale(1.08); }
.gp-btn:disabled { color: var(--text3); opacity: .35; cursor: not-allowed; transform: none; }
.gp-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--podcast-accent);
  color: #fff;
}
.gp-play:hover { background: var(--podcast-accent-hover); color: #fff; transform: scale(1.06); }

.gp-seek-row { width: 100%; display: flex; align-items: center; gap: 8px; }
.gp-time-current, .gp-time-total {
  font-size: 11px;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
}
.gp-time-current { text-align: right; }
.gp-seek-wrap {
  position: relative;
  flex: 1;
  height: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.gp-seek-wrap::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--surface2);
  transition: height .15s;
}
.gp-seek-fill {
  position: absolute;
  left: 0;
  height: 4px;
  width: 0%;
  border-radius: 2px;
  background: var(--podcast-accent);
  pointer-events: none;
  transition: height .15s;
}
.gp-seek-thumb {
  position: absolute;
  left: 0%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--podcast-accent);
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  transform: translateX(-50%) scale(0);
  transition: transform .15s;
  pointer-events: none;
}
.gp-seek-wrap:hover .gp-seek-thumb,
.gp-seek-wrap.dragging .gp-seek-thumb {
  transform: translateX(-50%) scale(1);
}
.gp-seek-wrap:hover::before,
.gp-seek-wrap.dragging::before { height: 5px; }
.gp-seek-wrap:hover .gp-seek-fill,
.gp-seek-wrap.dragging .gp-seek-fill { height: 5px; }

.gp-side {
  flex: 1 1 130px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 80px;
}
.gp-volume-slider {
  width: 80px;
  accent-color: var(--podcast-accent);
  cursor: pointer;
}
.gp-muted { color: var(--podcast-accent); }
.gp-close:hover { color: var(--podcast-accent); }

@media (max-width: 768px) {
  .global-player {
    bottom: 60px;
    height: 64px;
    padding: 0 12px;
    gap: 10px;
  }
  .gp-podcast { display: none; }
  .gp-controls { flex: 2 1 auto; }
  .gp-time-current, .gp-time-total { display: none; }
  .gp-side { flex: 0 0 auto; min-width: 0; }
  .gp-volume-slider { display: none; }
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: gap .15s, opacity .15s, background .2s;
  opacity: .7;
}
.author-profile-hero .back-link,
.hashtag-hero .back-link {
  background: rgba(0,0,0,.35);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  opacity: 1;
}
.author-profile-hero .back-link:hover,
.hashtag-hero .back-link:hover {
  background: rgba(0,0,0,.55);
}
.back-link:hover { gap: 10px; opacity: 1; text-decoration: none; }

/* ===================== AUTHOR PROFILE ===================== */
.author-profile-hero {
  background: linear-gradient(180deg, rgba(30,64,175,.7) 0%, rgba(99,102,241,.65) 55%, var(--bg) 100%),
              url('../assets/logo.png') 0 0 / calc(100% / 7) repeat;
  margin: -32px -20px 0;
  padding: 44px 32px 36px;
  color: #fff;
  position: relative;
}
.author-profile-hero.has-cover {
  background-size: cover;
  background-position: center;
}
.author-name-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.verified-badge-icon {
  vertical-align: middle;
  margin-left: 2px;
  flex-shrink: 0;
}
.author-name-verified .verified-badge-icon {
  width: 30px;
  height: 30px;
  margin-left: 0;
}
.author-profile-header {
  display: flex;
  gap: 28px;
  align-items: flex-end;
}
.author-profile-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.2);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  flex-shrink: 0;
}
.author-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
}
.author-profile-info { flex: 1; min-width: 0; }
.author-profile-info .detail-type {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
  opacity: .9;
}
.author-profile-info h1 {
  font-size: 42px;
  font-weight: 900;
  margin: 0 0 8px;
  letter-spacing: -1px;
  line-height: 1.1;
  color: #fff;
}
.author-role-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  color: #fff;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  margin-bottom: 8px;
}
/* Author tabs */
.author-tabs {
  display: flex;
  gap: 4px;
  margin-top: 24px;
  border-bottom: 2px solid rgba(255,255,255,.15);
  padding-bottom: 0;
}
.author-tab {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
  letter-spacing: .3px;
}
.author-tab:hover {
  color: rgba(255,255,255,.9);
}
.author-tab.active {
  color: #fff;
  border-bottom-color: #fff;
}
.author-tab-content {
  padding: 24px 0 0;
}
.author-bio-section {
  padding: 24px 28px 24px 32px;
  background: var(--card-bg);
  border-radius: 14px;
  margin-bottom: 20px;
  border-left: 4px solid var(--accent, #6c63ff);
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.author-bio-section::before {
  content: '\201C';
  position: absolute;
  top: 44px;
  left: 20px;
  font-size: 56px;
  color: var(--accent, #6c63ff);
  opacity: .18;
  font-family: Georgia, serif;
  line-height: 1;
}
.author-bio-section::after {
  content: '\201D';
  position: absolute;
  bottom: 12px;
  right: 20px;
  font-size: 56px;
  color: var(--accent, #6c63ff);
  opacity: .12;
  font-family: Georgia, serif;
  line-height: 1;
}
.author-bio-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent, #6c63ff);
  margin: 0 0 12px;
}
.author-bio {
  font-size: 15.5px;
  color: var(--text-primary);
  line-height: 1.8;
  margin: 0;
  padding-left: 28px;
  font-style: italic;
  position: relative;
  z-index: 1;
}
.author-stats {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.author-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 18px;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 22px;
  font-size: 15px;
  color: rgba(255,255,255,.85);
}
.author-stat-pill strong { color: #fff; font-size: 18px; font-weight: 800; }
.author-articles-section { padding: 24px 0 40px; }

/* Author article search */
.author-search-wrap {
  position: relative;
  max-width: 420px;
  margin: 0 0 20px;
}
.author-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  pointer-events: none;
}
.author-search-wrap input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.author-search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.author-search-empty {
  color: var(--text3);
  padding: 24px 0;
  text-align: center;
}

/* Clickable author links */
a.author-name, a.hero-source, a.podcast-card-author, a.podcast-author-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.author-name:hover, a.hero-source:hover, a.podcast-card-author:hover, a.podcast-author-link:hover {
  text-decoration: underline;
}

/* ===================== HASHTAG PAGE ===================== */
.hashtag-hero {
  background: linear-gradient(180deg, #6366F1 0%, #8B5CF6 55%, var(--bg) 100%);
  margin: -32px -20px 0;
  padding: 44px 32px 36px;
  color: #fff;
  text-align: center;
}
.hashtag-hero h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 12px 0 8px;
}
.hashtag-count {
  font-size: 15px;
  color: rgba(255,255,255,.75);
  margin: 0;
}
.hashtag-articles-section { padding: 24px 0 40px; }
@media (max-width: 768px) {
  .hashtag-hero { padding: 28px 20px 28px; }
  .hashtag-hero h1 { font-size: 28px; }
}
@media (max-width: 640px) {
  .hashtag-hero { margin: -32px -16px 0; padding: 36px 16px 24px; }
  .hashtag-hero h1 { font-size: 24px; }
}

/* About page */
.about-hero .about-logo { border-radius: 20px; }
.about-content { padding: 24px 0 40px; }
.about-section { margin-bottom: 32px; }
.about-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.about-section p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text2);
}
.about-features { list-style: none; padding: 0; }
.about-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text2);
}
.about-features li::before {
  content: '\2713';
  color: var(--primary);
  font-weight: 700;
  margin-right: 10px;
}
.about-links { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-outline {
  background: transparent !important;
  border: 2px solid var(--primary) !important;
  color: var(--primary) !important;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .podcast-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .podcasts-hero { padding: 36px 20px 28px; }
  .podcasts-hero h1 { font-size: 28px; }
  .podcast-detail-hero { padding: 28px 20px 28px; }
  .podcast-detail-header { gap: 20px; }
  .podcast-detail-cover { width: 180px; height: 180px; object-fit: contain; background: transparent; }
  .podcast-detail-cover.podcast-card-img-placeholder { width: 180px; height: 180px; }
  .podcast-detail-info h1 { font-size: 32px; letter-spacing: -.8px; }
  .author-profile-hero { padding: 28px 20px 28px; }
  .author-profile-header { gap: 20px; }
  .author-profile-avatar { width: 120px; height: 120px; }
  .author-profile-info h1 { font-size: 28px; }
}
@media (max-width: 640px) {
  .podcast-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .podcasts-hero { margin: -32px -16px 0; padding: 40px 16px 24px; }
  .podcasts-hero h1 { font-size: 24px; }
  .podcasts-hero-icon { display: none; }
  .podcast-card-wrap { padding: 12px 12px 14px; }
  .podcast-card-play-btn { opacity: 1; width: 40px; height: 40px; min-width: 40px; bottom: -4px; right: 6px; }
  .podcast-card-body h3 { font-size: 13px; }
  .podcast-card-body p { display: none; }
  .podcast-detail-hero { margin: -32px -16px 0; padding: 36px 16px 24px; }
  .podcast-detail-header { flex-direction: column; align-items: center; text-align: center; }
  .podcast-detail-cover { width: 100%; max-width: 280px; height: auto; object-fit: contain; background: transparent; }
  .podcast-detail-cover.podcast-card-img-placeholder { width: 200px; height: 200px; }
  .podcast-detail-info h1 { font-size: 26px; letter-spacing: -.5px; }
  .podcast-actions { justify-content: center; }
  .episode-list-header { display: none; }
  .author-profile-hero { margin: -32px -16px 0; padding: 36px 16px 24px; }
  .author-profile-header { flex-direction: column; align-items: center; text-align: center; }
  .author-profile-avatar { width: 100px; height: 100px; }
  .author-profile-info h1 { font-size: 24px; }
  .author-stats { justify-content: center; }
  .author-tabs { gap: 0; }
  .author-tab { padding: 8px 14px; font-size: 13px; }
  .author-bio-section { text-align: center; padding: 20px 18px; }
  .author-bio-section::before, .author-bio-section::after { display: none; }
  .author-bio { padding-left: 0; font-size: 14.5px; }
  .author-bio-title { text-align: center; }
}
@media (max-width: 380px) {
  .podcast-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .podcast-card-wrap { padding: 10px 10px 12px; }
}

/* ======== Album section (Spotify-style) ======== */
.album-section { margin: 28px 0 8px; }
.album-section .section-title { margin-bottom: 16px; }
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.album-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 8px;
  padding: 14px 14px 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: background .3s ease;
}
.album-card:hover {
  background: var(--surface2);
}
.album-card-img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 14px;
}
.album-card-img {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  border-radius: 6px;
}
.album-card-img-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--surface2));
  color: var(--primary);
}
.album-card-body { padding: 0; }
.album-card-body h4 {
  margin: 0 0 4px; font-size: 15px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.album-card-meta { font-size: 13px; color: var(--text3); }

@media (max-width: 600px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .album-card { padding: 12px 12px 14px; }
}

/* ===================== BLOCKED PAGE ===================== */
.blocked-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  padding: 40px 20px;
}

.blocked-page-icon {
  color: var(--text3);
  margin-bottom: 20px;
  opacity: 0.6;
}

.blocked-page h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.blocked-page p {
  font-size: 16px;
  color: var(--text2);
  margin-bottom: 24px;
  max-width: 400px;
}

.blocked-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.blocked-page-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ===================== ADMIN PAGE TOGGLE BUTTONS ===================== */
.admin-btn-warning-active {
  background: #F59E0B !important;
  color: #fff !important;
  border-color: #D97706 !important;
}

.admin-btn-danger-active {
  background: #EF4444 !important;
  color: #fff !important;
  border-color: #DC2626 !important;
}

.page-toggle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-toggle-actions .admin-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
}

/* ===================== ADMIN GALLERY GRID ===================== */
.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.admin-gallery-item {
  position: relative;
  border-radius: var(--radius-sm, 6px);
  overflow: hidden;
  background: var(--surface2, #f1f5f9);
}

.admin-gallery-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.admin-gallery-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.admin-gallery-item:hover .admin-gallery-remove {
  opacity: 1;
}

.admin-gallery-caption {
  display: block;
  font-size: 11px;
  color: var(--text3, #94a3b8);
  padding: 4px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-gallery-caption-input {
  width: 100%;
  padding: 4px 6px;
  font-size: 11px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0 0 var(--radius-sm, 6px) var(--radius-sm, 6px);
  background: var(--bg, #fff);
  color: var(--text, #1e293b);
  outline: none;
  box-sizing: border-box;
}

.admin-gallery-caption-input:focus {
  border-color: var(--primary);
}

/* ===================== LIGHTBOX ===================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightbox-fade-in 0.2s ease;
}

@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.15s ease;
}

.lightbox-caption {
  color: #e2e8f0;
  font-size: 14px;
  margin-top: 12px;
  text-align: center;
  max-width: 600px;
}

.lightbox-counter {
  color: #94a3b8;
  font-size: 13px;
  margin-top: 8px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

@media (max-width: 768px) {
  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    font-size: 22px;
  }
}

/* ===================== MOBILE BOTTOM NAV ===================== */
.mobile-bottom-nav {
  display: none;
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 6px 0 4px;
  color: var(--text3);
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
  gap: 2px;
}

.bnav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.bnav-item.active {
  color: var(--primary);
}

.bnav-item:active {
  opacity: 0.7;
}

/* Elevated center search tab */
#bnav-search {
  position: relative;
  top: -18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  flex: 0 0 54px;
  padding: 0;
  gap: 0;
  box-shadow: 0 4px 14px rgba(99,102,241,.4);
  margin: 0 4px;
}

#bnav-search svg {
  width: 26px;
  height: 26px;
}

#bnav-search span {
  display: none;
}

#bnav-search.active {
  color: #fff;
  background: var(--primary);
}

[data-theme="dark"] #bnav-search {
  box-shadow: 0 4px 12px rgba(99,102,241,.5);
}

/* Category Modal */
.category-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: center;
}

.category-modal-overlay.open {
  display: flex;
}

.category-modal {
  width: 100%;
  max-width: 500px;
  max-height: 70vh;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 0;
  overflow: hidden;
  animation: slideUpModal .25s ease;
}

@keyframes slideUpModal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.category-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.category-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface2);
  color: var(--text2);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-modal-body {
  padding: 16px 20px 24px;
  overflow-y: auto;
  max-height: calc(70vh - 60px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.category-modal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.category-modal-item:active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.category-modal-item .cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    align-items: flex-end;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 101;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
    overflow: visible;
  }

  body {
    padding-bottom: 60px !important;
  }

  /* Make navbar fixed on mobile */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
  }

  #main-content {
    padding-top: 64px;
  }

  .site-footer {
    display: none !important;
  }
}

[data-theme="dark"] .mobile-bottom-nav {
  box-shadow: 0 -2px 10px rgba(0,0,0,.3);
}

[data-theme="dark"] .category-modal-overlay {
  background: rgba(0,0,0,.7);
}

/* ===================== ENIGMA / GRAN LAKU SHOW ===================== */

/* Body overrides when enigma page is active */
body.enigma-active {
  background: #0a0a0a !important;
  padding-bottom: 0 !important;
}
body.enigma-active .site-footer {
  background: #0a0a0a;
  color: #888;
  border-top: 1px solid #1a1a1a;
}
body.enigma-active .site-footer a {
  color: #d4a853;
}
body.enigma-active .navbar {
  background: rgba(10,10,10,.95);
  border-bottom-color: #1a1a1a;
  backdrop-filter: blur(12px);
}
body.enigma-active .mobile-bottom-nav {
  background: #111;
  border-top: 1px solid #1a1a1a;
}
body.enigma-active .mobile-bottom-nav .bnav-item {
  color: #888;
}
body.enigma-active .mobile-bottom-nav .bnav-item.active {
  color: #FFD700;
}

.enigma-page {
  background: #0a0a0a;
  color: #f5f5f5;
  min-height: 100vh;
  overflow: hidden;
}

/* Hero */
.enigma-hero {
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1000 40%, #2a1800 70%, #0a0a0a 100%);
  padding: 80px 20px 60px;
  text-align: center;
  overflow: hidden;
}
.enigma-hero-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #FFD70044, transparent),
    radial-gradient(2px 2px at 40% 70%, #FFD70033, transparent),
    radial-gradient(2px 2px at 60% 20%, #FFD70022, transparent),
    radial-gradient(2px 2px at 80% 60%, #FFD70044, transparent),
    radial-gradient(3px 3px at 10% 80%, #FFD70033, transparent),
    radial-gradient(2px 2px at 90% 40%, #FFD70022, transparent),
    radial-gradient(3px 3px at 50% 50%, #FFD70044, transparent);
  animation: enigmaParticles 6s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes enigmaParticles {
  0% { opacity: 0.5; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(-10px); }
}
.enigma-hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}
.enigma-hero-title {
  font-size: 56px;
  font-weight: 900;
  background: linear-gradient(135deg, #FFD700, #FFC107, #FF8C00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 20px;
  text-shadow: none;
  letter-spacing: 4px;
}
.enigma-hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 3px;
  padding: 10px 28px;
  border-radius: 30px;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.enigma-hero-subtitle {
  font-size: 22px;
  color: #d4a853;
  margin-bottom: 10px;
  font-style: italic;
}
.enigma-hero-slogan {
  font-size: 16px;
  color: #aaa;
  margin-bottom: 32px;
}
.enigma-hero-cta {
  display: inline-block;
  background: linear-gradient(135deg, #FFD700, #FF8C00);
  color: #0a0a0a;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 40px;
  border-radius: 30px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(255,215,0,.3);
}
.enigma-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255,215,0,.5);
}

/* Sections */
.enigma-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
}
.enigma-section + .enigma-section {
  border-top: 1px solid #1a1a1a;
}
.enigma-section-title {
  font-size: 28px;
  font-weight: 800;
  color: #FFD700;
  text-align: center;
  margin-bottom: 32px;
  letter-spacing: 1px;
}

/* Video */
.enigma-video-section {
  max-width: 700px;
}
.enigma-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #FFD70033;
}
.enigma-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.enigma-video-caption {
  text-align: center;
  font-size: 18px;
  color: #d4a853;
  margin-top: 20px;
  font-style: italic;
}

/* Steps */
.enigma-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.enigma-step {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #151515;
  border: 1px solid #FFD70022;
  border-radius: 12px;
  padding: 16px 20px;
  transition: border-color .2s, background .2s;
}
.enigma-step:hover {
  border-color: #FFD70066;
  background: #1a1a1a;
}
.enigma-step-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}
.enigma-step-text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* Platforms */
.enigma-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.enigma-platform-link {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #151515;
  border: 1px solid #FFD70033;
  border-radius: 10px;
  padding: 14px 16px;
  color: #f5f5f5;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
  animation: enigmaPlatformFloat 4s ease-in-out infinite;
}
/* Dekale animasyon an pou chak bouton */
.enigma-platform-link:nth-child(2) { animation-delay: .4s; }
.enigma-platform-link:nth-child(3) { animation-delay: .8s; }
.enigma-platform-link:nth-child(4) { animation-delay: 1.2s; }
.enigma-platform-link:nth-child(5) { animation-delay: 1.6s; }
.enigma-platform-link:nth-child(6) { animation-delay: 2s; }
@keyframes enigmaPlatformFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
/* Efè briyans ki pase sou bouton an lè ou pase sou li */
.enigma-platform-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,215,0,.25), transparent);
  transform: skewX(-20deg);
  transition: left .5s ease;
}
.enigma-platform-link:hover {
  background: #1a1a1a;
  border-color: #FFD700;
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 24px rgba(255,215,0,.18);
  animation-play-state: paused;
}
.enigma-platform-link:hover::before {
  left: 130%;
}
.enigma-platform-link.disabled {
  opacity: 0.4;
  pointer-events: none;
  animation: none;
}
.enigma-platform-icon {
  display: flex;
  align-items: center;
  transition: transform .3s ease;
}
.enigma-platform-link:hover .enigma-platform-icon {
  transform: scale(1.2) rotate(-8deg);
}
.enigma-platform-icon svg {
  width: 20px;
  height: 20px;
}

/* Questions */
.enigma-questions-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 620px;
  margin: 0 auto;
}
.enigma-question-card {
  position: relative;
  background: linear-gradient(160deg, #151515, #0d0d0d);
  border: 1px solid #FFD70033;
  border-radius: 18px;
  padding: 34px 28px 28px;
  text-align: center;
  transition: border-color .3s, box-shadow .3s, transform .3s;
  animation: enigmaGlow 3s ease-in-out infinite alternate;
}
@keyframes enigmaGlow {
  0% { box-shadow: 0 0 10px rgba(255,215,0,.05); }
  100% { box-shadow: 0 0 28px rgba(255,215,0,.12); }
}
.enigma-question-card:hover {
  border-color: #FFD70099;
  transform: translateY(-2px);
}
.enigma-question-card.answered {
  border-color: #FFD700;
  box-shadow: 0 0 24px rgba(255,215,0,.18);
}
.enigma-question-num {
  display: inline-block;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 30px;
  margin-bottom: 18px;
}
.enigma-question-text {
  font-size: 18px;
  color: #ececec;
  line-height: 1.6;
  margin-bottom: 22px;
  font-style: italic;
  font-weight: 500;
}

/* Answer input + play form */
.enigma-answer-input {
  width: 100%;
  max-width: 420px;
  margin: 8px auto 0;
  display: block;
  background: #0a0a0a;
  border: 1px solid #FFD70044;
  border-radius: 12px;
  padding: 14px 16px;
  color: #f5f5f5;
  font-size: 15px;
  text-align: center;
  transition: border-color .2s, box-shadow .2s;
}
.enigma-answer-input::placeholder { color: #777; font-style: italic; }
.enigma-answer-input:disabled {
  opacity: .55;
  cursor: not-allowed;
  border-style: dashed;
}
.enigma-answer-input:focus {
  outline: none;
  border-color: #FFD700;
  box-shadow: 0 0 12px rgba(255,215,0,.2);
}
.enigma-play-form {
  max-width: 480px;
  margin: 36px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(160deg, #151515, #0d0d0d);
  border: 1px solid #FFD70044;
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 0 30px rgba(255,215,0,.06);
}
.enigma-play-title {
  text-align: center;
  color: #FFD700;
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
}
.enigma-play-field {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #FFD70044;
  border-radius: 12px;
  padding: 14px 16px;
  color: #f5f5f5;
  font-size: 15px;
  text-align: center;
  transition: border-color .2s, box-shadow .2s;
}
.enigma-play-field::placeholder { color: #777; }
.enigma-play-field:focus {
  outline: none;
  border-color: #FFD700;
  box-shadow: 0 0 12px rgba(255,215,0,.2);
}
.enigma-play-submit {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #0a0a0a;
  border: none;
  border-radius: 30px;
  padding: 15px 24px;
  margin-top: 4px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .5px;
  cursor: pointer;
  transition: transform .15s, opacity .2s, box-shadow .2s;
}
.enigma-play-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,215,0,.25);
}
.enigma-play-submit:disabled { opacity: .6; cursor: not-allowed; }
.enigma-play-result {
  text-align: center;
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
  font-size: 15px;
}
/* Blòk "fòk ou enskri pou w jwe" */
.enigma-login-required { text-align: center; }
.enigma-login-required-text {
  color: #bbb;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 4px;
}
.enigma-play-submit-link {
  display: block;
  text-align: center;
  text-decoration: none;
}
.enigma-login-link {
  display: block;
  text-align: center;
  color: #FFD700;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 4px;
}
.enigma-login-link:hover { text-decoration: underline; }
.enigma-already-played { text-align: center; }

/* ===================== PROFILE PAGE ===================== */
.profile-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}
.profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.profile-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 26px;
  font-weight: 800;
}
.profile-hero-info { min-width: 0; }
.profile-name { font-size: 22px; font-weight: 800; margin: 0 0 4px; color: var(--text); }
.profile-name .verified-badge-icon { width: 20px; height: 20px; vertical-align: middle; }
.profile-email { color: var(--text2); font-size: 14px; margin: 0; word-break: break-all; }
.profile-section { margin-bottom: 28px; }
.profile-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text);
}
.profile-count {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
}
.profile-list { display: flex; flex-direction: column; gap: 10px; }
.profile-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.profile-item-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.profile-item-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  font-size: 22px;
}
.profile-item-info { flex: 1; min-width: 0; }
.profile-item-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-item-sub { color: var(--text2); font-size: 13px; margin-top: 2px; }
.profile-item-meta { color: var(--text3); font-size: 12px; flex-shrink: 0; white-space: nowrap; }
.profile-empty {
  color: var(--text2);
  font-size: 14px;
  text-align: center;
  padding: 28px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ===================== SURVEY (SONDAJ) PAGE ===================== */
.survey-page { max-width: 820px; margin: 0 auto; padding: 0 16px 60px; }
.survey-hero {
  text-align: center;
  padding: 48px 20px 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 0 0 24px 24px;
  margin: 0 -16px 28px;
  color: #fff;
}
.survey-hero-title { font-size: 34px; font-weight: 900; margin: 0 0 8px; letter-spacing: .5px; }
.survey-hero-subtitle { font-size: 16px; opacity: .92; margin: 0; max-width: 520px; margin-inline: auto; }
.survey-back-wrap { margin-bottom: 16px; }
.survey-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}
.survey-head { text-align: center; margin-bottom: 22px; }
.survey-title { font-size: 22px; font-weight: 800; margin: 0 0 6px; color: var(--text); }
.survey-question { font-size: 17px; font-weight: 600; color: var(--primary); margin: 0 0 6px; }
.survey-desc { font-size: 14px; color: var(--text2); margin: 0; }

/* Leader card */
.survey-leader {
  position: relative;
  text-align: center;
  padding: 28px 20px 22px;
  margin-bottom: 22px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(99,102,241,.10), rgba(236,72,153,.06));
  border: 1.5px solid var(--primary);
  overflow: hidden;
}
.survey-leader-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 30px;
  margin-bottom: 14px;
}
.survey-leader-photo {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 38px;
  font-weight: 800;
}
.survey-leader-name { font-size: 22px; font-weight: 800; color: var(--text); }
.survey-leader-pct { font-size: 40px; font-weight: 900; color: var(--primary); line-height: 1.1; margin: 4px 0; }
.survey-leader-sub { font-size: 13px; color: var(--text2); }

/* Option rows (horizontal bars + ranking) */
.survey-options { display: flex; flex-direction: column; gap: 12px; }
.survey-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.survey-option.is-leader { border-color: var(--primary); background: var(--primary-light); }
.survey-option.mine { border-color: var(--success); }
.survey-option-clickable { cursor: pointer; }
.survey-option-clickable:hover { border-color: var(--primary); box-shadow: 0 6px 20px rgba(99,102,241,.18); transform: translateY(-2px); }
.survey-option-clickable:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.survey-rank { font-size: 22px; font-weight: 800; min-width: 34px; text-align: center; color: var(--text2); flex-shrink: 0; }
.survey-option-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.survey-option-photo-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}
.survey-option-body { flex: 1; min-width: 0; }
.survey-option-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.survey-option-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.survey-mine-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  background: rgba(16,185,129,.12);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.survey-option-pct { font-weight: 800; font-size: 16px; color: var(--text); flex-shrink: 0; }
.survey-bar {
  height: 10px;
  background: var(--surface2);
  border-radius: 20px;
  overflow: hidden;
}
.survey-bar-fill {
  height: 100%;
  border-radius: 20px;
  transition: width 1s cubic-bezier(.22,1,.36,1);
  min-width: 2px;
}
.survey-option-meta { font-size: 12px; color: var(--text3); margin-top: 5px; }
.survey-empty-opt { text-align: center; color: var(--text2); padding: 20px; }
.survey-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.survey-total-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  background: var(--surface2);
  padding: 6px 14px;
  border-radius: 20px;
}
.survey-hint { font-size: 13px; color: var(--text2); }
.survey-hint-done { color: var(--success); font-weight: 600; }

/* Donut chart */
.survey-chart-wrap {
  position: relative;
  height: 280px;
  margin: 8px auto 24px;
  max-width: 420px;
}

/* Location breakdown (depatman / dyaspora) */
.survey-locations {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.survey-locations-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}
.survey-loc-list { display: flex; flex-direction: column; gap: 8px; }
.survey-loc-row { display: flex; align-items: center; gap: 10px; }
.survey-loc-name { font-size: 13px; color: var(--text2); width: 90px; flex-shrink: 0; }
.survey-loc-bar { flex: 1; height: 8px; background: var(--surface2); border-radius: 20px; overflow: hidden; }
.survey-loc-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 20px;
  transition: width .9s cubic-bezier(.22,1,.36,1);
}
.survey-loc-count { font-size: 13px; font-weight: 700; color: var(--text); width: 44px; text-align: right; flex-shrink: 0; }

@media (max-width: 640px) {
  .survey-hero-title { font-size: 26px; }
  .survey-hero-subtitle { font-size: 14px; }
  .survey-section { padding: 18px 14px; }
  .survey-leader-pct { font-size: 34px; }
  .survey-rank { font-size: 18px; min-width: 26px; }
  .survey-option-photo { width: 42px; height: 42px; }
}
.enigma-play-result.ok  { background: #14361f; color: #7CFC9B; border: 1px solid #2e7d4f; }
.enigma-play-result.win { background: #3a2e05; color: #FFD700; border: 1px solid #FFD700; }
.enigma-play-result.err { background: #3a1414; color: #ff8a8a; border: 1px solid #7d2e2e; }

/* Live toast */
.enigma-live-toast {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9999;
  background: rgba(17,17,17,.96);
  border: 1px solid #FFD70055;
  border-radius: 12px;
  padding: 12px 16px;
  color: #f5f5f5;
  font-size: 13px;
  max-width: 80vw;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity .35s, transform .35s;
}
.enigma-live-toast.show { opacity: 1; transform: translateY(0); }
.enigma-live-toast strong { color: #FFD700; }

/* Countdown */
.enigma-countdown-section {
  text-align: center;
}
.enigma-countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.enigma-cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #151515;
  border: 2px solid #FFD70033;
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 72px;
}
.enigma-cd-unit span {
  font-size: 36px;
  font-weight: 900;
  color: #FFD700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.enigma-cd-unit small {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}
.enigma-cd-sep {
  font-size: 32px;
  font-weight: 700;
  color: #FFD700;
  opacity: .5;
}

/* Prize */
.enigma-prize-section {
  text-align: center;
  background: linear-gradient(180deg, transparent, #1a1000 50%, transparent);
  padding: 60px 20px;
}
.enigma-prize-amount {
  font-size: 64px;
  font-weight: 900;
  background: linear-gradient(135deg, #FFD700, #FF8C00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.1;
}
.enigma-prize-desc {
  font-size: 22px;
  color: #d4a853;
  margin-bottom: 12px;
}
.enigma-prize-note {
  font-size: 14px;
  color: #888;
  font-style: italic;
}

/* WhatsApp CTA */
.enigma-whatsapp-section {
  text-align: center;
}
.enigma-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 36px;
  border-radius: 30px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(37,211,102,.3);
}
.enigma-whatsapp-btn svg {
  width: 24px;
  height: 24px;
}
.enigma-whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(37,211,102,.5);
}
.enigma-whatsapp-phone {
  margin-top: 16px;
  font-size: 18px;
  color: #aaa;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.enigma-whatsapp-phone-icon {
  display: inline-flex;
  align-items: center;
  color: #25D366;
}
.enigma-whatsapp-phone-icon svg {
  width: 20px;
  height: 20px;
}
.enigma-rules {
  margin-top: 32px;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.enigma-rules h3 {
  font-size: 16px;
  color: #FFD700;
  margin-bottom: 12px;
}
.enigma-rules ul {
  list-style: none;
  padding: 0;
}
.enigma-rules li {
  padding: 8px 0;
  color: #ccc;
  font-size: 14px;
  line-height: 1.5;
}
.enigma-rules li::before {
  content: '\2714\0020';
  color: #25D366;
}

/* Winner */
.enigma-winner-section {
  text-align: center;
}
.enigma-winner-name {
  font-size: 32px;
  font-weight: 800;
  color: #FFD700;
  margin-bottom: 16px;
}
.enigma-winner-img {
  max-width: 300px;
  border-radius: 12px;
  border: 3px solid #FFD700;
  margin: 0 auto 16px;
}
.enigma-replay-link {
  display: inline-block;
  background: #FFD700;
  color: #0a0a0a;
  font-weight: 700;
  padding: 10px 28px;
  border-radius: 30px;
  text-decoration: none;
}
.enigma-btn-back {
  display: inline-block;
  margin-top: 20px;
  color: #FFD700;
  text-decoration: none;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .enigma-platforms {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .enigma-hero { padding: 60px 16px 40px; }
  .enigma-hero-title { font-size: 36px; letter-spacing: 2px; }
  .enigma-hero-subtitle { font-size: 18px; }
  .enigma-hero-badge { font-size: 12px; padding: 8px 20px; letter-spacing: 2px; }
  .enigma-section { padding: 32px 16px; }
  .enigma-section-title { font-size: 22px; margin-bottom: 24px; }
  .enigma-steps { gap: 10px; }
  .enigma-step { padding: 14px 16px; gap: 12px; }
  .enigma-step-icon { font-size: 20px; width: 32px; }
  .enigma-step-text { font-size: 14px; }
  .enigma-platforms { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .enigma-platform-link { padding: 12px 12px; font-size: 13px; }
  .enigma-question-card { padding: 20px 16px; }
  .enigma-question-text { font-size: 15px; }
  .enigma-cd-unit { min-width: 56px; padding: 12px 14px; }
  .enigma-cd-unit span { font-size: 28px; }
  .enigma-cd-sep { font-size: 24px; }
  .enigma-prize-section { padding: 40px 16px; }
  .enigma-prize-amount { font-size: 44px; }
  .enigma-prize-desc { font-size: 18px; }
  .enigma-whatsapp-btn { font-size: 14px; padding: 14px 24px; }
  .enigma-winner-name { font-size: 26px; }
  .enigma-winner-img { max-width: 220px; }
}

@media (max-width: 400px) {
  .enigma-hero-title { font-size: 30px; }
  .enigma-platforms { grid-template-columns: 1fr 1fr; }
  .enigma-cd-unit { min-width: 48px; padding: 10px 10px; }
  .enigma-cd-unit span { font-size: 24px; }
  .enigma-cd-sep { font-size: 20px; }
  .enigma-prize-amount { font-size: 36px; }
}

/* ========================================
   VOTE PAGE
   ======================================== */

/* Body overrides when vote page is active */
body.vote-active { background: #0a0a14; }
body.vote-active .navbar { background: rgba(10,10,20,0.97); border-bottom-color: #1a1a2e; }
body.vote-active .mobile-bottom-nav { background: rgba(10,10,20,0.97); border-top-color: #1a1a2e; }
body.vote-active .site-footer { background: #06060e; }

.vote-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

.vote-hero {
  text-align: center;
  padding: 60px 16px 40px;
}
.vote-hero-title {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -1px;
}
.vote-hero-subtitle {
  font-size: 18px;
  color: #94a3b8;
  margin: 0;
}

/* Contest section */
.vote-section {
  margin-bottom: 48px;
}
.vote-section + .vote-section {
  border-top: 1px solid #1a1a2e;
  padding-top: 48px;
}
.vote-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.vote-section-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.vote-section-desc {
  font-size: 15px;
  color: #94a3b8;
  margin: 4px 0 0;
}
.vote-section-link {
  color: #3b82f6;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.vote-section-link:hover { text-decoration: underline; }

/* Candidates grid */
.vote-candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* Candidate card */
.vote-candidate-card {
  background: #12121f;
  border: 1px solid #1e1e32;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.vote-candidate-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(59,130,246,0.10);
}
/* Kat kandida ou ka klike sou li pou vote */
.vote-candidate-clickable {
  cursor: pointer;
}
.vote-candidate-clickable:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 32px rgba(59,130,246,0.28);
}
.vote-candidate-clickable:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Rank badge */
.vote-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  z-index: 2;
  background: #334155;
}
.vote-rank-1 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.vote-rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
.vote-rank-3 { background: linear-gradient(135deg, #b45309, #92400e); }

/* Candidate photo */
.vote-candidate-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: #1a1a2e;
}
.vote-candidate-photo-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a2e;
  color: #334155;
  font-size: 48px;
}

/* Candidate info */
.vote-candidate-info {
  padding: 20px;
}
.vote-candidate-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}
.vote-candidate-desc {
  font-size: 14px;
  color: #94a3b8;
  margin: 0 0 12px;
  line-height: 1.5;
}
.vote-candidate-link {
  display: inline-block;
  color: #3b82f6;
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 12px;
}
.vote-candidate-link:hover { text-decoration: underline; }

/* Vote count */
.vote-candidate-count {
  font-size: 24px;
  font-weight: 800;
  color: #3b82f6;
  margin-bottom: 12px;
}
.vote-candidate-count small {
  font-size: 13px;
  font-weight: 400;
  color: #64748b;
  margin-left: 4px;
}

/* Vote button */
.vote-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  background: #3b82f6;
  color: #fff;
}
.vote-btn:hover { background: #2563eb; }
.vote-btn:active { transform: scale(0.97); }
.vote-btn:disabled {
  background: #1e293b;
  color: #64748b;
  cursor: default;
}
.vote-btn:disabled:hover { background: #1e293b; }

/* Already voted badge */
.vote-voted-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid #1e3a5f;
  color: #3b82f6;
  font-size: 14px;
  font-weight: 500;
}

/* Closed contest badge */
.vote-closed-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: #1e293b;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

/* Login hint */
.vote-login-hint {
  text-align: center;
  padding: 16px;
  color: #64748b;
  font-size: 13px;
}

/* No contests message */
.vote-empty {
  text-align: center;
  padding: 80px 20px;
  color: #64748b;
  font-size: 16px;
}

/* Contest detail back link */
.vote-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3b82f6;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
}
.vote-back:hover { text-decoration: underline; }

/* Section meta: total badge + share */
.vote-section-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.vote-total-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: #12121f;
  border: 1px solid #1e1e32;
  color: #3b82f6;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* Social share */
.vote-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.vote-share-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}
.vote-share-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: #12121f;
  border: 1px solid #1e1e32;
  transition: transform 0.15s, color 0.15s, background 0.15s;
}
.vote-share-btn:hover { transform: translateY(-2px); }
.vote-share-wa:hover { color: #fff; background: #25D366; border-color: #25D366; }
.vote-share-fb:hover { color: #fff; background: #1877F2; border-color: #1877F2; }
.vote-share-x:hover  { color: #fff; background: #000; border-color: #333; }

/* Result percentage bar */
.vote-result {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.vote-result-bar {
  flex: 1;
  height: 8px;
  border-radius: 6px;
  background: #1e293b;
  overflow: hidden;
}
.vote-result-fill {
  height: 100%;
  border-radius: 6px;
  background: #3b82f6;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.vote-result-fill.vote-rank-1 { background: linear-gradient(90deg, #f59e0b, #d97706); }
.vote-result-fill.vote-rank-2 { background: linear-gradient(90deg, #94a3b8, #64748b); }
.vote-result-fill.vote-rank-3 { background: linear-gradient(90deg, #b45309, #92400e); }
.vote-result-pct {
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  min-width: 38px;
  text-align: right;
}

/* ---- Vote Responsive ---- */

@media (max-width: 768px) {
  .vote-section-meta { width: 100%; justify-content: space-between; }
  .vote-hero { padding: 40px 12px 28px; }
  .vote-hero-title { font-size: 36px; }
  .vote-hero-subtitle { font-size: 16px; }
  .vote-section-title { font-size: 22px; }
  .vote-candidates-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .vote-candidate-photo,
  .vote-candidate-photo-placeholder { height: 180px; }
}

@media (max-width: 640px) {
  .vote-hero-title { font-size: 28px; }
  .vote-candidates-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .vote-candidate-info { padding: 14px; }
  .vote-candidate-name { font-size: 16px; }
  .vote-candidate-count { font-size: 20px; }
  .vote-candidate-photo,
  .vote-candidate-photo-placeholder { height: 160px; }
}

@media (max-width: 400px) {
  .vote-hero-title { font-size: 24px; }
  .vote-candidates-grid { grid-template-columns: 1fr; }
  .vote-candidate-photo,
  .vote-candidate-photo-placeholder { height: 200px; }
}


/* Enigma plays — badge + answers */
.admin-nav-item { position: relative; }
.admin-nav-badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: 10px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 16px;
}
.enigma-play-answers { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.enigma-play-answer { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; border-left-width: 4px; }
.enigma-play-answer.correct { border-left-color: #2e7d4f; }
.enigma-play-answer.wrong   { border-left-color: #e53935; }
.enigma-play-answer.neutral { border-left-color: #9e9e9e; }
.enigma-play-answer .epa-q { font-weight: 600; margin-bottom: 6px; }
.enigma-play-answer .epa-a { color: var(--text); font-size: 14px; }
.enigma-play-answer .epa-tag { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; margin-left: 6px; }
.enigma-play-answer.correct .epa-tag { background: #14361f; color: #7CFC9B; }
.enigma-play-answer.wrong .epa-tag   { background: #3a1414; color: #ff8a8a; }
.enigma-play-answer.neutral .epa-tag { background: var(--surface2); color: var(--text-muted); }


/* ==================== SOVE ATIK POU PITA (BOOKMARKS) ==================== */
.btn-save.saved {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.btn-save.saved svg { fill: var(--primary); }

/* ==================== LIKE ATIK ==================== */
.btn-like.liked {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.btn-like.liked svg { fill: var(--accent); }

/* ==================== FOLLOW EDITÈ ==================== */
.follow-btn {
  margin-top: 14px;
  padding: 10px 24px;
  border: none;
  border-radius: 22px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.follow-btn:hover { opacity: .9; transform: translateY(-1px); }
.follow-btn.following {
  background: rgba(255,255,255,.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}
.follow-btn.following:hover {
  background: rgba(239,68,68,.2);
  border-color: rgba(239,68,68,.5);
  color: #fecaca;
}
.follow-btn.edit-profile-btn {
  display: inline-block;
  text-decoration: none;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
}
.follow-btn.edit-profile-btn:hover {
  background: rgba(255,255,255,.22);
}

/* Lyen tit atik sove nan pwofil la */
.profile-item-link {
  display: block;
  text-decoration: none;
}
.profile-item-link:hover { color: var(--primary); }

/* Bouton retire yon atik sove */
.profile-item-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.profile-item-remove:hover {
  border-color: #EF4444;
  color: #EF4444;
  background: rgba(239, 68, 68, 0.08);
}

/* ==================== ENIGMA — DOWNLOAD APP (Android / iOS) ==================== */
.enigma-download-section { text-align: center; }
.enigma-download-sub {
  color: #cfcfcf;
  font-size: 15px;
  margin: -6px 0 22px;
}
.enigma-download-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.enigma-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  padding: 12px 22px;
  background: #151515;
  border: 1px solid #FFD70033;
  border-radius: 12px;
  color: #f5f5f5;
  text-decoration: none;
  text-align: left;
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.enigma-dl-btn:hover {
  border-color: #FFD700;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.15);
}
.enigma-dl-btn svg { flex-shrink: 0; }
.enigma-dl-android svg { color: #3DDC84; }
.enigma-dl-ios svg { color: #f5f5f5; }
.enigma-dl-text { display: flex; flex-direction: column; line-height: 1.25; }
.enigma-dl-text small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9a9a9a;
}
.enigma-dl-text strong { font-size: 17px; font-weight: 800; }
@media (max-width: 480px) {
  .enigma-download-btns { flex-direction: column; align-items: stretch; }
  .enigma-dl-btn { justify-content: center; text-align: center; }
}
