/* ============================================================
   ALYRIAZ — Styles principaux
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:        #04040C;
  --surface:   #0A0A1A;
  --surface2:  #0F0F24;
  --accent:    #7C3AED;
  --accent2:   #06B6D4;
  --green:     #059669;
  --red:       #DC2626;
  --amber:     #F59E0B;
  --text:      #F1F5F9;
  --muted:     #64748B;
  --border:    rgba(124, 58, 237, 0.18);
  --glow:      rgba(124, 58, 237, 0.35);
  --radius:    12px;
  --radius-lg: 20px;
  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --nav-h:     64px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }

.mono { font-family: var(--font-mono); }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ── Navbar ─────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  z-index: 1000;
  transition: background 0.3s, backdrop-filter 0.3s, border-bottom 0.3s;
}
#navbar.scrolled {
  background: rgba(4, 4, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-logo span { color: var(--accent); -webkit-text-fill-color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent2);
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.nav-cta:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.65;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, transparent 30%, var(--bg) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
  padding: 0 clamp(16px, 4vw, 32px);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 100px;
  background: rgba(6, 182, 212, 0.07);
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent2);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
}
.hero-title .line-accent {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 14px 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: all 0.25s;
  box-shadow: 0 4px 30px rgba(124, 58, 237, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(124, 58, 237, 0.55);
}

.btn-ghost {
  padding: 14px 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.08);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2.5s ease infinite;
}
.hero-scroll::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Stats bar ──────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.stat-item {
  padding: 24px;
  text-align: center;
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: var(--surface2); }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Main layout ────────────────────────────────────────────── */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.section {
  padding: 80px 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-title span {
  color: var(--text);
  margin-left: 8px;
}
.section-link {
  font-size: 0.82rem;
  color: var(--accent2);
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
}
.section-link:hover { opacity: 0.7; }

/* ── Category filters & Sorting ───────────────────────────────────────── */
.filters-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sorting {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sorting label {
  color: var(--muted);
  font-size: 0.9rem;
}
.sort-select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

/* ── Featured card ──────────────────────────────────────────── */
#featured-container {
  margin-bottom: 48px;
}

.featured-card:hover {
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.3);
}
.featured-bg {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  transition: opacity 0.3s;
}
.featured-card:hover .featured-bg { opacity: 0.28; }

/* Newspaper diagonal line */
.featured-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), transparent);
  opacity: 0.4;
}

.featured-content {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 4vw, 52px);
  max-width: 680px;
}
.featured-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin: 14px 0 12px;
  letter-spacing: -0.02em;
}
.featured-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.featured-excerpt {
  font-size: 0.95rem;
  color: rgba(241, 245, 249, 0.7);
  margin-bottom: 24px;
  line-height: 1.7;
}
.featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent2);
  letter-spacing: 0.02em;
  padding: 10px 0;
  border-bottom: 1px solid rgba(6, 182, 212, 0.3);
  transition: gap 0.2s;
}
.featured-card:hover .featured-cta { gap: 14px; }
.featured-cta .arrow { transition: transform 0.2s; }
.featured-card:hover .featured-cta .arrow { transform: translateX(4px); }

.featured-tags {
  position: absolute;
  bottom: 28px;
  right: 28px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Featured image support ──────────────────────────────────── */
.featured-bg[data-has-img="true"] {
  opacity: 1 !important;
  position: absolute;
  inset: 0;
}

/* ── Article grid ───────────────────────────────────────────── */
#articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Card thumbnail ─────────────────────────────────────────── */
.card-thumb {
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.article-card:hover .card-thumb img { transform: scale(1.04); }
.card-thumb-gradient {
  opacity: 0.5;
}
.article-card.wide .card-thumb { height: 200px; }

.article-card {
  display: block;
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.3s,
              box-shadow 0.35s;
  will-change: transform;
  opacity: 0;
  transform: translateY(20px);
}
.article-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease,
              border-color 0.3s, box-shadow 0.35s,
              filter 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.article-card:hover {
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2);
}

.article-card.wide {
  grid-column: span 2;
}

.card-accent-line {
  height: 3px;
  width: 100%;
}
.card-body {
  padding: 24px;
}
.card-title {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  margin: 10px 0 10px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.card-excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-gradient-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.article-card:hover .card-gradient-overlay { opacity: 0.08; }

/* ── Category badge ─────────────────────────────────────────── */
.category-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--cat-color) 15%, transparent);
  color: var(--cat-color);
  border: 1px solid color-mix(in srgb, var(--cat-color) 30%, transparent);
}

/* ── Article meta ───────────────────────────────────────────── */
.article-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.meta-sep { opacity: 0.5; }
.meta-author { font-weight: 600; color: rgba(241, 245, 249, 0.6); }

/* ── Tags ───────────────────────────────────────────────────── */
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.04em;
}

/* ── Ticker ─────────────────────────────────────────────────── */
.ticker-wrap {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  overflow: hidden;
  position: relative;
}
.ticker-wrap::before,
.ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
}
.ticker-wrap::before { left: 0;  background: linear-gradient(to right, var(--surface), transparent); }
.ticker-wrap::after  { right: 0; background: linear-gradient(to left,  var(--surface), transparent); }

.ticker-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 24px;
  position: relative;
  z-index: 3;
  background: var(--surface);
  white-space: nowrap;
}

