/* ==============================
   Innovation & Vision — Style
   Premium Dark Tech Glassmorphism
   ============================== */

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

/* ---------- Design Tokens ---------- */
:root {
  /* Background */
  --bg-primary: #050816;
  --bg-secondary: #0a0f1e;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-strong: rgba(255, 255, 255, 0.09);

  /* Accent gradient — Cyan to Purple */
  --accent-start: #06b6d4;
  --accent-mid: #8b5cf6;
  --accent-end: #a855f7;
  --accent-gradient: linear-gradient(135deg, var(--accent-start), var(--accent-mid), var(--accent-end));
  --accent-glow: rgba(6, 182, 212, 0.25);
  --accent-glow-purple: rgba(139, 92, 246, 0.25);

  /* Tech palette */
  --tech-cyan: #22d3ee;
  --tech-purple: #a78bfa;
  --tech-blue: #60a5fa;
  --tech-green: #34d399;
  --tech-pink: #f472b6;
  --tech-amber: #fbbf24;

  /* Rank palette */
  --rank-gold: #fbbf24;
  --rank-silver: #94a3b8;
  --rank-bronze: #d97706;

  /* Text */
  --text-primary: #e2e8f0;
  --text-secondary: rgba(226, 232, 240, 0.65);
  --text-tertiary: rgba(226, 232, 240, 0.38);
  --text-accent: #22d3ee;

  /* Border */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-accent: rgba(6, 182, 212, 0.3);
  --border-purple: rgba(139, 92, 246, 0.3);

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px var(--accent-glow);
  --shadow-glow-purple: 0 0 40px var(--accent-glow-purple);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 600ms;

  /* Typography */
  --font-sans: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Inter', 'Noto Sans KR', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ---------- Background Decoration ---------- */
.bg-decoration {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.12;
  animation: orbFloat 25s ease-in-out infinite;
}

.bg-orb--1 {
  width: 600px;
  height: 600px;
  background: var(--accent-start);
  top: -15%;
  right: -10%;
  animation-delay: 0s;
}

.bg-orb--2 {
  width: 500px;
  height: 500px;
  background: var(--accent-mid);
  bottom: -10%;
  left: -10%;
  animation-delay: -8s;
}

.bg-orb--3 {
  width: 400px;
  height: 400px;
  background: var(--tech-green);
  top: 45%;
  left: 50%;
  animation-delay: -16s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ---------- Grid Lines Overlay ---------- */
.bg-decoration::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black 20%, transparent 100%);
}

/* ---------- Noise Overlay ---------- */
.bg-decoration::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
}

/* ---------- Main Container ---------- */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ---------- Header ---------- */
.site-header {
  text-align: center;
  padding: 60px 0 32px;
  position: relative;
}

.site-header__emoji {
  font-size: 3.2rem;
  display: block;
  margin-bottom: 12px;
  animation: bounceIn 0.8s var(--ease-out) both;
}

.site-header__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
  margin-bottom: 10px;
  animation: fadeSlideUp 0.7s var(--ease-out) 0.1s both;
}

.site-header__subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-secondary);
  animation: fadeSlideUp 0.7s var(--ease-out) 0.2s both;
}

.site-header__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-tertiary);
  backdrop-filter: blur(12px);
  animation: fadeSlideUp 0.7s var(--ease-out) 0.3s both;
}

.site-header__date::before {
  content: '🕐';
  font-size: 0.9rem;
}

/* ---------- Auto-Refresh Bar ---------- */
.refresh-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 5px 14px 5px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
  animation: fadeSlideUp 0.7s var(--ease-out) 0.35s both;
}

.refresh-bar__label {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
}

.refresh-bar__countdown {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  min-width: 38px;
  text-align: center;
  font-family: var(--font-mono);
}

.refresh-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.12);
  color: var(--text-accent);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.refresh-bar__btn:hover {
  background: rgba(6, 182, 212, 0.25);
  transform: rotate(180deg);
  box-shadow: 0 0 12px var(--accent-glow);
}

