@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-dark: #0a0f1e;
  --bg-mid: #0d1528;
  --bg-card: #111c30;
  --accent-cyan: #00d4c8;
  --accent-green: #00ff44;
  --accent-blue: #1a3a6b;
  --text-primary: #ffffff;
  --text-secondary: #6b8ab0;
  --text-muted: #3d5a80;
  --border-glow: rgba(0, 212, 200, 0.3);
  --border-subtle: rgba(255,255,255,0.06);
  --logo-color: #2a4a7f;

  /* Single font — Unbounded for everything */
  --font-display: 'Unbounded', sans-serif;
  --font-body:    'Unbounded', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow: hidden;
}

.page {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(ellipse at 50% 0%, rgba(26,58,107,0.4) 0%, var(--bg-dark) 70%);
}

/* ─── LOGO ─── */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
}

/* Full logo image (icon + text combined) */
.logo-full {
  height: 36px;
  width: auto;
  display: block;
}

/* ─── BACKGROUND GRID ─── */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,58,107,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,58,107,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ═══════════════════════════════════════
   GLOSS BUTTON — base
═══════════════════════════════════════ */
.btn-gloss {
  position: relative;
  padding: 20px 72px;
  border-radius: 60px;
  border: none;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform      0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow     0.2s ease,
    filter         0.2s ease,
    letter-spacing 0.2s ease;

  /* Outer metallic ring */
  outline: 3px solid rgba(255,255,255,0.18);
  outline-offset: 4px;
}

/* Top-half gloss sheen */
.btn-gloss::before {
  content: '';
  position: absolute;
  inset: 2px 2px 50% 2px;
  border-radius: 60px 60px 0 0;
  background: rgba(255,255,255,0.16);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Shimmer sweep on hover */
.btn-gloss::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255,255,255,0.32) 50%,
    transparent 80%
  );
  border-radius: inherit;
  pointer-events: none;
  transition: left 0.55s ease;
}

.btn-gloss:hover::after {
  left: 140%;
}

.btn-gloss:hover {
  transform: scale(1.05) translateY(-2px);
  letter-spacing: 4px;
}

.btn-gloss:hover::before {
  opacity: 1.4;
}

.btn-gloss:active {
  transform: scale(0.97) translateY(1px);
  filter: brightness(0.9);
  transition-duration: 0.08s;
}

