/* ==========================================================================
   NEWS.F.ORG - Authentic Modern Web Design System
   Parent Reference: f.org ("IN CODE WE TRUST" / FinTech Labs)
   ========================================================================== */

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

:root {
  /* Color Palette - Dark Obsidian Cyberpunk Default */
  --bg-dark: #070A0F;
  --bg-surface: #0E131F;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(28, 38, 60, 0.85);
  --bg-glass: rgba(15, 20, 32, 0.65);
  
  --border-color: rgba(255, 255, 255, 0.09);
  --border-glow: rgba(0, 240, 255, 0.3);

  --accent-cyan: #00F0FF;
  --accent-emerald: #00FFA3;
  --accent-purple: #A855F7;
  --accent-amber: #FFB800;
  --accent-rose: #FF3366;

  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --text-subtle: #6B7280;

  --font-head: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.15);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables Override */
[data-theme="light"] {
  --bg-dark: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.75);
  
  --border-color: rgba(0, 0, 0, 0.1);
  --border-glow: rgba(0, 160, 255, 0.4);

  --accent-cyan: #0077FF;
  --accent-emerald: #059669;
  --accent-purple: #7C3AED;
  --accent-amber: #D97706;

  --text-main: #0F172A;
  --text-muted: #475569;
  --text-subtle: #94A3B8;

  --shadow-glow: 0 10px 30px rgba(0, 119, 255, 0.08);
}

/* Reset & Global Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* Ambient Background Glow */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, rgba(0, 255, 163, 0.03) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
  outline: none;
  border: none;
  background: none;
}

/* Utility Layout Classes */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.badge-emerald {
  background: rgba(0, 255, 163, 0.1);
  color: var(--accent-emerald);
  border-color: rgba(0, 255, 163, 0.25);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent-purple);
  border-color: rgba(168, 85, 247, 0.25);
}

.badge-amber {
  background: rgba(255, 184, 0, 0.1);
  color: var(--accent-amber);
  border-color: rgba(255, 184, 0, 0.25);
}

/* ==========================================================================
   Header & Top Bar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-logo .domain-tag {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.parent-ref {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border-color);
}

.parent-ref a {
  color: var(--text-muted);
  transition: var(--transition);
}
.parent-ref a:hover {
  color: var(--accent-cyan);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Header Controls & Search */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 220px;
  padding: 0.45rem 0.85rem 0.45rem 2.2rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.85rem;
  transition: var(--transition);
}

.search-input:focus {
  width: 280px;
  border-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.05);
  box-shadow: var(--shadow-glow);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-subtle);
  pointer-events: none;
  font-size: 0.9rem;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
}

/* Category Navigation Bar */
.nav-categories {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0 0.85rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-categories::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.3);
  font-weight: 600;
}

/* ==========================================================================
   Live Ticker Bar (Running Market/Breaking News Marquee)
   ========================================================================== */
.ticker-container {
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  height: 38px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.ticker-label {
  background: var(--accent-cyan);
  color: #000;
  font-weight: 700;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  z-index: 2;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  white-space: nowrap;
  animation: marquee 35s linear infinite;
}

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

.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.ticker-item .val {
  color: var(--accent-emerald);
  font-weight: 600;
}
.ticker-item .val.down {
  color: var(--accent-rose);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Hero Featured Section
   ========================================================================== */
.hero-section {
  padding: 2rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 1.5rem;
}

.featured-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.2rem;
  transition: var(--transition);
}

.featured-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.featured-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
  z-index: 0;
}

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

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 10, 15, 0.1) 0%, rgba(7, 10, 15, 0.95) 85%);
  z-index: 1;
}

.featured-content {
  position: relative;
  z-index: 2;
}

.featured-title {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0.8rem 0 1rem 0;
  color: #FFF;
}

.featured-snippet {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  max-width: 90%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

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

/* Side Trending Section */
.trending-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

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

.box-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: var(--transition);
}

.trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trending-item:hover {
  transform: translateX(4px);
}

.trending-num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-cyan);
  opacity: 0.8;
  min-width: 24px;
}

.trending-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.3rem;
  transition: var(--transition);
}

.trending-item:hover .trending-info h4 {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Main Articles Grid
   ========================================================================== */
.main-section {
  padding: 1.5rem 0 3rem 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-head h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.article-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
}

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

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

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.article-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  color: var(--text-main);
  transition: var(--transition);
}

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

