:root {
  --bg: #070908;
  --panel: #0c100d;
  --panel-soft: #111713;
  --card: #252526;
  --line: #29342a;
  --line-blue: #263746;
  --green: #b6ff00;
  --green-2: #17d653;
  --text: #f4f7f4;
  --muted: #9da89e;
  --danger: #ff6767;
  --warning: #f4c430;
  --info: #38bdf8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 5%, rgba(182, 255, 0, 0.085), transparent 28rem),
    linear-gradient(180deg, #070908 0%, #090c0a 55%, #070908 100%);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
[hidden] { display: none !important; }

.container { width: min(1180px, 92%); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(182, 255, 0, 0.12);
  background: rgba(7, 9, 8, 0.87);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(1180px, 92%);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 0 13px rgba(182, 255, 0, 0.25)); }
.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(182, 255, 0, 0.2);
  border-radius: 999px;
  background: rgba(182, 255, 0, 0.07);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.1px;
}
.brand-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }

.top-actions { display: flex; align-items: center; gap: 11px; }
.home-link, .language-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0b0f0c;
  color: #dce4dc;
  cursor: pointer;
  font-weight: 800;
}
.home-link { padding: 0 15px; }
.language-button { min-width: 46px; padding: 0 11px; }
.home-link:hover, .language-button:hover { border-color: rgba(182, 255, 0, 0.5); color: var(--green); }

.intro { position: relative; overflow: hidden; padding: 76px 0 42px; }
.intro-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  right: -180px;
  top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182, 255, 0, 0.12), transparent 67%);
  pointer-events: none;
}
.intro-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; align-items: center; gap: 58px; }
.eyebrow, .section-kicker {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(182, 255, 0, 0.22);
  border-radius: 999px;
  background: rgba(182, 255, 0, 0.06);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); }
