/* Pile of Shame */

:root {
  --bg: #1a1a2e;
  --surface: #16213e;
  --text: #e0e0e0;
  --text-muted: #a0a0a0;
  --accent: #1b9aaa;
  --danger: #d73027;
  --success: #1a9850;
  --steam-blue: #1b2838;
}

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

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

/* Landing */
.landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.landing h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #d73027, #fee08b, #1a9850);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.description {
  max-width: 500px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
}

.steam-btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--steam-blue);
  color: white;
  border: 2px solid #66c0f4;
  border-radius: 4px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.steam-btn:hover {
  background: #2a475e;
}

/* Dashboard */
.dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info h1 {
  font-size: 1.5rem;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.currency-select {
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #555;
  background: #2a2a2a;
  color: #e0e0e0;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.btn-secondary {
  background: var(--accent);
  color: white;
}
.btn-secondary:hover { background: #158a99; }

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
}
.btn-outline:hover {
  color: var(--text);
  border-color: var(--text);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: var(--surface);
  padding: 1.2rem;
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stat-shame .stat-value {
  color: var(--danger);
}

/* Sync banner */
.sync-banner {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.sync-banner.syncing {
  background: #2d2d44;
  border-left: 4px solid var(--accent);
}

.sync-banner.pricing {
  background: #2d3a2d;
  border-left: 4px solid #fee08b;
}

.sync-banner.done {
  background: var(--surface);
  border-left: 4px solid var(--success);
}

/* Treemap */
.treemap-container {
  background: var(--surface);
  border-radius: 8px;
  padding: 0.5rem;
  position: relative;
  min-height: 500px;
}

.treemap-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--text-muted);
}

.treemap-chart svg {
  display: block;
}

.treemap-tooltip {
  position: absolute;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border-radius: 4px;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 10;
  line-height: 1.4;
}

.treemap-legend {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-color {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* Flash messages */
.flash {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin: 1rem auto;
  max-width: 1400px;
}

.flash-notice { background: #1a3a1a; color: #8eff8e; }
.flash-alert { background: #3a1a1a; color: #ff8e8e; }
