/* ============================================================
   BERITA TERKINI 88 NEWS — Premium Dark Theme
   Font: Inter (Google Fonts)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ────────────────────────────────────────────────────────────
   1. CSS VARIABLES
   ──────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-primary: #121212;
  --bg-card: #1e1e1e;
  --bg-card-hover: #2a2a2a;
  --bg-sidebar: #1e1e1e;
  --bg-input: #2a2a2a;
  --bg-overlay: rgba(0, 0, 0, 0.85);

  /* Accent — Blue (Kompas style) */
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: transparent;
  --accent-subtle: rgba(59, 130, 246, 0.15);

  /* Accent — Orange (Kompas categories) */
  --gold: #f97316;
  --gold-end: #ea580c;
  --gold-gradient: linear-gradient(135deg, #f97316, #ea580c);
  --gold-subtle: rgba(249, 115, 22, 0.12);

  /* Accent — Green (Logo) */
  --accent-green: #10b981;
  --green-gradient: linear-gradient(135deg, #10b981, #059669);

  /* Text */
  --text-primary: #ffffff;
  --text-muted: #a1a1aa;
  --text-dark: #71717a;

  /* Borders & Misc */
  --border: #3f3f46;
  --border-strong: #52525b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 8px;
    --transition: all 0.3s ease;
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.5);
  --shadow-glow: none;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --sidebar-width: 320px;
  --header-height: auto;
  --container-max: 1600px;
}

body.light-mode {
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-input: #ffffff;
  --bg-overlay: rgba(255, 255, 255, 0.85);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
}

/* ────────────────────────────────────────────────────────────
   2. RESET & BODY
   ──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ────────────────────────────────────────────────────────────
   3. HEADER / NAVIGATION — Kompas Style
   ──────────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-card);
  border-bottom: 2px solid var(--accent);
}

.header-top {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
}

.header-bottom {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}

.header-bottom .container {
  display: flex;
  align-items: center;
  padding: 0 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* Logo */
.logo {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  height: 36px;
  border-radius: 4px;
}

.logo span {
  color: var(--accent-green);
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

.nav-links a {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 14px 4px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Auth Buttons */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-btn,
.register-btn {
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}

.login-btn {
  color: var(--text-primary);
  background: transparent;
  border: 1.5px solid var(--border-strong);
  letter-spacing: 0.3px;
}

.login-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,170,228,0.06);
}

.register-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #0066ff 100%);
  border: none;
  box-shadow: 0 2px 12px rgba(0,170,228,0.3);
  letter-spacing: 0.3px;
}

.register-btn:hover {
  background: linear-gradient(135deg, #00c4ff 0%, #0055dd 100%);
  box-shadow: 0 4px 20px rgba(0,170,228,0.5);
  transform: translateY(-1px);
}

/* ────────────────────────────────────────────────────────────
   4. AUTH PAGES
   ──────────────────────────────────────────────────────────── */
.auth-container {
  max-width: 450px;
  margin: 80px auto;
  padding: 40px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Styling Khusus Input File agar lebih rapi */
input[type="file"].form-control {
  padding: 8px; /* Sedikit lebih kecil agar muat dengan tombol di dalamnya */
  color: var(--text-muted);
}

input[type="file"].form-control::file-selector-button {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-right: 12px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

input[type="file"].form-control::file-selector-button:hover {
  background-color: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.form-control::placeholder {
  color: var(--text-dark);
}

.auth-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-link a {
  color: var(--accent);
  font-weight: 600;
}

.auth-link a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.auth-btn {
  width: 100%;
  padding: 14px;
  font-weight: 700;
  font-size: 1rem;
  color: #050505;
  background: var(--accent);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.auth-btn:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* ────────────────────────────────────────────────────────────
   5. MAIN LAYOUT & NEWS LIST (Kompas Style)
   ──────────────────────────────────────────────────────────── */
.main-grid {
  display: flex;
  gap: 30px;
  padding: 30px 0;
}

.main-content {
  flex: 1;
}

.sidebar {
  width: 320px;
  flex-shrink: 0;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 24px;
}

/* Sidebar Widgets */
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 24px;
}

.widget-title {
  font-size: 1.15rem;
  font-weight: 800;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.popular-item {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
}
.popular-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.popular-item .rank {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--border-strong);
  line-height: 1;
  width: 24px;
}

.pop-details h4 {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 6px;
  cursor: pointer;
  transition: color var(--transition);
}
.pop-details h4:hover {
  color: var(--accent);
}

.pop-details span {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold);
}

/* Kelas helper untuk menyembunyikan elemen secara visual tetapi tetap terbaca oleh SEO (Screen Reader) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* News List — 2 kolom (seperti kompas.com) */
.news-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}

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

.news-image {
  width: 100%;
  aspect-ratio: 16/10;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.news-card:hover .news-image img {
  transform: scale(1.05);
}

.category-tag {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
  display: block;
}

.news-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}

.news-excerpt {
  display: none; /* Hide excerpt to match Kompas feed style */
}

.news-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-dark);
}

