/* ==========================================================================
   NEXABLOG GLOBAL DESIGN SYSTEM - STYLE.CSS
   Aesthetic: Dark Editorial Luxury (Indian Tech Startup Meets Premium Magazine)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CORE DESIGN SYSTEM VARIABLES & RESET
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --bg-void: #070710;
  --bg-surface: #0F0F1A;
  --bg-elevated: #161625;
  --bg-card: #1C1C2E;
  --border: rgba(255,255,255,0.06);
  --border-active: rgba(108,99,255,0.4);

  /* Brand */
  --primary: #6C63FF;
  --primary-glow: rgba(108,99,255,0.3);
  --secondary: #FF6584;
  --accent: #00F5A0;
  --accent-warm: #F7B731;

  /* Text */
  --text-1: #F0F0FF;
  --text-2: #A0A0C0;
  --text-3: #606080;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
  --grad-card: linear-gradient(145deg, #1C1C2E 0%, #13131F 100%);
  --grad-glow: radial-gradient(ellipse at center, rgba(108,99,255,0.15) 0%, transparent 70%);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Shadows */
  --shadow-card: 0 4px 32px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-glow: 0 0 40px rgba(108,99,255,0.2);
  --shadow-hover: 0 8px 48px rgba(108,99,255,0.25), 0 2px 0 rgba(255,255,255,0.06) inset;
}

/* Base resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-void);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  background: var(--grad-primary);
  z-index: 10000;
  width: 0%;
  transition: width 0.1s ease;
  box-shadow: 0 0 12px var(--primary);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-active);
}

/* --------------------------------------------------------------------------
   2. CORE UTILITY STYLES (GLASS-CARD, TEXT, RIPPLE, REVEAL)
   -------------------------------------------------------------------------- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-active);
}

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations & Transitions */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger > * {
  transition-delay: calc(var(--i, 0) * 80ms);
}

/* Ripple keyframes */
@keyframes rippleAnim {
  from {
    transform: scale(0);
    opacity: 1;
  }
  to {
    transform: scale(3);
    opacity: 0;
  }
}

/* Orbs animation keyframes */
@keyframes float1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, 40px) scale(1.1); }
}

@keyframes float2 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-40px, -60px) scale(0.9); }
}

@keyframes float3 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(30px, 50px) scale(1.05); }
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Ripple click base element styling */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY & BUTTON COMMON ELEMENTS
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-1);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 0 32px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 0 40px rgba(108, 99, 255, 0.6);
}

.btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-1);
}

.btn-secondary:hover {
  border-color: var(--border-active);
  background: var(--bg-card);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--text-1);
}

.btn-danger {
  background: rgba(255, 101, 132, 0.1);
  border: 1px solid var(--secondary);
  color: var(--secondary);
}

.btn-danger:hover {
  background: var(--secondary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   4. LAYOUT: HEADER / NAVBAR & FOOTER
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  height: 72px;
  z-index: 1000;
  background: rgba(7, 7, 16, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
}

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

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse-dot 2s infinite ease-in-out;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
}

.logo-text span {
  font-weight: 400;
  color: var(--text-2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--text-2);
  position: relative;
  padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-1);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

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

.search-trigger {
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
}

.search-trigger:hover {
  background: var(--bg-elevated);
  color: var(--text-1);
}

.write-btn {
  border: 1px solid var(--border-active);
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 14px;
}

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

/* Mobile burger button */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-1);
  cursor: pointer;
  padding: 4px;
}

/* Mobile nav drawer overlay */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 40px rgba(0,0,0,0.8);
  z-index: 1001;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-nav-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--text-2);
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: var(--text-1);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,7,16,0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.drawer-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Footer styling */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 80px 24px 40px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-brand p {
  color: var(--text-2);
  font-size: 15px;
  max-width: 320px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: all 0.3s ease;
}

.social-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-1);
  margin-bottom: 24px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul a {
  color: var(--text-3);
  font-size: 14px;
}

.footer-col ul a:hover {
  color: var(--text-1);
}

.footer-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 40px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-3);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   5. PAGE: HOMEPAGE (HERO, AD PLACEMENTS, FEATURED, TOPICS, LATEST GRID)
   -------------------------------------------------------------------------- */