.ticker-track {
  display: flex;
  gap: 48px;
  animation: ticker 25s linear infinite;
  white-space: nowrap;
}
.ticker-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ticker-item::before {
  content: '//';
  color: var(--accent);
  opacity: 0.5;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 48px clamp(16px, 4vw, 48px);
  margin-top: 80px;
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 12px;
  max-width: 280px;
  line-height: 1.7;
}
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.875rem; color: rgba(241, 245, 249, 0.55); transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Publicités ─────────────────────────────────────────────── */
.ad-slot {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 40px 0;
}
.ad-slot-banner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 90px;
  border: 1px dashed rgba(100, 116, 139, 0.3);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(100, 116, 139, 0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.015);
}

/* ── Nav actions ────────────────────────────────────────────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-area {
  display: flex;
  align-items: center;
}

/* ── User avatar dropdown ──────────────────────────────────── */
.user-avatar-wrap {
  position: relative;
  cursor: pointer;
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
  object-fit: cover;
}
.user-avatar:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--glow);
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 2000;
}
.user-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.user-dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.user-dropdown-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.user-dropdown-email {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
}
.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font-body);
  text-align: left;
}
.user-dropdown-item:hover {
  background: rgba(124, 58, 237, 0.1);
}
.user-dropdown-logout {
  color: #F87171;
}

/* ── Google Sign-In Button ─────────────────────────────────── */
.google-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Card social bar ───────────────────────────────────────── */
.card-social-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px 12px;
  border-top: 1px solid rgba(124, 58, 237, 0.1);
  position: relative;
  z-index: 5;
}
.featured-card .card-social-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 24px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(to top, rgba(4, 4, 12, 0.6), transparent);
}

/* ── Card link wrapping ────────────────────────────────────── */
.featured-card {
  display: block;
  position: relative;
  min-height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s;
  will-change: transform;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}
.featured-card-link {
  display: block;
  min-height: 420px;
}
.card-link {
  display: block;
}

/* ── Social buttons ────────────────────────────────────────── */
.social-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s;
}
.social-btn:hover {
  background: rgba(124, 58, 237, 0.15);
  color: var(--text);
}
.social-btn.liked {
  color: #F87171;
}
.social-btn.liked:hover {
  background: rgba(248, 113, 113, 0.15);
}
.like-count {
  min-width: 8px;
}

/* ── Article social bar (large) ────────────────────────────── */
.article-social-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.social-btn-lg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.social-btn-lg:hover {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.08);
  color: var(--text);
}
.social-btn-lg.liked {
  color: #F87171;
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.08);
}
.social-btn-lg.liked:hover {
  background: rgba(248, 113, 113, 0.15);
}

/* ── Comments section ──────────────────────────────────────── */
.comments-section {
  margin: 48px 0 64px;
}
.comments-header h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.comments-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  margin-left: 8px;
  vertical-align: middle;
}

/* ── Comment form ──────────────────────────────────────────── */
.comment-form {
  display: flex;
  gap: 14px;
  margin-bottom: 32px;
}
.comment-form-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  object-fit: cover;
}
.comment-form-body {
  flex: 1;
}
.comment-form-body textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 14px 16px;
  line-height: 1.6;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-form-body textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.comment-form-body textarea::placeholder {
  color: var(--muted);
}
.comment-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.comment-char-count {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--muted);
}
.btn-comment-submit {
  padding: 8px 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.3);
}
.btn-comment-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
}

/* ── Comment login prompt ──────────────────────────────────── */
.comment-login-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 32px;
  text-align: center;
}
.comment-login-prompt p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ── Comments list ─────────────────────────────────────────── */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.comment-item {
  display: flex;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(124, 58, 237, 0.08);
  animation: fadeUp 0.3s ease forwards;
}
.comment-item:last-child {
  border-bottom: none;
}
.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
  object-fit: cover;
}
.comment-body {
  flex: 1;
  min-width: 0;
}
.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.comment-author {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}
.comment-date {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--muted);
}
.comment-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
  line-height: 1;
}
.comment-delete:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #F87171;
}
.comment-text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(241, 245, 249, 0.8);
  word-wrap: break-word;
}
.comments-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  border: 1px dashed rgba(100, 116, 139, 0.2);
  border-radius: var(--radius);
}

/* ── Toast notification ────────────────────────────────────── */
#alyriaz-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 28px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
  z-index: 10000;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  white-space: nowrap;
}
#alyriaz-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  #articles-grid { grid-template-columns: repeat(2, 1fr); }
  .article-card.wide { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  #about .section > div[style] {
    grid-template-columns: 1fr !important;
  }
  .article-social-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .social-btn-lg {
    font-size: 0.8rem;
    padding: 8px 14px;
  }
  .comment-form {
    gap: 10px;
  }
  .comment-form-avatar {
    width: 32px;
    height: 32px;
  }
}
@media (max-width: 640px) {
  #articles-grid { grid-template-columns: 1fr; }
  .article-card.wide { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 20px; }
  .nav-links { display: none; }
  .google-signin-btn { transform: scale(0.85); transform-origin: right center; }
  
  .filters-container {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .sorting {
    justify-content: space-between;
  }
  .sort-select {
    flex-grow: 1;
    max-width: 200px;
  }
  .featured-card .card-social-bar {
    position: relative;
    background: var(--surface);
  }
}