.news-meta .read-more {
  display: none;
}

/* ────────────────────────────────────────────────────────────
   6. ARTICLE DETAIL PAGE
   ──────────────────────────────────────────────────────────── */
.article-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

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

.article-header .category-tag {
  position: static;
  display: inline-block;
  margin-bottom: 18px;
}

.article-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.article-meta .author-name {
  font-weight: 700;
  color: var(--gold);
}

.article-meta .meta-separator {
  color: var(--text-dark);
}

.article-meta .meta-date,
.article-meta .meta-category {
  color: var(--text-muted);
}

.article-meta .meta-category {
  color: var(--accent);
  font-weight: 600;
}

.article-hero-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 36px;
  border: 1px solid var(--border);
}

.article-body {
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--text-primary);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.article-body p {
  margin-bottom: 24px;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .article-body {
    font-size: 1.1rem;
    line-height: 1.75;
  }
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 36px 0 16px;
  color: var(--text-primary);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text-primary);
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 24px;
  margin: 28px 0;
  background: var(--accent-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-style: italic;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 22px;
}

.article-body li {
  margin-bottom: 8px;
  color: #d1d5db;
  list-style: disc;
}

.article-body img {
  border-radius: var(--radius-sm);
  margin: 24px 0;
  border: 1px solid var(--border);
}

/* ────────────────────────────────────────────────────────────
   7. COMMENT SECTION
   ──────────────────────────────────────────────────────────── */
.comments-section {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.comment-count {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.comment-count span {
  color: var(--accent);
}

/* Comment Form */
.comment-form {
  margin-bottom: 36px;
}

.comment-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
  font-size: 0.95rem;
  line-height: 1.6;
  transition: all var(--transition);
}

.comment-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-form textarea::placeholder {
  color: var(--text-dark);
}

.comment-form .submit-btn,
.comment-form button[type="submit"] {
  margin-top: 14px;
  padding: 12px 32px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #050505;
  background: var(--accent);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.comment-form .submit-btn:hover,
.comment-form button[type="submit"]:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* Comment Items */
.comment-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  transition: border-color var(--transition);
}

.comment-item:hover {
  border-color: var(--border-strong);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  color: #050505;
  flex-shrink: 0;
  object-fit: cover;
}

.comment-username {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold);
}

.comment-date {
  font-size: 0.78rem;
  color: var(--text-dark);
  margin-left: auto;
}

.comment-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 54px;
}

.comment-actions {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-left: 54px;
}

.btn-like-comment, .btn-reply-comment {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition);
  padding: 0;
}

.btn-like-comment:hover, .btn-reply-comment:hover {
  color: var(--accent);
}

.comment-replies {
  margin-left: 54px;
  margin-top: 16px;
  border-left: 2px solid var(--border);
  padding-left: 16px;
}

