:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #d7e0eb;
  --text: #0f172a;
  --text-muted: #475569;
  --primary: #0f4c81;
  --primary-hover: #0b3a63;
  --accent: #059669;
  --accent-soft: #ecfdf5;
  --accent-border: #a7f3d0;
  --gold: #d97706;
  --gold-soft: #fffbeb;
  --gold-border: #fde68a;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.16);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
}

/* Sticky Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  min-height: 32px;
  padding: 4px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.lang-btn.active {
  background: #10b981;
  color: #ffffff;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #0f4c81 60%, #065f46 100%);
  color: #ffffff;
  padding: clamp(36px, 6vw, 68px) 16px clamp(42px, 6vw, 72px);
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4.8vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 0 24px;
  max-width: 720px;
  color: #e2e8f0;
  font-size: clamp(15px, 2vw, 18px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.roadmap-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.15s, background 0.15s;
}

.roadmap-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
}

.roadmap-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6ee7b7;
  margin-bottom: 4px;
}

.roadmap-title {
  display: block;
  font-weight: 700;
  font-size: 15px;
}

.roadmap-desc {
  display: block;
  font-size: 13px;
  color: #cbd5e1;
  margin-top: 2px;
}

/* Main Container */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 16px 72px;
}

.section-block {
  margin-bottom: 40px;
  scroll-margin-top: 72px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.step-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 19px;
  box-shadow: 0 6px 14px rgba(15, 76, 129, 0.25);
}

.step-badge.green {
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(5, 150, 105, 0.25);
}

.section-header h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.card-accent {
  border-top: 4px solid var(--primary);
}

.card-green {
  border-top: 4px solid var(--accent);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0 0 12px;
}

.card p:last-child {
  margin-bottom: 0;
}

.muted {
  color: var(--text-muted);
  font-size: 14.5px;
}

/* Buttons */
.btn, button, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid #b6c4d4;
  background: #ffffff;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn:hover, button:hover {
  background: #f1f5f9;
}

.btn:active, button:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.btn-green {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-green:hover {
  background: #047857;
  color: #ffffff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* APK Download Grid */
.apk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.apk-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.apk-card.recommended {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  border-color: #93c5fd;
}

.apk-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  margin-bottom: 8px;
}

.apk-tag.legacy {
  background: #fef3c7;
  color: #92400e;
}

.apk-meta {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 6px 0 0;
}

/* Callouts */
.callout {
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 16px;
  font-size: 14.5px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.callout.tip {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: #065f46;
}

.callout.warn {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  color: #78350f;
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

/* Form Elements */
label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 15px;
}

textarea, input[type="text"], input[type="email"], input[type="password"] {
  display: block;
  width: 100%;
  border: 1px solid #94a3b8;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: #fbfdff;
  color: var(--text);
  font-family: "JetBrains Mono", "Consolas", "Courier New", monospace;
  font-size: 15px;
  line-height: 1.5;
}

textarea {
  resize: vertical;
}

textarea:focus, input:focus {
  outline: 3px solid rgba(15, 76, 129, 0.22);
  border-color: var(--primary);
}

.hint {
  font-size: 14px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

.report-line:not(:empty) {
  margin-top: 14px;
  font-weight: 700;
  color: var(--primary);
}

.error-list {
  color: var(--danger);
  margin: 8px 0 0;
  padding-left: 22px;
  font-size: 14.5px;
}

.error-list:empty {
  display: none;
}

/* Converter Results */
.converter-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 20px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-top: 14px;
}

.converter-card h4 {
  margin: 0 0 4px;
  font-size: 18px;
}

.converter-card .endpoint {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.converter-card figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.converter-card canvas {
  display: block;
  width: 100%;
  max-width: 204px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  image-rendering: pixelated;
}

.status-msg {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 8px;
  min-height: 20px;
}

/* Phase Tabs / Screenshot Grid */
.phase-block {
  margin-top: 22px;
}

.phase-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
}

.phase-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
}

.shots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.shot-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}

.shot-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.shot-thumb {
  position: relative;
  background: #e2e8f0;
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 599 / 1064;
}

.shot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shot-num {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.86);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}

.shot-zoom-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.shot-caption {
  padding: 12px 13px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.shot-caption strong {
  color: var(--primary);
}

/* Plan Comparison Grid */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.plan-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--surface-soft);
}

.plan-card.ultra {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  border-color: var(--accent-border);
}

.plan-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin: 6px 0;
}

.plan-card.ultra .plan-price {
  color: var(--accent);
}

/* 2FA Live Generator */
.totp-box {
  margin-top: 16px;
  padding: 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.totp-code {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: clamp(32px, 6vw, 44px);
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #34d399;
  line-height: 1.1;
}

.totp-timer-wrap {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #cbd5e1;
}

.totp-bar {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.totp-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981, #38bdf8);
  transition: width 0.25s linear;
}

.twofa-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  border: 1px solid #93c5fd;
  margin-bottom: 18px;
}

/* Numbered Step List */
.olist {
  margin: 12px 0 0;
  padding-left: 22px;
}

.olist li {
  margin-bottom: 10px;
}

/* Helper Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-bar {
  width: min(620px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
  margin-bottom: 10px;
  font-weight: 700;
}

.lightbox-img-wrap {
  max-height: 74vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-height: 74vh;
  max-width: 94vw;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  max-width: 620px;
  text-align: center;
  color: #e2e8f0;
  margin-top: 12px;
  font-size: 15px;
}

.lightbox-controls {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

footer {
  text-align: center;
  padding: 28px 16px 40px;
  color: var(--text-muted);
  font-size: 13.5px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

@media (max-width: 680px) {
  .converter-card {
    grid-template-columns: 1fr;
  }
  .converter-card figure {
    margin-top: 8px;
  }
  .totp-box {
    grid-template-columns: 1fr;
  }
  .shots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