.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbs-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  top: -10%;
  left: -5%;
  animation: float1 12s ease-in-out infinite alternate;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  bottom: -10%;
  right: -5%;
  animation: float2 16s ease-in-out infinite alternate;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: 30%;
  right: 20%;
  animation: float3 9s ease-in-out infinite alternate;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 2;
  pointer-events: none;
}

.hero-fade-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 25vh;
  background: linear-gradient(transparent, var(--bg-void));
  z-index: 3;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.hero-badge {
  background: var(--bg-elevated);
  border: 1px solid var(--border-active);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 72px;
  line-height: 1.1;
  letter-spacing: -2px;
}

.hero-subtext {
  font-family: var(--font-body);
  font-size: 19px;
  color: var(--text-2);
  min-height: 30px;
}

.typing-cursor {
  border-right: 2px solid var(--primary);
  animation: blink 0.75s step-end infinite;
}

@keyframes blink {
  from, to { border-color: transparent }
  50% { border-color: var(--primary); }
}

.hero-ctas {
  display: flex;
  gap: 16px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 24px;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-stat-divider {
  width: 1px;
  background: var(--border);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  z-index: 10;
  color: var(--text-3);
  animation: bounce 2s infinite;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Advertisement slot styling */
.ad-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  margin: 24px auto;
}

.ad-label {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.ad-billboard {
  max-width: 970px;
  min-height: 250px;
  background: rgba(255,255,255,0.015);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
}

.ad-rect-300 {
  width: 300px;
  height: 250px;
  background: rgba(255,255,255,0.015);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
}

.ad-leaderboard {
  max-width: 728px;
  min-height: 90px;
  background: rgba(255,255,255,0.015);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
}

.desktop-only { display: block; }
.mobile-only { display: none; }

/* Sticky mobile banner container */
#ad-slot-mobile-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  min-height: 64px;
}

.ad-close-btn {
  position: absolute;
  top: -12px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  z-index: 1000;
}

/* Featured Section */
.section-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
}

.section-title-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-title {
  font-size: 36px;
  letter-spacing: -1px;
}

.section-subtitle {
  color: var(--text-2);
  font-size: 15px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

/* Cards configurations */
.featured-large-card {
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.large-card-img {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.large-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.featured-large-card:hover .large-card-img img {
  transform: scale(1.04);
}

.large-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(7,7,16,0.9));
  pointer-events: none;
}

.category-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 100px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-transform: uppercase;
}

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

.large-card-title {
  font-size: 28px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.large-card-excerpt {
  color: var(--text-2);
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
}

.author-name {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
}

.post-meta-details {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-3);
  font-size: 13px;
}

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

.post-meta-details i {
  width: 14px;
  height: 14px;
}

.read-more-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.featured-right-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.featured-small-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 20px;
  cursor: pointer;
}

.small-card-img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.small-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.featured-small-card:hover .small-card-img img {
  transform: scale(1.06);
}

.small-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.small-card-cat {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.small-card-title {
  font-size: 16px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.small-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

/* Skeletons animations */
.skeleton-card {
  min-height: 380px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skeleton-element {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-img {
  height: 180px;
  border-radius: var(--radius-md);
}

.skeleton-tag {
  width: 60px;
  height: 16px;
}

.skeleton-title {
  width: 90%;
  height: 24px;
}

.skeleton-text {
  width: 100%;
  height: 14px;
}

.skeleton-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  height: 28px;
}

/* Explore Topics categories chips container */
.categories-slider-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.categories-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 4px;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
}

.categories-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(28,28,46,0.3);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-chip:hover {
  transform: translateY(-2px);
  background: rgba(108, 99, 255, 0.08);
}

.category-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(108, 99, 255, 0.3);
}

.category-chip i {
  width: 18px;
  height: 18px;
}

/* Post Cards Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.post-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
}

.post-card-image {
  height: 200px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.post-card:hover .post-card-image img {
  transform: scale(1.04);
}

.post-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.post-date-badge {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-title {
  font-size: 18px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-excerpt {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: auto;
}

.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

/* --------------------------------------------------------------------------
   6. PAGE: SINGLE POST READER (STICKY SIDEBARS, TYPOGRAPHY, EMOTIONS)
   -------------------------------------------------------------------------- */
.post-layout-header {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.post-header-bg {
  position: absolute;
  inset: 0;
}

.post-header-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(7, 7, 16, 0.4) 0%, rgba(7, 7, 16, 0.8) 50%, var(--bg-void) 100%);
  z-index: 1;
}

