/* ═══════════════════════════════════════════════════════════════
   NETTOWAKUDAYS — PREMIUM DARK THEME
   Mobile-first • Premium WordPress-like • Satu file untuk semua
   ═══════════════════════════════════════════════════════════════ */

/* ─── ROOT VARIABLES ─── */
:root {
  /* Palet utama — soft dark, bukan pure black */
  --bg-base:      #0f1117;
  --bg-surface:   #161b22;
  --bg-elevated:  #1c2333;
  --bg-hover:     #252d3f;
  --bg-inset:     #0a0d14;
  --bg-card:      #1a2030;

  --text-primary: #e8edf5;
  --text-secondary: #9ea8b9;
  --text-muted:   #6b7485;
  --text-inverse: #0d1117;

  /* Accent — purple premium */
  --accent:       #7c3aed;
  --accent-hover: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-dim:   rgba(124, 58, 237, 0.12);
  --accent-glow:  rgba(124, 58, 237, 0.25);

  /* Gradien premium */
  --gradient-brand: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #7c3aed 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(167, 139, 250, 0.04) 100%);
  --gradient-overlay: linear-gradient(to top, rgba(15, 17, 23, 0.95) 0%, rgba(15, 17, 23, 0.5) 50%, transparent 100%);

  /* Border */
  --border:       #2d3548;
  --border-light: #232b3d;
  --border-accent: rgba(124, 58, 237, 0.3);

  /* Status */
  --error:        #f85149;
  --warning:      #d29922;
  --info:         #58a6ff;
  --success:      #3fb950;

  /* Dimensi */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  --header-h:    68px;
  --sidebar-w:   310px;
  --max-width:   1220px;
  --content-w:   720px;
  --space:       1.5rem;

  /* Tipografi */
  --font:         'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;

  /* Shadow */
  --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md:    0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg:    0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow:  0 4px 24px rgba(124, 58, 237, 0.2);

  /* Transisi */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:  cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SELECTION ─── */
::selection { background: var(--accent-dim); color: var(--accent-light); }
::-moz-selection { background: var(--accent-dim); color: var(--accent-light); }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── TYPOGRAPHY ─── */
a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease-out); }
a:hover { color: var(--accent-hover); }
img, video, iframe { max-width: 100%; height: auto; display: block; border-radius: var(--radius-md); }
button { cursor: pointer; font: inherit; border: none; background: none; color: inherit; }
input, textarea { font: inherit; background: none; border: none; outline: none; color: inherit; }
ul, ol { list-style: none; }

/* ─── APP SHELL ─── */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.app.ready { opacity: 1; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space);
}

/* ═══════════════════════════════════════════════
   BANNER WRAP — Sticky, menjadi header saat collapse
   ═══════════════════════════════════════════════ */
.banner-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  transition: all 0.4s var(--ease-out);
}

.banner-wrap.banner-collapsed {
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* ─── SEARCH OVERLAY ─── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding-top: 18vh;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.search-overlay-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.search-overlay.active .search-overlay-content {
  transform: translateY(0);
}

.search-overlay-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-overlay-input {
  flex: 1;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  padding: 0.75rem 0;
  outline: none;
  transition: border-color 0.3s ease;
  letter-spacing: -0.3px;
}

.search-overlay-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.search-overlay-input:focus {
  border-color: var(--accent);
}

.search-overlay-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 1.3rem;
  transition: all 0.25s var(--ease-out);
  flex-shrink: 0;
}

.search-overlay-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: scale(1.05);
}

/* ─── Search Suggestions ─── */
.search-suggestions {
  width: 100%;
  max-height: 50vh;
  overflow-y: auto;
  margin-top: 0.75rem;
  display: none;
}

.search-suggestions.active {
  display: block;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  border-bottom: 1px solid var(--border-light);
}

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

.search-suggestion-item:hover {
  background: var(--accent-dim);
}

.search-suggestion-item .sugg-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.search-suggestion-item .sugg-text {
  flex: 1;
  min-width: 0;
}

.search-suggestion-item .sugg-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestion-item .sugg-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

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

