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

:root {
  --bg: #07141d;
  --panel: #0a1824;
  --panel-strong: #0d2030;
  --text: #ecf7ff;
  --muted: #b5c4d0;
  --primary: #f4c86b;
  --primary-2: #d99d1d;
  --gold: #ffcd5c;
  --shadow: rgba(217, 157, 29, 0.35);
}

html, body {
  min-height: 100%;
}

body {
  background: radial-gradient(circle at top, rgba(255, 205, 92, 0.14), transparent 30%),
    linear-gradient(180deg, #07141d 0%, #030c13 100%);
  color: var(--text);
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.phone {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(13, 32, 48, 0.86) 0%, rgba(5, 13, 20, 0.96) 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 20px 70px rgba(0,0,0,0.4);
}

.top {
  height: 74px;
  display: grid;
  place-items: center;
  background: rgba(8, 17, 25, 0.9);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-top: env(safe-area-inset-top);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(217, 157, 29, 0.45);
}

main {
  padding: 58px 22px 42px;
  text-align: center;
}

.app-icon {
  width: 110px;
  height: 110px;
  margin: 0 auto 24px;
  border-radius: 28px;
  background: transparent;
  border: 1px solid rgba(255, 205, 92, 0.4);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px rgba(255, 205, 92, 0.08), 0 12px 30px rgba(255, 205, 92, 0.28);
  overflow: hidden;
}

.icon-inner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 28px;
}

h1 {
  font-size: clamp(27px, 5vw, 34px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.04em;
}

h1 span {
  color: var(--gold);
}

.sub {
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.install {
  margin-top: 30px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 20px;
  border: none;
  border-radius: 20px;
  color: #1a1200;
  font-size: 20px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  background: linear-gradient(90deg, #ffd977, #f3b949 35%, #d99d1d 100%);
  box-shadow: 0 12px 35px rgba(217, 157, 29, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.install:active {
  transform: scale(0.98);
}

.login-btn {
  margin-top: 12px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  color: #f4c86b;
  text-decoration: none;
  letter-spacing: 0.01em;
  background: rgba(255, 205, 92, 0.08);
  border: 1px solid rgba(255, 205, 92, 0.34);
  box-shadow: 0 10px 26px rgba(217, 157, 29, 0.16);
  transition: transform 0.2s ease, background 0.2s ease;
}

.login-btn:active {
  transform: scale(0.98);
}

.login-icon {
  opacity: 0.9;
}

.benefits {
  list-style: none;
  margin-top: 30px;
  text-align: left;
}

.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.benefits b {
  color: var(--text);
}

.benefits i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffd977, #d99d1d);
  color: #1a1200;
  font-style: normal;
  font-weight: 900;
  flex: none;
}

.tagline {
  margin-top: 34px;
  color: var(--gold);
  font-weight: 800;
  font-size: 15px;
}

.foot {
  margin-top: 24px;
  color: #8ea4b3;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.android-install-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(7, 12, 18, 0.68);
  padding: 24px 16px 16px;
}

.android-install-modal.open {
  display: flex;
}

.android-install-card {
  width: min(100%, 420px);
  background: linear-gradient(180deg, rgba(18, 28, 39, 0.98), rgba(10, 17, 25, 0.98));
  border: 1px solid rgba(255, 205, 92, 0.18);
  border-radius: 26px 26px 20px 20px;
  padding: 18px 18px 16px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
}

.android-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #f7f9ff;
  font-size: 24px;
  cursor: pointer;
}

.android-install-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.android-install-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(217, 157, 29, 0.28);
}

.android-install-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.android-install-label {
  font-size: 11px;
  font-weight: 700;
  color: #adc2d2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.android-install-meta strong {
  font-size: 22px;
  font-weight: 800;
  color: #f9fbff;
}

.android-install-copy {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #dfeaf4;
}

.android-install-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.android-btn {
  flex: 1;
  border: none;
  border-radius: 14px;
  min-height: 48px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.android-btn-primary {
  background: linear-gradient(90deg, #ffd977, #f0b63d 45%, #d99d1d 100%);
  color: #160f04;
  box-shadow: 0 10px 24px rgba(217, 157, 29, 0.25);
}

.android-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #edf4ff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.install-guide {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 15, 24, 0.82);
  backdrop-filter: blur(4px);
  padding: 20px 16px;
}

.install-guide.open {
  display: flex;
}

.guide-panel {
  position: relative;
  width: min(100%, 760px);
  background: rgba(20, 31, 48, 0.98);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 30px;
  padding: 22px 18px 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
}

.guide-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(93, 106, 157, 0.28);
  color: #f5f7ff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.guide-panel h2 {
  margin-top: 25px;
  text-align: center;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.07em;
  color: #f5f7ff;
}

.guide-panel h2 span {
  color: #ffcd5c;
}

.guide-panel p {
  margin-top: 10px;
  margin-bottom: 18px;
  text-align: center;
  color: #f3f7ff;
  font-size: clamp(1.2rem, 2.8vw, 2.2rem);
  font-weight: 500;
}

.guide-step {
  display: grid;
  grid-template-columns: 56px 56px 1fr;
  align-items: center;
  gap: 16px;
  margin: 0 auto 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(74, 86, 119, 0.26);
  border: 1px solid rgba(255,255,255,0.025);
  min-height: 82px;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffd977, #d99d1d);
  color: #1b1200;
  font-weight: 900;
  font-size: 2rem;
  box-shadow: 0 12px 22px rgba(217, 157, 29, 0.26);
}

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(86, 103, 183, 0.76);
  border: 1px solid rgba(255,255,255,0.04);
}

.step-icon svg {
  width: 29px;
  height: 29px;
  stroke: #f5f7ff;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step-text {
  color: #f5f7ff;
  font-size: clamp(1.08rem, 2.2vw, 1.9rem);
  font-weight: 800;
  line-height: 1.25;
}

.step-text b {
  font-weight: 900;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  background: rgba(8, 17, 25, 0.92);
  backdrop-filter: blur(6px);
}

.loading-overlay.visible {
  display: grid;
}

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 22px;
  border-radius: 24px;
  background: rgba(17, 25, 33, 0.9);
  border: 1px solid rgba(255, 205, 92, 0.35);
  box-shadow: 0 18px 40px rgba(217, 157, 29, 0.22);
}

.loading-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 205, 92, 0.25);
  border-top-color: #ffcd5c;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.loading-text {
  color: #ffcd5c;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.download-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  background: radial-gradient(circle at top, rgba(255, 205, 92, 0.08), transparent 32%), rgba(5, 12, 18, 0.94);
  backdrop-filter: blur(8px);
  padding: 20px;
}