.post-header-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-header-badges {
  display: flex;
  gap: 8px;
}

.badge-pill {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-2);
}

.post-main-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 52px;
  line-height: 1.1;
  max-width: 900px;
  letter-spacing: -1.5px;
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-2);
  font-size: 14px;
}

.post-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-3);
  transition: all 0.2s ease;
}

.tag-pill:hover {
  border-color: var(--primary);
  color: var(--text-1);
}

/* Post Container Layout */
.post-layout-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
}

.post-content-area {
  min-width: 0; /* Prevents flex items from breaking grid widths */
}

/* Typography styles for #post-content */
.article-body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.9;
  color: #D0D0E8;
}

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

.article-body h2 {
  font-size: 28px;
  line-height: 1.3;
  margin: 40px 0 16px;
  color: var(--text-1);
  display: flex;
  align-items: center;
}

.article-body h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 24px;
  background: var(--primary);
  margin-right: 12px;
  border-radius: 2px;
}

.article-body h3 {
  font-size: 22px;
  margin: 32px 0 12px;
}

.article-body a {
  color: var(--primary);
  text-decoration: underline dotted;
  font-weight: 500;
}

.article-body a:hover {
  text-decoration: underline solid;
}

.article-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--bg-elevated);
  padding: 24px 32px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  margin: 32px 0;
  color: var(--text-1);
}

.article-body code {
  font-family: var(--font-mono);
  background: var(--bg-elevated);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--accent);
  font-size: 14px;
}

.article-body pre {
  background: var(--bg-elevated);
  padding: 24px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--border);
  position: relative;
  margin: 32px 0;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: var(--text-1);
  border-radius: 0;
}

.copy-code-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}

.copy-code-btn:hover {
  background: var(--bg-card);
  color: var(--text-1);
}

.article-body img {
  border-radius: var(--radius-lg);
  width: 100%;
  margin: 32px 0 8px;
  display: block;
}

.image-caption {
  font-size: 13px;
  color: var(--text-3);
  font-style: italic;
  text-align: center;
  margin-bottom: 32px;
}

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

.article-body li {
  margin-bottom: 8px;
}

.article-body li::marker {
  color: var(--primary);
}

.article-body strong {
  color: var(--text-1);
  font-weight: 600;
}

.article-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 48px 0;
}

/* First paragraph drop cap */
.article-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 800;
  float: left;
  line-height: 0.85;
  margin: 8px 12px 0 0;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Share panel */
.post-actions-divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

.share-reactions-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.share-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.share-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-3);
}

.share-btns {
  display: flex;
  gap: 10px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.share-btn:hover {
  border-color: var(--primary);
  color: var(--text-1);
  transform: translateY(-2px);
}

.share-btn i {
  width: 14px;
  height: 14px;
}

/* Emoji reactions bar */
.reactions-section {
  display: flex;
  align-items: center;
  gap: 24px;
}

.reactions-bar {
  display: flex;
  gap: 12px;
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.reaction-btn:hover .reaction-emoji {
  animation: emoji-bounce 0.5s ease infinite alternate;
}

.reaction-btn.selected {
  border-color: var(--border-active);
  background: rgba(108, 99, 255, 0.12);
  box-shadow: 0 0 15px rgba(108,99,255,0.15);
}

.reaction-emoji {
  font-size: 20px;
  display: inline-block;
}

.reaction-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

@keyframes emoji-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

/* Footer author block */
.author-profile-card {
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 60px;
}

.author-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  border: 2px solid var(--border);
  box-shadow: 0 0 24px rgba(108,99,255,0.25);
  flex-shrink: 0;
}

.author-profile-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.author-profile-details h3 {
  font-size: 20px;
}

.author-profile-details p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.author-profile-details .btn-ghost {
  align-self: flex-start;
  padding: 6px 16px;
  font-size: 12px;
  margin-top: 6px;
}

/* Related Posts block */
.related-posts-section {
  border-top: 1px solid var(--border);
  padding-top: 60px;
  margin-top: 60px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

/* Sticky Sidebar styling */
.sticky-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
}

.sidebar-widget {
  padding: 24px;
}

.sidebar-widget-title {
  font-size: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-widget-title i {
  color: var(--secondary);
}

.author-sidebar-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.author-sidebar-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-glow);
}