.comment-reply-item {
  padding: 16px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

/* Login-to-comment */
.login-to-comment {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.login-to-comment a {
  color: var(--accent);
  font-weight: 700;
}

.login-to-comment a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* ────────────────────────────────────────────────────────────
   8. ADMIN PANEL — Sidebar + Main
   ──────────────────────────────────────────────────────────── */
.admin-panel {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 900;
  overflow-y: auto;
}

.admin-sidebar .sidebar-logo {
  padding: 26px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
}

.admin-sidebar .sidebar-logo span {
  background: var(--green-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-sidebar .sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}

.admin-sidebar .sidebar-link .icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.admin-sidebar .sidebar-link:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

.admin-sidebar .sidebar-link.active {
  color: var(--accent);
  background: var(--accent-subtle);
  font-weight: 600;
}

.admin-sidebar .sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

.admin-sidebar .sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dark);
  padding: 20px 16px 8px;
}

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

.admin-sidebar .sidebar-footer .sidebar-link {
  color: #ef4444;
}

.admin-sidebar .sidebar-footer .sidebar-link:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

/* Main Content */
.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  background: var(--bg-primary);
}

.admin-header {
  padding: 24px 36px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 5, 5, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-header .admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Stats Grid */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  padding: 32px 36px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.gold::before {
  background: var(--gold-gradient);
}

.stat-card.blue::before {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-card.red::before {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-card.purple::before {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.stat-card .stat-icon {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 1.8rem;
  opacity: 0.15;
}

/* ────────────────────────────────────────────────────────────
   9. ADMIN TABLES
   ──────────────────────────────────────────────────────────── */
.table-container {
  padding: 0 36px 36px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table thead {
  background: rgba(251, 191, 36, 0.06);
}

.data-table th {
  text-align: left;
  padding: 16px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.04);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Action Buttons */
.action-btn {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 6px;
  color: var(--text-primary);
  background: var(--accent-subtle);
  border: 1px solid transparent;
}

.action-btn:hover {
  background: var(--accent);
  color: #050505;
  transform: translateY(-1px);
}

.action-btn.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.action-btn.danger:hover {
  background: #ef4444;
  color: #fff;
}

.action-btn.warning {
  background: rgba(251, 191, 36, 0.12);
  color: var(--gold);
}

.action-btn.warning:hover {
  background: var(--gold);
  color: #050505;
}

.action-btn.info {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
}

.action-btn.info:hover {
  background: #3b82f6;
  color: #fff;
}

/* ────────────────────────────────────────────────────────────
   10. ADMIN UPLOAD / CREATE FORM
   ──────────────────────────────────────────────────────────── */
.admin-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 36px;
}

.admin-container .form-group {
  margin-bottom: 24px;
}

.admin-container .form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.admin-container .form-control {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.admin-container .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.form-control {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

select.form-control option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.submit-btn {
  width: 100%;
  padding: 15px 24px;
  font-weight: 700;
  font-size: 1rem;
  color: #050505;
  background: var(--accent);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  letter-spacing: 0.02em;
  margin-top: 8px;
}

.submit-btn:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* File input styling */
.file-input-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  cursor: pointer;
  transition: all var(--transition);
}

.file-input-wrapper:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ────────────────────────────────────────────────────────────
   11. SECTION TITLE — Gold Bar
   ──────────────────────────────────────────────────────────── */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 32px;
  padding-left: 20px;
  position: relative;
  letter-spacing: -0.02em;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  min-height: 24px;
  background: var(--gold-gradient);
  border-radius: 4px;
}

/* ────────────────────────────────────────────────────────────
   12. FOOTER
   ──────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 36px 24px;
  margin-top: 80px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--gold);
  font-weight: 600;
}

.footer a:hover {
  color: var(--accent);
}

.footer .footer-brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.footer .footer-brand span {
  background: var(--green-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer .footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 16px 0;
}

.footer .footer-copy {
  margin-top: 16px;
  color: var(--text-dark);
  font-size: 0.8rem;
}

/* ────────────────────────────────────────────────────────────
   13. RESPONSIVE — REMOVED TO KEEP DESKTOP VIEW
   ──────────────────────────────────────────────────────────── */

/* ────────────────────────────────────────────────────────────
   14. UTILITY — Alerts
   ──────────────────────────────────────────────────────────── */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.alert-info {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.25);
}

.alert-warning {
  background: rgba(251, 191, 36, 0.12);
  color: var(--gold);
  border-color: rgba(251, 191, 36, 0.25);
}

/* ────────────────────────────────────────────────────────────
   15. MODAL
   ──────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

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

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 520px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
  position: relative;
}

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

.modal-content .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.modal-content .modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.modal-content .modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.modal-content .modal-body {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.modal-content .modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ────────────────────────────────────────────────────────────
   16. MEMBER PROFILE DETAIL (Admin)
   ──────────────────────────────────────────────────────────── */
.member-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 700px;
  margin: 32px auto;
  box-shadow: var(--shadow);
}

.member-detail .member-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #050505;
  margin-bottom: 20px;
}

.member-detail .member-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.member-detail .member-role {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: 50px;
  margin-bottom: 24px;
}

.member-detail .member-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.member-detail .info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-detail .info-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dark);
}

