:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-active: #6366f1;
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --accent-primary: #4f46e5;
  --accent-light: #6366f1;
  --accent-glow: rgba(79, 70, 229, 0.14);
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

  --color-up: #dc2626;
  --color-down: #2563eb;
  --color-same: #64748b;
  --color-new: #059669;
  --color-hot: #d97706;

  --font-family: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-card-hover: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 20px 72px 20px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 22px;
}

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

.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-text p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Language Selector */
.lang-selector-wrapper {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-hover);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  border-radius: var(--radius-md);
  padding: 8px;
  min-width: 210px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lang-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-dropdown-header {
  font-size: 11px;
  color: var(--text-dim);
  padding: 4px 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.lang-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.lang-option:hover {
  background: var(--bg-subtle);
}

.lang-option.active {
  background: rgba(79, 70, 229, 0.08);
  color: var(--accent-primary);
  font-weight: 700;
}

.lang-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

.lang-ext-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
  font-size: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.lang-ext-link:hover {
  background: rgba(79, 70, 229, 0.06);
}

/* Suppress Google Translate top bar cleanly */
.goog-te-banner-frame.skiptranslate,
body > .skiptranslate {
  display: none !important;
}
body {
  top: 0 !important;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-muted);
}

.sync-badge strong {
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.45);
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.btn-refresh:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

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

.btn-refresh:disabled {
  opacity: 0.75;
  cursor: wait;
}

