@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --orange: #FF6B35;
  --orange-glow: rgba(255, 107, 53, 0.3);
  --orange-light: #ff8558;
  --navy: #1a1a2e;
  --navy-dark: #0f0f1a;
  --navy-light: #16213e;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --gray-800: #212529;

  /* Fonts */
  --font-brand: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  /* Theme mappings (Dark Mode default) */
  --bg-color: var(--navy-dark);
  --panel-color: var(--navy-light);
  --text-color: #eaeaea;
  --text-heading: var(--white);
  --text-muted: #8b8f9e;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
  --glass-bg: rgba(22, 33, 62, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);

  --in-oklab: ;
}

@supports (linear-gradient(in oklab, white, black)) {
  :root {
    --in-oklab: in oklab;
  }
}

/* Light Mode Theme */
[data-theme="light"] {
  --bg-color: #f4f6f9;
  --panel-color: var(--white);
  --text-color: #33334b;
  --text-heading: #1a1a2e;
  --text-muted: #626575;
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.05);
}

/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-brand);
  color: var(--text-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--orange-light);
}

button, input, textarea, select {
  font-family: inherit;
}

/* Layout Elements */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s, border-color 0.3s;
}

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

.logo {
  font-family: var(--font-brand);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  display: flex;
  align-items: center;
}

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

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

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--orange);
  background: rgba(255, 107, 53, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Search bar styling */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 8px 16px;
  padding-right: 36px;
  border-radius: 999px;
  font-size: 0.85rem;
  width: 180px;
  transition: all 0.3s ease;
}

[data-theme="light"] .search-input {
  background: rgba(0, 0, 0, 0.04);
}

.search-input:focus {
  outline: none;
  border-color: var(--orange);
  width: 240px;
  background: rgba(255,255,255,0.12);
}

.search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.search-btn:hover {
  color: var(--orange);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.08);
  color: var(--orange);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(0,0,0,0.05);
}

/* Hamburger menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Breaking Ticker */
.ticker-wrap {
  width: 100%;
  background: var(--navy-dark);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  height: 40px;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
}

[data-theme="light"] .ticker-wrap {
  background: var(--white);
}

.ticker-title {
  background: var(--orange);
  color: var(--white);
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-family: var(--font-brand);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 4px 0 10px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.ticker-content-container {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  flex-grow: 1;
}

.ticker-scroll {
  display: inline-block;
  padding-left: 100%;
  animation: ticker-anim 25s linear infinite;
}

.ticker-scroll:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-block;
  padding: 0 24px;
  color: var(--text-color);
  transition: color 0.2s;
}

.ticker-item:hover {
  color: var(--orange);
}

.ticker-dot {
  color: var(--orange);
  margin-right: 8px;
}

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

/* Layout columns */
.main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
}

.main-content {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Hero Section */
.hero-section {
  margin-bottom: 32px;
}

.hero-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 420px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom var(--in-oklab), transparent 30%, rgba(15, 15, 26, 0.95));
}

[data-theme="light"] .hero-overlay {
  background: linear-gradient(to bottom var(--in-oklab), transparent 30%, rgba(15, 15, 26, 0.95));
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 32px;
  width: 100%;
  max-width: 800px;
}

.badge-tag {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
  font-family: var(--font-brand);
}

.badge-tag.news {
  background: #0077b6;
}

.hero-title {
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--white);
}

.hero-excerpt {
  color: #c9c9d6;
  font-size: 0.95rem;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  font-size: 0.75rem;
  color: #a0a5b8;
  display: flex;
  align-items: center;
  gap: 12px;
}

[data-theme="light"] .post-meta {
  color: #bfbfd4;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Grid Layout */
.section-title {
  font-size: 1.4rem;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--orange);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

/* Card Styling */
.card-item {
  background: var(--panel-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.card-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Blogger Orange Border Highlight */
.card-item.our-post {
  border: 2px solid var(--orange);
  box-shadow: 0 4px 14px var(--orange-glow);
}

.card-item.our-post:hover {
  box-shadow: 0 8px 24px var(--orange-glow);
}

.card-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy-dark);
  position: relative;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-item:hover .card-image {
  transform: scale(1.05);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-category {
  font-family: var(--font-brand);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 6px;
}

.card-title {
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-heading);
}

.card-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Fact of the Day Highlighted Box */
.fact-of-day-box {
  background: linear-gradient(135deg var(--in-oklab), var(--navy-light), #2a1b3d);
  border-radius: 12px;
  border: 2px dashed var(--orange);
  padding: 24px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.15);
}

[data-theme="light"] .fact-of-day-box {
  background: linear-gradient(135deg var(--in-oklab), #fff7f3, #ffece3);
}

.fact-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--orange);
  font-weight: 700;
  font-family: var(--font-brand);
  font-size: 1.1rem;
}

.fact-of-day-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-heading);
}

