@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Oswald:wght@400;500;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #ffffff;
  --bg-card: #f8f9fa;
  --bg-card-hover: #f0f1f3;
  --accent: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.12);
  --gold: #d97706;
  --gold-glow: rgba(217, 119, 6, 0.12);
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --border-light: #d1d5db;
  --hero-gradient-start: #f0f4ff;
  --font-display: 'Permanent Marker', cursive;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

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

::selection { background: var(--accent); color: white; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ─── ACCESSIBILITY ─── */
.skip-link {
  position: fixed; top: -50px; left: 16px; z-index: 10001;
  background: var(--accent); color: white; padding: 8px 16px; border-radius: 0 0 6px 6px;
  font-family: var(--font-body); font-size: 13px;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.nav-logo-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), #1d4ed8);
  box-shadow: 0 2px 8px var(--accent-glow);
  font-size: 18px;
}
.nav-logo-text h1 {
  font-family: var(--font-display); font-size: 18px; color: var(--text); letter-spacing: 1px;
}
.nav-logo-text span {
  font-size: 9px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; display: block; margin-top: -2px;
}
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--border-light);
  color: var(--text-muted); width: 40px; height: 40px; border-radius: 8px;
  cursor: pointer; font-size: 20px; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-link {
  background: transparent; border: 1px solid transparent;
  color: var(--text-muted); padding: 6px 14px; border-radius: 6px;
  cursor: pointer; font-size: 13px; text-transform: capitalize;
  font-family: var(--font-body); font-weight: 500; transition: all 0.2s;
}
.nav-link:hover { color: var(--accent); border-color: var(--accent); }
.nav-link.active { background: rgba(37,99,235,0.08); border-color: var(--accent); color: var(--accent); }
.nav-link.admin-link { border-color: var(--border-light); }
.nav-link.admin-link:hover { border-color: var(--gold); color: var(--gold); }
.nav-link.admin-link.active { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 700; }

