:root {
  --bg: #060914;
  --navy: #0a0f2c;
  --cyan: #00c2ff;
  --purple: #9d4edd;
  --gold: #d4af37;
  --white: #f4f7fb;
  --muted: #9aa3b5;
  --card: rgba(10, 15, 44, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --radius: 18px;
  --font: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--white);
  background: var(--bg);
}

.mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(157, 78, 221, 0.28), transparent 55%),
    radial-gradient(800px 480px at 110% 10%, rgba(0, 194, 255, 0.22), transparent 50%),
    radial-gradient(700px 400px at 50% 120%, rgba(212, 175, 55, 0.12), transparent 50%),
    var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  max-width: 1100px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.top-nav > a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.top-nav > a:hover { color: var(--cyan); }

.store-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}
.store-badges a { line-height: 0; }
.store-badges img {
  width: auto;
  display: block;
}
.store-badge--ios img { height: 36px; }
/* Official Play PNG has large transparent padding — scale up so the black pill matches Apple. */
.store-badge--play {
  display: inline-flex;
  height: 36px;
  overflow: hidden;
  align-items: center;
}
.store-badge--play img {
  height: 54px;
  margin: -9px -10px;
}
.store-badges--foot {
  justify-content: center;
  margin-bottom: 14px;
  gap: 8px;
}
.store-badges--foot .store-badge--ios img { height: 40px; }
.store-badges--foot .store-badge--play {
  height: 40px;
}
.store-badges--foot .store-badge--play img {
  height: 60px;
  margin: -10px -12px;
}

@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 10px; }
  .store-badge--ios img { height: 32px; }
  .store-badge--play { height: 32px; }
  .store-badge--play img { height: 48px; margin: -8px -8px; }
}

.hero {
  max-width: 760px;
  margin: 12px auto 36px;
  padding: 0 22px 8px;
}
.eyebrow {
  color: var(--cyan);
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0 0 8px;
}
h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}
.lede { color: var(--muted); margin: 0 0 22px; line-height: 1.5; }

.search {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
}
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--white);
  padding: 12px 14px;
  font: inherit;
  outline: none;
}
.search button {
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  font-weight: 700;
  background: var(--cyan);
  color: #041018;
  cursor: pointer;
}

.chip-block { margin-top: 14px; }
.chip-label {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid rgba(0, 194, 255, 0.28);
  background: rgba(0, 194, 255, 0.08);
  color: var(--white);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}
.chip:hover { border-color: var(--cyan); }
.chip.on {
  background: rgba(0, 194, 255, 0.22);
  border-color: var(--cyan);
  color: #fff;
}

.results-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.type-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.view-toggle {
  display: flex;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
}
.view-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
}
.view-toggle button.on {
  background: var(--cyan);
  color: #041018;
}
.type-chips .chip[data-type="fixed"].on {
  background: rgba(0, 194, 255, 0.22);
}
.type-chips .chip[data-type="daily"].on {
  background: rgba(157, 78, 221, 0.28);
  border-color: rgba(157, 78, 221, 0.7);
}

.results { max-width: 1100px; margin: 0 auto 80px; padding: 0 22px; }
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.results-head h2 { margin: 0 0 4px; font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: 0.78rem; line-height: 1.45; }
.err { color: #ff6b6b; font-size: 0.88rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.grid.list {
  grid-template-columns: 1fr;
  gap: 8px;
}

.row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}
.row-flag { font-size: 1.35rem; line-height: 1; }
.row-main { min-width: 0; }
.row-main .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-main .sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.row-price { text-align: right; }
.row .price { font-size: 1rem; }
.row .btn { height: 34px; padding: 0 12px; }
.row .btn.details { width: auto; }
.row .btn.buy { min-width: 72px; }

@media (max-width: 720px) {
  .row {
    grid-template-columns: auto 1fr auto;
  }
  .row-price { grid-column: 3; grid-row: 1; }
  .row .btn.details { grid-column: 2; }
  .row .btn.buy { grid-column: 3; }
}