/* ─── Search Overlay Mobile ─── */
@media (max-width: 767px) {
  .search-overlay {
    padding: 12vh 0.5rem 0;
  }
  .search-overlay-input {
    font-size: 1.1rem;
  }
  .search-overlay-content {
    max-width: 100%;
  }
  .search-suggestion-item {
    padding: 0.6rem 0.6rem;
  }
}

/* ═══════════════════════════════════════════════
   BANNER — Premium hero + scroll effect
   ═══════════════════════════════════════════════ */
.banner {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: height 0.4s var(--ease-out), margin 0.4s var(--ease-out), border-radius 0.4s var(--ease-out), max-width 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  aspect-ratio: 851 / 315;
}

.banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-elevated);
  transition: opacity 0.4s var(--ease-out);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-overlay);
  transition: opacity 0.4s var(--ease-out);
}

/* ─── Banner Content: Logo + Search di atas banner ─── */
.banner-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.5rem 1.5rem;
  z-index: 2;
  pointer-events: none;
  transition: padding 0.4s var(--ease-out), align-items 0.4s var(--ease-out);
}

.banner-logo {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.75px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  transition: all 0.4s var(--ease-out);
  position: relative;
}

.banner-logo:hover {
  filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.4));
}

.banner-search-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: auto;
  transition: all 0.25s var(--ease-out);
  flex-shrink: 0;
}

.banner-search-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

/* ─── Banner Collapsed (smooth, tanpa layout shift) ─── */
.banner-wrap.banner-collapsed .banner {
  margin: 0;
  max-width: 100%;
  border-radius: 0;
  box-shadow: none;
  height: var(--header-h);
}

.banner-wrap.banner-collapsed .banner-img {
  opacity: 0.15;
}

.banner-wrap.banner-collapsed .banner-overlay {
  opacity: 0;
}

.banner-wrap.banner-collapsed .banner-content {
  align-items: center;
  padding: 0 var(--space);
}

.banner-wrap.banner-collapsed .banner-logo {
  font-size: 1.2rem;
  text-shadow: none;
  background: var(--gradient-brand);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoShimmer 4s ease-in-out infinite;
}

.banner-wrap.banner-collapsed .banner-search-btn {
  width: 36px;
  height: 36px;
  font-size: 1rem;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-color: var(--border-light);
}

@keyframes logoShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ═══════════════════════════════════════════════
   LAYOUT UTAMA
   ═══════════════════════════════════════════════ */
.layout {
  display: flex;
  flex: 1;
  gap: 2.5rem;
  padding: 2rem var(--space) 3rem;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.content-area {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

/* ─── SIDEBAR PREMIUM ─── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  height: fit-content;
  max-height: calc(100vh - var(--header-h) - 3rem);
  overflow-y: auto;
}

/* Hide scrollbar for sidebar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); }

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.3s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.widget:hover {
  border-color: var(--border);
}

.widget-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-title i {
  color: var(--accent);
  font-size: 0.85rem;
}

.widget-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ─── WIDGET: Stat Counter ─── */
.widget-stat {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: all 0.3s var(--ease-out);
}

.widget-stat:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── WIDGET: Tag Cloud Premium ─── */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}

.tag-chip:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.tag-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 0 0.4rem;
  border-radius: var(--radius-full);
  line-height: 1.5;
}

.tag-chip:hover .tag-count {
  color: var(--accent-light);
  background: var(--accent-dim);
}

/* ─── CHAT BOX (desktop) ─── */
.chat-frame {
  width: 100%;
  height: 380px;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-inset);
}

.chat-frame iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

/* ═══════════════════════════════════════════════
   ARTIKEL CARD — Premium Design
   ═══════════════════════════════════════════════ */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
  transition: all 0.35s var(--ease-out);
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* Accent line on top */
.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transition: transform 0.4s var(--ease-out);
  transform-origin: left;
  z-index: 1;
}

.article-card:hover::before {
  transform: scaleX(1);
}

.article-card:hover {
  border-color: var(--accent-dim);
  box-shadow: var(--shadow-md), 0 4px 24px rgba(124, 58, 237, 0.08);
  transform: translateY(-3px);
}

.card-head {
  padding: 1.5rem 1.5rem 0;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.6rem;
}