/* ─── CYAN variant ─── */
.btn-cyan {
  background: linear-gradient(180deg, #50ece4 0%, #00c4bc 45%, #008f8a 100%);
  color: #001a19;
  box-shadow:
    0 0 35px rgba(0,212,200,0.55),
    0 0 70px rgba(0,212,200,0.20),
    0 4px 20px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -3px 6px rgba(0,0,0,0.25);
}

.btn-cyan:hover {
  box-shadow:
    0 0 50px rgba(0,212,200,0.75),
    0 0 100px rgba(0,212,200,0.30),
    0 8px 30px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -3px 6px rgba(0,0,0,0.2);
}

.btn-cyan:active {
  box-shadow:
    0 0 20px rgba(0,212,200,0.4),
    inset 0 3px 8px rgba(0,0,0,0.35);
}

/* ─── GREEN variant ─── */
.btn-green {
  background: linear-gradient(180deg, #50ff78 0%, #00d93a 45%, #009928 100%);
  color: #001a09;
  box-shadow:
    0 0 35px rgba(0,255,68,0.55),
    0 0 70px rgba(0,255,68,0.20),
    0 4px 20px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -3px 6px rgba(0,0,0,0.25);
}

.btn-green:hover {
  box-shadow:
    0 0 50px rgba(0,255,68,0.75),
    0 0 100px rgba(0,255,68,0.30),
    0 8px 30px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -3px 6px rgba(0,0,0,0.2);
}

.btn-green:active {
  box-shadow:
    0 0 20px rgba(0,255,68,0.4),
    inset 0 3px 8px rgba(0,0,0,0.35);
}

/* ─── STATUS TEXT ─── */
.status-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.status-inactive { color: var(--text-secondary); }

.status-active {
  color: var(--accent-green);
  text-shadow: 0 0 20px rgba(0,255,68,0.8);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}


/* ═══════════════════════════════════════
   RESPONSIVE — адаптив
═══════════════════════════════════════ */

/* ── Tablet landscape / small desktop (≤1024px) ── */
@media (max-width: 1024px) {
  .bg-grid {
    background-size: 48px 48px;
  }
}

/* ── Tablet portrait (≤768px) ── */
@media (max-width: 768px) {

  /* Кути — менші */
  .corner { width: 32px; height: 32px; }

  /* Логотип у шапці — менший */
  .logo-hero {
    height: 60px !important;
  }

  /* page1: логотип по центру */
  .center-block .logo-hero {
    height: 110px !important;
  }

  /* Статус тексти */
  .system-status {
    font-size: 18px !important;
    letter-spacing: 3px !important;
    white-space: normal !important;
    text-align: center !important;
  }

  .inactive-label {
    font-size: 9px !important;
    letter-spacing: 5px !important;
  }

  /* page2: кнопка ініціалізація */
  .btn-init {
    font-size: 11px !important;
    letter-spacing: 4px !important;
    padding: 14px 32px !important;
  }

  /* page4: заголовок чекліст */
  .checklist-title {
    font-size: 16px !important;
    letter-spacing: 3px !important;
  }

  .checklist {
    width: 260px !important;
  }

  .check-label {
    font-size: 10px !important;
    letter-spacing: 2px !important;
  }

  /* page5: dashboard layout */
  .dashboard {
    flex-direction: column !important;
    gap: 20px !important;
    align-items: center !important;
    margin-top: 20px !important;
  }

  .v-divider {
    width: 120px !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, rgba(0,212,200,0.2), transparent) !important;
  }

  .left-panel {
    gap: 14px !important;
  }

  .circle-btn {
    width: 58px !important;
    height: 58px !important;
    font-size: 11px !important;
  }

  .value-frame {
    width: 150px !important;
    height: 52px !important;
    font-size: 28px !important;
  }

  .right-panel {
    flex-direction: row !important;
    border-radius: 12px !important;
    min-width: unset !important;
    width: 100% !important;
    max-width: 340px !important;
  }

  .info-block {
    flex: 1 !important;
    padding: 14px 16px !important;
    gap: 6px !important;
  }

  .info-block + .info-block {
    border-top: none !important;
    border-left: 1px solid rgba(0,212,200,0.1) !important;
  }

  .info-icon {
    width: 36px !important;
    height: 36px !important;
  }

  .info-id {
    font-size: 9px !important;
    letter-spacing: 1px !important;
    text-align: center !important;
  }

  /* Bottom status */
  .bottom-status {
    bottom: 24px !important;
  }

  .status-online, .status-offline {
    font-size: 10px !important;
    letter-spacing: 3px !important;
  }
}

/* ── Mobile (≤480px) ── */
@media (max-width: 480px) {

  /* Кути — ще менші */
  .corner { width: 24px; height: 24px; }
  .corner-tl, .corner-tr, .corner-bl, .corner-br {
    border-width: 1.5px !important;
  }

  /* page1: логотип */
  .center-block {
    margin-top: -40px !important;
  }
  .center-block .logo-hero {
    height: 90px !important;
  }

  /* page1: статус */
  .status-block {
    bottom: 40px !important;
    gap: 10px !important;
  }

  .status-row {
    gap: 10px !important;
  }

  .system-status {
    font-size: 14px !important;
    letter-spacing: 2px !important;
  }

  .search-icon {
    width: 22px !important;
    height: 22px !important;
  }

  /* page2: логотип анімований */
  .logo-hero-wrap.move-up {
    top: 36px !important;
  }

  .logo-hero.shrink {
    height: 52px !important;
  }

  .logo-hero {
    height: 52px !important;
  }

  /* page2: статус активна */
  .system-status {
    font-size: 13px !important;
  }

  .connect-icon {
    width: 22px !important;
    height: 22px !important;
  }

  /* page2: кнопка */
  .btn-init {
    font-size: 10px !important;
    letter-spacing: 3px !important;
    padding: 12px 24px !important;
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%) !important;
  }

  /* page3: спінер */
  .spinner-wrap {
    width: 110px !important;
    height: 110px !important;
  }

  .loading-text {
    font-size: 9px !important;
    letter-spacing: 4px !important;
  }

  .progress-track {
    width: 160px !important;
  }

  /* page4 */
  .checklist-title {
    font-size: 13px !important;
    letter-spacing: 2px !important;
  }

  .checklist {
    width: 220px !important;
    gap: 12px !important;
  }

  .checkbox {
    width: 18px !important;
    height: 18px !important;
  }

  /* page5 */
  .circle-btn {
    width: 50px !important;
    height: 50px !important;
    font-size: 10px !important;
  }

  .value-frame {
    width: 130px !important;
    height: 46px !important;
    font-size: 24px !important;
    border-radius: 40px !important;
  }

  .data-row {
    gap: 14px !important;
  }

  .right-panel {
    max-width: 280px !important;
  }

  .info-block {
    padding: 10px 12px !important;
    gap: 4px !important;
  }

  .info-tag {
    font-size: 7px !important;
    letter-spacing: 3px !important;
  }

  .info-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .info-id {
    font-size: 8px !important;
    letter-spacing: 0.5px !important;
  }

  /* nav links */
  a.back, a.next, .nav-hint {
    font-size: 9px !important;
    letter-spacing: 1.5px !important;
    bottom: 16px !important;
  }
  a.back { left: 16px !important; }
  a.next { right: 16px !important; }
  .nav-hint { right: 16px !important; bottom: 16px !important; }

  /* bottom status */
  .bottom-status {
    bottom: 16px !important;
  }
}