.author-sidebar-bio {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.popular-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popular-post-item {
  display: flex;
  gap: 16px;
  cursor: pointer;
}

.popular-post-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
}

.popular-post-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.popular-post-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.popular-post-item:hover .popular-post-title {
  color: var(--primary);
}

.popular-post-views {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.popular-post-views i {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   7. NEWSLETTER CONIC GLOWS & FOOTER DESIGNS
   -------------------------------------------------------------------------- */
.newsletter-card {
  position: relative;
  padding: 60px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  overflow: hidden;
  z-index: 1;
}

/* Gradient animated border wrapper */
.newsletter-card-glow {
  position: absolute;
  inset: -1.5px;
  background: conic-gradient(from 0deg, var(--primary) 0%, var(--secondary) 25%, var(--accent) 50%, var(--primary) 100%);
  z-index: -1;
  border-radius: var(--radius-lg);
  animation: border-rotate 8s linear infinite;
  opacity: 0.4;
}

.newsletter-card-inner {
  position: absolute;
  inset: 1px;
  background: var(--bg-card);
  border-radius: calc(var(--radius-lg) - 1px);
  z-index: -1;
}

@keyframes border-rotate {
  100% { transform: rotate(360deg); }
}

.newsletter-icon {
  width: 64px;
  height: 64px;
  background: rgba(108, 99, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.newsletter-card:hover .newsletter-icon {
  transform: scale(1.08);
  color: var(--secondary);
  background: rgba(255, 101, 132, 0.1);
}

.newsletter-title {
  font-size: 32px;
}

.newsletter-desc {
  max-width: 580px;
  color: var(--text-2);
  font-size: 15px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

.form-input-container {
  flex-grow: 1;
  position: relative;
}

.newsletter-input {
  width: 100%;
  padding: 14px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(7,7,16,0.6);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: all 0.3s;
}

.newsletter-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(108, 99, 255, 0.15);
}

.newsletter-submit {
  flex-shrink: 0;
}

.newsletter-status {
  font-size: 14px;
  min-height: 20px;
}

.newsletter-status.success { color: var(--accent); }
.newsletter-status.error { color: var(--secondary); }

.newsletter-proof {
  font-size: 12px;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   8. PAGE: SEARCH ENGINE (MATCH TAGS & LOCALSTORAGE LISTS)
   -------------------------------------------------------------------------- */
.search-hero {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-void) 100%);
  padding: 80px 24px 40px;
  border-bottom: 1px solid var(--border);
}

.search-bar-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.search-input-field {
  width: 100%;
  height: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0 64px 0 28px;
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: 18px;
  outline: none;
  transition: all 0.3s;
  box-shadow: var(--shadow-card);
}

.search-input-field:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.search-submit-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-history-panel {
  max-width: 800px;
  margin: 16px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.history-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-chip {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
}

.history-chip:hover {
  border-color: var(--primary);
  color: var(--text-1);
}

.results-stats-row {
  max-width: 1280px;
  margin: 32px auto 0;
  padding: 0 24px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-2);
}

mark {
  background: rgba(108, 99, 255, 0.25);
  color: var(--text-1);
  border-radius: 2px;
  padding: 0 2px;
}

.empty-state-wrapper {
  text-align: center;
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.empty-state-icon {
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   9. PAGE: ABOUT (COUNTER ROLLS)
   -------------------------------------------------------------------------- */
.about-hero {
  padding: 100px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
}

.about-card {
  padding: 32px;
  border-left: 4px solid var(--primary);
}

.about-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(108,99,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 20px;
}

.about-card h3 {
  margin-bottom: 12px;
}

.about-card p {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

.about-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.team-card {
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.team-avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-glow);
}

.team-role {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
}

.team-bio {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   10. ADMIN: LOGIN PANEL (SHAKE / ERRORS)
   -------------------------------------------------------------------------- */
.admin-login-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.login-card.shake {
  animation: shake 0.5s ease-in-out;
}

.login-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-2);
}

.form-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input-wrapper i {
  position: absolute;
  left: 16px;
  color: var(--text-3);
  width: 18px;
  height: 18px;
}

.form-control {
  width: 100%;
  height: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px 0 48px;
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(108, 99, 255, 0.1);
}

.form-control-textarea {
  height: auto;
  padding: 12px 16px;
}

.password-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.login-error-alert {
  padding: 12px 16px;
  background: rgba(255, 101, 132, 0.1);
  border: 1px solid var(--secondary);
  border-radius: var(--radius-sm);
  color: var(--secondary);
  font-size: 14px;
  text-align: center;
  display: none;
}

/* --------------------------------------------------------------------------
   11. ADMIN: DASHBOARD (STATISTICS / SIDEBAR / CHARTS)
   -------------------------------------------------------------------------- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-brand {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
}

.admin-panel-badge {
  background: var(--bg-elevated);
  border: 1px solid var(--border-active);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--primary);
}

.sidebar-menu {
  list-style: none;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.sidebar-menu-item a {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
}

.sidebar-menu-item a:hover {
  background: var(--bg-elevated);
  color: var(--text-1);
}

.sidebar-menu-item.active a {
  background: rgba(108, 99, 255, 0.15);
  color: var(--text-1);
  border-left: 3px solid var(--primary);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.sidebar-menu-item a i {
  width: 20px;
  height: 20px;
}

.sidebar-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 16px;
}

.admin-main {
  flex-grow: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-topbar {
  height: 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-1);
  cursor: pointer;
  display: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-notification {
  position: relative;
  color: var(--text-2);
  cursor: pointer;
}

.topbar-notification-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
}

.admin-user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
}

.admin-user-name {
  font-size: 14px;
  font-weight: 500;
}

.admin-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 8px 0;
  display: none;
  margin-top: 8px;
}

.admin-user-dropdown.show {
  display: block;
}

.admin-user-dropdown-item {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-user-dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--text-1);
}

.admin-content {
  padding: 32px;
  flex-grow: 1;
}

/* Stats metrics rows */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-metric-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card-title-row i {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

.stat-card-num {
  font-size: 36px;
}

.stat-card-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.stat-trend-up { color: var(--accent); }
.stat-trend-down { color: var(--secondary); }

/* Quick actions row */
.quick-actions-row {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

/* Tables Admin styling */
.admin-table-container {
  overflow: hidden;
  margin-bottom: 32px;
}

.admin-table-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-table-title {
  font-size: 18px;
}

.table-wrapper {
  overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}

.admin-table th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-2);
  background: rgba(255,255,255,0.01);
}

.admin-table tbody tr {
  transition: background-color 0.2s;
}

.admin-table tbody tr:hover {
  background-color: var(--bg-elevated);
}

.admin-table tbody tr.selected {
  background-color: rgba(108, 99, 255, 0.08);
}

.post-thumbnail-cell {
  width: 56px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.post-thumbnail-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fallback-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;
  font-size: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
}

.status-badge-published {
  background: rgba(0, 245, 160, 0.1);
  color: var(--accent);
}

.status-badge-draft {
  background: rgba(247, 183, 49, 0.1);
  color: var(--accent-warm);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-dot-published { background: var(--accent); }
.status-dot-draft { background: var(--accent-warm); }

.table-action-btns {
  display: flex;
  gap: 8px;
}

.table-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

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

.table-action-btn-danger:hover {
  border-color: var(--secondary);
  color: var(--secondary);
  background: rgba(255, 101, 132, 0.1);
}

/* Bulk actions bar overlay */
.bulk-actions-bar {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: 100px;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  z-index: 200;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  transition: bottom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bulk-actions-bar.show {
  bottom: 32px;
}

.bulk-count {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}

.bulk-btns {
  display: flex;
  gap: 8px;
}

/* CSS Only Bar Chart */
.chart-card {
  padding: 24px;
  margin-bottom: 32px;
}

.bar-chart-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.bar-chart-row {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  align-items: center;
  gap: 16px;
}

.bar-chart-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.bar-chart-track {
  height: 12px;
  background: var(--bg-elevated);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.bar-chart-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: 6px;
  width: 0%;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-chart-val {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-1);
  text-align: right;
}

/* Modals Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,7,16,0.6);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.show .modal-card {
  transform: translateY(0);
}

.modal-title {
  font-size: 20px;
}

.modal-desc {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}

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

/* --------------------------------------------------------------------------
   12. ADMIN: EDITING PANEL (RICH-TEXT EDITOR WIDGETS)
   -------------------------------------------------------------------------- */
.editor-layout-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 32px;
}

.editor-top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.editor-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.unsaved-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent-warm);
  opacity: 0;
  transition: opacity 0.2s;
}

.unsaved-indicator.show {
  opacity: 1;
}

.unsaved-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-warm);
  animation: pulse-dot 1.5s infinite ease-in-out;
}

.editor-buttons {
  display: flex;
  gap: 12px;
}

.rich-editor-card {
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

.editor-toolbar {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  position: sticky;
  top: 64px;
  z-index: 50;
}

.toolbar-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.toolbar-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-1);
}

