/* ============================================================
   Bugee Speed Test — Ookla Style Light Theme (No Scroll)
   © 2025 Bugee Interactive Pvt Ltd
   ============================================================ */

:root {
  --bg-main: #F2F4F8; /* Very light grey/blueish background */
  --txt-dark: #111118;
  --txt-dim: #6E7280;
  
  --brand-cyan: #00E5FF;
  --brand-cyan-dark: #00B8D4;
  
  --f-sans: 'Montserrat', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--f-sans);
  background-color: var(--bg-main);
  color: var(--txt-dark);
  height: 100vh;
  width: 100vw;
  overflow: hidden; /* NO SCROLL */
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-font-smoothing: antialiased;
}

.app-wrapper {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ── HEADER ── */
.app-header {
  width: 100%;
  padding: 20px 40px;
  position: absolute;
  top: 0; left: 0;
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-logo {
  width: 32px; height: 32px;
}
.header-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--txt-dark);
}
.header-links {
  display: flex;
  gap: 24px;
}
.h-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--txt-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.h-link.active, .h-link:hover {
  color: var(--txt-dark);
}

/* ── MAIN CONTENT (CENTERED) ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* ── CENTER STAGE (GO BUTTON OR GAUGE) ── */
.center-stage {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  position: relative;
}

/* ── GO BUTTON ── */
.go-container {
  display: flex; justify-content: center; align-items: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.go-container.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  position: absolute;
}

.go-ring-outer {
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 2px solid rgba(0, 229, 255, 0.3);
  display: flex; justify-content: center; align-items: center;
  animation: pulse-ring 3s infinite ease-out;
}
@keyframes pulse-ring {
  0% { transform: scale(0.95); border-color: rgba(0, 229, 255, 0.8); }
  50% { transform: scale(1.05); border-color: rgba(0, 229, 255, 0.1); }
  100% { transform: scale(0.95); border-color: rgba(0, 229, 255, 0.8); }
}

.go-ring-inner {
  width: 230px; height: 230px;
  border-radius: 50%;
  border: 2px solid var(--brand-cyan);
  display: flex; justify-content: center; align-items: center;
}

.btn-go {
  width: 200px; height: 200px;
  border-radius: 50%;
  background: transparent;
  border: none;
  font-size: 4rem;
  font-weight: 300; /* Thin font like Ookla */
  color: var(--txt-dark);
  cursor: pointer;
  outline: none;
  transition: transform 0.2s, color 0.2s;
}
.btn-go:hover {
  transform: scale(1.05);
  color: var(--brand-cyan-dark);
}

/* ── TESTING GAUGE STATE ── */
.test-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
  transition: opacity 0.5s ease;
}
.test-container.hidden {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.live-metrics {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 40px;
  margin-bottom: 20px;
}
.metric-block {
  display: flex; flex-direction: column; align-items: center;
}
.m-label {
  font-size: 0.75rem; font-weight: 700; color: var(--txt-dim);
  text-transform: uppercase; margin-bottom: 4px;
}
.m-val {
  font-size: 2.2rem; font-weight: 300; color: var(--txt-dark);
}
.highlight-dl { color: var(--brand-cyan-dark); }
.highlight-ul { color: #8A2BE2; /* Purple */ }

.gauge-area {
  position: relative;
  width: 280px; height: 280px;
  display: flex; justify-content: center; align-items: center;
}
.circular-gauge {
  width: 100%; height: 100%;
  transform: rotate(-90deg); /* Start from top */
}
.c-track {
  fill: none; stroke: rgba(0,0,0,0.05);
  stroke-width: 6;
}
.c-fill {
  fill: none; stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 565.48; /* 2 * pi * 90 */
  stroke-dashoffset: 565.48;
  transition: stroke-dashoffset 0.1s linear;
}

.live-speed {
  position: absolute;
  display: flex; flex-direction: column; align-items: center;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.s-val {
  font-size: 3.5rem; font-weight: 300; color: var(--txt-dark);
  line-height: 1;
}
.s-msg {
  font-size: 0.8rem; font-weight: 600; color: var(--brand-cyan-dark);
  text-transform: uppercase; margin-top: 8px;
}

/* ── BOTTOM NETWORK INFO ── */
.bottom-info {
  position: absolute;
  bottom: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
}
.info-box {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 250px;
}
.info-box.box-isp { flex-direction: row-reverse; }

.icon-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  display: flex; justify-content: center; align-items: center;
  color: var(--txt-dim);
}
.icon-circle svg { width: 20px; height: 20px; }

.info-text { display: flex; flex-direction: column; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.i-title { font-size: 1.1rem; font-weight: 500; color: var(--txt-dark); }
.i-sub { font-size: 0.8rem; font-weight: 500; color: var(--txt-dim); margin-top: 4px; }
.i-sub.link { color: var(--brand-cyan-dark); cursor: pointer; }
.i-sub.link:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .app-header { padding: 16px 20px; }
  .go-ring-outer { width: 220px; height: 220px; }
  .go-ring-inner { width: 190px; height: 190px; }
  .btn-go { font-size: 3rem; }
  
  .bottom-info {
    flex-direction: column;
    gap: 20px;
    bottom: 20px;
  }
  .info-box { width: 100%; justify-content: center; }
  .info-box.box-isp { flex-direction: row; }
  .text-right { text-align: left; }
}