.btn-refresh.loading svg {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Info Bar & Quick Stats */
.hero-banner {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-left h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.hero-left p {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.stat-val {
  font-size: 19px;
  font-weight: 800;
  color: var(--accent-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.stat-lbl {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

/* Search Controls */
.controls-bar {
  margin-bottom: 24px;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 0;
}

.btn-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.btn-alert:hover,
.btn-alert[aria-expanded="true"] {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.alert-count-badge {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

.alert-count-badge.has-items {
  background: var(--accent-primary);
  color: #fff;
}

.alert-panel {
  margin-top: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.alert-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.alert-panel-head strong {
  font-size: 14px;
  color: var(--text-main);
}

.alert-panel-head p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-enable-push {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.btn-enable-push:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-enable-push.granted {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.35);
  color: var(--color-new);
}

.alert-input-row {
  display: flex;
  gap: 8px;
}

.alert-input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.alert-input:focus {
  border-color: var(--accent-primary);
}

.btn-add-alert {
  padding: 9px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.alert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.alert-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 600;
}

.alert-tag button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0 2px;
}

.search-input {
  width: 100%;
  padding: 13px 44px 13px 44px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.search-clear-btn.visible {
  display: inline-flex;
}

.search-clear-btn:hover {
  background: var(--border-hover);
  color: var(--text-main);
}

/* Grid layout for Platforms & Trends */
.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: 20px;
}

.grid-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.platform-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.platform-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.platform-icon {
  font-size: 20px;
  line-height: 1;
}

.platform-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.platform-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.platform-tag {
  font-size: 11px;
  background: var(--bg-subtle);
  padding: 3px 9px;
  border-radius: 6px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Trend List */
.trend-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.trend-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: var(--transition);
}

.trend-row:hover {
  background: var(--bg-primary);
  border-color: var(--border-subtle);
}

.trend-row.alert-hit {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(79, 70, 229, 0.25);
}

.trend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 6px 8px 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
  flex: 1;
  min-width: 0;
}

.trend-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 4px;
  flex-shrink: 0;
}

.topic-btn,
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  padding: 3px 5px;
  line-height: 1;
  text-decoration: none;
  opacity: 0.65;
  transition: var(--transition);
}

.trend-row:hover .topic-btn,
.trend-row:hover .like-btn,
.trend-row:hover .copy-btn,
.like-btn.liked {
  opacity: 1;
}

.topic-btn:hover,
.like-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.like-btn.liked {
  color: #e11d48;
  background: rgba(225, 29, 72, 0.08);
}

.like-count {
  font-size: 10.5px;
  font-weight: 700;
}

.trend-item:focus-visible,
.link-card:focus-visible,
.lang-btn:focus-visible,
.btn-refresh:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.trend-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.rank-badge {
  font-size: 12px;
  font-weight: 800;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  flex-shrink: 0;
}

.trend-list li:nth-child(1) .rank-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}
.trend-list li:nth-child(2) .rank-badge {
  background: linear-gradient(135deg, #64748b, #475569);
  color: #fff;
}
.trend-list li:nth-child(3) .rank-badge {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
}

.trend-keyword {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.trend-item:hover .trend-keyword {
  color: var(--accent-primary);
}

.trend-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.traffic-pill {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.state-up {
  color: var(--color-up);
  background: rgba(220, 38, 38, 0.08);
}
.state-down {
  color: var(--color-down);
  background: rgba(37, 99, 235, 0.08);
}
.state-new {
  color: var(--color-new);
  background: rgba(5, 150, 105, 0.09);
}
.state-hot {
  color: var(--color-hot);
  background: rgba(217, 119, 6, 0.1);
}
.state-same {
  color: var(--color-same);
}

.copy-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  padding: 3px 5px;
  line-height: 1;
  opacity: 0.65;
  transition: var(--transition);
}

.trend-item:hover .copy-btn,
.copy-btn:focus-visible {
  opacity: 1;
}

.copy-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

/* Quick Copy Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.25s ease;
  z-index: 1000;
}
.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Sources & Media Hub Sections */
.sources-card {
  margin-top: 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.media-hub-card {
  margin-top: 36px;
  border-color: rgba(124, 58, 237, 0.22);
}

.sources-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.sources-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--accent-primary);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.media-badge {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.22);
}

.sources-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.sources-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.source-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: var(--transition);
  text-decoration: none;
}

.source-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-subtle);
}

.link-card {
  cursor: pointer;
}

.link-card:hover {
  transform: translateY(-2px);
  background: var(--bg-secondary);
  border-color: #7c3aed;
  box-shadow: var(--shadow-card-hover);
}

.source-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.source-item h4 {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--text-main);
}

.source-item p {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.sources-disclaimer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.65;
}

/* AI Briefing & FAQ */
.briefing-summary {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

.briefing-summary strong {
  color: var(--text-main);
}

.briefing-summary a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}

.briefing-summary a:hover {
  text-decoration: underline;
}

.briefing-highlights {
  list-style: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.briefing-highlights li {
  font-size: 13px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.briefing-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  background: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  background: var(--bg-secondary);
}

.faq-item summary {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.faq-item p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.6;
}

.faq-item a {
  color: var(--accent-primary);
  font-weight: 600;
}

/* Footer */
footer {
  margin-top: 44px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 13px;
}

@media (min-width: 1140px) {
  .trends-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .platform-card:nth-child(3n + 1):last-child {
    grid-column: 1 / -1;
  }
  .platform-card:nth-child(3n + 1):last-child .trend-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 16px;
  }
}

@media (min-width: 769px) and (max-width: 1139px) {
  .trends-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .platform-card:nth-child(2n + 1):last-child {
    grid-column: 1 / -1;
  }
  .platform-card:nth-child(2n + 1):last-child .trend-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 16px;
  }
}

@media (max-width: 1024px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 16px 14px 56px 14px;
  }
  .hero-banner {
    padding: 16px;
  }
  .hero-stats {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .stat-item {
    text-align: left;
  }
  .trends-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .platform-card {
    padding: 16px;
  }
  .media-grid {
    grid-template-columns: 1fr;
  }
  .traffic-pill {
    max-width: 68px;
  }
  .controls-row {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-alert {
    justify-content: center;
  }
  .copy-btn,
  .topic-btn,
  .like-btn {
    opacity: 0.85;
  }
}