.toolbar-btn.active {
  background: rgba(108, 99, 255, 0.15);
  color: var(--primary);
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 6px 4px;
}

.editor-area-wrapper {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.editor-editable {
  min-height: 500px;
  outline: none;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.9;
  color: #D0D0E8;
  flex-grow: 1;
}

.editor-editable:empty::before {
  content: 'Start writing your masterpiece...';
  color: var(--text-3);
  pointer-events: none;
}

.word-counter-indicator {
  padding: 8px 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  justify-content: space-between;
}

/* Sidebar Collapsible boxes */
.collapsible-box {
  border-bottom: 1px solid var(--border);
}

.collapsible-box-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.collapsible-box-header i {
  transition: transform 0.3s;
  width: 16px;
  height: 16px;
}

.collapsible-box.collapsed .collapsible-box-header i {
  transform: rotate(-90deg);
}

.collapsible-box-content {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.collapsible-box.collapsed .collapsible-box-content {
  display: none;
}

/* Tags chip list creation input */
.tags-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 8px;
  border-radius: var(--radius-sm);
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.tag-badge button {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
}

.tag-badge button:hover {
  color: var(--secondary);
}

.tags-text-input {
  border: none;
  background: none;
  outline: none;
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 14px;
  flex-grow: 1;
  min-width: 80px;
}

/* Preview image placeholder */
.image-upload-preview {
  width: 100%;
  height: 168px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 12px;
}

/* Google Mockup Preview */
.google-preview-box {
  background: #ffffff;
  color: #1a0dab;
  padding: 16px;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  line-height: 1.4;
}

.google-url {
  font-size: 12px;
  color: #202124;
  margin-bottom: 4px;
}

.google-title {
  font-size: 18px;
  text-decoration: none;
  margin-bottom: 4px;
  display: block;
}

.google-title:hover {
  text-decoration: underline;
}

.google-description {
  font-size: 13px;
  color: #4d5156;
}

/* Toasts Alert System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 16px 28px;
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  color: var(--text-1);
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 20px rgba(0, 245, 160, 0.15);
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  border-left-color: var(--accent);
}

.toast-error {
  border-left-color: var(--secondary);
  box-shadow: 0 0 20px rgba(255, 101, 132, 0.15);
}

/* --------------------------------------------------------------------------
   13. MEDIA PANEL & SETTINGS PANEL
   -------------------------------------------------------------------------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.media-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 16, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.media-card:hover .media-card-overlay {
  opacity: 1;
}

.media-card-overlay .btn {
  padding: 8px 16px;
  font-size: 12px;
}

.empty-media-card {
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-3);
  padding: 40px;
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --------------------------------------------------------------------------
   14. RESPONSIVE DESIGN (BREAKPOINTS)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .post-layout-grid {
    grid-template-columns: 1fr;
  }
  
  .editor-layout-grid {
    grid-template-columns: 1fr;
  }
  
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-grid, .about-team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .media-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: block;
  }
  
  .hero-title {
    font-size: 42px;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }
  
  .hero-stat-divider {
    display: none;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .about-grid, .about-team-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .post-main-title {
    font-size: 32px;
  }
  
  .post-layout-header {
    height: 280px;
  }
  
  .in-content-ad {
    float: none;
    margin: 24px auto;
  }
  
  .desktop-only { display: none; }
  .mobile-only { display: block; }
  
  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }
  
  .admin-sidebar {
    width: 0px;
    overflow: hidden;
  }
  
  .admin-sidebar.open {
    width: 260px;
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .sidebar-toggle {
    display: block;
  }
  
  .stats-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
