/* ============================================================
   claudedumb.com — Premium dashboard aesthetic
   JetBrains Mono, warm neutrals
   ============================================================ */

:root {
  --font: 'JetBrains Mono', monospace;
  --bg: #f6f3ef;
  --bg-card: #ffffff;
  --bg-hover: #faf8f5;
  --text: #1a1815;
  --text-2: #8a8480;
  --text-3: #b5b0a8;
  --accent: #E36B2B;
  --green: #5a9a1f;
  --green-soft: #76AD2A;
  --green-bg: rgba(90, 154, 31, 0.08);
  --red: #d63031;
  --red-bg: rgba(214, 48, 49, 0.08);
  --yellow: #d4a017;
  --yellow-bg: rgba(212, 160, 23, 0.08);
  --orange: #e67e22;
  --orange-bg: rgba(230, 126, 34, 0.08);
  --border: #e5e0da;
  --r: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.06);
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Subtle grain texture */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
  will-change: auto;
}

/* ---- Header ---- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
  z-index: 10;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.03em;
}

.logo .accent { color: var(--accent); }
.logo .tld { color: var(--text-3); font-weight: 500; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.tagline {
  color: var(--text-3);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.gh-link {
  color: var(--text-3);
  display: flex;
  transition: color 0.15s;
}
.gh-link:hover { color: var(--text); }
.gh-link svg { width: 22px; height: 22px; }

/* ---- Main 3-column layout ---- */
main {
  flex: 1;
  display: grid;
  grid-template-columns: 340px 1fr 360px;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

/* ---- Left Panel: Vibes + Vote ---- */
.panel-left {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.2rem;
  gap: 1.2rem;
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  overflow-y: auto;
}

.panel-left::-webkit-scrollbar { width: 0; }

/* Vibes hero */
.vibes-hero {
  text-align: center;
}

.vibes-hero-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-3);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(90,154,31,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 5px rgba(90,154,31,0); }
}

.vibes-hero-status {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.vibes-hero-status.smart { color: var(--green); }
.vibes-hero-status.mixed { color: var(--yellow); }
.vibes-hero-status.dumb { color: var(--red); }

.vibes-hero-count {
  font-size: 14px;
  color: var(--text-3);
  font-weight: 500;
}

/* 24h tile grid */
.tiles-section {
  padding: 0 0.2rem;
}

.tiles-grid {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 4px;
}

.vibes-tile {
  aspect-ratio: 1;
  border-radius: 4px;
  position: relative;
  cursor: default;
  transition: transform 0.1s, box-shadow 0.1s;
}

.vibes-tile:hover {
  transform: scale(1.5);
  z-index: 5;
  box-shadow: var(--shadow-lg);
}

.vibes-tile-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

.vibes-tile:hover .vibes-tile-tooltip { display: block; }

.tiles-axis {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
  font-weight: 500;
}

/* Vote area */
.vote-area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Comment input */
.comment-input {
  width: 100%;
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 6px;
}

.comment-input:focus {
  border-color: var(--accent);
}

.comment-input::placeholder {
  color: var(--text-3);
}

.vote-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vote-btn {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--r);
  padding: 0.8rem 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}

.vote-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.15s;
}

.vote-btn:active::after { opacity: 0.08; }

.vote-btn.smart {
  background: var(--green-bg);
  color: var(--green);
}

.vote-btn.smart:hover {
  background: rgba(90, 154, 31, 0.14);
  box-shadow: 0 2px 12px rgba(90, 154, 31, 0.12);
  transform: translateY(-1px);
}

.vote-btn.dumb {
  background: var(--red-bg);
  color: var(--red);
}

.vote-btn.dumb:hover {
  background: rgba(214, 48, 49, 0.14);
  box-shadow: 0 2px 12px rgba(214, 48, 49, 0.12);
  transform: translateY(-1px);
}

.vote-btn:active { transform: translateY(0) !important; }

.vote-btn-icon {
  font-size: 14px;
}

.vote-feedback {
  font-size: 14px;
  text-align: center;
  color: var(--text-3);
  min-height: 18px;
}