.card-title a {
  color: var(--text-primary);
  display: block;
  transition: color 0.25s var(--ease-out);
}

.card-title a:hover {
  color: var(--accent-light);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  align-items: center;
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.card-meta i {
  font-size: 0.72rem;
  color: var(--accent);
}

/* Thumbnail Premium */
.card-thumb-wrap {
  margin: 0 1.5rem 0.85rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.card-thumb-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent 30%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.article-card:hover .card-thumb-wrap::after {
  opacity: 1;
}

.card-thumb {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-elevated);
  transition: transform 0.5s var(--ease-out);
}

.article-card:hover .card-thumb {
  transform: scale(1.04);
}

.card-excerpt {
  padding: 0 1.5rem 0.85rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.75;
}

.card-excerpt-skeleton {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  padding: 0 1.5rem 1.5rem;
}

/* ─── BUTTONS PREMIUM ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.25s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.08) 100%);
  pointer-events: none;
}

.btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
  transform: translateY(-2px);
}

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

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  color: var(--text-secondary);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: all 0.25s var(--ease-out);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  background: var(--accent-dim);
  color: var(--accent-light);
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════
   ARTIKEL FULL — Premium Readability
   ═══════════════════════════════════════════════ */
.article-full {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.full-head {
  padding: 2rem 2rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.full-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.full-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
}

.full-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.full-meta i {
  font-size: 0.78rem;
  color: var(--accent);
}

.full-thumb {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  background: var(--bg-elevated);
}

.full-body {
  padding: 2rem;
  color: var(--text-primary);
  line-height: 1.85;
  font-size: 1.05rem;
  max-width: var(--content-w);
  margin: 0 auto;
}

/* Article Typography Premium */
.full-body p { margin-bottom: 1.25rem; }

.full-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.full-body h3 {
  font-size: 1.25rem;
  font-weight: 650;
  margin: 2rem 0 0.6rem;
  color: var(--text-primary);
}

.full-body h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--text-primary);
}

.full-body ul, .full-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.full-body li { margin-bottom: 0.4rem; }
.full-body ul li { list-style: disc; }
.full-body ol li { list-style: decimal; }
.full-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.full-body a:hover { color: var(--accent-hover); }
.full-body strong { color: var(--text-primary); font-weight: 650; }

/* Code Blocks Premium */
.full-body pre {
  background: var(--bg-inset);
  border: 1px solid var(--border-light);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  margin: 1.5rem 0;
  line-height: 1.7;
  position: relative;
}

.full-body code {
  background: var(--bg-inset);
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  border: 1px solid var(--border-light);
}

.full-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  border: none;
}

/* Blockquote Premium */
.full-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 0 1rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--gradient-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
}

.full-body blockquote::before {
  content: '"';
  position: absolute;
  top: 0.25rem;
  left: 0.6rem;
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.3;
  font-style: normal;
  line-height: 1;
}

.full-body img, .full-body video, .full-body iframe {
  margin: 1.5rem auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.full-body hr {
  border: none;
  height: 1px;
  background: var(--gradient-brand);
  opacity: 0.15;
  margin: 2.5rem 0;
}

/* ─── TABLE di dalam konten ─── */
.full-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}