/* Sidebar Components */
.sidebar-box {
  background: var(--panel-color);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--orange);
}

/* Trending List */
.trending-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trending-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.trending-num {
  font-family: var(--font-brand);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
  opacity: 0.6;
  width: 24px;
}

.trending-item-content {
  flex-grow: 1;
}

.trending-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-item-title a {
  color: var(--text-heading);
}

.trending-item-title a:hover {
  color: var(--orange);
}

.trending-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Newsletter Signup */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.newsletter-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.newsletter-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
}

[data-theme="light"] .newsletter-input {
  background: rgba(0, 0, 0, 0.02);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--orange);
}

.newsletter-submit-btn {
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.88rem;
}

.newsletter-submit-btn:hover {
  background: var(--orange-light);
}

.newsletter-msg {
  font-size: 0.8rem;
  text-align: center;
  display: none;
}

.newsletter-msg.success {
  display: block;
  color: #2ec4b6;
}

.newsletter-msg.error {
  display: block;
  color: #e63946;
}

/* Ad slots */
.ad-slot-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .ad-slot-card {
  background: rgba(0, 0, 0, 0.01);
}

.ad-slot-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.ad-slot-size {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Ad slot dimensions */
.ad-leaderboard {
  max-width: 1280px;
  margin: 16px auto;
  height: 90px;
}
.ad-hero-footer {
  margin-bottom: 24px;
  height: 90px;
}
.ad-sidebar-top {
  height: 250px;
}
.ad-sidebar-bottom {
  height: 250px;
}
.ad-grid-middle {
  grid-column: 1 / -1;
  height: 90px;
}
.ad-footer-banner {
  margin: 24px auto;
  height: 90px;
}
.ad-sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  height: 50px;
  width: 320px;
  background: var(--panel-color);
  box-shadow: 0 -4px 10px rgba(0,0,0,0.15);
  border-top: 1px solid var(--border-color);
}

/* Article Page Layout */
.article-container {
  background: var(--panel-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

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

.article-title {
  font-size: 2.2rem;
  line-height: 1.25;
  margin: 12px 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.article-image {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 24px;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 20px 0;
}

.article-body blockquote {
  border-left: 4px solid var(--orange);
  padding-left: 20px;
  font-style: italic;
  color: var(--text-muted);
  margin: 24px 0;
}

.breadcrumbs {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--orange);
}

/* NewsAPI External Post Preview page */
.external-news-container {
  background: var(--panel-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
  text-align: center;
}

.external-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 53, 0.08);
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-brand);
  font-weight: 700;
  color: var(--orange);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  background: var(--orange);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 24px;
  transition: background 0.2s;
  box-shadow: 0 4px 14px var(--orange-glow);
}

.cta-button:hover {
  background: var(--orange-light);
  color: var(--white);
}

/* Footer Styling */
footer {
  background: var(--navy-dark);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 48px 24px 24px 24px;
}

[data-theme="light"] footer {
  background: var(--white);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  font-size: 1.6rem;
  margin-bottom: 12px;
  display: inline-flex;
}

.footer-brand p {
  font-size: 0.88rem;
  max-width: 380px;
  line-height: 1.5;
}

.footer-column h4 {
  font-size: 0.95rem;
  color: var(--text-heading);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 32px 0;
}

.btn-secondary {
  background: var(--panel-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--orange);
  color: var(--orange);
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Active page number highlight */
.page-num-btn {
  padding: 8px 12px;
  min-width: 38px;
}

.page-active {
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  color: var(--white) !important;
  font-weight: 700;
}


/* Admin Dashboard CSS layout styling */
.admin-login-container {
  max-width: 420px;
  margin: 80px auto;
  background: var(--panel-color);
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

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

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

.form-control {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 14px;
  border-radius: 6px;
}

[data-theme="light"] .form-control {
  background: rgba(0,0,0,0.02);
}

.form-control:focus {
  outline: none;
  border-color: var(--orange);
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--orange-light);
}

/* Admin Portal Layout */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  min-height: 600px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--border-color);
  padding-right: 20px;
}

.admin-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-nav-item:hover, .admin-nav-item.active {
  background: rgba(255, 107, 53, 0.08);
  color: var(--orange);
}

.admin-panel-content {
  min-width: 0;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--panel-color);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.stat-card-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.stat-card-val {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-brand);
  color: var(--text-heading);
}

