:root {
  --news-red: #CC0000;
  --news-red-dark: #990000;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #1a1a1a;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
}

.dark {
  --news-red: #ff4444;
  --news-red-dark: #cc3333;
  --bg-primary: #0d0d0d;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #262626;
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --border-color: #333333;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.3);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.5);
}

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

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s, color 0.3s;
  line-height: 1.6;
}

.font-serif {
  font-family: 'Newsreader', Georgia, serif;
}

.news-red {
  color: var(--news-red);
}

.bg-news-red {
  background-color: var(--news-red);
}

.border-news-red {
  border-color: var(--news-red);
}

/* Breaking news ticker */
@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.ticker-wrap {
  overflow: hidden;
  background: var(--news-red);
}

.ticker {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 45s linear infinite;
}

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

/* Card hover effects */
.article-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

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

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--news-red);
  z-index: 9999;
  transition: width 0.1s;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Skeleton loading */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Search modal */
.search-modal {
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.85);
}

/* Pull quote */
.pull-quote {
  position: relative;
  padding-left: 2rem;
  border-left: 4px solid var(--news-red);
  font-style: italic;
  font-size: 1.25rem;
}

.pull-quote::before {
  content: '"';
  position: absolute;
  left: -0.5rem;
  top: -1rem;
  font-size: 4rem;
  color: var(--news-red);
  opacity: 0.3;
  font-family: Georgia, serif;
}

/* Category badge colors */
.badge-world { background: #0066cc; }
.badge-politics { background: #8b0000; }
.badge-business { background: #006400; }
.badge-technology { background: #4b0082; }
.badge-entertainment { background: #ff6b00; }
.badge-sports { background: #cc6600; }
.badge-health { background: #008080; }
.badge-lifestyle { background: #9932cc; }

/* Mobile menu */
.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Fade in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Sticky sidebar */
.sticky-sidebar {
  position: sticky;
  top: 100px;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--news-red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1000;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--news-red-dark);
}