.full-body table th,
.full-body table td {
  border: 1px solid var(--border);
  padding: 0.7rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.full-body table th {
  background: var(--bg-elevated);
  font-weight: 650;
  color: var(--text-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.full-body table td {
  color: var(--text-secondary);
}

.full-body table tr:nth-child(even) td {
  background: var(--bg-surface);
}

/* ─── Overlap / overflow protection ─── */
.full-body > * {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.full-body pre {
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
}

.full-body iframe {
  max-width: 100%;
}

.full-body ul,
.full-body ol {
  padding-left: 1.5rem;
}

.full-share-top {
  padding: 0.85rem 0 0;
  display: flex;
  gap: 0.75rem;
}

/* ─── POST PAGE NAVIGATION ─── */
.post-pages {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
  background: var(--bg-surface);
}

.post-pages .page-btn {
  flex-shrink: 0;
}

.post-pages span { flex: 1; }

.post-page-nums {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.post-page-num {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
}

.post-page-num:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.post-page-num.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: default;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.post-page-num.active:hover {
  transform: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s var(--ease-out);
  margin-bottom: 0.85rem;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
}

.back-link:hover {
  color: var(--accent-light);
  border-color: var(--border-accent);
  background: var(--accent-dim);
}

/* ═══════════════════════════════════════════════
   PAGINATION — Premium Load More
   ═══════════════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  padding-top: 0.75rem;
  padding-bottom: 1.25rem;
}

.page-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 0.65rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.page-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 4px 16px rgba(124, 58, 237, 0.1);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════
   STATE: LOADING, EMPTY, ERROR
   ═══════════════════════════════════════════════ */
.state-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-elevated);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 1.25rem;
}

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

.state-msg {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.state-msg strong {
  display: block;
  color: var(--text-primary);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════════
   FLOATING CHAT (MOBILE)
   ═══════════════════════════════════════════════ */
.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}

.chat-overlay.active {
  opacity: 1;
  visibility: visible;
}

.chat-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s var(--ease-spring);
}

.chat-overlay.active .chat-modal {
  transform: scale(1) translateY(0);
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-elevated);
}

.chat-head span {
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.chat-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.3rem;
  transition: all 0.2s var(--ease-out);
}

.chat-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.chat-body {
  background: var(--bg-inset);
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-body iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

.chat-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-md), 0 4px 20px rgba(124, 58, 237, 0.3);
  transition: all 0.3s var(--ease-spring);
}

.chat-float:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg), 0 6px 30px rgba(124, 58, 237, 0.4);
}

.chat-float:active {
  transform: scale(0.95);
}

/* ═══════════════════════════════════════════════
   FOOTER — Premium
   ═══════════════════════════════════════════════ */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: auto;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: var(--gradient-brand);
  opacity: 0.3;
}

.footer p {
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════
   SPOILER — +teks+ → efek partikel
   ═══════════════════════════════════════════════ */
.spoiler {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-elevated);
  padding: 0 4px;
  vertical-align: middle;
  line-height: inherit;
  transition: background 0.3s ease;
}

.spoiler:hover {
  background: var(--bg-hover);
}

.spoiler-content {
  display: inline;
  filter: blur(5px);
  opacity: 0.35;
  transition: filter 0.45s ease, opacity 0.45s ease;
  user-select: none;
  -webkit-user-select: none;
}

.spoiler-content.revealed {
  filter: none;
  opacity: 1;
  user-select: auto;
  -webkit-user-select: auto;
}

.spoiler-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 4px;
}

/* Spoiler preview (card, non-interaktif) */
.spoiler.is-preview {
  cursor: default;
  pointer-events: none;
  background: var(--bg-elevated);
}

.spoiler.is-preview:hover {
  background: var(--bg-elevated);
}

.spoiler.is-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 4px;
  background-image:
    radial-gradient(1.5px circle at 20% 30%, var(--accent) 50%, transparent 50%),
    radial-gradient(1.2px circle at 60% 15%, var(--info) 50%, transparent 50%),
    radial-gradient(1px circle at 85% 45%, #bf4b8a 50%, transparent 50%),
    radial-gradient(1.4px circle at 40% 70%, var(--success) 50%, transparent 50%),
    radial-gradient(1.1px circle at 10% 80%, var(--warning) 50%, transparent 50%),
    radial-gradient(1.3px circle at 75% 80%, var(--info) 50%, transparent 50%),
    radial-gradient(1px circle at 50% 50%, var(--error) 50%, transparent 50%),
    radial-gradient(1.2px circle at 30% 40%, var(--accent-light) 50%, transparent 50%);
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════
   SCROLL ANIMATIONS
   ═══════════════════════════════════════════════ */
.anim-fade {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.anim-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

#postContainer {
  transition: opacity 0.35s ease;
}

/* ═══════════════════════════════════════════════
   BACK-TO-TOP — Premium
   ═══════════════════════════════════════════════ */
.scroll-top {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.35s var(--ease-spring);
  cursor: pointer;
  pointer-events: none;
}

.scroll-top.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* ═══════════════════════════════════════════════
   LIGHTBOX — Premium
   ═══════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: zoom-out;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-spring);
}