/* Table elements */
.admin-table-container {
  overflow-x: auto;
  background: var(--panel-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.admin-table th {
  background: rgba(255,255,255,0.02);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-heading);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .admin-table th {
  background: rgba(0,0,0,0.01);
}

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

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

.action-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.action-badge.blogger { background: rgba(255, 107, 53, 0.12); color: var(--orange); }
.action-badge.newsapi { background: rgba(0, 119, 182, 0.12); color: #0077b6; }

.action-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  margin-right: 4px;
}

.action-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.action-btn.delete:hover {
  border-color: #e63946;
  color: #e63946;
}

/* Form layouts in Admin */
.inline-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
}

/* Logs console */
.logs-console {
  background: #0d0d16;
  color: #a8ffb2;
  font-family: monospace;
  padding: 16px;
  border-radius: 6px;
  max-height: 240px;
  overflow-y: auto;
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
  margin-top: 16px;
}

/* Edit Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--panel-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.modal-backdrop.open .modal-container {
  transform: translateY(0);
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--orange);
}

.modal-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .main-wrapper {
    grid-template-columns: 1fr;
  }
  .sidebar {
    grid-row: 2;
  }
}

@media (max-width: 768px) {
  .main-wrapper {
    padding: 16px 12px;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--panel-color);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    box-shadow: var(--shadow-md);
    z-index: 101;
  }
  .nav-links.open {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .header-container {
    padding: 12px 16px;
  }
  .header-actions {
    gap: 8px;
  }
  .search-input {
    width: 140px;
  }
  .search-input:focus {
    width: 180px;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    border-right: none;
    flex-direction: row;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    padding-right: 0;
  }
  .admin-nav-item {
    width: auto;
  }
  .news-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .hero-card {
    height: 320px;
  }
  .skeleton-hero {
    height: 320px;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .hero-content {
    padding: 24px;
  }
  .article-container, .external-news-container {
    padding: 24px 16px;
  }
  .article-title {
    font-size: 1.8rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 540px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 10px 12px;
  }
  .logo {
    font-size: 1.4rem;
  }
  .search-input {
    width: 100px;
    padding: 8px 12px;
    padding-right: 30px;
  }
  .search-input:focus {
    width: 140px;
  }
  .hero-card {
    height: 240px;
  }
  .skeleton-hero {
    height: 240px;
  }
  .hero-title {
    font-size: 1.3rem;
  }
  .hero-excerpt {
    display: none;
  }
  .hero-content {
    padding: 16px;
  }
  .article-title {
    font-size: 1.5rem;
  }
  .pagination {
    gap: 8px;
    flex-wrap: wrap;
  }
  .page-num-btn {
    padding: 6px 10px;
    min-width: 32px;
    font-size: 0.85rem;
  }
  .breadcrumbs {
    font-size: 0.75rem;
    flex-wrap: wrap;
  }
  .section-title {
    font-size: 1.2rem;
  }
}

/* ============================================================
 * SITE LOADING OVERLAY
 * ============================================================ */
#site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--navy-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

[data-theme="light"] #site-loader {
  background: #f4f6f9;
}

#site-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-loader-logo {
  font-family: var(--font-brand);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  animation: loader-pulse 1.5s ease-in-out infinite alternate;
}

[data-theme="light"] .site-loader-logo {
  color: var(--navy);
}

.site-loader-logo span {
  color: var(--orange);
}

@keyframes loader-pulse {
  from { opacity: 0.7; }
  to   { opacity: 1; }
}

.site-loader-bar-wrap {
  width: 220px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

[data-theme="light"] .site-loader-bar-wrap {
  background: rgba(0, 0, 0, 0.08);
}

.site-loader-bar-wrap::after {
  content: '';
  position: absolute;
  left: -60%;
  top: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  animation: loader-sweep 1.1s ease-in-out infinite;
}

@keyframes loader-sweep {
  0%   { left: -60%; }
  100% { left: 110%; }
}

.site-loader-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================================
 * SKELETON CARD LOADER (shimmer)
 * ============================================================ */
@keyframes skeleton-shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position: 800px 0; }
}

.skeleton-base {
  background: linear-gradient(
    90deg,
    var(--panel-color) 25%,
    rgba(255, 255, 255, 0.06) 50%,
    var(--panel-color) 75%
  );
  background-size: 1600px 100%;
  animation: skeleton-shimmer 1.6s infinite linear;
  border-radius: 6px;
}

[data-theme="light"] .skeleton-base {
  background: linear-gradient(
    90deg,
    #e2e5eb 25%,
    #f0f2f5 50%,
    #e2e5eb 75%
  );
  background-size: 1600px 100%;
  animation: skeleton-shimmer 1.6s infinite linear;
}

.skeleton-hero {
  width: 100%;
  height: 380px;
  border-radius: 12px;
  margin-bottom: 32px;
}

.skeleton-card {
  background: var(--panel-color);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.skeleton-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
}

.skeleton-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 13px;
  border-radius: 4px;
}

.sk-w-100 { width: 100%; }
.sk-w-80  { width: 80%; }
.sk-w-60  { width: 60%; }
.sk-w-40  { width: 40%; }
.sk-w-30  { width: 30%; }

.skeleton-section-title {
  height: 22px;
  width: 200px;
  border-radius: 4px;
  margin-bottom: 20px;
}
