/* =====================================================
   ORBILO — Dark Tech Modern Design System
   Palette: #1E1F24 / #2A2C33 / #6C8CFF / #8FA8FF
   Neuroscience-driven engagement: dopamine loops,
   progress cues, micro-animations, visual hierarchy
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* === Core Palette === */
  --bg-body: #1E1F24;
  --bg-secondary: #2A2C33;
  --bg-card: #23252B;
  --bg-card-hover: #2E3039;
  --bg-muted: #25272E;

  --text-primary: #E6E6E6;
  --text-secondary: #A8ADB8;
  --text-muted: #6B7080;
  --text-inverse: #1E1F24;

  --color-accent: #6C8CFF;
  --color-accent-h: #8FA8FF;
  --color-accent2: #7B6DFF;
  --color-success: #4ADE80;
  --color-danger: #F87171;
  --color-warn: #FBBF24;

  --border-color: #35373F;
  --border-light: #2E3039;
  --border-accent: rgba(108, 140, 255, 0.25);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --glow-accent: 0 0 20px rgba(108, 140, 255, 0.25), 0 0 40px rgba(108, 140, 255, 0.1);
  --glow-sm: 0 0 10px rgba(108, 140, 255, 0.2);

  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Legacy compat variables for PHP inline styles */
  --neon-cyan: var(--color-accent);
  --neon-magenta: var(--color-accent2);
  --neon-purple: var(--color-accent2);
  --neon-pink: var(--color-accent);
  --neon-blue: var(--color-accent);
  --neon-green: var(--color-success);
  --bg-dark: var(--bg-body);
  --bg-darker: var(--bg-muted);
  --color-primary: var(--color-accent);
  --color-primary-light: var(--color-accent-h);
  --color-primary-dark: var(--color-accent2);
  --color-secondary: var(--color-accent-h);
  --color-secondary-light: var(--color-accent-h);
  --color-cyan: var(--color-accent);
  --border-width: 1px;
  --border-neon: 1px;
  --glow-green: var(--glow-accent);
  --glow-amber: var(--glow-sm);
  --glow-pink: var(--glow-sm);
  --glow-cyan: var(--glow-accent);
  --glow-md: var(--glow-accent);
  --glow-lg: var(--glow-accent);
  --shadow-hard: var(--shadow-md);
  --text-light: var(--text-secondary);

  /* Font display/main compat */
  --font-display: var(--font-heading);
  --font-main: var(--font-body);
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Subtle animated gradient background — creates sense of depth */
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -5%, rgba(108, 140, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(123, 109, 255, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
}

/* No CRT overlay — clean modern look */
body::before {
  display: none;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.2rem;
}

h4 {
  font-size: 1rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-h);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.text-center {
  text-align: center;
}

.w-100 {
  width: 100%;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.font-weight-bold {
  font-weight: 700;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0;
}

/* Shimmer on hover — dopamine reward micro-animation */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transition: left var(--transition-slow);
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-h);
  transform: translateY(-1px);
  box-shadow: var(--glow-sm);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-h);
  border-color: var(--color-accent-h);
  color: #fff;
  box-shadow: var(--glow-accent);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(108, 140, 255, 0.06);
}

.btn-danger {
  background: transparent;
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.btn-danger:hover {
  background: var(--color-danger);
  color: #fff;
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* =====================================================
   FORMS
   ===================================================== */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  background: var(--bg-muted);
  color: var(--text-primary);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.15);
  background: var(--bg-card);
}

.form-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

select.form-control {
  color: var(--text-primary);
  background: var(--bg-muted);
}

select.form-control option {
  color: var(--text-primary);
  background: var(--bg-card);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* =====================================================
   HEADER
   ===================================================== */
.main-header {
  background: rgba(30, 31, 36, 0.92);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: box-shadow var(--transition-normal);
}

.main-header:hover {
  box-shadow: 0 0 0 1px rgba(108, 140, 255, 0.12), var(--shadow);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.03em;
  transition: color var(--transition-fast);
}

.logo-icon {
  font-size: 1.4rem;
}

/* Accent underline on logo hover */
.logo::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-h));
  border-radius: 2px;
  transition: width var(--transition-normal);
}

.logo:hover {
  color: var(--color-accent-h);
}

.logo:hover::after {
  width: 100%;
}

.logo {
  position: relative;
}

.nav-links {
  display: flex;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 0.9rem;
  position: relative;
}

/* Active indicator under nav items */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(108, 140, 255, 0.08);
}

.nav-links a:hover::after {
  width: 60%;
}

