/* ===== Theme & easy-to-change colors ===== */
:root{
  --bg: #5E608F;       /* Body background color */
  --card: #121827;
  --muted: #aab3c5;
  --text: #eaf0ff;
  --accent: #ff4d5a;

  /* EDIT THESE to change colors globally */
  --ok:  #21c55d;   /* Perfect (green) */
  --err: #ef4444;   /* Error (red)    */

  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
  --wrap: 1180px;
}

/* ===== Page base ===== */
*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: var(--bg);   /* Solid background color */
}

.wrap{ width:100%; max-width:var(--wrap); margin:0 auto; padding:0 20px; }

/* ===== Promo banner ===== */
.promo-banner{
  background:#e53935;
  color:#fff;
  position:sticky; top:0; z-index:3;
  box-shadow:var(--shadow);
}
.promo-inner{
  display:flex; align-items:center; justify-content:space-between;
  min-height:56px; gap:16px;
}
.banner-title{
  margin:0;
  font-size: clamp(16px, 2vw, 20px);
  font-weight:700;
  letter-spacing:.2px;
}
.btn-download{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 16px;
  background: var(--ok);
  color:#0b0f16;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  border:2px solid transparent;
}
.btn-download:hover{ filter:brightness(1.06); }
.btn-download:active{ transform:translateY(1px); }

/* ===== Hero (centered) ===== */
.hero{ padding:48px 0 24px; }
.hero-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;      /* center text */
  gap:10px;
}
.hero h2{
  font-size: clamp(26px, 3.8vw, 44px);
  line-height:1.06;
  margin:0;
}
.hero .accent{ color: var(--accent); }
.hero p{
  max-width:920px;
  color:var(--muted);
  margin:0 auto;          /* center the paragraph block */
}

/* ===== Cards ===== */
.status-area{ display:grid; gap:18px; padding:10px 0 40px; }
.card{
  background: var(--card);
  border:1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}

/* Overall state card + dot color controlled by class */
.card-ok{
  display:flex; align-items:flex-start; gap:14px;
  background: linear-gradient(180deg, rgba(33,197,93,.12), rgba(33,197,93,.06));
  border-color: rgba(33,197,93,.4);
}
.state-dot{
  width:16px; height:16px; border-radius:50%; margin-top:4px;
  background: var(--state-color, var(--ok)); /* default GREEN (Perfect) */
}
/* Toggle these classes on the card to switch the dot color */
.state--ok    { --state-color: var(--ok); }    /* green dot */
.state--error { --state-color: var(--err); }   /* red dot   */

.state-text h3{ margin:0 0 4px; font-size:20px; }
.state-text .muted{ margin:0; color:var(--muted); }

/* ===== Rows ===== */
.card-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.card-head h3{ margin:0; font-size:18px; }
.card-head .range{ color:var(--muted); font-size:14px; }

.row{
  display:grid;
  grid-template-columns: 130px 1fr 120px;
  gap:14px; align-items:center;
  padding:10px 0;
  border-top:1px dashed rgba(255,255,255,.08);
}
.row:first-of-type{ border-top:0; }

.name{ font-weight:600; }
.uptime{ text-align:right; color:var(--muted); font-size:14px; }

/* ===== Line bars ===== */
/* Default: every block uses Perfect color (green) */
.bars{
  display:grid;
  grid-template-columns: repeat(48, 1fr);
  gap:4px;
}
.b{
  display:block;
  height:14px;
  border-radius:4px;
  background: var(--ok); /* all green right now */
}

/* Helpers to flip a whole row quickly (optional) */
.bars.all-ok    .b{ background: var(--ok); }  /* force green on that row   */
.bars.all-error .b{ background: var(--err); } /* force red on that row     */

/* ===== Legend ===== */
.legend{
  margin-top:14px; display:flex; align-items:center;
  font-size:14px; color:var(--muted);
}
.key{ width:14px; height:14px; border-radius:4px; display:inline-block; margin-right:8px; }
.key.ok{ background: var(--ok); }
.key.err{ background: var(--err); }
.legend .spacer{ width:18px; }

/* ===== Responsive ===== */
@media (max-width:720px){
  .row{ grid-template-columns: 100px 1fr; }
  .uptime{ grid-column: 1 / -1; text-align:left; }
}