.intro h1 { max-width: 720px; margin: 22px 0 18px; font-size: clamp(44px, 5.5vw, 76px); line-height: 0.98; letter-spacing: -3px; }
.intro h1 em { display: block; color: var(--green); font-style: normal; }
.intro-copy > p { max-width: 690px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.68; }
.trust-row { margin-top: 27px; display: flex; flex-wrap: wrap; gap: 20px; color: #d3dbd3; font-size: 13px; }
.trust-row > span { display: flex; align-items: center; gap: 7px; }
.trust-row b { color: var(--green); }

.requirements {
  position: relative;
  padding: 25px;
  border: 1px solid rgba(182, 255, 0, 0.22);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(16, 29, 40, 0.55), rgba(10, 13, 11, 0.96));
  box-shadow: var(--shadow), 0 0 55px rgba(182, 255, 0, 0.045);
}
.requirements-title { display: flex; align-items: center; gap: 13px; }
.requirements-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(182, 255, 0, 0.28); border-radius: 13px; background: rgba(182, 255, 0, 0.08); color: var(--green); font-size: 12px; font-weight: 950; }
.requirements-title strong, .requirements-title small { display: block; }
.requirements-title strong { font-size: 17px; }
.requirements-title small { margin-top: 4px; color: var(--muted); }
.requirements ol { margin: 23px 0 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.requirements li { display: grid; grid-template-columns: 32px 1fr; align-items: start; gap: 11px; }
.requirements li > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #334035; border-radius: 9px; color: var(--green); font-size: 11px; font-weight: 900; }
.requirements p { margin: 5px 0 0; color: #c0c9c0; font-size: 13px; line-height: 1.5; }

.connect-section { padding: 42px 0 68px; }
.browser-notice {
  width: fit-content;
  margin: 0 auto 29px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b0f0c;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.notice-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }
.browser-notice[data-state="supported"] { border-color: rgba(182, 255, 0, 0.24); color: #dbe8d4; }
.browser-notice[data-state="supported"] .notice-dot { background: var(--green-2); box-shadow: 0 0 10px rgba(23, 214, 83, 0.7); }
.browser-notice[data-state="unsupported"] { border-color: rgba(255, 103, 103, 0.3); color: #ffc0c0; }
.browser-notice[data-state="unsupported"] .notice-dot { background: var(--danger); }
.connect-heading { max-width: 680px; margin: 0 auto 28px; text-align: center; }
.connect-heading h2 { margin: 9px 0 10px; font-size: clamp(30px, 4vw, 46px); letter-spacing: -1.4px; }
.connect-heading p { margin: 0; color: var(--muted); line-height: 1.6; }

.mode-grid { max-width: 930px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.mode-card {
  width: 100%;
  min-height: 116px;
  padding: 21px;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--line-blue);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(16, 29, 40, 0.63), rgba(10, 13, 11, 0.97));
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
  transition: 0.2s ease;
}
.mode-card:hover:not(:disabled) { transform: translateY(-3px); border-color: rgba(182, 255, 0, 0.45); }
.mode-card:disabled { cursor: not-allowed; opacity: 0.48; }
.mode-icon { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid rgba(182, 255, 0, 0.24); border-radius: 15px; background: rgba(182, 255, 0, 0.08); color: var(--green); font-size: 20px; font-weight: 950; }
.mode-copy strong, .mode-copy small { display: block; }
.mode-copy strong { margin-bottom: 7px; font-size: 17px; }
.mode-copy small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.mode-arrow { color: var(--green); font-size: 23px; }

.message-panel {
  max-width: 930px;
  margin: 18px auto 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 15px;
}
.message-panel strong { display: block; font-size: 13px; }
.message-panel p { margin: 4px 0 0; font-size: 12px; line-height: 1.5; }
.progress-panel { border: 1px solid rgba(56, 189, 248, 0.28); background: rgba(56, 189, 248, 0.07); color: #c8edff; }
.error-panel { border: 1px solid rgba(255, 103, 103, 0.3); background: rgba(255, 103, 103, 0.07); color: #ffc2c2; }
.spinner { width: 27px; height: 27px; flex: 0 0 auto; border: 3px solid rgba(56, 189, 248, 0.2); border-top-color: var(--info); border-radius: 50%; animation: spin 0.8s linear infinite; }
.message-icon { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(255, 103, 103, 0.45); border-radius: 50%; font-weight: 950; }
@keyframes spin { to { transform: rotate(360deg); } }

.dashboard-section { padding: 64px 0 78px; scroll-margin-top: 76px; }
.dashboard-shell { padding: 24px; border: 1px solid #252f27; border-radius: 24px; background: #1d1d1e; box-shadow: var(--shadow), 0 0 50px rgba(182, 255, 0, 0.045); }
.dashboard-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dashboard-topline h2 { margin: 6px 0 0; font-size: 27px; }
.mode-badge { padding: 9px 13px; border: 1px solid rgba(56, 189, 248, 0.4); border-radius: 10px; background: rgba(56, 189, 248, 0.08); color: #8cdbff; font-size: 12px; font-weight: 900; }
.overall-status { margin-top: 21px; padding: 16px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 13px; border: 1px solid #343a35; border-radius: 14px; background: #232424; }
.overall-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: rgba(56, 189, 248, 0.1); color: var(--info); font-weight: 950; }
.overall-status small, .overall-status strong { display: block; }
.overall-status small { margin-bottom: 4px; color: #8c978d; font-size: 9px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; }
.overall-status strong { font-size: 14px; }
.overall-status button { padding: 9px 12px; border: 1px solid #404740; border-radius: 9px; background: #181a18; color: #cdd5cd; cursor: pointer; font-size: 10px; font-weight: 850; }
.overall-status button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.overall-status button:disabled { opacity: 0.48; cursor: not-allowed; }
.overall-status[data-state="success"] { border-color: rgba(23, 214, 83, 0.45); background: rgba(23, 214, 83, 0.07); }
.overall-status[data-state="success"] .overall-symbol { background: rgba(23, 214, 83, 0.12); color: #46ee7a; }
.overall-status[data-state="warning"] { border-color: rgba(244, 196, 48, 0.37); }
.overall-status[data-state="warning"] .overall-symbol { color: var(--warning); background: rgba(244, 196, 48, 0.1); }
.dashboard-label { margin: 26px 0 10px; color: var(--green); font-size: 13px; font-weight: 850; }
.device-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.device-card { min-height: 79px; padding: 14px; border: 1px solid #303031; border-radius: 11px; background: #29292a; overflow: hidden; }
.device-card small { display: block; color: #858b86; font-size: 9px; }
.device-card strong { display: block; margin-top: 10px; color: #f0f3f0; font-size: 12px; overflow-wrap: anywhere; }
.mode-device-card { border-color: rgba(56, 189, 248, 0.5); }
#valueBootloader[data-value="UNLOCKED"] { color: #4bea79; }
#valueBootloader[data-value="LOCKED"] { color: var(--warning); }
#valueMode { color: #75d4ff; }

.action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.action-card { min-height: 190px; padding: 15px; display: flex; flex-direction: column; border: 1px solid #303031; border-radius: 13px; background: #252526; }
.action-title { min-height: 36px; display: flex; align-items: flex-start; gap: 7px; color: #f5f6f5; font-size: 12px; }
.action-title span { color: var(--green); }
.action-card > p { margin: 5px 0 8px; color: var(--warning); font-size: 10px; font-weight: 850; }
.action-card > small { flex: 1; color: #a7aea8; font-size: 9px; line-height: 1.48; }
.action-card > a { margin-top: 13px; padding: 10px 8px; border-radius: 9px; background: var(--green); color: #071006; text-align: center; font-size: 9px; font-weight: 950; }
.action-card > a:hover { filter: brightness(1.06); }
.action-card[data-state="COMPATIBLE"] { border-color: rgba(23, 214, 83, 0.55); }
.action-card[data-state="COMPATIBLE"] > p, .action-card[data-state="CARRIER_REVIEW"] > p { color: #4bea79; }
.action-card[data-state="NOT_SUPPORTED"] > p, .action-card[data-state="CARRIER_NOT_DETECTED"] > p, .action-card[data-state="SERVER_CHECK_FAILED"] > p { color: #ff8585; }
.action-card[data-state="READY_TO_CHECK"] { border-color: rgba(56, 189, 248, 0.34); }
.action-card[data-state="READY_TO_CHECK"] > p { color: #75d4ff; }
.privacy-note { margin-top: 18px; padding: 14px 16px; display: flex; align-items: flex-start; gap: 11px; border: 1px solid rgba(182, 255, 0, 0.17); border-radius: 13px; background: rgba(182, 255, 0, 0.035); }
.privacy-note > span { color: var(--green); }
.privacy-note p { margin: 0; color: #8e998f; font-size: 10px; line-height: 1.6; }

.help-section { padding: 68px 0 86px; border-top: 1px solid #172019; }
.help-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 55px; align-items: start; }
.help-grid h2 { margin: 10px 0 0; font-size: clamp(30px, 4vw, 46px); letter-spacing: -1.4px; }
.help-list { display: grid; gap: 10px; }
.help-list p { margin: 0; padding: 14px 15px; display: grid; grid-template-columns: 34px 1fr; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: #0b0f0c; color: #b5beb5; font-size: 12px; line-height: 1.5; }
.help-list b { color: var(--green); }

footer { padding: 32px 0 42px; border-top: 1px solid #172019; color: #7f8a80; font-size: 12px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-inner a { color: var(--green); font-weight: 850; }

.is-busy .mode-card { pointer-events: none; }

@media (max-width: 930px) {
  .intro-grid { grid-template-columns: 1fr; gap: 34px; }
  .intro { padding-top: 48px; }
  .requirements { max-width: 720px; }
  .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .brand-pill { display: none; }
  .home-link span:nth-child(2) { display: none; }
  .home-link { width: 42px; padding: 0; }
  .intro { padding-top: 36px; }
  .intro h1 { font-size: clamp(40px, 13vw, 58px); letter-spacing: -2px; }
  .intro-copy > p { font-size: 16px; }
  .mode-grid { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: 1fr; gap: 28px; }
  .dashboard-shell { padding: 16px; border-radius: 18px; }
  .overall-status { grid-template-columns: 38px 1fr; }
  .overall-status button { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 520px) {
  .trust-row { gap: 12px; }
  .requirements { padding: 19px; }
  .mode-card { min-height: 108px; padding: 16px; grid-template-columns: 50px 1fr auto; gap: 11px; }
  .mode-icon { width: 48px; height: 48px; }
  .device-grid, .action-grid { grid-template-columns: 1fr; }
  .device-card { min-height: 73px; }
  .action-card { min-height: 178px; }
  .dashboard-topline { align-items: flex-start; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