.member-detail .info-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ────────────────────────────────────────────────────────────
   EXTRA — Scrollbar
   ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ────────────────────────────────────────────────────────────
   EXTRA — Selection
   ──────────────────────────────────────────────────────────── */
::selection {
  background: var(--accent);
  color: #050505;
}

/* ────────────────────────────────────────────────────────────
   EXTRA — Hamburger menu toggle (mobile)
   ──────────────────────────────────────────────────────────── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}



/* ────────────────────────────────────────────────────────────
   EXTRA — Sidebar toggle button (admin mobile)
   ──────────────────────────────────────────────────────────── */
.sidebar-toggle {
  display: none;
  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
}

.sidebar-toggle:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
}



/* ────────────────────────────────────────────────────────────
   EXTRA — Status badges
   ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 50px;
  letter-spacing: 0.03em;
}

.badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.badge.pending {
  background: rgba(251, 191, 36, 0.15);
  color: var(--gold);
}

/* ────────────────────────────────────────────────────────────
   EXTRA — Pagination
   ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  padding: 20px 0;
}

.pagination a,
.pagination span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.pagination .active {
  background: var(--accent);
  border-color: var(--accent);
  color: #050505;
}

/* ────────────────────────────────────────────────────────────
   EXTRA — Loading Skeleton
   ──────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    rgba(255, 255, 255, 0.05) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes ticker {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

/* ============================================================
   EMOJI REACTIONS
   ============================================================ */
.article-reactions {
  margin: 40px 0;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.reaction-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.reaction-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
  cursor: pointer;
  transition: all var(--transition);
}

.reaction-btn:hover {
  background: rgba(0, 170, 228, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.reaction-btn.active {
  background: rgba(0, 170, 228, 0.2);
  border-color: var(--accent);
}

.reaction-btn .emoji {
  font-size: 2rem;
  margin-bottom: 8px;
  transition: transform 0.2s;
}

.reaction-btn:hover .emoji {
  transform: scale(1.1);
}

.reaction-btn .count {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* ============================================================
   RELATED ARTICLES
   ============================================================ */
.related-articles-section {
  margin: 40px 0;
  padding-top: 30px;
  border-top: 2px dashed var(--border);
}

.related-articles-section h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.related-news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-4px);
}

.related-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.related-card-content {
  padding: 12px;
  flex: 1;
}

.related-card h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ────────────────────────────────────────────────────────────
   EXTRA — Tooltip
   ──────────────────────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  pointer-events: none;
  z-index: 100;
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ────────────────────────────────────────────────────────────
   13. BANNER SLIDER
   ──────────────────────────────────────────────────────────── */
.banner-slider {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--bg-card);
}

.banner-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.banner-slide.active {
  opacity: 1;
  z-index: 1;
}