.card {
  padding: 14px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(0, 194, 255, 0.08), transparent 45%),
    radial-gradient(80% 60% at 100% 100%, rgba(212, 175, 55, 0.07), transparent 40%),
    var(--card);
  border: 1.2px solid transparent;
  background-clip: padding-box;
  box-shadow:
    0 6px 12px rgba(0, 194, 255, 0.12),
    0 8px 10px rgba(0, 0, 0, 0.45);
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(135deg, rgba(0,194,255,0.35), rgba(255,255,255,0.08), rgba(212,175,55,0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-top { display: flex; gap: 10px; align-items: flex-start; }
.flag { font-size: 1.5rem; line-height: 1; }
.name { font-weight: 700; font-size: 1rem; }
.sub { color: var(--muted); font-size: 0.75rem; margin-top: 2px; }

.card-mid { display: flex; gap: 12px; align-items: center; margin: 12px 0; }
.ring {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  display: grid;
  place-items: center;
  position: relative;
}
.ring svg { position: absolute; inset: 0; }
.ring .spin { transform-origin: 40px 40px; animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ring-label { text-align: center; z-index: 1; }
.ring-label strong { display: block; font-size: 0.78rem; }
.ring-label span { font-size: 0.62rem; color: var(--muted); }

.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 6px;
  border-radius: 5px;
}
.badge.fixed { color: var(--cyan); background: rgba(0,194,255,0.18); }
.badge.unl { color: var(--purple); background: rgba(157,78,221,0.18); }
.badge.fup { color: #ff9f0a; background: rgba(255,159,10,0.18); }
.badge.reload { color: var(--gold); background: rgba(212,175,55,0.18); }
.meta { color: var(--muted); font-size: 0.72rem; display: grid; gap: 3px; }

.card-bot { display: flex; align-items: center; gap: 10px; }
.price { font-size: 1.2rem; font-weight: 800; }
.per { color: var(--muted); font-size: 0.7rem; }
.spacer { flex: 1; }

.btn {
  border: 0;
  border-radius: 10px;
  height: 40px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
  font: inherit;
}
.btn.details {
  width: 88px;
  color: var(--cyan);
  background: rgba(0,194,255,0.14);
  border: 1px solid rgba(0,194,255,0.35);
}
.btn.buy {
  min-width: 100px;
  color: #041018;
  background: linear-gradient(135deg, var(--cyan), rgba(0,194,255,0.82));
  border: 1px solid rgba(212,175,55,0.45);
}
.btn.ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.empty, .loading {
  color: var(--muted);
  padding: 28px 8px;
}

.sheet {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 520px;
  width: calc(100% - 24px);
  color: var(--white);
  color-scheme: dark;
}
.sheet::backdrop { background: rgba(0,0,0,0.62); }
.sheet-inner {
  background: #0c1228;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  color: var(--white);
}
.sheet-inner header, .sheet-inner footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}
.sheet-inner h3,
.sheet-inner h4,
.sheet-inner p,
.sheet-inner .name,
.sheet-inner .country-name,
.sheet-inner dd {
  margin: 0;
  color: var(--white);
}
.sheet-inner h3 { font-size: 1.05rem; }
.sheet-inner .sub,
.sheet-inner .muted,
.sheet-inner dt,
.sheet-inner .carrier {
  color: var(--muted);
}
.sheet-body { padding: 0 16px 16px; }
.sheet-inner footer { border-top: 1px solid var(--line); gap: 8px; justify-content: flex-end; }
.icon-x {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.field { display: grid; gap: 6px; margin: 10px 0; font-size: 0.82rem; color: var(--muted); }
.field[hidden],
#days-field[hidden] { display: none !important; }
.field input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--white);
  padding: 10px 12px;
  font: inherit;
  width: 100%;
}
.promo-row { display: flex; gap: 8px; align-items: stretch; }
.promo-row input { flex: 1; }
.promo-row .btn { height: auto; min-height: 40px; }
.promo-msg { font-size: 0.82rem; margin: -4px 0 8px; }
.promo-msg.ok { color: #6ee7b7; }
.promo-msg.bad { color: #ff6b6b; }
.pay-summary { margin: 0 0 8px; font-weight: 600; color: var(--white); }
.pay-title { font-size: 1.02rem; }
.pay-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  font-size: 1.15rem;
  line-height: 1.2;
}
#card-element {
  margin: 12px 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  min-height: 44px;
}
#card-element:empty {
  display: none;
}

.foot {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 22px 48px;
  color: var(--muted);
  font-size: 0.8rem;
}
.foot a { color: var(--cyan); text-decoration: none; }

.eyebrow.tight { margin: 0 0 2px; }
.sheet .sheet-body { max-height: min(68vh, 640px); overflow: auto; }
.glass {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.glass h4 { margin: 0 0 10px; font-size: 0.95rem; }
.glass.summary .sum-top { display: flex; gap: 12px; align-items: flex-start; }
.flag.big { font-size: 2.2rem; line-height: 1; }
.gold-price {
  margin-top: 12px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.03em;
}
.gold-price span { font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.facts.rows { display: grid; gap: 8px; margin: 0; }
.facts.rows > div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; font-size: 0.9rem; }
.facts.rows dt { color: var(--muted); margin: 0; }
.facts.rows dd { margin: 0; }
.cov-head { display: flex; justify-content: space-between; align-items: baseline; }
.cyan { color: var(--cyan); font-size: 0.75rem; font-weight: 700; }
.cov-search {
  width: 100%;
  margin: 0 0 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--white);
  padding: 10px 12px;
  font: inherit;
}
.country {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.country-name { font-weight: 650; margin-bottom: 4px; }
.order-keep {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}
.order-keep code {
  color: var(--cyan);
  font-size: 0.95rem;
}
.qr-slot { text-align: center; margin: 12px 0; }
.qr-img {
  width: min(240px, 70vw);
  height: auto;
  background: #fff;
  padding: 10px;
  border-radius: 12px;
}
.carrier { font-size: 0.75rem; color: var(--muted); }

@media (max-width: 560px) {
  .card-bot { flex-wrap: wrap; }
  .btn.details, .btn.buy { flex: 1; }
}
