/* CelebSignal - Main Stylesheet */

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

:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --border: #2a2a2d;
  --text: #ffffff;
  --text-muted: #8a8a8e;
  --accent: #f59e0b;
  --purple: #a855f7;
  --blue: #3b82f6;
  --green: #10b981;
  --pink: #ec4899;
  --red: #ef4444;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* HEADER */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 50;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}

.nav-links a:hover { color: var(--text); }

/* LAYOUT */
.page-container {
  display: grid;
  grid-template-columns: 300px 1fr 340px;
  max-width: 1600px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .page-container {
    grid-template-columns: 280px 1fr;
  }
  .right-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-container {
    grid-template-columns: 1fr;
  }
  .profile-sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .site-header {
    padding: 16px 20px;
  }
  .main-content {
    padding: 20px;
  }
}

/* LEFT SIDEBAR */
.profile-sidebar {
  border-right: 1px solid var(--border);
  padding: 32px 24px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.profile-photo-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
}

.profile-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--surface-2);
  background: var(--surface);
}

/* Activity ring around photo */
.activity-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    var(--green) 0deg,
    var(--green) calc(var(--activity, 78) * 3.6deg),
    var(--border) calc(var(--activity, 78) * 3.6deg),
    var(--border) 360deg
  );
  z-index: -1;
}

.activity-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: var(--green);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 12px;
  border: 2px solid var(--bg);
}

.profile-name {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.profile-handle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

/* Tags */
.profile-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.profile-tag {
  padding: 4px 10px;
  background: var(--surface);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* STATIC FACTS - High value permanent info */
.static-facts {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.static-facts-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.static-fact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.static-fact:last-child { border-bottom: none; }

.static-fact-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.static-fact-content {
  flex: 1;
}

.static-fact-label {
  font-size: 11px;
  color: var(--text-muted);
}

.static-fact-value {
  font-size: 14px;
  font-weight: 600;
}

.static-fact-value a {
  color: var(--blue);
  text-decoration: none;
}

/* ACTIVITY METRICS */
.activity-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.metric-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-trend {
  font-size: 11px;
  margin-top: 4px;
}

.metric-trend.up { color: var(--green); }
.metric-trend.down { color: var(--red); }

/* POPULARITY/TREND METER */
.trend-meter {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.trend-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.trend-meter-title {
  font-size: 13px;
  font-weight: 600;
}

.trend-meter-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.trend-bar-container {
  position: relative;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.trend-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--accent), var(--pink));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.trend-bar-markers {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

/* Follow button */
.follow-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #000;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* Share profile button */
.share-profile-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.share-profile-btn:hover { background: var(--surface); }

/* MAIN CONTENT */
.main-content {
  padding: 32px 40px;
  border-right: 1px solid var(--border);
}

/* Timeline header */
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.timeline-title {
  font-size: 20px;
  font-weight: 600;
}

.timeline-filters {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.filter-btn:hover { border-color: var(--text-muted); }
.filter-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* NEWS TIMELINE */
.news-timeline {
  position: relative;
  padding-left: 32px;
}

.news-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

/* Date group */
.date-group {
  margin-bottom: 32px;
}

.date-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
  margin-left: -32px;
  position: relative;
}

.date-label::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50%;
  position: absolute;
  left: -24px;
}

/* NEWS NODE */
.news-node {
  background: var(--surface);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.news-node:hover {
  transform: translateX(4px);
}

/* Node importance indicator */
.node-importance {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.node-importance.high { background: var(--green); }
.node-importance.medium { background: var(--accent); }
.node-importance.low { background: var(--border); }

/* Node type dot on timeline */
.news-node::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}

.news-node.type-sighting::before { background: #60a5fa; }
.news-node.type-event::before { background: #a855f7; }
.news-node.type-rumor::before { background: #f59e0b; }
.news-node.type-confirmed::before { background: #10b981; }
.news-node.type-commentary::before { background: #8a8a8e; }

/* Node header */
.node-header {
  display: flex;
  gap: 14px;
  padding: 18px 18px 14px;
}

.node-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.type-sighting .node-icon { background: rgba(96, 165, 250, 0.15); }
.type-event .node-icon { background: rgba(168, 85, 247, 0.15); }
.type-rumor .node-icon { background: rgba(245, 158, 11, 0.15); }
.type-confirmed .node-icon { background: rgba(16, 185, 129, 0.15); }
.type-commentary .node-icon { background: rgba(138, 138, 142, 0.15); }

.node-main { flex: 1; }

.node-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.node-type-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
}

.type-sighting .node-type-badge { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
.type-event .node-type-badge { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.type-rumor .node-type-badge { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.type-confirmed .node-type-badge { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.type-commentary .node-type-badge { background: rgba(138, 138, 142, 0.2); color: #8a8a8e; }

.node-time {
  font-size: 12px;
  color: var(--text-muted);
}

.node-source {
  font-size: 12px;
  color: var(--text-muted);
}

.node-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

/* Node value score */
.node-value-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  background: var(--surface-2);
  border-radius: 8px;
  min-width: 50px;
}

.node-value-number {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.node-value-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Node body */
.node-body {
  padding: 0 18px 14px;
}

.node-summary {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Node connections */
.node-connections {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.connections-label {
  font-size: 11px;
  color: var(--text-muted);
}

.connection-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.connection-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  background: var(--surface);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: var(--text);
}

.connection-chip:hover { background: var(--border); text-decoration: none; }

.connection-chip img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}

/* Node tags */
.node-tags {
  display: flex;
  gap: 6px;
  padding: 0 18px 14px;
  flex-wrap: wrap;
}

.node-tag {
  padding: 4px 8px;
  background: var(--surface-2);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

/* RIGHT SIDEBAR */
.right-sidebar {
  padding: 32px 24px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 28px;
}

.sidebar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Connections list */
.connections-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.connection-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: var(--text);
}

.connection-item:hover { background: var(--surface-2); text-decoration: none; }

.connection-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}

.connection-item-info { flex: 1; }

.connection-item-name {
  font-size: 13px;
  font-weight: 600;
}

.connection-item-type {
  font-size: 11px;
  color: var(--text-muted);
}

.connection-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}

/* HOMEPAGE STYLES */
.homepage-hero {
  text-align: center;
  padding: 60px 40px 40px;
  border-bottom: 1px solid var(--border);
}

.homepage-hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 12px;
}

.homepage-hero h1 span {
  color: var(--accent);
}

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

.homepage-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 32px;
  border-bottom: 1px solid var(--border);
}

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

.homepage-stat-value {
  font-size: 36px;
  font-weight: 700;
}

.homepage-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.homepage-section {
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.homepage-section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Celeb grid */
.celebs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.celeb-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.celeb-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  text-decoration: none;
}

.celeb-card-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 3px solid var(--surface-2);
  background: var(--surface-2);
}

.celeb-card-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.celeb-card-tags {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.celeb-card-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.celeb-card-stat {
  text-align: center;
}

.celeb-card-stat-value {
  font-size: 18px;
  font-weight: 700;
}

.celeb-card-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* News grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.news-grid .news-node {
  margin-bottom: 0;
}

.news-grid .news-node::before {
  display: none;
}

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

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

/* Loading state */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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