.banner-slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 32px 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.banner-slide-tag {
  background: var(--gold);
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.banner-slide-title {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.35;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
  max-width: 100%;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-arrow:hover {
  background: rgba(0,0,0,0.8);
}

.banner-prev { left: 12px; }
.banner-next { right: 12px; }

.banner-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.banner-dot.active {
  background: var(--gold);
  transform: scale(1.3);
}

/* ────────────────────────────────────────────────────────────
   14. QUILL RICH TEXT EDITOR OVERRIDES
   ──────────────────────────────────────────────────────────── */
.ql-toolbar.ql-snow {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
  border-radius: var(--radius) var(--radius) 0 0 !important;
}

.ql-container.ql-snow {
  border-color: var(--border) !important;
  border-radius: 0 0 var(--radius) var(--radius) !important;
  background: var(--bg-input) !important;
  color: var(--text-primary) !important;
  font-family: var(--font) !important;
  font-size: 1rem !important;
  min-height: 300px;
}

.ql-editor {
  min-height: 300px;
  color: var(--text-primary) !important;
}

.ql-snow .ql-stroke {
  stroke: var(--text-muted) !important;
}

.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
  fill: var(--text-muted) !important;
}

.ql-snow .ql-picker-label {
  color: var(--text-muted) !important;
}

.ql-snow .ql-picker-options {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
}

.ql-snow .ql-picker-item {
  color: var(--text-primary) !important;
}

.ql-editor a {
  color: var(--accent) !important;
  text-decoration: underline !important;
}

/* ────────────────────────────────────────────────────────────
   15. RESPONSIVE (Auth + Admin pages use device-width)
   ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Header Mobile Fix — gunakan wrap bukan column agar logo tidak pecah */
  .header-top {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
  }
  
  /* Utility bar (search + toggle) menyempit di mobile */
  #utility-bar {
    order: 3;
    width: 100%;
    margin: 0 !important;
    justify-content: center;
  }
  
  /* Search container diperkecil */
  #utility-bar > div:first-child {
    max-width: 100% !important;
    flex: 1;
  }

  .auth-buttons {
    order: 2;
    gap: 6px;
  }

  .logo {
    font-size: 1.4rem;
    order: 1;
  }

  /* Auth pages mobile fix */
  .auth-container {
    margin: 20px auto;
    padding: 24px 20px;
    max-width: 100%;
  }

  /* Main Grid mobile fix */
  .main-grid {
    flex-direction: column;
    padding: 16px 0;
    gap: 20px;
  }
  .sidebar {
    width: 100%;
  }
  
  /* News list: 2 kolom di mobile agar seperti kompas */
  .news-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .news-title {
    font-size: 1rem;
  }

  .news-image {
    aspect-ratio: 16/9;
  }
  
  /* Banner mobile fix */
  .banner-slider {
    height: 220px;
    border-radius: 0;
  }

  .banner-slide-title {
    font-size: 1.1rem;
  }

  .banner-slide-overlay {
    padding: 24px 16px 16px;
  }
  
  .auth-title {
    font-size: 1.4rem;
  }

  /* Admin pages mobile fix */
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
  }
  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .sidebar-link {
    padding: 8px 12px !important;
    font-size: 0.85rem;
  }
  .admin-main {
    margin-left: 0;
    padding: 16px;
  }
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .data-table {
    font-size: 0.8rem;
  }
  .data-table th,
  .data-table td {
    padding: 8px 6px;
  }
}

/* ============================================================
   SMALL PHONE BREAKPOINT (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .news-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .banner-slider {
    height: 190px;
  }

  .banner-slide-title {
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .section-title {
    font-size: 1.05rem;
  }

  .main-grid {
    padding: 12px 0;
  }
}

/* ============================================================
   CRYPTO / XRP ADMIN PANEL THEME OVERRIDES
   ============================================================ */
body:has(.admin-sidebar) {
  background: #07090e !important; /* Deep dark blue background */
}

.admin-sidebar {
  background: #0b0e14 !important;
  border-right: 1px solid #1c2230 !important;
}