/* ─── HERO ─── */
.hero {
  min-height: 90vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 120px 24px 80px;
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--hero-gradient-start) 0%, var(--bg) 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: 0.08;
  background: radial-gradient(circle at 20% 50%, var(--accent) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, var(--gold) 0%, transparent 50%);
}
.hero::after {
  content: ''; position: absolute; inset: 0; opacity: 0.03;
  background: repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(0,0,0,0.02) 50px, rgba(0,0,0,0.02) 51px);
}
.hero-content { position: relative; z-index: 1; }
.hero-pre {
  font-family: var(--font-body); font-size: 12px; color: var(--accent);
  letter-spacing: 4px; text-transform: uppercase; margin-bottom: 16px;
  font-weight: 600; animation: fadeIn 0.8s ease;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(40px, 8vw, 80px);
  color: var(--text); line-height: 1.1; letter-spacing: 2px;
  margin-bottom: 8px;
}
.hero h1 .accent { color: var(--accent); }
.hero-tagline {
  font-family: var(--font-body); font-size: 12px; color: var(--gold);
  letter-spacing: 4px; text-transform: uppercase; margin-bottom: 32px; font-weight: 600;
}
.hero-desc {
  color: var(--text-muted); font-size: 16px; max-width: 500px;
  margin: 0 auto 40px; line-height: 1.7;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Hero background media */
.hero-bg-media {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero-bg-media iframe {
  position: absolute; top: 50%; left: 50%;
  width: 120vw; height: 120vh;
  transform: translate(-50%, -50%);
  border: none; pointer-events: none;
}
.hero-bg-overlay {
  position: absolute; inset: 0; z-index: 0;
  background: rgba(0,0,0,0.4);
}
.hero.hero-has-bg { background: #111; }
.hero.hero-has-bg::before, .hero.hero-has-bg::after { display: none; }
.hero.hero-has-bg .hero-content { z-index: 2; }
.hero.hero-has-bg .hero-pre { color: rgba(255,255,255,0.85); }
.hero.hero-has-bg h1 { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.hero.hero-has-bg h1 .accent { color: #93bbff; }
.hero.hero-has-bg .hero-tagline { color: rgba(255,255,255,0.8); }
.hero.hero-has-bg .hero-desc { color: rgba(255,255,255,0.85); text-shadow: 0 1px 4px rgba(0,0,0,0.4); }

/* Per-slide colour overrides */
.hero-slide[style*="--slide-text"] .hero-pre,
.hero-slide[style*="--slide-text"] h1,
.hero-slide[style*="--slide-text"] .hero-tagline,
.hero-slide[style*="--slide-text"] .hero-desc { color: var(--slide-text); }
.hero-slide[style*="--slide-btn"] .btn-primary {
  background: var(--slide-btn); box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.hero-slide[style*="--slide-btn"] .btn-outline {
  border-color: var(--slide-btn); color: var(--slide-btn);
}

/* ─── HERO CAROUSEL ─── */
.hero-carousel {
  position: relative; overflow: hidden;
}
.hero-slide {
  display: none; /* hidden by default */
}
.hero-slide.active {
  display: flex; /* show active slide */
  animation: heroFadeIn 0.6s ease;
}
@keyframes heroFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Carousel dots */
.hero-carousel-dots {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 10;
}
.hero-carousel-dot {
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.6);
  background: transparent; cursor: pointer; transition: all 0.3s; padding: 0;
}
.hero-carousel-dot.active {
  background: #fff; border-color: #fff; transform: scale(1.2);
}
.hero-carousel-dot:hover { border-color: #fff; background: rgba(255,255,255,0.4); }

/* Carousel arrows */
.hero-carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  background: rgba(0,0,0,0.25); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2); color: #fff;
  width: 44px; height: 44px; border-radius: 50%;
  font-size: 18px; cursor: pointer; transition: all 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.hero-carousel-arrow:hover { background: rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.5); }
.hero-carousel-prev { left: 20px; }
.hero-carousel-next { right: 20px; }

/* ─── BUTTONS ─── */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #1d4ed8); border: none;
  color: #fff; padding: 14px 32px; border-radius: 8px; font-size: 14px; cursor: pointer;
  font-family: var(--font-heading); letter-spacing: 1px; text-transform: uppercase;
  box-shadow: 0 4px 16px var(--accent-glow); transition: transform 0.2s, box-shadow 0.2s; display: inline-block;
}
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 6px 24px var(--accent-glow); }
.btn-outline {
  background: transparent; border: 1px solid var(--border-light);
  color: var(--text); padding: 14px 32px; border-radius: 8px; font-size: 14px; cursor: pointer;
  font-family: var(--font-heading); letter-spacing: 1px; text-transform: uppercase;
  transition: all 0.2s; display: inline-block;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm {
  padding: 8px 20px; border-radius: 6px; font-size: 13px;
  font-family: var(--font-body); font-weight: 500; cursor: pointer;
}
.btn-gold { background: var(--gold); border: none; color: #fff; font-weight: 700; }

/* ─── SECTIONS ─── */
.section {
  max-width: 1200px; margin: 0 auto; padding: 0 24px 80px;
}
.section.narrow { max-width: 800px; }
.section-title {
  font-family: var(--font-display); font-size: 32px; color: var(--text);
  position: relative; display: inline-block; margin-bottom: 8px;
}
.section-title::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 60%; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent); border-radius: 2px;
}
.section-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }

/* ─── PAGE HEADER (for inner pages) ─── */
.page-header { padding: 100px 24px 0; max-width: 1200px; margin: 0 auto; }
.page-header.narrow { max-width: 800px; }

/* ─── BADGE ─── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px;
  font-family: var(--font-body); text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
}
.badge-accent { background: rgba(37,99,235,0.08); color: var(--accent); border: 1px solid rgba(37,99,235,0.2); }
.badge-gold { background: rgba(217,119,6,0.08); color: var(--gold); border: 1px solid rgba(217,119,6,0.2); }

/* ─── CARDS GRID ─── */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.card-list { display: flex; flex-direction: column; gap: 20px; }
.resource-list { display: flex; flex-direction: column; gap: 12px; }

/* ─── VIDEO CARD ─── */
.video-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: all 0.3s; cursor: pointer;
}
.video-card:hover {
  border-color: var(--accent); transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.video-thumb {
  height: 180px; background: linear-gradient(135deg, #dbeafe, #ede9fe);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.video-play {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(37,99,235,0.9);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.video-play svg { width: 20px; height: 20px; fill: white; }
.video-type-badge { position: absolute; top: 12px; right: 12px; }
.video-info { padding: 16px; }
.video-info .badges { display: flex; gap: 6px; margin-bottom: 8px; }
.video-info h3 {
  color: var(--text); font-size: 16px; font-family: var(--font-heading);
  font-weight: 500; margin-bottom: 6px;
}
.video-info .date { color: var(--text-muted); font-size: 12px; font-family: var(--font-body); }

/* ─── POST CARD ─── */
.post-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; transition: all 0.3s; cursor: pointer;
}
.post-card:hover {
  border-color: var(--accent); box-shadow: 0 4px 20px var(--accent-glow);
}
.post-meta {
  display: flex; justify-content: space-between; margin-bottom: 12px;
  font-size: 12px; font-family: var(--font-body);
}
.post-meta .date { color: var(--text-muted); }
.post-meta .read-time { color: var(--accent); font-weight: 600; }
.post-card h3 {
  color: var(--text); font-size: 20px; font-family: var(--font-heading);
  font-weight: 500; margin-bottom: 8px;
}
.post-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ─── RESOURCE CARD ─── */
.resource-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; transition: all 0.3s; display: flex; align-items: center; gap: 16px;
}
.resource-card:hover { border-color: var(--gold); background: var(--bg-card-hover); }
.resource-icon {
  width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(217,119,6,0.12), rgba(217,119,6,0.04));
  border: 1px solid rgba(217,119,6,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.resource-card .info { flex: 1; }
.resource-card .info h3 {
  color: var(--text); font-size: 16px; font-family: var(--font-heading);
  font-weight: 500; margin: 6px 0 4px;
}
.resource-card .info p { color: var(--text-muted); font-size: 13px; }
.resource-arrow { color: var(--gold); font-size: 20px; }

/* ─── FILTER PILLS ─── */
.filters { display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.filter-pill {
  background: transparent; border: 1px solid var(--border-light);
  color: var(--text-muted); padding: 6px 16px; border-radius: 20px;
  cursor: pointer; font-size: 12px; font-family: var(--font-body); font-weight: 500;
  transition: all 0.2s;
}
.filter-pill:hover { border-color: var(--accent); color: var(--accent); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-pill.active-gold { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 700; }

/* ─── VIEW ALL ─── */
.view-all {
  text-align: center; margin-top: 32px;
}
.view-all a {
  background: transparent; border: 1px solid var(--border-light);
  color: var(--text-muted); padding: 10px 24px; border-radius: 6px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500; display: inline-block;
  transition: all 0.2s;
}
.view-all a:hover { border-color: var(--accent); color: var(--accent); }

/* ─── ADMIN ─── */
.admin-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 32px;
}
.admin-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(217,119,6,0.15), rgba(217,119,6,0.05));
  border: 1px solid rgba(217,119,6,0.2); font-size: 18px;
}
.admin-header h2 {
  font-family: var(--font-display); font-size: 28px; color: var(--text);
}
.admin-header .url {
  color: var(--gold); font-size: 12px; font-family: var(--font-body);
}
.admin-tabs { display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.admin-tab {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); padding: 8px 20px; border-radius: 6px;
  cursor: pointer; font-size: 13px; font-family: var(--font-body); font-weight: 500;
  text-transform: capitalize; transition: all 0.2s;
}
.admin-tab.active { background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 700; }
.admin-panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.admin-panel-padded { padding: 24px; }
.admin-row {
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.admin-row:last-child { border-bottom: none; }
.admin-row .left { display: flex; align-items: center; gap: 12px; }
.admin-row .actions { display: flex; gap: 8px; }
.admin-btn-edit {
  background: transparent; border: 1px solid var(--border-light);
  color: var(--text-muted); padding: 4px 12px; border-radius: 4px;
  cursor: pointer; font-size: 12px;
}
.admin-btn-delete {
  background: transparent; border: 1px solid rgba(220,38,38,0.3);
  color: #dc2626; padding: 4px 12px; border-radius: 4px;
  cursor: pointer; font-size: 12px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  color: var(--text-muted); font-size: 11px; font-family: var(--font-body); font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 10px 12px; background: var(--bg);
  border: 1px solid var(--border-light); border-radius: 6px;
  color: var(--text); font-size: 14px; outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }
.form-input::placeholder { color: var(--text-muted); opacity: 0.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 16px; }
.admin-section-title {
  color: var(--gold); font-family: var(--font-heading); font-size: 18px; margin-bottom: 20px;
}
.admin-section-title.open .hb-collapse-arrow { transform: rotate(90deg) !important; }
.admin-top-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.admin-top-bar h3 { color: var(--text); font-family: var(--font-heading); }

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid var(--border); padding: 40px 24px; text-align: center;
  background: var(--bg-card);
}
.footer-logo {
  font-family: var(--font-display); font-size: 20px; color: var(--text); margin-bottom: 8px;
}
.footer-logo .accent { color: var(--accent); }
.footer-copy {
  color: var(--text-muted); font-size: 12px; font-family: var(--font-body); margin-bottom: 16px;
}
.footer-links { display: flex; gap: 16px; justify-content: center; }
.footer-links a {
  color: var(--text-muted); font-size: 13px; transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-links .sep { color: var(--border); }

/* ─── UTILITY ─── */
.hidden { display: none !important; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-close {
  position: absolute; top: 20px; right: 20px;
  background: transparent; border: 1px solid rgba(255,255,255,0.3); color: rgba(255,255,255,0.7);
  padding: 8px 16px; border-radius: 6px; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; z-index: 10;
}
.modal-close:hover { border-color: #fff; color: #fff; }
.modal-title {
  color: #fff; font-family: var(--font-heading); font-size: 20px; margin-bottom: 16px;
}
.modal-video {
  width: 100%; max-width: 800px; aspect-ratio: 16/9; border: none; border-radius: 12px;
}

/* ─── DETAIL VIDEO ─── */
.detail-video {
  width: 100%; aspect-ratio: 16/9; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
}
.detail-video-placeholder {
  display: flex; align-items: center; justify-content: center;
}
.detail-video-placeholder p {
  color: var(--text-muted); font-family: var(--font-body); font-size: 14px;
}

/* ─── PREMIUM BADGE ─── */
.premium-badge { position: absolute; bottom: 10px; left: 10px; }
.watched-badge { position: absolute; top: 10px; right: 10px; }

/* ─── PRICING CARDS ─── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 900px; margin: 0 auto; }
.pricing-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; padding: 32px 24px; text-align: center; display: flex; flex-direction: column; }
.pricing-card-featured { border-color: var(--accent); box-shadow: 0 4px 20px rgba(37,99,235,0.1); position: relative; }
.pricing-card-featured::before { content: 'POPULAR'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-family: var(--font-body); font-size: 10px; font-weight: 700; padding: 4px 12px; border-radius: 4px; letter-spacing: 1px; }
.pricing-name { font-family: var(--font-display); font-size: 24px; color: var(--text); margin-bottom: 8px; }
.pricing-price { font-family: var(--font-display); font-size: 42px; color: var(--accent); line-height: 1; }
.pricing-period { font-family: var(--font-body); font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.pricing-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.pricing-features li { font-size: 14px; color: var(--text); padding: 6px 0; border-bottom: 1px solid var(--border-light); }
.pricing-features li::before { content: '\2713 '; color: var(--gold); font-weight: bold; }
.pricing-features li:last-child { border-bottom: none; }

/* ─── PREMIUM CONTENT GATE ─── */
.premium-gate { background: var(--bg-card); border: 1px solid var(--gold); border-radius: 12px; padding: 32px; text-align: center; margin: 24px 0; }
.premium-gate h3 { font-family: var(--font-display); color: var(--gold); margin-bottom: 12px; }

/* ─── ANALYTICS DASHBOARD ─── */
.analytics-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 8px; padding: 16px; text-align: center; }
.stat-value { font-family: var(--font-display); font-size: 28px; color: var(--accent); line-height: 1.2; }
.stat-label { font-family: var(--font-body); font-size: 11px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.analytics-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-container { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding-top: 8px; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; min-width: 4px; background: var(--accent); border-radius: 3px 3px 0 0; transition: height .3s; position: relative; }
.chart-bar:hover { background: var(--gold); }
.chart-bar-wrap .chart-label { font-size: 9px; color: var(--text-muted); font-family: var(--font-body); margin-top: 4px; writing-mode: vertical-rl; text-orientation: mixed; max-height: 40px; overflow: hidden; }
.chart-bar[data-tooltip]:hover::after { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-family: var(--font-body); white-space: nowrap; border: 1px solid var(--border-light); z-index: 10; }
.analytics-rank { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.analytics-rank:last-child { border-bottom: none; }
.analytics-rank-num { font-family: var(--font-display); font-size: 18px; color: var(--gold); min-width: 28px; text-align: center; }
.analytics-rank-title { flex: 1; font-size: 13px; color: var(--text); }
.analytics-rank-views { font-family: var(--font-body); font-size: 12px; color: var(--accent); font-weight: 600; }
.analytics-recent-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border-light); font-size: 12px; }
.analytics-recent-row:last-child { border-bottom: none; }

/* ─── BLOG BODY ─── */
.blog-body {
  color: var(--text); font-size: 16px; line-height: 1.8;
}
.blog-body h1, .blog-body h2, .blog-body h3 {
  font-family: var(--font-heading); color: var(--text); margin: 32px 0 12px;
}
.blog-body h2 { font-size: 22px; }
.blog-body h3 { font-size: 18px; }
.blog-body p { margin-bottom: 16px; }
.blog-body ul, .blog-body ol { margin: 0 0 16px 24px; }
.blog-body li { margin-bottom: 8px; }
.blog-body strong { color: var(--text); }
.blog-body code {
  background: var(--bg-card); padding: 2px 6px; border-radius: 4px;
  font-family: 'Consolas', 'Courier New', monospace; font-size: 14px; color: var(--accent);
}
.blog-body pre {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; overflow-x: auto; margin-bottom: 16px;
}
.blog-body pre code { background: none; padding: 0; }
.blog-body blockquote {
  border-left: 3px solid var(--accent); padding-left: 16px; margin: 16px 0;
  color: var(--text-muted); font-style: italic;
}

/* ─── AUTH MESSAGES ─── */
.auth-message {
  background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.2);
  color: #dc2626; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px;
  font-size: 13px; font-family: var(--font-body);
}
.auth-message.auth-success {
  background: rgba(22,163,74,0.08); border-color: rgba(22,163,74,0.2); color: #16a34a;
}

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 10000;
  padding: 12px 20px; border-radius: 8px;
  font-family: var(--font-body); font-size: 13px;
  opacity: 0; transform: translateY(10px); transition: all 0.3s;
  max-width: 400px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-info { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.toast-success { background: rgba(22,163,74,0.08); color: #16a34a; border: 1px solid rgba(22,163,74,0.2); }
.toast-error { background: rgba(220,38,38,0.08); color: #dc2626; border: 1px solid rgba(220,38,38,0.2); }

/* ─── COOKIE BANNER ─── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9000;
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 16px 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.cookie-banner p {
  color: var(--text-muted); font-size: 13px; flex: 1; min-width: 200px;
}
.cookie-banner .cookie-btns { display: flex; gap: 8px; }
.cookie-hidden { transform: translateY(100%); opacity: 0; }

/* ─── ANIMATIONS ─── */
.fade-in { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ─── SHARE BUTTONS ─── */
.share-bar {
  display: flex; gap: 8px; align-items: center; margin-top: 24px; flex-wrap: wrap;
}
.share-bar-label {
  font-family: var(--font-body); font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-right: 4px; font-weight: 600;
}
.share-btn {
  background: var(--bg-card); border: 1px solid var(--border-light);
  color: var(--text-muted); padding: 6px 14px; border-radius: 6px;
  cursor: pointer; font-size: 12px; font-family: var(--font-body);
  transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn.copied { border-color: #16a34a; color: #16a34a; }

/* ─── LOADING SPINNER ─── */
.loading-spinner {
  display: flex; align-items: center; justify-content: center; padding: 48px 0;
  color: var(--text-muted); font-size: 13px; font-family: var(--font-body);
  gap: 10px;
}
.loading-spinner::before {
  content: ''; width: 20px; height: 20px; border: 2px solid var(--border-light);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
  text-align: center; padding: 48px 0; color: var(--text-muted);
  font-size: 14px; font-family: var(--font-body);
}

/* ─── EASYMDE THEME ─── */
.EasyMDEContainer .CodeMirror { background: var(--bg); color: var(--text); border: 1px solid var(--border-light); border-radius: 6px; }
.EasyMDEContainer .CodeMirror-cursor { border-left-color: var(--text); }
.EasyMDEContainer .editor-toolbar { background: var(--bg-card); border: 1px solid var(--border-light); border-bottom: none; border-radius: 6px 6px 0 0; opacity: 1; }
.EasyMDEContainer .editor-toolbar button { color: var(--text-muted) !important; }
.EasyMDEContainer .editor-toolbar button:hover { background: var(--border); }
.EasyMDEContainer .editor-toolbar button.active { background: var(--border); }
.EasyMDEContainer .editor-toolbar i.separator { border-left-color: var(--border-light); }
.EasyMDEContainer .editor-statusbar { color: var(--text-muted); border-top: 1px solid var(--border-light); }
.EasyMDEContainer .CodeMirror .CodeMirror-selected { background: rgba(37,99,235,.15); }
.EasyMDEContainer .editor-preview { background: var(--bg); color: var(--text); }
.EasyMDEContainer .editor-preview-side { background: var(--bg); color: var(--text); border: 1px solid var(--border-light); }

/* ─── SEARCH ─── */
.search-input-lg {
  font-size: 18px; padding: 14px 20px; border-radius: 12px;
  border: 2px solid var(--border); width: 100%; transition: border-color 0.2s;
}
.search-input-lg:focus { border-color: var(--accent); outline: none; }
.nav-search-icon { text-decoration: none; }

/* ─── MEDIA GALLERY ─── */
.media-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.media-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; transition: border-color 0.2s;
}
.media-card:hover { border-color: var(--accent); }

/* ─── COURSE LESSON ─── */
.course-lesson:hover { border-color: var(--accent) !important; }
.course-lesson-done { background: var(--accent-glow); }
.course-lesson-done div:first-child { color: var(--accent) !important; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav-inner { height: 64px; padding: 0 16px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
    flex-direction: column; padding: 12px 16px; gap: 4px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.nav-open { display: flex; }
  .nav-link { width: 100%; text-align: center; padding: 10px 14px; }
  .hero { padding: 100px 16px 60px; min-height: 80vh; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-carousel-arrow { width: 36px; height: 36px; font-size: 14px; }
  .hero-carousel-prev { left: 10px; }
  .hero-carousel-next { right: 10px; }
  .hero-carousel-dots { bottom: 16px; gap: 8px; }
  .hero-carousel-dot { width: 10px; height: 10px; }
  .section { padding: 0 16px 60px; }
  .card-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-row { flex-direction: column; gap: 8px; align-items: flex-start; }
  .analytics-stats { grid-template-columns: repeat(3, 1fr); }
  .analytics-columns { grid-template-columns: 1fr; }
  .chart-bar-wrap .chart-label { display: none; }
}