.lightbox.active .lightbox-img {
  opacity: 1;
  transform: scale(1);
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2001;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2001;
  width: 46px;
  height: 68px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s var(--ease-out);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-counter {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2001;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ─── Lightbox Mobile ─── */
@media (max-width: 767px) {
  .lightbox { padding: 0; }
  .lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }
  .lightbox-prev,
  .lightbox-next {
    width: 36px;
    height: 50px;
    font-size: 1.4rem;
  }
  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIF: TABLET (768px–1023px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .sidebar {
    display: none !important;
  }

  .chat-float {
    display: flex !important;
  }

  .banner-img {
    min-height: 180px;
    max-height: 280px;
  }

  .banner-logo {
    font-size: 1.7rem;
  }

  .layout {
    padding: 1.25rem var(--space) 2rem;
  }

  .full-title {
    font-size: 1.5rem;
    max-width: 100%;
  }

  .full-body {
    padding: 1.5rem;
    max-width: 100%;
  }

  .card-thumb {
    height: 200px;
  }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIF: MOBILE (<768px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  :root {
    --header-h: 58px;
    --space: 1rem;
  }

  .banner-wrap {
    background: rgba(15, 17, 23, 0.92);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  }

  .banner {
    margin: 0;
    border-radius: 0;
    aspect-ratio: auto;
    height: var(--header-h);
    min-height: 0;
    box-shadow: none;
  }

  .banner-img {
    opacity: 0.15;
  }

  .banner-overlay {
    opacity: 0;
  }

  .banner-content {
    align-items: center;
    padding: 0 var(--space);
  }

  .banner-logo {
    font-size: 1.1rem;
    text-shadow: none;
    background: var(--gradient-brand);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoShimmer 4s ease-in-out infinite;
  }

  .banner-search-btn {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border-color: var(--border-light);
  }

  .layout {
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 0 1.5rem;
  }

  .container {
    padding: 0 var(--space);
  }

  .article-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 0.85rem;
  }

  .card-head { padding: 1.1rem 1.1rem 0; }
  .card-title { font-size: 1.05rem; }
  .card-meta { font-size: 0.78rem; gap: 0.4rem 0.75rem; }
  .card-thumb-wrap { margin: 0 1.1rem 0.6rem; }
  .card-thumb { height: 180px; }
  .card-excerpt { padding: 0 1.1rem 0.6rem; font-size: 0.85rem; }
  .card-foot { padding: 0 1.1rem 1.1rem; }

  .article-full {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .full-head { padding: 1.25rem 1.25rem 1rem; }
  .full-title { font-size: 1.35rem; }
  .full-meta { font-size: 0.8rem; gap: 0.5rem; }
  .full-body { padding: 1.25rem; font-size: 0.95rem; max-width: 100%; }
  .full-body h2 { font-size: 1.3rem; }
  .full-body h3 { font-size: 1.1rem; }
  .full-body pre { padding: 1rem; font-size: 0.82rem; }

  .post-pages {
    padding: 1rem 1.25rem;
    gap: 0.4rem;
    justify-content: center;
  }

  .post-pages .page-btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }

  .post-page-num {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .full-share-top {
    padding: 0.5rem 0 0;
  }

  .chat-float {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    bottom: 1rem;
    right: 1rem;
  }

  .chat-modal {
    max-width: 100%;
    margin: 0.5rem;
    border-radius: var(--radius-lg);
  }

  .chat-body { height: 340px; }

  .pagination { padding-bottom: 0.5rem; }

  .state-box {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 2.5rem 1.25rem;
  }

  .btn { padding: 0.5rem 1.1rem; font-size: 0.82rem; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIF: DESKTOP (>=1024px)
   ══════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .chat-float { display: none !important; }
  .chat-overlay { display: none !important; }

  .banner-logo { font-size: 2.4rem; }
  .full-title { font-size: 2rem; }
  .card-thumb { height: 240px; }
  .card-title { font-size: 1.3rem; }
  .card-meta { gap: 0.5rem 1.25rem; }
}