.download-screen.visible {
  display: grid;
}

.download-shell {
  width: min(100%, 520px);
  border-radius: 32px;
  padding: 28px 22px 24px;
  background: linear-gradient(180deg, rgba(18, 28, 39, 0.98), rgba(8, 15, 22, 0.98));
  border: 1px solid rgba(255, 205, 92, 0.18);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 205, 92, 0.08) inset;
}

.download-hero {
  text-align: center;
}

.download-logo {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  object-fit: cover;
  margin-bottom: 14px;
  box-shadow: 0 10px 20px rgba(217, 157, 29, 0.28);
}

.download-kicker {
  color: #ffcd5c;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 800;
}

.download-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 900;
  color: #f9fbff;
  letter-spacing: -0.03em;
  margin-top: 10px;
}

.download-copy {
  margin-top: 10px;
  color: #dfeaf4;
  font-size: 16px;
  line-height: 1.6;
}

.download-progress-card {
  margin-top: 24px;
  padding: 18px 18px 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.download-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.download-bar-fill {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd977, #f3b949 35%, #d99d1d 100%);
  animation: downloadBar 1.35s ease-in-out infinite;
}

.download-progress-meta {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #c5d3de;
  font-weight: 700;
}

.download-progress-percent {
  color: #ffcd5c;
}

.download-steps {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.download-step {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #b9c8d4;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.download-step.is-active {
  color: #f9fbff;
  background: rgba(255, 205, 92, 0.12);
  border-color: rgba(255, 205, 92, 0.35);
  transform: translateY(-1px);
}

.download-hint {
  margin-top: 18px;
  color: #97adbc;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

@keyframes downloadBar {
  0% { transform: translateX(-40%); width: 18%; }
  50% { transform: translateX(48%); width: 56%; }
  100% { transform: translateX(128%); width: 18%; }
}

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