.refresh-bar__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.refresh-bar__btn.spinning {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ---------- Header Controls (PWA Install & Language) ---------- */
.header-controls {
  position: absolute;
  top: 20px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  animation: fadeSlideUp 0.7s var(--ease-out) 0.35s both;
}

/* Install Button */
.install-btn {
  display: none; /* Controlled by JS dynamically */
  align-items: center;
  gap: 6px;
  background: var(--bg-glass);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: var(--text-accent);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: all var(--duration-fast) var(--ease-out);
  animation: pulseLight 2s infinite;
}

.install-btn:hover {
  background: var(--bg-glass-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.install-btn__icon {
  font-size: 0.95rem;
}

@keyframes pulseLight {
  0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(6, 182, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

.lang-selector {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 6px;
  backdrop-filter: blur(16px);
}

.lang-btn {
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-transform: uppercase;
}

.lang-btn:hover {
  color: var(--text-secondary);
}

.lang-btn.active {
  color: #050816;
  background: var(--accent-gradient);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.lang-divider {
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 300;
  opacity: 0.4;
  user-select: none;
}

/* ---------- Controls Bar ---------- */
.controls-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  animation: fadeSlideUp 0.7s var(--ease-out) 0.4s both;
}

/* Category Tabs (replaces Region Toggle) */
.category-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  backdrop-filter: blur(16px);
}

.category-tabs__btn {
  position: relative;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.category-tabs__btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.category-tabs__btn.active {
  color: #050816;
  background: var(--accent-gradient);
  box-shadow: 0 2px 16px var(--accent-glow);
}

/* Sort Toggle */
.sort-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
  backdrop-filter: blur(16px);
}

.sort-toggle__btn {
  padding: 7px 18px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.sort-toggle__btn:hover {
  color: var(--text-secondary);
}

.sort-toggle__btn.active {
  color: var(--text-primary);
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid var(--border-accent);
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
  animation: fadeSlideUp 0.7s var(--ease-out) 0.5s both;
}

.stat-item {
  text-align: center;
}

.stat-item__value {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-mono);
}

.stat-item__label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- TOP 3 Section ---------- */
.top3-section {
  margin-bottom: 24px;
}

.top3-section__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ---------- Top Card (1st, 2nd, 3rd) ---------- */
.news-card--top {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  backdrop-filter: blur(20px);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  overflow: hidden;
  animation: cardAppear 0.5s var(--ease-out) both;
}

.news-card--top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transition: opacity var(--duration-normal);
}

.news-card--top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 0 30px var(--accent-glow);
}

/* Gold - 1st place */
.news-card--top.rank-1 {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.03));
}

.news-card--top.rank-1::before {
  background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706);
  opacity: 1;
}

/* Silver - 2nd place */
.news-card--top.rank-2 {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.06), rgba(100, 116, 139, 0.02));
}

.news-card--top.rank-2::before {
  background: linear-gradient(90deg, #94a3b8, #cbd5e1, #94a3b8);
  opacity: 1;
}

/* Bronze - 3rd place */
.news-card--top.rank-3 {
  border: 1px solid rgba(217, 119, 6, 0.3);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.06), rgba(180, 83, 9, 0.02));
}

.news-card--top.rank-3::before {
  background: linear-gradient(90deg, #d97706, #b45309, #d97706);
  opacity: 1;
}

.news-card--top__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.news-card--top__rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
  flex-shrink: 0;
}

.news-card--top__rank.rank-1 {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #1a1a2e;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
}

.news-card--top__rank.rank-2 {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  color: #1a1a2e;
  box-shadow: 0 0 12px rgba(148, 163, 184, 0.3);
}

.news-card--top__rank.rank-3 {
  background: linear-gradient(135deg, #d97706, #92400e);
  color: #fef3c7;
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.3);
}

.news-card--top__category {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-accent);
  padding: 3px 10px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
}

.news-card--top__title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card--top:hover .news-card--top__title {
  color: var(--tech-cyan);
}