.article-snippet {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
}

.btn-bookmark {
  color: var(--text-subtle);
  transition: var(--transition);
}
.btn-bookmark:hover, .btn-bookmark.bookmarked {
  color: var(--accent-amber);
}

/* ==========================================================================
   PAGE-SPECIFIC COMPONENT STYLES (Sub-pages: category, api-docs, status, about, feed)
   ========================================================================== */

/* Category Header Banner */
.page-hero-banner {
  background: linear-gradient(135deg, rgba(14, 19, 31, 0.9), rgba(18, 24, 38, 0.95));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.page-hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.page-title {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 700px;
}

/* Category Stats Bar */
.category-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-info h4 {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
}

.stat-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* API Docs Endpoint Components */
.api-endpoint-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.api-endpoint-head {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.method-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}
.method-get { background: rgba(0, 255, 163, 0.15); color: var(--accent-emerald); border: 1px solid rgba(0, 255, 163, 0.3); }
.method-post { background: rgba(0, 240, 255, 0.15); color: var(--accent-cyan); border: 1px solid rgba(0, 240, 255, 0.3); }

.endpoint-path {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-left: 0.75rem;
}

.api-endpoint-body {
  padding: 1.5rem;
}

.code-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.code-tab-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.code-tab-btn.active {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent-cyan);
}

.code-snippet-box {
  background: #030508;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #A9B7C6;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* Status Dashboard Grid */
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.status-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
}

.status-value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-emerald);
  margin: 0.5rem 0;
}

.incident-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.incident-item {
  display: flex;
  gap: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent-emerald);
}

/* About Page Manifesto Box */
.manifesto-box {
  background: rgba(0, 240, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin: 2rem 0;
  text-align: center;
}

.manifesto-title {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

/* Authentic Feature 1: Live Wire Terminal Widget */
.terminal-section {
  padding: 2rem 0;
}

.terminal-window {
  background: #030508;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.08);
  font-family: var(--font-mono);
  overflow: hidden;
}

.terminal-header {
  background: #0B0F19;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
  display: flex;
  gap: 0.4rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #FF5F56; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #27C93F; }

.terminal-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-body {
  padding: 1.25rem;
  height: 220px;
  overflow-y: auto;
  font-size: 0.82rem;
  color: #A9B7C6;
  line-height: 1.7;
}

.log-line {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
  animation: fadeIn 0.3s ease;
}

.log-time {
  color: var(--text-subtle);
}
.log-tag {
  color: var(--accent-cyan);
  font-weight: 700;
}
.log-msg {
  color: var(--text-main);
}
.log-msg .highlight {
  color: var(--accent-emerald);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Authentic Feature 2: Developer API & Newsletter */
.api-newsletter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
}

.interactive-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}

.interactive-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.interactive-box h3 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.interactive-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.form-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.88rem;
}

.form-input:focus {
  border-color: var(--accent-cyan);
}

.btn-primary {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-cyan), #00A6FF);
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 240, 255, 0.3);
}

.api-output {
  margin-top: 1rem;
  background: #030508;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px dashed rgba(0, 255, 163, 0.3);
}

/* Full Article Reader Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 2rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  margin: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.reading-progress-bar {
  position: sticky;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  width: 0%;
  z-index: 10;
  transition: width 0.1s ease;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body {
  padding: 2.2rem 2.5rem;
  line-height: 1.8;
}

.modal-article-title {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 1rem 0;
}

.modal-hero-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.article-text-content {
  font-size: 1.05rem;
  color: var(--text-main);
}

.article-text-content p {
  margin-bottom: 1.4rem;
}

.article-text-content blockquote {
  border-left: 3px solid var(--accent-cyan);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 3rem 0 1.5rem 0;
  margin-top: 4rem;
}

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 0.75rem;
  max-width: 320px;
}

.footer-col h5 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: var(--transition);
}
.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #0E131F;
  border: 1px solid var(--accent-cyan);
  color: var(--text-main);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-glow);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .category-stats-bar, .status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .api-newsletter-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .search-input {
    display: none;
  }
  .parent-ref {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .articles-grid, .category-stats-bar, .status-grid {
    grid-template-columns: 1fr;
  }
  .modal-body {
    padding: 1.5rem;
  }
  .modal-article-title {
    font-size: 1.6rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}
