/* ===== Vortanix LibreSpeed Skin (single-server template) ===== */

html, body {
  background: #0b0f14 !important;
  color: #e5e7eb !important;
}

h1, h2, h3, h4, h5 {
  color: #f3f4f6 !important;
}

a {
  color: #93c5fd !important;
}

:root{
  --bg: #0b0d12;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.60);
  --shadow: 0 20px 60px rgba(0,0,0,0.55);
  --radius: 22px;
  --accent: #3b82f6;
  --danger: #ef4444;
}

html.theme-light{
  --bg: #f7f7fb;
  --panel: rgba(0,0,0,0.04);
  --panel2: rgba(0,0,0,0.06);
  --border: rgba(0,0,0,0.10);
  --text: rgba(0,0,0,0.88);
  --muted: rgba(0,0,0,0.55);
  --shadow: 0 20px 60px rgba(0,0,0,0.12);
  --accent: #2563eb;
  --danger: #dc2626;
}

/* Hard override the original inline style block */
html, body{
  background: radial-gradient(1200px 600px at 20% 0%, rgba(59,130,246,0.18), transparent 55%),
              radial-gradient(900px 500px at 80% 10%, rgba(99,102,241,0.14), transparent 60%),
              var(--bg) !important;
  color: var(--text) !important;
  height: 100% !important;
}

body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji" !important;
  text-align: center;
}

/* Title */
h1{
  color: var(--text) !important;
  letter-spacing: -0.02em;
  font-weight: 650;
  margin-top: 24px !important;
}

/* Wrapper / Card */
#testWrapper{
  width: min(1100px, calc(100% - 32px));
  margin: 18px auto 60px auto !important;
  padding: 22px 22px 26px 22px !important;
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(10px);
}

/* inner spacing */
#test{
  margin-top: 18px !important;
  margin-bottom: 14px !important;
}

/* Start/Stop button */
#startStopBtn{
  width: 9.5em !important;
  height: 3.1em !important;
  line-height: 2.9em !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  background: linear-gradient(135deg, rgba(59,130,246,0.95), rgba(99,102,241,0.90)) !important;
  color: white !important;
  box-shadow: 0 14px 28px rgba(0,0,0,0.28) !important;
  transition: transform .08s ease, filter .15s ease !important;
}

#startStopBtn:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
}

#startStopBtn.running{
  background: linear-gradient(135deg, rgba(239,68,68,0.95), rgba(220,38,38,0.92)) !important;
  border-color: rgba(255,255,255,0.18) !important;
}

/* Replace the original pseudo-labels visually */
#startStopBtn:before{
  content:"Start" !important;
  font-weight: 650;
}
#startStopBtn.running:before{
  content:"Abort" !important;
  font-weight: 650;
}

/* Privacy link */
a.privacy{
  color: var(--muted) !important;
  text-decoration: none !important;
  margin-top: 8px;
}
a.privacy:hover{
  color: var(--text) !important;
}

/* Gauges layout blocks */
div.testGroup{
  margin: 0 auto !important;
  padding-top: 10px;
}

div.testArea, div.testArea2{
  background: var(--panel2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 24px rgba(0,0,0,0.20);
  margin: 10px 10px !important;
}

div.testArea{
  width: 18em !important;
  height: 13em !important;
}

div.testArea2{
  width: 16em !important;
  height: 7.6em !important;
}

/* Labels / numbers */
div.testArea div.testName,
div.testArea2 div.testName{
  color: var(--muted) !important;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding-top: 10px;
}

div.testArea div.meterText,
div.testArea2 div.meterText{
  color: var(--text) !important;
  font-weight: 700;
}

div.testArea div.unit,
div.testArea2 div.unit{
  color: var(--muted) !important;
  font-weight: 600;
}

/* Make ping/jitter not hard-coded red; override inline style attr */
#pingText, #jitText{
  color: var(--text) !important;
}

/* Canvas: soften */
canvas.meter{
  filter: drop-shadow(0 12px 26px rgba(0,0,0,0.25));
  opacity: 0.95;
}

/* IP line */
#ipArea{
  margin-top: 10px;
  color: var(--muted) !important;
  font-size: 0.95em;
}

/* Source code link */
a[href*="github.com/librespeed"]{
  color: var(--accent) !important;
  text-decoration: none !important;
  font-weight: 600;
}
a[href*="github.com/librespeed"]:hover{
  text-decoration: underline !important;
}

/* Privacy modal */
#privacyPolicy{
  background: color-mix(in srgb, var(--bg) 85%, #000 15%) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
}

#privacyPolicy h2, #privacyPolicy h4{
  color: var(--text) !important;
}
#privacyPolicy a.privacy{
  color: var(--accent) !important;
}

/* Responsive */
@media all and (max-width: 40em){
  #testWrapper{ width: calc(100% - 20px); padding: 16px !important; }
  div.testArea{ width: 100% !important; max-width: 22em; }
  div.testArea2{ width: 100% !important; max-width: 22em; }
}