.news-card--top__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.news-card--top__clicks {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------- News Grid ---------- */
.news-grid {
  display: grid;
  gap: 18px;
}

/* ---------- News Card ---------- */
.news-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  backdrop-filter: blur(20px);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  overflow: hidden;
  animation: cardAppear 0.5s var(--ease-out) both;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.news-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.news-card:hover::before {
  opacity: 1;
}

.news-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.news-card__rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--bg-glass-strong);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.news-card__category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-accent);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Category-specific tag colors */
.news-card__category--science {
  color: var(--tech-cyan);
  border-color: rgba(6, 182, 212, 0.25);
  background: rgba(6, 182, 212, 0.08);
}

.news-card__category--ceo {
  color: var(--tech-purple);
  border-color: rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.08);
}

.news-card__clicks {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
  padding: 3px 10px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
}

.news-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  transition: color var(--duration-fast);
}

.news-card:hover .news-card__title {
  color: var(--tech-cyan);
}

.news-card__summary {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.news-card__footer, .news-card--top__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.news-card__meta, .news-card--top__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.news-card__date {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.news-card__date::before {
  content: '•';
  margin-right: 8px;
  color: var(--text-tertiary);
  opacity: 0.5;
}

.news-card__source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.news-card__source::before {
  content: '📡';
  font-size: 0.8rem;
}

/* ---------- Hashtags ---------- */
.news-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.news-card__tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--tech-cyan);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ---------- Quote Card (CEO Insights) ---------- */
.quote-card {
  position: relative;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(167, 139, 250, 0.03));
  border: 1px solid var(--border-purple);
  border-radius: var(--radius-lg);
  padding: 32px 28px 26px;
  backdrop-filter: blur(20px);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  overflow: hidden;
  animation: cardAppear 0.5s var(--ease-out) both;
}

.quote-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-mid), var(--accent-end), var(--tech-pink));
  opacity: 0.8;
}

.quote-card::after {
  content: '"';
  position: absolute;
  top: 14px;
  right: 24px;
  font-size: 5rem;
  font-family: Georgia, serif;
  line-height: 1;
  color: rgba(139, 92, 246, 0.08);
  pointer-events: none;
}

.quote-card:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.05));
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), var(--shadow-glow-purple);
}

.quote-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.quote-card__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tech-purple);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  letter-spacing: 0.03em;
}

.quote-card__clicks {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
  padding: 3px 10px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
}

.quote-card__quote {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.65;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-left: 18px;
  border-left: 3px solid var(--tech-purple);
  font-style: italic;
  letter-spacing: -0.01em;
}

.quote-card:hover .quote-card__quote {
  color: var(--tech-purple);
}

.quote-card__speaker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.quote-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--accent-mid), var(--accent-end));
  flex-shrink: 0;
  box-shadow: 0 0 16px var(--accent-glow-purple);
}

.quote-card__speaker-info {
  display: flex;
  flex-direction: column;
}

.quote-card__speaker-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.quote-card__speaker-role {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.quote-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quote-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quote-card__source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.quote-card__source::before {
  content: '🗣️';
  font-size: 0.8rem;
}

.quote-card__date {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.quote-card__date::before {
  content: '•';
  margin-right: 8px;
  color: var(--text-tertiary);
  opacity: 0.5;
}

.quote-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ---------- 𝕏 Tweet Card (X Trends Insights) ---------- */
.tweet-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  backdrop-filter: blur(20px);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  overflow: hidden;
  animation: cardAppear 0.5s var(--ease-out) both;
}

.tweet-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #333333, #666666, #999999);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.tweet-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 30px rgba(255, 255, 255, 0.05);
}

.tweet-card:hover::before {
  opacity: 1;
}

.tweet-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tweet-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tweet-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.tweet-card__author-info {
  display: flex;
  flex-direction: column;
}

.tweet-card__name-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tweet-card__author-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tweet-card__badge {
  color: #1d9bf0;
  font-size: 0.85rem;
  font-weight: 700;
}

