/* Where Babies Are Born - Devil AI Aesthetic & Real World Map Styling */

:root {
  --bg-color: #FAF9F6;
  --surface-color: #FFFFFF;
  --text-primary: #242424;
  --text-secondary: #77736E;
  --text-muted: #9E9B95;
  --border-color: #E8E5DF;
  --border-light: #F2EFEB;
  --accent-color: #F46D82;
  --accent-soft: #FFE4E8;
  --map-bg: #111622;
  --map-land: #263143;
  --map-stroke: #161F2E;
  --flash-color: #FACC15;
  --radius-card: 14px;
  --radius-btn: 8px;
  --shadow-subtle: 0 4px 18px rgba(0, 0, 0, 0.04);
  --transition-smooth: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body.baby-page {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.baby-container {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.baby-hero {
  text-align: center;
  padding: 32px 16px 24px;
}

.baby-kicker {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 8px;
}

.baby-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 48px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.05;
}

.baby-sub {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.baby-live-counter {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 16px 36px;
  box-shadow: var(--shadow-subtle);
}

.live-count-num {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 38px;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1.1;
}

.live-count-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Map Section */
.map-wrapper {
  background: var(--map-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  margin-bottom: 28px;
  position: relative;
}

.world-map-stage {
  position: relative;
  width: 100%;
  height: 480px;
  background: var(--map-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-map-holder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-map-holder svg {
  width: 100%;
  height: 100%;
  max-height: 480px;
}

/* SVG Country Paths & Flashing */
.svg-map-holder svg path,
.svg-map-holder svg g {
  fill: var(--map-land);
  stroke: var(--map-stroke);
  stroke-width: 0.6px;
  transition: fill 0.35s ease, filter 0.35s ease;
}

.svg-map-holder svg path.flash,
.svg-map-holder svg g.flash {
  fill: var(--flash-color) !important;
  filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.95)) !important;
  transition: fill 0.05s ease;
}

#pulseCanvas {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Map Controls */
.map-controls {
  padding: 12px 24px;
  background: #171E2B;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.rate-label {
  font-size: 13px;
  color: #94A3B8;
  font-weight: 500;
}

.speed-btn-group {
  display: flex;
  gap: 8px;
}

.speed-btn {
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #1E293B;
  color: #F1F5F9;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.speed-btn:hover {
  background: #334155;
}

.speed-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #FFFFFF;
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 24px 20px;
  box-shadow: var(--shadow-subtle);
}

.stat-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.pulse-indicator-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.recent-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-primary);
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.feed-country-code {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--accent-color);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
}

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

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leader-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
}

.leader-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leader-code {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 11px;
  background: var(--bg-color);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.leader-bar-wrapper {
  flex: 1;
  max-width: 140px;
  margin: 0 16px;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.leader-bar-fill {
  height: 100%;
  background: var(--accent-color);
  border-radius: 3px;
}

.leader-count {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .baby-title {
    font-size: 34px;
  }
  .world-map-stage {
    height: 320px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