/* ── Landscape mobile (висота < 500px) ── */
@media (max-height: 500px) and (orientation: landscape) {

  .center-block {
    margin-top: -20px !important;
  }

  .center-block .logo-hero {
    height: 70px !important;
  }

  .status-block {
    bottom: 20px !important;
    gap: 6px !important;
  }

  .system-status {
    font-size: 13px !important;
  }

  /* page2 */
  .logo-hero-wrap.move-up {
    top: 18px !important;
  }

  .logo-hero.shrink,
  .logo-hero {
    height: 46px !important;
  }

  /* page5: горизонтальне розташування залишаємо але зменшуємо */
  .dashboard {
    flex-direction: row !important;
    gap: 16px !important;
    margin-top: 10px !important;
  }

  .v-divider {
    width: 1px !important;
    height: 120px !important;
    background: linear-gradient(180deg, transparent, rgba(0,212,200,0.2), transparent) !important;
  }

  .circle-btn {
    width: 48px !important;
    height: 48px !important;
    font-size: 10px !important;
  }

  .value-frame {
    width: 120px !important;
    height: 44px !important;
    font-size: 22px !important;
  }

  .right-panel {
    flex-direction: column !important;
    width: auto !important;
  }

  .info-block {
    padding: 8px 12px !important;
    gap: 4px !important;
  }

  .info-block + .info-block {
    border-left: none !important;
    border-top: 1px solid rgba(0,212,200,0.1) !important;
  }

  .info-icon {
    width: 24px !important;
    height: 24px !important;
  }

  /* page4 */
  .content {
    gap: 16px !important;
  }

  .checklist {
    gap: 10px !important;
  }

  /* page3 */
  .spinner-wrap {
    width: 90px !important;
    height: 90px !important;
  }
}