.tweet-card__author-handle {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.tweet-card__logo {
  font-size: 1.3rem;
  font-weight: 900;
  color: rgba(226, 232, 240, 0.25);
  font-family: var(--font-display);
}

.tweet-card__body {
  margin-bottom: 16px;
}

.tweet-card__text {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.tweet-card__text-hashtag {
  color: var(--tech-cyan);
  font-weight: 600;
  transition: text-shadow var(--duration-fast);
}

.tweet-card:hover .tweet-card__text-hashtag {
  text-shadow: 0 0 8px var(--accent-glow);
}

.tweet-card__footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 14px;
}

.tweet-card__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.tweet-card__action {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
}

.tweet-card__action-icon {
  font-size: 0.95rem;
  line-height: 1;
  transition: transform var(--duration-fast) var(--ease-out);
}

.tweet-card__action--reply:hover {
  color: var(--tech-blue);
  background: rgba(96, 165, 250, 0.1);
}

.tweet-card__action--retweet:hover {
  color: var(--tech-green);
  background: rgba(52, 211, 153, 0.1);
}

.tweet-card__action--retweet.active {
  color: var(--tech-green);
  font-weight: 700;
}

.tweet-card__action--like:hover {
  color: var(--tech-pink);
  background: rgba(244, 114, 182, 0.1);
}

.tweet-card__action--like.active {
  color: var(--tech-pink);
  font-weight: 700;
}

.tweet-card__action--like.active .tweet-card__action-icon {
  animation: heartPulse 0.4s var(--ease-out) forwards;
}

.tweet-card__action--views {
  cursor: default;
}

.tweet-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.tweet-card__date {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.heart-pulse {
  animation: heartPulse 0.4s var(--ease-out) forwards;
}

/* Responsive stats grid for mobile */
@media (max-width: 600px) {
  .stats-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 24px !important;
    justify-items: center;
  }
}

/* ---------- Action Buttons ---------- */
.news-card__share-btn {
  padding: 6px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.news-card__share-btn:hover {
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.news-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.news-card__read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-full);
  color: #050816;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.news-card__read-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
  filter: brightness(1.1);
}

.news-card__read-btn:active {
  transform: translateY(0);
}

/* Card animation stagger */
.news-card:nth-child(1) { animation-delay: 0.05s; }
.news-card:nth-child(2) { animation-delay: 0.12s; }
.news-card:nth-child(3) { animation-delay: 0.19s; }
.news-card:nth-child(4) { animation-delay: 0.26s; }

/* ---------- Click Pulse Animation ---------- */
.click-pulse {
  animation: clickPulse 0.4s var(--ease-out);
}

@keyframes clickPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* ---------- Ad Slot ---------- */
.ad-slot {
  position: relative;
  border: 1px dashed rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.03), rgba(139, 92, 246, 0.01));
  margin: 24px 0;
  overflow: hidden;
}

.ad-slot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(6, 182, 212, 0.015) 10px,
    rgba(6, 182, 212, 0.015) 20px
  );
  pointer-events: none;
}

.ad-slot__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.ad-slot__placeholder {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.25);
  font-weight: 500;
}

.ad-slot__icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  opacity: 0.4;
}

/* ---------- Newsletter Section ---------- */
.newsletter-section {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 48px 36px;
  margin: 48px 0;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), rgba(139, 92, 246, 0.04), rgba(52, 211, 153, 0.03));
  border: 1px solid rgba(6, 182, 212, 0.15);
  backdrop-filter: blur(20px);
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.newsletter-section__emoji {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 14px;
}

.newsletter-section__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.newsletter-section__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-form__input {
  flex: 1;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.newsletter-form__input::placeholder {
  color: var(--text-tertiary);
}

.newsletter-form__input:focus {
  border-color: var(--accent-start);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}

.newsletter-form__btn {
  padding: 14px 28px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-full);
  color: #050816;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.newsletter-form__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.newsletter-form__btn:active {
  transform: translateY(0);
}

.newsletter-section__success {
  display: none;
  font-size: 0.9rem;
  color: var(--tech-green);
  font-weight: 600;
  margin-top: 12px;
  animation: fadeSlideUp 0.5s var(--ease-out);
}

