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

:root {
  --bg: #09090b;
  --card: #141417;
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --text-secondary: #d4d4d8;
  --muted: #a1a1aa;
  --border: #27272a;
  --accent: #f4f4f5;
  --tag-bg: rgba(255, 255, 255, 0.07);
  --tag-text: #e4e4e7;
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

header {
  padding: 2.5rem 1.5rem 1rem;
  text-align: center;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.tagline {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.2rem;
  font-weight: 400;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- Cards --- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--card-border);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-header h2,
.section-header h3 {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* --- Location Badge --- */

.location-badge {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--tag-bg);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  letter-spacing: 0.04em;
}

/* --- Section Groups --- */

.section-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.group-title {
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding-left: 0.15rem;
}

.col-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.col-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

/* --- Shower Thought (slim) --- */

.shower-thought-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shower-thought-card blockquote {
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  font-style: italic;
  color: var(--text);
}

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

.shower-thought-card cite {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-style: normal;
}

.shower-thought-card cite a {
  color: var(--text-secondary);
  text-decoration: none;
}

.shower-thought-card cite a:hover {
  color: var(--text);
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.15s ease;
  padding: 0.15rem;
  line-height: 1;
}

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

/* --- Trending Grid (Twitter tags) --- */

.trending-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.trend-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--tag-bg);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  text-decoration: none;
  color: var(--tag-text);
  font-size: 0.75rem;
  font-weight: 500;
  transition: background 0.15s ease;
}

.trend-tag:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* --- Toggle Pills (shared) --- */

.time-toggle,
.day-toggle {
  display: flex;
  gap: 1px;
  background: var(--tag-bg);
  border-radius: 6px;
  padding: 2px;
}

.time-btn,
.day-btn {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 0.6rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s ease;
  font-family: inherit;
}

.time-btn:hover,
.day-btn:hover {
  color: var(--text-secondary);
}

.time-btn.active,
.day-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* --- Feed List --- */

.feed-list {
  display: flex;
  flex-direction: column;
}

.feed-item {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--card-border);
}

.feed-item:first-child {
  padding-top: 0;
}

.feed-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.feed-item-ranked {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.feed-rank {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  min-width: 1rem;
  padding-top: 0.1rem;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.feed-title {
  font-size: 0.8rem;
  font-weight: 450;
  line-height: 1.45;
  color: var(--tag-text);
  text-decoration: none;
  display: block;
}

.feed-title:hover {
  color: var(--text);
}

.feed-meta {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.1rem;
  line-height: 1.4;
}

.feed-meta a {
  color: var(--muted);
  text-decoration: none;
}

.feed-meta a:hover {
  color: var(--text-secondary);
}

.traffic {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 400;
}

/* --- Product Hunt Items --- */

.ph-item {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.ph-rank {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  min-width: 0.9rem;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.ph-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--tag-bg);
}

.ph-logo-placeholder {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
}

.ph-info {
  flex: 1;
  min-width: 0;
}

.ph-info .feed-title {
  font-size: 0.8rem;
}

.ph-info .feed-meta {
  font-size: 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Tracking Section --- */

.track-keywords {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.kw-tag {
  font-size: 0.58rem;
  font-weight: 500;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}

.tracking-item {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.source-badge {
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 0.12rem;
}

.source-twitter {
  background: rgba(59, 130, 246, 0.15);
  color: #93bbfd;
}

.source-reddit {
  background: rgba(249, 115, 22, 0.15);
  color: #fdba74;
}

.source-hackernews {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

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

.tracking-text {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.1rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.highlight {
  background: rgba(250, 204, 21, 0.15);
  color: #fde047;
  padding: 0 0.15rem;
  border-radius: 2px;
}

/* --- Loading / Error --- */

.loading {
  color: var(--muted);
  font-size: 0.75rem;
  padding: 1.25rem 0;
  text-align: center;
}

.error {
  color: #ef4444;
  font-size: 0.75rem;
  padding: 0.5rem 0;
  text-align: center;
}

.empty-state {
  color: var(--muted);
  font-size: 0.75rem;
  padding: 1.25rem 0;
  text-align: center;
}

/* --- Footer --- */

footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.65rem;
  color: var(--muted);
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .col-3 {
    grid-template-columns: 1fr;
  }

  .col-2 {
    grid-template-columns: 1fr;
  }

  main {
    padding: 0 0.75rem 3rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 1.5rem 1rem 0.75rem;
  }

  header h1 {
    font-size: 1.1rem;
  }

  .card {
    padding: 1rem;
    border-radius: 10px;
  }

  .shower-thought-card {
    padding: 0.85rem 1rem;
  }

  .shower-thought-card blockquote {
    font-size: 0.8rem;
  }
}