.admin-sidebar .sidebar-logo span {
  background: var(--green-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.admin-sidebar .sidebar-link {
  color: #8a99b5 !important;
}

.admin-sidebar .sidebar-link:hover {
  color: #fff !important;
  background: rgba(0, 170, 228, 0.05) !important;
  box-shadow: inset 3px 0 0 #00aae4 !important;
}

.admin-sidebar .sidebar-link.active {
  color: #fff !important;
  background: rgba(0, 170, 228, 0.1) !important;
}

.admin-sidebar .sidebar-link.active::before {
  background: #00aae4 !important;
  box-shadow: 0 0 10px rgba(0, 170, 228, 0.6) !important;
}

.admin-main {
  background: #07090e !important;
}

.admin-header {
  background: rgba(7, 9, 14, 0.85) !important;
  border-bottom: 1px solid #1c2230 !important;
}

.admin-header h1, .admin-header h2 {
  color: #e2e8f0 !important;
}

.stat-card {
  background: #11151f !important;
  border: 1px solid #1c2230 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}

.stat-card::before {
  background: #00aae4 !important;
  box-shadow: 0 0 8px rgba(0, 170, 228, 0.8) !important;
}

.stat-card:hover {
  border-color: #00aae4 !important;
  box-shadow: 0 4px 24px rgba(0, 170, 228, 0.15) !important;
}

.data-table {
  background: #11151f !important;
  border: 1px solid #1c2230 !important;
}

.data-table thead {
  background: rgba(0, 170, 228, 0.05) !important;
}

.data-table th {
  color: #00aae4 !important;
  border-bottom: 1px solid #1c2230 !important;
}

.data-table td {
  color: #cbd5e1 !important;
  border-bottom: 1px solid #1c2230 !important;
}

.data-table tbody tr:hover {
  background: rgba(0, 170, 228, 0.04) !important;
}

.admin-container {
  background: #11151f !important;
  border: 1px solid #1c2230 !important;
  padding: 32px !important;
  border-radius: 8px !important;
  margin: 32px !important;
}

/* Auth and inputs in Admin */
.admin-container .form-control {
  background: #0d111a !important;
  border: 1px solid #1c2230 !important;
  color: #e2e8f0 !important;
}
.admin-container .form-control:focus {
  border-color: #00aae4 !important;
  box-shadow: 0 0 0 3px rgba(0, 170, 228, 0.15) !important;
}

/* Action Buttons */
.action-btn {
  background: rgba(0, 170, 228, 0.1) !important;
  color: #00aae4 !important;
  border: 1px solid #00aae4 !important;
}
.action-btn:hover {
  background: #00aae4 !important;
  color: #fff !important;
  box-shadow: 0 0 12px rgba(0, 170, 228, 0.4) !important;
}

.submit-btn {
  background: linear-gradient(135deg, #00aae4, #0077ff) !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(0, 170, 228, 0.3) !important;
}
.submit-btn:hover {
  box-shadow: 0 6px 20px rgba(0, 170, 228, 0.5) !important;
  transform: translateY(-1px) !important;
}

/* ============================================================
   SHARE DROPDOWN (SOSMED)
   ============================================================ */
.share-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  width: 220px;
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInDown 0.2s ease;
}

.share-dropdown.show {
  display: flex;
}

.share-dropdown-title {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.share-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.share-option:hover {
  background: var(--bg-card-hover);
}

.share-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

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

/* ============================================================
   BOTTOM ADS BANNER (IKLAN BAWAH HORIZONTAL)
   ============================================================ */
.layout-with-ads {
  display: flex;
  justify-content: center;
  max-width: 1800px;
  margin: 0 auto;
  gap: 16px;
  padding: 0 10px;
}

.main-content-wrapper {
  flex: 1;
  max-width: 1400px;
  min-width: 0; /* Mencegah overflow di mobile */
}

/* Kumpulan Iklan di Bawah Konten (Memanjang ke Samping) */
.bottom-ads-wrapper {
  display: flex;
  flex-direction: row;
  gap: 20px;
  width: 100%;
}

/* Kumpulan Iklan Samping (Untuk Halaman Artikel) */
.side-ads-left {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.side-ad-container {
  width: 160px;
  flex-shrink: 0;
}
.side-ads-left .side-ad-container {
  width: 100%;
}

.horizontal-ad-container {
  width: 100%;
  display: flex;
  justify-content: center;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.horizontal-ad-banner {
  display: block;
  width: 100%;
  max-width: 100%;
}

.horizontal-ad-banner img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  display: block;
}

/* Responsive: mobile */
@media (max-width: 768px) {
  .layout-with-ads {
    gap: 0;
    padding: 0;
  }
  
  .bottom-ads-wrapper {
    flex-direction: column; /* iklan bawah tumpuk di hp */
  }

  /* Sembunyikan iklan samping di hp (artikel) */
  .side-ads-left,
  .side-ad-container {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .side-ads-left,
  .side-ad-container {
    display: none !important;
  }
}

.side-ad-banner {
  position: sticky;
  top: 70px;
  width: 100%;
  background: transparent;
  display: block;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s;
}

/* Memaksa iklan sidebar menjadi vertikal/memanjang ke bawah */
#home-left-ad, #home-right-ad, #right-ad {
  height: 600px;
}

/* Memaksa iklan dalam artikel berbentuk persegi panjang normal */
#left-ad {
  height: 250px;
}

/* Menurunkan posisi awal iklan kanan di halaman artikel agar tidak sejajar dengan judul */
@media (min-width: 1024px) {
  #container-right-ad {
    margin-top: 140px; /* Menyesuaikan tinggi judul agar sejajar dengan gambar/isi artikel */
  }
}

/* Responsive tinggi iklan */
@media (max-width: 1024px) {
  #home-left-ad, #home-right-ad, #right-ad {
    height: 400px;
  }
}

@media (max-width: 768px) {
  #home-left-ad, #home-right-ad, #right-ad {
    height: 300px;
  }
  #left-ad {
    height: 200px;
  }
}