.newsletter-section__success.show {
  display: block;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.empty-state__emoji {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.empty-state__text {
  font-size: 1rem;
  font-weight: 500;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 48px 0 24px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 48px;
}

.site-footer__text {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  line-height: 1.8;
}

.site-footer__heart {
  color: var(--tech-cyan);
  animation: heartBeat 1.5s ease-in-out infinite;
}

/* ---------- Loading Skeleton ---------- */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  backdrop-filter: blur(20px);
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--bg-glass) 25%, var(--bg-glass-strong) 50%, var(--bg-glass) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: shimmer 1.5s ease-in-out infinite;
  margin-bottom: 10px;
}

.skeleton-line--short { width: 40%; }
.skeleton-line--medium { width: 70%; }
.skeleton-line--long { width: 100%; }
.skeleton-line--title { height: 20px; width: 85%; margin-bottom: 14px; }

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 14px 24px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card);
  z-index: 100;
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-out);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Scroll-to-Top Button ---------- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-accent);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(16px);
  color: var(--text-accent);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--duration-normal) var(--ease-out);
  z-index: 50;
}

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

.scroll-top:hover {
  background: var(--accent-gradient);
  color: var(--bg-primary);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

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

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.1);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

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

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .app-container {
    padding: 0 14px 60px;
  }

  .site-header {
    padding: 40px 0 24px;
  }

  .site-header__emoji {
    font-size: 2.4rem;
  }

  .header-controls {
    position: relative;
    top: auto;
    right: auto;
    margin: 12px auto 0;
    justify-content: center;
  }

  .controls-bar {
    gap: 12px;
  }

  .category-tabs__btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .sort-toggle__btn {
    padding: 6px 12px;
    font-size: 0.73rem;
  }

  .stats-bar {
    gap: 20px;
  }

  .stat-item__value {
    font-size: 1.3rem;
  }

  .top3-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .news-card--top {
    padding: 18px 16px;
  }

  .news-card {
    padding: 20px 20px;
    border-radius: var(--radius-md);
  }

  .quote-card {
    padding: 24px 20px 20px;
  }

  .quote-card__quote {
    font-size: 1.02rem;
  }

  .news-card__title {
    font-size: 1.05rem;
  }

  .news-card__summary {
    font-size: 0.87rem;
  }

  .news-card__header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .newsletter-section {
    padding: 32px 20px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form__btn {
    width: 100%;
  }

  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .ad-slot {
    padding: 20px 16px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .top3-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .top3-grid > :nth-child(3) {
    grid-column: 1 / -1;
  }

  .news-card {
    padding: 24px;
  }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--accent-start);
  outline-offset: 2px;
}

/* ---------- Modal (PWA Guide) ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}

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

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 22, 0.85);
  backdrop-filter: blur(8px);
}

.modal__content {
  position: relative;
  width: 90%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-card), 0 0 50px var(--accent-glow);
  backdrop-filter: blur(30px);
  transform: translateY(20px) scale(0.95);
  transition: transform var(--duration-normal) var(--ease-out);
  z-index: 1;
}

.modal.active .modal__content {
  transform: translateY(0) scale(1);
}

.modal__close-btn {
  position: absolute;
  top: 12px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color var(--duration-fast);
}

.modal__close-btn:hover {
  color: var(--text-primary);
}

.modal__header {
  text-align: center;
  margin-bottom: 20px;
}

.modal__emoji {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 6px;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.modal__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 20px;
}

.install-guide {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.guide-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.guide-item__platform {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-accent);
  margin-bottom: 4px;
}

.guide-item__steps {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.guide-item__steps b {
  color: var(--text-primary);
  font-weight: 600;
}

.modal__footer {
  display: flex;
  justify-content: center;
}

.modal__btn {
  padding: 10px 32px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-full);
  color: #050816;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 12px var(--accent-glow);
  transition: all var(--duration-fast) var(--ease-out);
}

.modal__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px var(--accent-glow);
}
