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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: #fff;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.site-header {
  text-align: center;
  padding: 20px 16px 12px;
}

.logo {
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: #4a4a4a;
  user-select: none;
}

.logo .ai { color: #ccc; }

.subtitle {
  font-size: 12px;
  color: #9aa0a6;
  font-style: italic;
  margin-top: 4px;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.tab {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: #70757a;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.tab.active {
  color: #202124;
  border-bottom-color: #202124;
}

.tab:hover { color: #202124; }

/* ── Topic pills ── */
.topic-bar {
  display: none;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}

.topic-bar.visible {
  display: flex;
}

.topic-pill {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-size: 13px;
  color: #5f6368;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.topic-pill.active {
  background: #202124;
  color: #fff;
  border-color: #202124;
}

.topic-pill:hover:not(.active) {
  background: #f1f3f4;
}

/* Hide scrollbar on topic pills */
.topic-bar::-webkit-scrollbar { display: none; }
.topic-bar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Feed ── */
.feed {
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.empty-state {
  text-align: center;
  color: #ccc;
  font-size: 15px;
  padding: 60px 0;
  font-style: italic;
}

/* ── Thought card ── */
.thought {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  animation: fadeIn 0.3s ease-in;
}

.thought .content {
  font-size: 15px;
  color: #202124;
  line-height: 1.55;
}

.thought .topic-tag {
  display: inline-block;
  font-size: 11px;
  color: #5f6368;
  background: #f1f3f4;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 6px;
}

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

.meta {
  font-size: 12px;
  color: #bbb;
}

/* ── Votes ── */
.votes {
  display: flex;
  gap: 12px;
  align-items: center;
}

.vote-group {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
}

.vote-label {
  color: #bbb;
  font-size: 11px;
  margin-right: 2px;
}

.vote-score {
  font-size: 12px;
  color: #999;
  min-width: 20px;
  text-align: center;
}

.vote-score.positive { color: #34a853; }
.vote-score.negative { color: #ea4335; }

.vote-btn {
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  color: #999;
  cursor: pointer;
  font-size: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.vote-btn:active {
  transform: scale(0.92);
}

.vote-btn.up:active, .vote-btn.up:hover {
  color: #34a853;
  border-color: #34a853;
  background: #e6f4ea;
}

.vote-btn.down:active, .vote-btn.down:hover {
  color: #ea4335;
  border-color: #ea4335;
  background: #fce8e6;
}

/* ── Live dot ── */
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #34a853;
  border-radius: 50%;
  margin-right: 5px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

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

/* ── Footer ── */
footer {
  background: #f8f9fa;
  border-top: 1px solid #e8e8e8;
  padding: 14px 16px;
  text-align: center;
  font-size: 12px;
  color: #9aa0a6;
}

/* ── Desktop ── */
@media (min-width: 768px) {
  .site-header {
    padding: 32px 20px 16px;
  }

  .logo {
    font-size: 48px;
  }

  .subtitle {
    font-size: 14px;
    margin-top: 8px;
  }

  .tab {
    font-size: 15px;
    padding: 14px 0;
  }

  .topic-pill {
    padding: 8px 20px;
    font-size: 14px;
  }

  .vote-btn {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
}