.nav-icon {
  font-size: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 100;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* =====================================================
   HERO SECTION — neurosciência: progresso e curiosidade
   ===================================================== */
.hero {
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

/* Animated grid that pulses — creates anticipation */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 140, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 140, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: grid-drift 18s linear infinite;
  pointer-events: none;
}

@keyframes grid-drift {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 48px 48px;
  }
}

/* Radial glow behind hero content */
.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(108, 140, 255, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: glow-pulse 4s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
  from {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

#neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  /* canvas is rendered by neural.js with semi-transparent fill,
     so the hero gradient still shows through */
}

.hero h1 {
  color: var(--text-primary);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 2;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #E6E6E6 0%, var(--color-accent-h) 60%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-shimmer 6s ease-in-out infinite;
}

@keyframes text-shimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.hero p {
  font-size: 1.1rem;
  font-weight: 400;
  max-width: 580px;
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
  z-index: 2;
}

/* =====================================================
   CATEGORIES SECTION
   ===================================================== */
.categories-section {
  padding: 3rem 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

@media (max-width: 1100px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

.categories-grid {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Category card — variable reward: visible progress indicator */
.category-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  flex: 1 1 220px;
  max-width: 280px;
  min-width: 220px;
}

/* Bottom accent stripe — progress bar feel */
.category-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-h));
  transition: width var(--transition-slow);
  border-radius: 0 0 2px 2px;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md), var(--glow-sm);
  background: var(--bg-card-hover);
}

.category-card:hover::before {
  width: 100%;
}

.category-card:hover .category-title {
  color: var(--color-accent-h);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  transition: transform var(--transition-normal);
}

.category-card:hover .category-icon {
  transform: scale(1.15) rotate(-5deg);
}

.category-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
  transition: color var(--transition-fast);
  letter-spacing: -0.01em;
}

.category-card p {
  margin-top: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =====================================================
   TOP ARTICLES (MAIS LIDOS)
   ===================================================== */
.top-articles-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
}

.top-articles-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.top-article-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.top-article-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: rgba(108, 140, 255, 0.06);
  transition: width var(--transition-slow);
}

.top-article-card:hover {
  transform: translateX(4px);
  border-color: var(--border-accent);
  box-shadow: var(--glow-sm);
}

.top-article-card:hover::before {
  width: 100%;
}

.top-article-rank {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: rgba(108, 140, 255, 0.08);
  position: relative;
  z-index: 1;
}

.top-article-card:nth-child(1) .top-article-rank {
  color: #FFD700;
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.08);
}

.top-article-card:nth-child(2) .top-article-rank {
  color: #C0C0C0;
  border-color: rgba(192, 192, 192, 0.3);
  background: rgba(192, 192, 192, 0.06);
}

.top-article-card:nth-child(3) .top-article-rank {
  color: #CD7F32;
  border-color: rgba(205, 127, 50, 0.3);
  background: rgba(205, 127, 50, 0.06);
}

.top-article-image {
  width: 80px;
  height: 55px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  transition: all var(--transition-normal);
  position: relative;
  z-index: 1;
}

.top-article-card:hover .top-article-image {
  border-color: var(--border-accent);
  transform: scale(1.04);
}

.top-article-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.top-article-info h3 {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-article-views {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .top-article-image {
    width: 60px;
    height: 42px;
  }

  .top-article-info h3 {
    font-size: 0.82rem;
  }

  .top-article-rank {
    font-size: 0.78rem;
    min-width: 28px;
    height: 28px;
  }
}

/* =====================================================
   FOOTER
   ===================================================== */
.main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-section h3,
.footer-section h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.footer-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-section ul li a::before {
  content: '›';
  color: var(--color-accent);
  font-weight: 700;
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--transition-fast);
}

.footer-section ul li a:hover {
  color: var(--color-accent-h);
  padding-left: 0;
  transform: translateX(4px);
}

.footer-section ul li a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-secondary);
}

.footer-bottom a:hover {
  color: var(--color-accent-h);
}

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border: 1px solid;
}

.alert-success {
  background: rgba(74, 222, 128, 0.08);
  color: var(--color-success);
  border-color: rgba(74, 222, 128, 0.25);
}

.alert-danger {
  background: rgba(248, 113, 113, 0.08);
  color: var(--color-danger);
  border-color: rgba(248, 113, 113, 0.25);
}

/* =====================================================
   TABLES
   ===================================================== */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

th,
td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.9rem;
}