.side-ad-banner:hover {
  transform: translateY(-2px);
}

.side-ad-banner img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover; /* Memotong gambar agar pas dengan kotak (tidak peyang) */
  /* Border putih dihapus */
}

.side-ad-placeholder {
  padding: 20px;
  text-align: center;
}

/* ============================================================
   FONT MOBILE LEBIH BESAR (ARTIKEL)
   ============================================================ */
@media (max-width: 768px) {
  .article-container {
    padding: 24px 16px 60px;
  }
  .article-header h1 {
    font-size: 1.55rem;
    line-height: 1.35;
  }
  .article-body {
    font-size: 1.15rem !important;
    line-height: 1.9 !important;
  }
  .article-body p {
    font-size: 1.15rem;
    margin-bottom: 18px;
  }
}

/* ============================================================
   FOOTER PREMIUM
   ============================================================ */
.site-footer {
  margin-top: 60px;
  background: linear-gradient(180deg, #0d1117 0%, #060a0f 100%);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-main {
  padding: 56px 24px 40px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 16px;
}

.footer-logo strong {
  color: var(--accent);
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-dark);
  margin: 14px 0 24px;
  max-width: 340px;
}

.footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid rgba(255,255,255,0.08);
}

.social-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,170,228,0.35);
}

.footer-col-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.92rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
  display: block;
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 4px;
}

/* Footer Bottom Bar */
.footer-bottom {
  background: rgba(0,0,0,0.35);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 18px 24px;
}

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

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-copyright strong {
  color: var(--accent);
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-dark);
}

/* Footer Mobile Responsive */
@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-tagline {
    max-width: 100%;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .footer-main {
    padding: 36px 20px 28px;
  }
}

/* ============================================================
   PAGINATION
   ============================================================ */
#news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0 16px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.page-btn:hover:not(:disabled) {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.page-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb, 59, 130, 246), 0.4);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-prev,
.page-next {
  padding: 0 16px;
  gap: 6px;
  font-weight: 600;
}

.page-ellipsis {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0 4px;
  line-height: 40px;
}

@media (max-width: 480px) {
  .page-prev,
  .page-next {
    padding: 0 10px;
    font-size: 0.8rem;
  }
  .page-btn {
    min-width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }
}

/* ============================================================
   YOUTUBE THUMBNAIL PLAYER
   ============================================================ */
