:root {
  color-scheme: light;
  font-family: Lexend, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7fbff;
  color: #24384e;
  --bg: #f7fbff;
  --surface: rgba(255, 255, 255, .92);
  --surface-strong: #fff;
  --blue: #0f5eb6;
  --blue-strong: #07387c;
  --blue-soft: #66aeff;
  --gold: #f4ad24;
  --green: #2bb673;
  --danger: #e6465d;
  --ink: #24384e;
  --muted: #58708a;
  --panel: rgba(255, 255, 255, .92);
  --line: rgba(15, 94, 182, .1);
  --shadow: 0 25px 60px rgba(23, 56, 96, .14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(15, 94, 182, .08);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.topbar-inner {
  width: min(1180px, calc(100vw - 32px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  width: 190px;
  max-height: 54px;
  object-fit: contain;
}

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border-radius: 999px;
  padding: .65rem 1rem;
  color: #1a3b63;
  background: var(--surface-strong);
  border: 1px solid rgba(15, 94, 182, .1);
  box-shadow: 0 12px 35px rgba(28, 70, 120, .08);
  white-space: nowrap;
}

.server-pill i {
  color: var(--blue);
}

.server-pill small {
  color: var(--blue-strong);
  font-weight: 700;
}

main {
  padding-bottom: 54px;
}

.hero-shell {
  position: relative;
  min-height: 590px;
  background-image: url("assets/hydronix/dlp1.webp");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 23, 43, .30), rgba(9, 29, 54, .78)),
    linear-gradient(90deg, rgba(6, 17, 31, .74), rgba(11, 37, 67, .28), rgba(8, 23, 43, .72));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 32px));
  min-height: 590px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
  align-items: center;
  gap: 34px;
  padding: 44px 0 82px;
}

.hero-copy {
  color: #fff;
  text-shadow: 0 18px 48px rgba(0,0,0,.3);
}

.eyebrow,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b8d8ff;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 12px 0 10px;
  font-size: clamp(4rem, 9vw, 6.1rem);
  line-height: .9;
  letter-spacing: 0;
}

h2 {
  margin: 2px 0 0;
  font-size: 1.34rem;
  letter-spacing: 0;
}

p {
  line-height: 1.65;
}

#status {
  max-width: 680px;
  margin: 0;
  color: #e6f3ff;
  font-size: 1.16rem;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(35, 121, 216, .36);
}

button.secondary {
  border: 1px solid rgba(255,255,255,.32);
  background: rgba(255,255,255,.14);
  box-shadow: none;
}

button:hover {
  filter: brightness(1.06);
}

button:disabled {
  cursor: wait;
  opacity: .68;
  transform: none;
}

.connection-card {
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 30px;
  padding: 1.45rem;
  background:
    radial-gradient(circle at 92% 18%, rgba(102, 174, 255, .18), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(228,242,255,.9));
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.connection-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.2rem;
}

.session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 1rem 0 1.15rem;
  border-bottom: 1px solid rgba(15, 94, 182, .1);
}

.session-row span,
.status-grid span {
  color: var(--muted);
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.status-grid article {
  min-height: 116px;
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 15px;
  border-radius: 20px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15, 94, 182, .08);
}

.status-grid i {
  color: #9fd0ff;
  font-size: 1.2rem;
}

.hero-curve {
  position: absolute;
  z-index: 2;
  inset-inline: 0;
  bottom: -2px;
  height: 190px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1920 500' preserveAspectRatio='none'%3E%3Cpath fill='%23f7fbff' d='M0 152c210 28 420 58 682 68 310 12 586-4 868-38 150-18 272-37 370-52v370H0V152z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
  pointer-events: none;
}

.console-grid {
  position: relative;
  z-index: 3;
  width: min(980px, calc(100vw - 32px));
  margin: -68px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.panel {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 30px;
  padding: 1.35rem;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease, opacity 220ms ease;
  animation: softFadeIn .34s ease both;
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 34px 68px rgba(23, 56, 96, .18);
  border-color: rgba(102,174,255,.28);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, #2f8bf6 100%);
  box-shadow: 0 16px 34px rgba(15, 94, 182, .25);
}

.panel-kicker {
  color: var(--blue);
}

label {
  display: block;
  margin: 15px 0;
  color: #284259;
  font-weight: 600;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-row span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.range-row {
  contain: layout paint style;
}

.range-row strong {
  color: var(--blue);
  font-size: .92rem;
}

input[type=range] {
  --fill: 100%;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 12px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 0 var(--fill), rgba(15, 94, 182, .12) var(--fill) 100%);
  outline: 0;
  cursor: pointer;
  transition: filter 180ms ease, opacity 180ms ease;
  contain: paint;
  transform: translateZ(0);
  will-change: background;
}

input[type=range]:hover {
  filter: brightness(1.04);
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(15, 94, 182, .28);
}

input[type=range]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(15, 94, 182, .28);
}

input[type=range]::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  background: transparent;
}

input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 0;
  border-top: 1px solid rgba(18, 35, 56, .1);
  border-bottom: 1px solid rgba(18, 35, 56, .1);
}

.metric span,
.muted {
  color: var(--muted);
}

.metric strong {
  color: var(--blue);
  font-size: 1.35rem;
}

.peers,
.now-playing {
  min-height: 96px;
  margin-top: 14px;
  padding: 13px;
  border-radius: 20px;
  background: rgba(102,174,255,.08);
  border: 1px solid rgba(102,174,255,.16);
  color: #30465e;
}

.peer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(18, 35, 56, .09);
}

.peer:last-child {
  border-bottom: 0;
}

.ok { color: var(--green); }
.error { color: var(--danger); }
.warn { color: var(--gold); }

@keyframes softFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

button {
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease, filter 180ms ease;
  animation: softFadeIn .28s ease both;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
  opacity: .82;
}

button:disabled,
button:disabled:hover,
button:disabled:active {
  cursor: wait;
  opacity: .68;
  transform: none;
  filter: none;
}

@media (max-width: 980px) {
  .hero-content,
  .console-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    min-height: 0;
    padding: 42px 0 96px;
  }

  .connection-card {
    max-width: 540px;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    min-height: 74px;
  }

  .brand-logo {
    width: 148px;
  }

  .server-pill {
    display: none;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