th {
  background: var(--bg-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  color: var(--text-secondary);
}

tr:hover {
  background: rgba(108, 140, 255, 0.03);
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-container {
  max-width: 400px;
  margin: 4rem auto;
}

/* =====================================================
   ERROR PAGES
   ===================================================== */
.error-page {
  text-align: center;
  padding: 5rem 1rem;
}

.error-code {
  font-family: var(--font-heading);
  font-size: 6rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-h));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: error-float 3s ease-in-out infinite;
}

@keyframes error-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* =====================================================
   DASHBOARD STATS
   ===================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* =====================================================
   CTA BOX
   ===================================================== */
.cta-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(108, 140, 255, 0.06) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin: 2.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Animated top border */
.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), var(--color-accent-h), transparent);
  animation: scan-line 3s linear infinite;
}

@keyframes scan-line {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

.cta-box h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: #fff;
  padding: 0.8rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  transition: all var(--transition-normal);
  text-decoration: none;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-accent);
  background: var(--color-accent-h);
  border-color: var(--color-accent-h);
  color: #fff;
}

/* =====================================================
   PAGE SINGLE & SHARING
   ===================================================== */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.25;
}

.page-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(108, 140, 255, 0.1);
  color: var(--color-accent);
  padding: 0.2rem 0.7rem;
  border: 1px solid rgba(108, 140, 255, 0.25);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.breadcrumbs {
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.breadcrumbs a {
  color: var(--color-accent);
}

.breadcrumbs a:hover {
  color: var(--color-accent-h);
}

.breadcrumbs span {
  margin: 0 0.1rem;
}

.share-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.share-buttons .btn span {
  margin-right: 4px;
}

.related-pages {
  margin-top: 3rem;
}

/* =====================================================
   PAGE CARDS / ARTICLES GRID
   ===================================================== */
.latest-pages-section {
  padding: 3rem 0;
}

.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Article card — scarcity/curiosity gap to drive clicks */
.page-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition-normal);
  position: relative;
}

/* Spotlight glow on hover — simulates "discovering" reward */
.page-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(108, 140, 255, 0.07) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.page-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md), var(--glow-sm);
}

.page-card:hover::after {
  opacity: 1;
}

.page-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-slow);
  filter: brightness(0.9);
}

.page-card:hover .page-card-image {
  filter: brightness(1);
  transform: scale(1.03);
}

.page-card-content {
  padding: 1.25rem;
}

.page-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin: 0.5rem 0;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: -0.01em;
  transition: color var(--transition-fast);
}

.page-card:hover h3 {
  color: var(--color-accent-h);
}

.excerpt {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =====================================================
   SECTION TITLES
   ===================================================== */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

/* Underline accent */
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-h));
  border-radius: 2px;
  margin: 0.5rem auto 0;
}

/* =====================================================
   ARTICLE CONTENT
   ===================================================== */
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.page-content h2 {
  font-size: 1.4rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.page-content h3 {
  font-size: 1.15rem;
  color: var(--color-accent-h);
}

.page-content h4 {
  font-size: 1rem;
}

.page-content h5 {
  font-size: 0.95rem;
}

.page-content h6 {
  font-size: 0.9rem;
}

.page-content p {
  margin-bottom: 1rem;
  font-family: var(--font-body);
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 1rem;
}

.page-content ul,
.page-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.page-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
  font-size: 0.97rem;
}

.page-content a {
  color: var(--color-accent);
  border-bottom: 1px solid rgba(108, 140, 255, 0.3);
  transition: all var(--transition-fast);
}

.page-content a:hover {
  color: var(--color-accent-h);
  border-bottom-color: var(--color-accent-h);
}

.page-content img {
  max-width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.page-content code {
  background: var(--bg-muted);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-family: 'Fira Code', monospace;
  color: var(--color-accent);
  font-size: 0.88em;
  border: 1px solid var(--border-color);
}

.page-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.page-content pre code {
  background: none;
  padding: 0;
  color: var(--color-accent-h);
  border: none;
}

.page-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
  background: rgba(108, 140, 255, 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.page-content table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
}

.page-content table th,
.page-content table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
}

.page-content table th {
  background: var(--bg-muted);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding: 2rem 0;
  flex-wrap: wrap;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.pagination-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.pagination-num:hover {
  background: rgba(108, 140, 255, 0.08);
  border-color: var(--border-accent);
  color: var(--color-accent);
}

.pagination-num.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  cursor: default;
  box-shadow: var(--glow-sm);
}

