/* Saint WebView — Android-first, connection screen only (no splash) */

html {
  height: 100%;
  height: 100dvh;
  background: #000;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: Roboto, "Noto Sans", "Segoe UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}

*, *::before, *::after { box-sizing: border-box; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

img { display: block; -webkit-user-drag: none; }

/* Full-bleed app chrome */
.shell {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 48px 1fr;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: -webkit-fill-available;
  background: #000;
  padding:
    env(safe-area-inset-top, 0px)
    env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px)
    env(safe-area-inset-left, 0px);
}

/* —— Rail —— */
.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0 8px;
  background: #07090e;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.rail-grow { flex: 1; }
.rail-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #6b7280;
}
.rail-btn.on {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.16);
}

/* —— Main connection screen —— */
.screen {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 12px 12px 20px;
  background: #000;
}

.top {
  text-align: center;
  padding: 4px 0 2px;
}
.top-label {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #e5e7eb;
}
.top-timer {
  margin: 2px 0 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.power {
  width: 112px;
  height: 112px;
  margin: 14px auto 12px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #151922;
  color: #3b82f6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.power:active { transform: scale(0.97); }
.power.busy { color: #93c5fd; }
.power.live {
  color: #fff;
  background: #2563eb;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
}

.status {
  width: fit-content;
  min-width: 148px;
  margin: 0 auto 14px;
  padding: 9px 18px;
  text-align: center;
  border-radius: 999px;
  background: #151922;
  font-size: 14px;
  font-weight: 600;
  color: #f3f4f6;
}
.status.busy { color: #93c5fd; }
.status.live {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.rows {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 12px;
  background: #151922;
}
.row-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.14);
  flex-shrink: 0;
}
.row-txt {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}
.row-chev {
  color: #6b7280;
  font-size: 22px;
  line-height: 1;
}

.mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 6px 10px 6px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: #151922;
}
.mode-l {
  font-size: 14px;
  font-weight: 600;
  color: #9ca3af;
}
.mode-sw {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: 9px;
  background: #0a0c12;
}
.mode-b {
  min-height: 34px;
  min-width: 72px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9ca3af;
}
.mode-b.on {
  background: #2563eb;
  color: #fff;
}

.card {
  border-radius: 14px;
  background: #151922;
  padding: 12px 10px 8px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.brand strong { font-weight: 700; }
.card-acts {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #3b82f6;
}
.act {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #3b82f6;
  font-size: 16px;
}

.quota { padding: 0 4px 8px; }
.bar {
  height: 7px;
  border-radius: 99px;
  background: #0a0c12;
  overflow: hidden;
  margin-bottom: 8px;
}
.bar i {
  display: block;
  height: 100%;
  background: #3b82f6;
  border-radius: inherit;
}
.quota-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 4px;
}
.quota-line b { font-weight: 700; }
.quota-line span { color: #9ca3af; }
.quota-sub {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #9ca3af;
}

.help {
  margin: 2px 4px 8px;
  font-size: 11px;
  color: #6b7280;
}

.list {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.srv {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
}
.srv:last-child { border-bottom: 0; }
.srv.on {
  background: rgba(59, 130, 246, 0.08);
  border-radius: 10px;
  border-bottom-color: transparent;
}

.srv-ico {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
  background: rgba(59, 130, 246, 0.12);
}
.srv-ico.flag {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}
.fr { background: linear-gradient(90deg, #002395 0 33.33%, #fff 33.33% 66.66%, #ed2939 66.66%); }
.nl { background: linear-gradient(180deg, #ae1c28 0 33.33%, #fff 33.33% 66.66%, #21468b 66.66%); }
.de { background: linear-gradient(180deg, #000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66%); }
.sg { background: linear-gradient(180deg, #ed2939 50%, #fff 50%); }
.cz {
  background:
    linear-gradient(115deg, #11457e 0 42%, transparent 42%),
    linear-gradient(180deg, #fff 0 50%, #d7141a 50%);
}

.srv-body { flex: 1; min-width: 0; }
.srv-body b {
  display: block;
  font-size: 14px;
  font-weight: 650;
}
.srv-body small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #9ca3af;
}
.srv-i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: #9ca3af;
  flex-shrink: 0;
}

/* Small phones */
@media (max-height: 700px) {
  .top-timer { font-size: 28px; }
  .power { width: 96px; height: 96px; margin: 10px auto 10px; }
  .power svg { width: 46px; height: 46px; }
}

/* Prevent desktop “framed phone” look in WebView — always full screen */
@media (min-width: 480px) {
  .shell {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
  }
}