.yt-thumb-wrapper {
  width: 100%;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.yt-thumb-link {
  display: block;
  position: relative;
  text-decoration: none;
  overflow: hidden;
  background: #000;
}

/* Portrait Shorts wrapper — dipusatkan, max 400px */
.yt-shorts-wrapper {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.yt-thumb-link img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

/* Khusus shorts: thumbnail portrait */
.yt-shorts-wrapper .yt-thumb-link img {
  aspect-ratio: 9/16;
  object-fit: cover;
}

.yt-thumb-link:hover img {
  opacity: 0.8;
}

.yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
  transition: transform 0.2s ease;
  pointer-events: none;
}

.yt-thumb-link:hover .yt-play-btn {
  transform: translate(-50%, -50%) scale(1.15);
}

.yt-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.4px;
  pointer-events: none;
}

/* Badge "📱 SHORTS" di pojok kiri atas */
.yt-shorts-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #ff0050, #ff4081);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(255,0,80,0.4);
}

.yt-fallback-bar {
  margin-top: 10px;
  background: #f8d7da;
  color: #721c24;
  padding: 10px 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
}

.yt-fallback-btn {
  background: #e53e3e;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.yt-fallback-btn:hover {
  background: #c53030;
}

/* Modal YouTube */
#yt-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#yt-modal.active {
  opacity: 1;
  visibility: visible;
}

.tg-widget-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.4;
}

.tg-widget-content img {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 5px;
  background: white;
  transition: transform 0.2s ease;
}

.tg-widget-content img:hover {
  transform: scale(1.05);
}

.yt-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.yt-modal-box {
  position: relative;
  width: 90%;
  max-width: 900px;
  background: #000;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1;
}

.yt-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  padding: 5px;
}

.yt-modal-close:hover {
  color: #e53e3e;
}

.yt-modal-player {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.livechat-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366; /* WhatsApp Green */
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  text-decoration: none;
}

.livechat-btn:hover {
  background-color: #128C7E;
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  color: #fff;
}

/* Tooltip khusus livechat */
.livechat-btn::before {
  content: attr(title);
  position: absolute;
  right: 75px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.livechat-btn:hover::before {
  opacity: 1;
  visibility: visible;
  right: 75px;
}

@media (max-width: 768px) {
  .livechat-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  .livechat-btn svg {
    width: 26px;
    height: 26px;
  }
  .livechat-btn::before {
    display: none; /* Hide tooltip on mobile */
  }
}

/* ============================================================
   BREAKING NEWS TICKER (Redesigned)
   ============================================================ */
.ticker-wrap {
  width: 100%;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  height: 44px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ticker-label {
  background: linear-gradient(90deg, #ef4444, #dc2626);
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
  white-space: nowrap;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 2px 0 8px rgba(0,0,0,0.3);
}

.ticker-label::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 0;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-left: 12px solid #dc2626;
}

/* Pulsing dot for live effect */
.ticker-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.ticker {
  flex: 1;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.ticker__item {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  line-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  animation: ticker 35s linear infinite;
}

.ticker__item:hover {
  animation-play-state: paused;
}

.ticker__item span {
  margin: 0 16px;
}

.ticker__item a {
  color: var(--text-primary);
  transition: color 0.2s;
  text-decoration: none;
}

.ticker__item a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 480px) {
  .ticker-label {
    font-size: 0.65rem;
    padding: 0 12px;
  }
  .ticker-label::after {
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
    border-left: 10px solid #dc2626;
    right: -10px;
  }
  .ticker__item {
    font-size: 0.85rem;
  }
  
  .reaction-buttons {
    gap: 8px;
  }
  .reaction-btn {
    padding: 8px 12px;
  }
  .reaction-btn .emoji {
    font-size: 1.5rem;
  }
}

/* ============================================================
   LIVE SEARCH DROPDOWN
   ============================================================ */
.live-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  margin-top: 4px;
  max-height: 350px;
  overflow-y: auto;
  z-index: 9999;
}

.live-search-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.2s;
}

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

.live-search-item:hover {
  background: rgba(0, 170, 228, 0.08);
}

.live-search-title {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}

.live-search-meta {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

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