.pagination-dots {
  color: var(--text-muted);
  padding: 0 0.25rem;
  user-select: none;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.pagination-btn:hover {
  border-color: var(--border-accent);
  color: var(--color-accent);
  background: rgba(108, 140, 255, 0.06);
}

@media (max-width: 600px) {
  .pagination {
    gap: 0.3rem;
  }

  .pagination-num {
    min-width: 36px;
    height: 36px;
    font-size: 0.82rem;
  }

  .pagination-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
  }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    padding: 0.75rem;
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    width: 100%;
    justify-content: flex-start;
    border-radius: var(--radius);
  }

  .nav-links a:hover {
    background: rgba(108, 140, 255, 0.08);
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .categories-grid {
    justify-content: center;
  }

  .category-card {
    max-width: 100%;
    width: 100%;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .pages-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   FAVORITES SYSTEM
   ===================================================== */
.btn-favorite {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-accent);
  background: rgba(108, 140, 255, 0.1);
  color: var(--color-accent);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
  backdrop-filter: blur(8px);
}

.btn-favorite:hover {
  transform: scale(1.15);
  background: rgba(108, 140, 255, 0.2);
  box-shadow: var(--glow-sm);
}

.btn-favorite:active {
  transform: scale(0.95);
}

#favorites-counter {
  color: var(--color-accent);
  font-weight: 600;
  margin-left: 0.25rem;
}

/* =====================================================
   ADMIN STYLES — PRESERVED AS-IS (do not modify)
   ===================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 280px;
  background: #050508;
  color: #e0e0ff;
  padding: 2rem;
  border-right: 2px solid #00f0ff;
  box-shadow: 5px 0 20px rgba(0, 240, 255, 0.2);
}

.admin-content {
  flex: 1;
  padding: 2rem;
  background: #0a0a0f;
}

.admin-header {
  background: #1a1a2e;
  border-bottom: 2px solid #00f0ff;
  padding: 1rem 0;
  box-shadow: 0 5px 20px rgba(0, 240, 255, 0.2);
}

.admin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-nav a {
  font-weight: 600;
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid #00f0ff;
  background: rgba(0, 240, 255, 0.1);
  transition: all 0.15s ease;
  color: #00f0ff;
}

.admin-nav a:hover {
  background: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
}

.admin-nav a:first-child {
  margin-left: 0;
}

.admin-form-container {
  padding-top: 2rem;
  padding-bottom: 3rem;
  max-width: 900px;
}

.admin-form {
  background: #1a1a2e;
  padding: 2rem;
  border: 2px solid #00f0ff;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.admin-form .form-control {
  background: white;
  color: #222;
  border: 2px solid #00f0ff;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  border-radius: 0;
}

.admin-form select.form-control,
.admin-form select.form-control option {
  color: #222;
  background: white;
}

.admin-form label {
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  color: #00f0ff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.note-editor {
  margin-bottom: 20px;
  background: white !important;
  color: #222 !important;
  border: 2px solid #00f0ff !important;
}

.note-editor.note-frame {
  border: 2px solid #00f0ff !important;
}

.note-editable {
  background: white !important;
  color: #222 !important;
}

.note-editable * {
  color: #222 !important;
}

.note-editable h1,
.note-editable h2,
.note-editable h3,
.note-editable h4,
.note-editable h5,
.note-editable h6 {
  color: #111 !important;
  text-shadow: none !important;
}

.note-toolbar {
  background: #f5f5f5 !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3) !important;
}

.note-statusbar {
  background: #f5f5f5 !important;
  border-top: 1px solid rgba(0, 240, 255, 0.3) !important;
}

.current-thumbnail {
  max-width: 200px;
  margin-top: 10px;
  border: 2px solid #00f0ff;
  padding: 4px;
  background: #050508;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.thumbnail-preview-container {
  margin-top: 10px;
  background: rgba(0, 240, 255, 0.05);
  padding: 10px;
  border: 1px solid #00f0ff;
}

.remove-thumbnail-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: #ff0055;
  font-weight: 700;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #00f0ff;
  }
}

/* =====================================================
   AUTO INTERNAL LINKS
   ===================================================== */
.internal-link {
  color: var(--color-accent-h) !important;
  border-bottom: 1px dashed rgba(143, 168, 255, 0.5);
  font-weight: 600;
  transition: all var(--transition-fast);
  padding: 0 2px;
  border-radius: 2px;
}

.internal-link:hover {
  color: var(--color-accent-h) !important;
  border-bottom-color: var(--color-accent-h);
  background: rgba(108, 140, 255, 0.1);
  text-decoration: none;
}

/* =====================================================
   STICKY AD BAR — updated colors
   ===================================================== */
.sticky-ad-label {
  color: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
}