.vote-feedback.success { color: var(--green); }
.vote-feedback.error { color: var(--red); }

/* Meter */
.meter {
  padding-top: 0.3rem;
  border-top: 1px solid var(--border);
}

.meter-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.meter-val {
  font-weight: 700;
  font-size: 15px;
}

.meter-val.smart { color: var(--green); }
.meter-val.dumb { color: var(--red); }

.meter-label {
  font-size: 13px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.meter-track {
  height: 8px;
  background: #ebe8e3;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.meter-fill {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.meter-fill.smart {
  background: var(--green-soft);
  border-radius: 4px 0 0 4px;
  width: 50%;
}

.meter-fill.dumb {
  background: var(--red);
  border-radius: 0 4px 4px 0;
  width: 50%;
}

/* ---- Activity Feed ---- */
.activity-feed {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  overflow: hidden;
}

.activity-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-3);
  margin-bottom: 0.5rem;
}

.activity-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.activity-list::-webkit-scrollbar { width: 0; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  font-size: 14px;
  color: var(--text-2);
  animation: fadeSlideIn 0.3s ease;
  line-height: 1.4;
}

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

.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.activity-dot.smart { background: var(--green); }
.activity-dot.dumb { background: var(--red); }

.activity-text {
  flex: 1;
  min-width: 0;
}

.activity-vote { font-weight: 600; }
.activity-vote.smart { color: var(--green); }
.activity-vote.dumb { color: var(--red); }

.activity-city {
  color: var(--text-3);
}

.activity-comment {
  color: var(--text-2);
  font-style: italic;
  display: block;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.activity-time {
  color: var(--text-3);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- Globe Zone Markers ---- */

/* Hot zone: floating avatar hologram */
.zone-hot {
  position: relative;
  width: 48px;
  height: 48px;
  pointer-events: none;
}

.zone-hot-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 8px rgba(90, 154, 31, 0.6));
  animation: floatAvatar 3s ease-in-out infinite;
  border: 2px solid rgba(90, 154, 31, 0.5);
}

.zone-hot-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px solid rgba(90, 154, 31, 0.4);
  transform: translate(-50%, -50%);
  animation: hotRingPulse 2.5s ease-out infinite;
}

.zone-hot-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(90,154,31,0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
}

@keyframes floatAvatar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes hotRingPulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* Cold zone: meteor impact / kaiju warning */
.zone-cold {
  position: relative;
  width: 64px;
  height: 64px;
  pointer-events: none;
}

/* Meteor streak */
.meteor-streak {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 3px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #ff4444, #ff8800);
  transform: translateX(-50%) rotate(-15deg);
  animation: meteorFall 1.8s ease-in infinite;
  border-radius: 2px;
  filter: blur(0.5px);
  box-shadow: 0 0 6px 1px rgba(255,68,68,0.5);
}

.meteor-streak:nth-child(2) {
  left: 35%;
  height: 30px;
  animation-delay: 0.6s;
  transform: translateX(-50%) rotate(-25deg);
  opacity: 0.7;
}

.meteor-streak:nth-child(3) {
  left: 65%;
  height: 25px;
  animation-delay: 1.2s;
  transform: translateX(-50%) rotate(-5deg);
  opacity: 0.5;
}

@keyframes meteorFall {
  0% { opacity: 0; transform: translateX(-50%) translateY(-20px) rotate(-15deg); }
  20% { opacity: 1; }
  60% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(30px) rotate(-15deg); }
}

/* Impact crater ring */
.impact-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 68, 68, 0.6);
  transform: translate(-50%, -50%);
  animation: impactExpand 2s ease-out infinite;
  box-shadow: 0 0 10px 2px rgba(255, 68, 68, 0.3), inset 0 0 10px 2px rgba(255, 68, 68, 0.1);
}

.impact-ring:nth-of-type(2) {
  animation-delay: 0.7s;
  border-color: rgba(255, 136, 0, 0.4);
}

@keyframes impactExpand {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

/* Kaiju hologram warning */
.kaiju-holo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kaiju-icon {
  font-size: 22px;
  animation: kaijuGlitch 3s step-end infinite, kaijuGlow 2s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255,68,68,0.6));
}

