/* ============================================
   AI Today — styles.css
   Dark, professional news site aesthetic
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161e;
  --bg-card-hover: #1c1c28;
  --border: #2a2a3a;
  --border-light: #3a3a4a;

  --text-primary: #f0f0f8;
  --text-secondary: #a0a0b8;
  --text-muted: #606078;

  --accent: #7c6af7;
  --accent-glow: rgba(124, 106, 247, 0.15);
  --accent-hover: #9580ff;

  --breaking-red: #ff4d4d;
  --breaking-red-bg: rgba(255, 77, 77, 0.08);

  --tag-model: #3b82f6;
  --tag-model-bg: rgba(59, 130, 246, 0.12);
  --tag-business: #10b981;
  --tag-business-bg: rgba(16, 185, 129, 0.12);
  --tag-policy: #f59e0b;
  --tag-policy-bg: rgba(245, 158, 11, 0.12);
  --tag-research: #a855f7;
  --tag-research-bg: rgba(168, 85, 247, 0.12);
  --tag-tool: #06b6d4;
  --tag-tool-bg: rgba(6, 182, 212, 0.12);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }

/* CONTAINER */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.logo-icon { font-size: 1.4rem; }
.logo-text { color: var(--text-primary); }
.logo-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--accent);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav a:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--accent) !important;
  color: white !important;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; }

.date-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 6px 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.date-bar .container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.separator { opacity: 0.4; }
.edition-label { font-weight: 500; color: var(--text-secondary); }
.story-count { color: var(--accent); font-weight: 500; }

/* ============================================
   BREAKING SECTION
   ============================================ */
.breaking-section {
  padding: 48px 0 56px;
  background: linear-gradient(180deg, rgba(255,77,77,0.04) 0%, transparent 60%);
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: 28px;
}

.breaking-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--breaking-red);
  background: var(--breaking-red-bg);
  border: 1px solid rgba(255, 77, 77, 0.2);
  padding: 5px 12px;
  border-radius: 100px;
  text-transform: uppercase;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--breaking-red);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.breaking-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  align-items: start;
}

.breaking-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* BREAKING CARDS */
.breaking-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.15s;
}
.breaking-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.breaking-card--featured {
  border-left: 3px solid var(--breaking-red);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255,77,77,0.03) 100%);
}

.breaking-card--side {
  padding: 20px;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.card-headline {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.breaking-card--side .card-headline {
  font-size: 1.05rem;
}

.card-summary {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-source {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.card-link {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================
   TOP STORIES SECTION
   ============================================ */
.stories-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 32px;
}

.stories-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

/* STORY ITEMS */
.story-item {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.story-item:last-child { border-bottom: none; }
.story-item:hover { background: rgba(255,255,255,0.01); }

.story-rank {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}
.story-item[data-rank="1"] .story-rank,
.story-item[data-rank="2"] .story-rank,
.story-item[data-rank="3"] .story-rank {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.story-content { flex: 1; min-width: 0; }

.story-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.story-headline {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.story-headline:hover { color: var(--accent); }

.story-summary {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 10px;
}

.story-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.story-source {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.story-link {
  font-size: 0.75rem;
  font-weight: 600;
}

/* ============================================
   TAGS
   ============================================ */
.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.tag--model { background: var(--tag-model-bg); color: var(--tag-model); }
.tag--business { background: var(--tag-business-bg); color: var(--tag-business); }
.tag--policy { background: var(--tag-policy-bg); color: var(--tag-policy); }
.tag--research { background: var(--tag-research-bg); color: var(--tag-research); }
.tag--tool { background: var(--tag-tool-bg); color: var(--tag-tool); }
.tag--hot { background: rgba(255,100,0,0.12); color: #ff8533; }

/* ============================================
   SIDEBAR
   ============================================ */
.stories-sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.widget-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.landscape-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.landscape-item:last-child { border-bottom: none; }
.landscape-label { font-size: 0.75rem; color: var(--text-muted); }
.landscape-value { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); text-align: right; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

.source-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.source-list a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.source-list a:hover { color: var(--accent); }

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
}

.newsletter-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.newsletter-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 28px;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.newsletter-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-input::placeholder { color: var(--text-muted); }
.newsletter-input:focus { border-color: var(--accent); }

.newsletter-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.newsletter-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.newsletter-btn:active { transform: translateY(0); }

.newsletter-fine-print {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.about-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.about-logo {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.about-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.about-text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.about-text:last-child { margin-bottom: 0; }

.about-beta-note {
  font-size: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: inline-block;
  margin-top: 8px;
  color: var(--text-muted) !important;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-secondary);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-logo {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary);
}
.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-right {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.footer-right strong { color: var(--accent); }

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  z-index: 999;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .breaking-grid {
    grid-template-columns: 1fr;
  }
  .breaking-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .stories-layout {
    grid-template-columns: 1fr;
  }
  .stories-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 12px; height: auto; padding: 12px 0; }
  .nav { gap: 16px; font-size: 0.8rem; }
  .nav-cta { display: none; }
  .breaking-side { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-btn { width: 100%; }
  .stories-sidebar { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .footer-left { flex-direction: column; gap: 4px; }
  .card-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
  .story-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
}
