/* ========================================
   voxole - Main Stylesheet
   Modern, clean design with dark/light themes
   ======================================== */

/* --- CSS Variables (Theme System) --- */
:root {
  /* Light Theme (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --border-color: #e2e8f0;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #eff6ff;
  --gradient-start: #3b82f6;
  --gradient-end: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #64748b;
  --border-color: #334155;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-light: #1e3a5f;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.4);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header / Navbar --- */
.navbar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--transition), border-color var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
  padding-left: 8px;
  border-left: 1px solid var(--border-color);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  background: transparent;
}

.nav-links a:visited,
.nav-links a:focus,
.nav-links a:focus-visible {
  background: transparent;
  color: var(--text-secondary);
  outline: none;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-links a.active:focus,
.nav-links a.active:focus-visible {
  background: var(--accent-light);
  color: var(--accent);
  outline: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  padding: 4px;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
  animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5%, 5%); }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 32px;
}

.search-box {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border-radius: 50px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
}

.search-box input {
  flex: 1;
  padding: 14px 24px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  outline: none;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.6);
}

.search-box button {
  padding: 14px 28px;
  border: none;
  background: #fff;
  color: var(--gradient-start);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.search-box button:hover {
  background: var(--accent-light);
}

/* --- Category Pills --- */
.category-nav {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.category-nav .container {
  display: flex;
  gap: 10px;
}

.category-pill {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  padding: 8px 20px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
}

.category-pill:hover,
.category-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Ensure focus never shows active blue when not .active */
.category-pill:focus,
.category-pill:focus-visible {
  outline: none;
  background: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-secondary);
}
.category-pill.active:focus,
.category-pill.active:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Page Header --- */
.page-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* --- Main Content Layout --- */
.main-content {
  padding: 40px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 968px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Article Card --- */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  margin-bottom: 24px;
}

.article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.article-card.featured {
  border-color: var(--accent);
  border-width: 2px;
}

.article-card-body {
  padding: 24px;
}

.article-card .category-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 12px;
  background: var(--accent-light);
  color: var(--accent);
}

.article-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-card h2 a {
  color: var(--text-primary);
  transition: color var(--transition);
}

.article-card h2 a:hover {
  color: var(--accent);
}

.article-card .excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Featured Banner --- */
.featured-banner {
  background: var(--bg-card);
  border: 2px solid;
  border-image: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) 1;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  position: relative;
}

.featured-badge {
  position: absolute;
  top: -1px;
  right: 24px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  padding: 6px 16px;
  border-radius: 0 0 8px 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.featured-banner .category-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 12px;
  background: var(--accent-light);
  color: var(--accent);
}

.featured-banner h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
}

.featured-banner h2 a {
  color: var(--text-primary);
}

.featured-banner .excerpt {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

/* --- Sidebar --- */
.sidebar {
  position: sticky;
  top: 84px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-widget h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list li a {
  color: var(--text-secondary);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-list li a:hover {
  color: var(--accent);
}

/* Ad placeholder in sidebar */
.ad-placeholder-sidebar {
  background: var(--bg-tertiary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* --- Article Detail --- */
.article-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.article-header {
  margin-bottom: 32px;
}

.article-header .category-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 16px;
}

/* Category-specific colors */
.category-tag.cat-ai-frontier { background: #eff6ff; color: #2563eb; }
.category-tag.cat-tech-news { background: #fff7ed; color: #ea580c; }
.category-tag.cat-info-gap { background: #fdf2f8; color: #db2777; }
.category-tag.cat-industry-insight { background: #eef2ff; color: #4f46e5; }
.category-tag.cat-software-tutorial { background: #d1fae5; color: #059669; }

[data-theme="dark"] .category-tag.cat-ai-frontier { background: #1e3a5f; color: #60a5fa; }
[data-theme="dark"] .category-tag.cat-tech-news { background: #3b2f1a; color: #fbbf24; }
[data-theme="dark"] .category-tag.cat-info-gap { background: #3b1a2e; color: #f472b6; }
[data-theme="dark"] .category-tag.cat-industry-insight { background: #1e2240; color: #818cf8; }
[data-theme="dark"] .category-tag.cat-software-tutorial { background: #064e3b; color: #34d399; }

.article-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.article-detail .article-meta {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

/* Article content styling */
.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 24px 0 12px;
}

.article-content p {
  margin-bottom: 16px;
}

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content code {
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.article-content pre {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 20px 0;
}

.article-content pre code {
  background: none;
  padding: 0;
}

/* In-article ad placeholder */
.ad-placeholder-inline {
  background: var(--bg-tertiary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  margin: 32px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Share buttons */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.share-bar span {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.share-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Related articles */
.related-articles {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.related-articles h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all var(--transition);
}

.related-card:hover {
  box-shadow: var(--shadow-md);
}

.related-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.related-card h4 a {
  color: var(--text-primary);
}

.related-card h4 a:hover {
  color: var(--accent);
}

/* --- About / Subscribe Page --- */
.about-section {
  max-width: 800px;
  margin: 0 auto;
}

.about-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 32px 0 16px;
}

.about-section p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

/* Subscribe Cards */
.subscribe-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.subscribe-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
}

.subscribe-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.subscribe-card.featured-plan {
  border-color: var(--accent);
  border-width: 2px;
}

.subscribe-card .plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  padding: 4px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.subscribe-card .plan-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.subscribe-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.subscribe-card .price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
}

.subscribe-card .price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-tertiary);
}

.subscribe-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}

.subscribe-card ul li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.subscribe-card ul li::before {
  content: '✓ ';
  color: var(--success);
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Newsletter form */
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 24px auto;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.95rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}

.newsletter-form input:focus {
  border-color: var(--accent);
}

.newsletter-form button {
  padding: 12px 28px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.newsletter-form button:hover {
  opacity: 0.9;
}

/* Subscribe CTA section */
.subscribe-cta {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  padding: 48px 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 40px 0;
}

.subscribe-cta h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.subscribe-cta p {
  opacity: 0.9;
  margin-bottom: 24px;
}

/* --- Footer --- */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-col p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination button {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.pagination button.active,
.pagination button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Search Results --- */
.search-results-header {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.search-results-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.search-results-header p {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.no-results .icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* --- Toast / Notification --- */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 28px;
  box-shadow: var(--shadow-xl);
  z-index: 2000;
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
}

.toast.success {
  border-color: var(--success);
  color: var(--success);
}

.toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .article-header h1 {
    font-size: 1.6rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .newsletter-form {
    flex-direction: column;
    max-width: 100%;
  }

  .newsletter-form button {
    width: 100%;
  }

  .subscribe-cards {
    grid-template-columns: 1fr;
  }

  .featured-banner {
    padding: 24px;
  }

  .featured-banner h2 {
    font-size: 1.3rem;
  }

  .search-box {
    max-width: 100%;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .search-box input {
    padding: 12px 16px;
  }

  .search-box button {
    padding: 12px 18px;
    font-size: 0.85rem;
  }

  .category-pill {
    padding: 6px 14px;
    font-size: 0.8rem;
  }
}

/* Print styles */
@media print {
  .navbar, .footer, .sidebar, .ad-placeholder-inline,
  .ad-placeholder-sidebar, .share-bar, .theme-toggle {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