.kaiju-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(255,68,68,0.06) 2px,
    rgba(255,68,68,0.06) 4px
  );
  animation: scanDrift 4s linear infinite;
  border-radius: 50%;
  overflow: hidden;
}

.zone-cold-label {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font);
  font-size: 8px;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(255,68,68,0.6);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  animation: kaijuGlitch 4s step-end infinite;
}

@keyframes kaijuGlitch {
  0%, 90%, 100% { opacity: 1; transform: translate(-50%, -50%); }
  92% { opacity: 0.5; transform: translate(-48%, -52%); }
  94% { opacity: 1; transform: translate(-52%, -50%); }
  96% { opacity: 0.3; transform: translate(-50%, -48%); }
  98% { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes kaijuGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255,68,68,0.4)); }
  50% { filter: drop-shadow(0 0 10px rgba(255,68,68,0.8)); }
}

@keyframes scanDrift {
  0% { transform: translateY(0); }
  100% { transform: translateY(40px); }
}

/* ---- Center: Globe ---- */
.panel-globe {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.globe-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.globe-wrapper canvas { cursor: grab; }
.globe-wrapper canvas:active { cursor: grabbing; }

/* ---- Right Panel: Official Status ---- */
.panel-right {
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.2rem;
  gap: 0.6rem;
  border-left: 1px solid var(--border);
  background: var(--bg-card);
  overflow-y: auto;
}

.panel-right::-webkit-scrollbar { width: 0; }

.status-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.status-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-2);
}

.status-source {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.status-source:hover { text-decoration: underline; }

/* Overall banner */
.overall-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
}

.overall-banner.operational {
  background: var(--green-bg);
  color: var(--green);
}

.overall-banner.minor {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.overall-banner.major, .overall-banner.critical {
  background: var(--red-bg);
  color: var(--red);
}

.overall-dot { font-size: 10px; }

/* Uptime cards */
.uptime-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
}

.uptime-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px 8px;
  transition: border-color 0.15s;
}

.uptime-card:hover { border-color: #ccc8c0; }

.uptime-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.uptime-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uptime-status {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.uptime-status.operational { color: var(--green); background: var(--green-bg); }
.uptime-status.degraded_performance { color: var(--yellow); background: var(--yellow-bg); }
.uptime-status.partial_outage { color: var(--orange); background: var(--orange-bg); }
.uptime-status.major_outage { color: var(--red); background: var(--red-bg); }

.uptime-bars {
  display: flex;
  gap: 2px;
  height: 22px;
  align-items: stretch;
}

.uptime-bar {
  flex: 1;
  border-radius: 2px;
  min-width: 2px;
  position: relative;
  cursor: default;
  transition: transform 0.1s;
}

.uptime-bar:hover {
  transform: scaleY(1.4);
  z-index: 2;
}

.uptime-bar-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

.uptime-bar:hover .uptime-bar-tooltip { display: block; }

.uptime-footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 3px;
}

.uptime-pct { font-weight: 700; color: var(--text-2); }

/* Incidents */
.incidents-area {
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
}

.incidents-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-2);
  margin-bottom: 0.5rem;
}

.incident-card {
  border-left: 3px solid var(--orange);
  padding: 8px 12px;
  margin-bottom: 6px;
  background: var(--bg-hover);
  border-radius: 0 8px 8px 0;
}

.incident-card.major { border-left-color: var(--red); }

.incident-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

.incident-status {
  font-size: 13px;
  color: var(--text-3);
  text-transform: capitalize;
}

/* ---- Responsive ---- */
@media (max-width: 1400px) {
  main {
    grid-template-columns: 300px 1fr 320px;
  }
}

@media (max-width: 1100px) {
  main {
    grid-template-columns: 260px 1fr 280px;
  }
}

@media (max-width: 900px) {
  html, body { overflow: auto; height: auto; }
  main {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }
  .panel-left, .panel-right {
    border: none;
    border-bottom: 1px solid var(--border);
  }
  .globe-wrapper { min-height: 400px; }
}
