/* ============================================================
   2PAY · Центр оплат
   Apple-раздел  = iOS light (стиль «Настройки» айфона)
   PlayStation   = тёмная тема (наследует site.css)
   ============================================================ */

:root {
  /* тёмная тема — палитра сайта 2pay.money */
  --ios-bg:       #050816;   /* фон сайта */
  --ios-bg-2:     #0A1024;
  --ios-surface:  #0F1830;   /* карточки */
  --ios-surface-2:#142042;
  --ios-sep:      rgba(135,197,255,.10);   /* hairline */
  --ios-label:    #EAF0FF;
  --ios-secondary:#7D89A8;
  --ios-tertiary: #5C657E;
  --ios-blue:     #1E66FF;   /* бренд 2PAY */
  --ios-sky:      #87C5FF;
  --ios-blue-press:#0A47CC;
  --ios-green:    #2EE6A8;
  --ios-r:        14px;
  --ios-r-lg:     18px;
  --sfont: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Inter, sans-serif;
}

/* ---------- Базовый режим Apple (light) ---------- */
html { background: var(--ios-bg); }
body.theme-ios {
  background: var(--ios-bg);
  color: var(--ios-label);
  font-family: var(--sfont);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  padding-bottom: 150px;
}
body.theme-ios .ps-only { display: none; }
[hidden] { display: none !important; }

/* Шапка */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5,8,22,.82); backdrop-filter: saturate(180%) blur(20px);
  padding: env(safe-area-inset-top) 16px 0;
  border-bottom: .5px solid var(--ios-sep);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.tb-brand { display: flex; align-items: center; gap: 10px; }
.tb-logo { height: 32px; width: auto; }
.tb-eyebrow { font-size: 13px; font-weight: 600; color: var(--ios-secondary); border-left: 1px solid var(--ios-sep); padding-left: 10px; }
.tb-help { background: 0 0; border: 0; color: var(--ios-blue); font: inherit; font-size: 16px; font-weight: 500; }

/* Segmented control (iOS) */
.svc {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  background: rgba(135,197,255,.08); border: 1px solid var(--ios-sep); border-radius: 9px; padding: 2px;
  margin: 8px 0 12px;
}
.svc-btn {
  position: relative; z-index: 2; border: 0; background: 0 0;
  padding: 8px 6px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--ios-secondary); cursor: pointer; transition: color .2s;
}
.svc-btn.is-active { color: #fff; }
.svc-thumb {
  position: absolute; z-index: 1; top: 2px; left: 2px; bottom: 2px; width: calc(50% - 2px);
  background: linear-gradient(135deg, #1E66FF, #87C5FF); border-radius: 7px; box-shadow: 0 6px 18px rgba(30,102,255,.45);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}

.svc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.svc-ic { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }

/* Экраны */
.apple-wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.scr { display: none; }
.scr.is-active { display: block; animation: iosfade .25s ease; }
@keyframes iosfade { from { opacity: 0; } to { opacity: 1; } }

/* Large title */
.lt { padding: 6px 2px 14px; }
.hero-icon { display: block; margin: 2px 0 12px; border-radius: 10px; box-shadow: 0 4px 12px rgba(30,102,255,.28); }
.lt h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.lt p { margin-top: 6px; color: var(--ios-secondary); font-size: 15px; line-height: 1.4; }

/* Гарантии */
.guarantees { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 2px 22px; }
.guarantees span { font-size: 14px; font-weight: 600; color: var(--ios-green); }

/* Переключатель региона App Store (Турция / США) — вся кнопка = флаг, подпись поверх */
.rgn-switch { display: flex; gap: 10px; margin-bottom: 8px; }
.rgn-chip { position: relative; overflow: hidden; flex: 1; height: 74px; border-radius: 14px;
  border: 2px solid transparent; background-size: cover; background-position: center; cursor: pointer;
  transition: .18s; display: grid; place-items: center; font: inherit; opacity: .72; }
.rgn-chip:active { transform: scale(.98); }
.rgn-flag { display: none; }
/* Флаг Турции */
.rgn-chip[data-region="tr"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect width='30' height='20' fill='%23E30A17'/%3E%3Ccircle cx='11' cy='10' r='5' fill='%23fff'/%3E%3Ccircle cx='12.6' cy='10' r='4' fill='%23E30A17'/%3E%3Cpath fill='%23fff' d='M16.8 10l3.4-1.1-2.1 2.9v-3.6l2.1 2.9z'/%3E%3C/svg%3E"); }
/* Флаг США */
.rgn-chip[data-region="us"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 20'%3E%3Crect width='38' height='20' fill='%23fff'/%3E%3Cg fill='%23B22234'%3E%3Crect width='38' height='1.54' y='0'/%3E%3Crect width='38' height='1.54' y='3.08'/%3E%3Crect width='38' height='1.54' y='6.15'/%3E%3Crect width='38' height='1.54' y='9.23'/%3E%3Crect width='38' height='1.54' y='12.3'/%3E%3Crect width='38' height='1.54' y='15.38'/%3E%3Crect width='38' height='1.54' y='18.46'/%3E%3C/g%3E%3Crect width='15.2' height='10.77' fill='%233C3B6E'/%3E%3Cg fill='%23fff'%3E%3Ccircle cx='2.5' cy='2' r='.7'/%3E%3Ccircle cx='6' cy='2' r='.7'/%3E%3Ccircle cx='9.5' cy='2' r='.7'/%3E%3Ccircle cx='13' cy='2' r='.7'/%3E%3Ccircle cx='4.2' cy='4' r='.7'/%3E%3Ccircle cx='7.7' cy='4' r='.7'/%3E%3Ccircle cx='11.2' cy='4' r='.7'/%3E%3Ccircle cx='2.5' cy='6' r='.7'/%3E%3Ccircle cx='6' cy='6' r='.7'/%3E%3Ccircle cx='9.5' cy='6' r='.7'/%3E%3Ccircle cx='13' cy='6' r='.7'/%3E%3Ccircle cx='4.2' cy='8' r='.7'/%3E%3Ccircle cx='7.7' cy='8' r='.7'/%3E%3Ccircle cx='11.2' cy='8' r='.7'/%3E%3C/g%3E%3C/svg%3E"); }
.rgn-name { position: relative; z-index: 1; font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: #fff;
  background: rgba(5,8,22,.6); backdrop-filter: blur(2px); padding: 6px 16px; border-radius: 999px; }
.rgn-chip.is-on { opacity: 1; border-color: var(--ios-blue); box-shadow: 0 6px 20px rgba(30,102,255,.5); }
.rgn-hint { font-size: 12.5px; color: var(--ios-secondary); margin: 0 2px 20px; line-height: 1.45; }

/* Заголовок группы (iOS uppercase) */
.grp-label {
  font-size: 13px; font-weight: 600; letter-spacing: -.01em;
  color: var(--ios-secondary); margin: 4px 4px 8px; text-transform: uppercase;
}
.grp-note { margin: 10px 4px 0; font-size: 13px; color: var(--ios-secondary); line-height: 1.45; }
.grp-note.warn { background: rgba(255,180,0,.1); border: 1px solid rgba(255,180,0,.22); border-radius: 12px; padding: 12px 14px; color: #FFCC66; }

/* Номиналы — плитки на фоне */
.noms-ios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nom {
  position: relative; text-align: left; cursor: pointer;
  background: var(--ios-surface); border: 1px solid var(--ios-sep); border-radius: var(--ios-r);
  padding: 16px 16px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: transform .12s, background .15s;
  display: flex; flex-direction: column; gap: 3px;
}
.nom:active { transform: scale(.97); }
.nom .nt { font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--ios-label); }
.nom .nr { font-size: 14px; font-weight: 600; color: var(--ios-secondary); }
.nom .nchk { position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; opacity: 0; transition: .15s; }
.nom.is-sel { background: var(--ios-blue); }
.nom.is-sel .nt, .nom.is-sel .nr { color: #fff; }
.nom.is-sel .nchk { opacity: 1; }
.nom.off { opacity: .45; cursor: default; }
.nom.off .nt, .nom.off .nr { color: var(--ios-tertiary); }
.nom.free { border: 1.5px solid var(--ios-green); }
.nom.free .nr { color: var(--ios-green); font-weight: 700; }
.nom.free.is-sel { background: var(--ios-green); border-color: var(--ios-green); }
.nom.free.is-sel .nt, .nom.free.is-sel .nr { color: #06301f; }

/* Поле email для оплаты App Store */
.as-email { width: 100%; margin-top: 12px; padding: 15px 16px; border-radius: var(--ios-r); border: 1px solid var(--ios-sep);
  background: var(--ios-surface); color: var(--ios-label); font: inherit; font-size: 15px; }
.as-email::placeholder { color: var(--ios-tertiary); }
.as-email:focus { outline: none; border-color: var(--ios-blue); }

/* Группированный список (iOS inset) */
.ios-group { background: var(--ios-surface); border-radius: var(--ios-r); overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.ios-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-size: 15px; line-height: 1.35; border-bottom: .5px solid var(--ios-sep); }
.ios-row:last-child { border-bottom: 0; }
.row-idx { flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ios-blue); color: #fff; font-size: 13px; font-weight: 700; }

/* Реферальный экран */
.ref-card { background: var(--ios-surface); border-radius: var(--ios-r-lg); padding: 24px 20px; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.ref-emoji { font-size: 40px; }
.ref-num { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 8px 0 10px; }
.ref-card p { color: var(--ios-secondary); font-size: 14.5px; line-height: 1.5; margin-bottom: 18px; }
.ref-hint { margin-top: 12px; font-size: 13px; color: var(--ios-blue); word-break: break-all; }

/* Кнопка-пилюля (вторичное действие) */
.pill-btn { width: 100%; border: 0; border-radius: var(--ios-r); padding: 15px; background: var(--ios-blue); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.pill-btn:active { background: var(--ios-blue-press); }

/* Stepper (инструкция) */
.stepper { list-style: none; padding: 0; margin: 0; }
.stepper li { position: relative; padding: 0 0 20px 40px; font-size: 15px; line-height: 1.4; color: var(--ios-label); }
.stepper li::before { content: ''; position: absolute; left: 11px; top: 22px; bottom: -2px; width: 2px; background: var(--ios-sep); }
.stepper li:last-child { padding-bottom: 0; }
.stepper li:last-child::before { display: none; }
.stepper li::after { content: counter(step); counter-increment: step; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--ios-blue); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.stepper { counter-reset: step; }

/* FAQ (iOS раскрывающиеся строки) */
.faq-ios .faq-item { background: transparent; border: 0; border-radius: 0; border-bottom: .5px solid var(--ios-sep); }
.faq-ios .faq-item:last-child { border-bottom: 0; }
.faq-ios .faq-q { width: 100%; text-align: left; background: 0 0; border: 0; padding: 15px 16px; font: inherit; font-size: 15px; font-weight: 500; color: var(--ios-label); display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; }
.faq-ios .faq-ar { color: var(--ios-tertiary); font-size: 15px; transition: transform .2s; }
.faq-ios .faq-item.is-open .faq-ar { transform: rotate(45deg); }
.faq-ios .faq-a { max-height: 0; overflow: hidden; padding: 0 16px; font-size: 14px; color: var(--ios-secondary); line-height: 1.5; transition: max-height .3s ease, padding .3s ease; }
.faq-ios .faq-item.is-open .faq-a { max-height: 460px; padding: 0 16px 16px; }

/* Sticky pay */
.buybar { position: fixed; left: 0; right: 0; bottom: 64px; z-index: 45; padding: 0 16px 8px; pointer-events: none; }
.buybar-in { pointer-events: auto; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #1E66FF, #3B82F6); border: 0; border-radius: var(--ios-r-lg);
  padding: 12px 12px 12px 20px; box-shadow: 0 10px 34px rgba(30,102,255,.5);
  animation: buybarUp .28s cubic-bezier(.34,1.4,.5,1); }
@keyframes buybarUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.buybar-info { display: flex; flex-direction: column; line-height: 1.1; }
.buybar-info span { font-size: 12px; color: rgba(255,255,255,.8); }
.buybar-info b { font-size: 19px; font-weight: 800; color: #fff; }
.pay-btn { margin-left: auto; border: 0; border-radius: 12px; background: #fff; color: var(--ios-blue); font: inherit; font-size: 15px; font-weight: 700; padding: 13px 20px; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.pay-btn:active { transform: scale(.97); }

/* Tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; display: grid; grid-template-columns: repeat(4,1fr); background: rgba(8,10,20,.97); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid rgba(135,197,255,.18); box-shadow: 0 -6px 24px rgba(0,0,0,.5); padding-bottom: env(safe-area-inset-bottom); }
.tab { border: 0; background: 0 0; padding: 9px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ios-secondary); font: inherit; font-size: 10.5px; font-weight: 600; cursor: pointer; }
.tab svg { width: 24px; height: 24px; }
.tab.is-active { color: var(--ios-blue); }
.tab.is-active svg { stroke-width: 2.1; }

/* ---------- Бонус-баннер ---------- */
.bonus-strip {
  margin: 0 0 18px; padding: 12px 16px; border-radius: 12px; text-align: center;
  background: rgba(46,230,168,.12); color: #2EE6A8; font-size: 14.5px; font-weight: 600; line-height: 1.4;
  border: .5px solid rgba(46,230,168,.3);
}
.bonus-strip b { font-weight: 800; white-space: nowrap; }

/* ---------- Карусель ---------- */
.carousel { margin: 0 -16px 12px; }
.carousel-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 16px; -ms-overflow-style: none; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 100%; scroll-snap-align: center; }
.car-slide img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 18px; display: block; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.car-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 22px; }
.car-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ios-tertiary); transition: .2s; cursor: pointer; }
.car-dot.is-on { background: var(--ios-blue); width: 18px; border-radius: 3px; }

/* ---------- Карточка адреса ---------- */
.addr-card { position: relative; background: linear-gradient(160deg, rgba(30,102,255,.16), rgba(135,197,255,.05)); border: 1.5px solid rgba(30,102,255,.35);
  border-radius: var(--ios-r-lg); padding: 18px; margin-top: 4px; box-shadow: 0 6px 22px rgba(30,102,255,.25); }
.addr-title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--ios-label); margin-bottom: 6px; }
.addr-intro { color: var(--ios-secondary); font-size: 14px; line-height: 1.5; margin-bottom: 14px; }

/* Копия формы Apple */
.apple-form { margin-top: 16px; }
.af-caption { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ios-secondary); text-transform: uppercase; margin: 0 4px 6px; }
.af-group { background: var(--ios-bg-2); border: .5px solid var(--ios-sep); border-radius: 12px; overflow: hidden; }
.af-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: 0 0; border: 0; border-bottom: .5px solid var(--ios-sep); font: inherit; text-align: left; cursor: pointer; }
.af-row:last-child { border-bottom: 0; }
.af-row.af-static { cursor: default; }
.af-k { flex: 0 0 78px; color: var(--ios-secondary); font-size: 15px; }
.af-v { flex: 1; min-width: 0; color: var(--ios-label); font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-v.af-dim { color: var(--ios-tertiary); font-weight: 400; }
.af-cp { flex-shrink: 0; color: var(--ios-blue); font-size: 13px; font-weight: 600; }
.af-actions { display: flex; gap: 10px; margin-top: 12px; }
.af-newbtn, .af-shot { flex: 1; border: .5px solid var(--ios-sep); background: var(--ios-surface-2); border-radius: 10px; padding: 11px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ios-sky); cursor: pointer; }
.af-screenshot { display: block; width: 100%; max-width: 320px; margin: 14px auto 0; border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.af-screenshot.solo { margin-top: 12px; }

/* Мокап экрана активации кода */
.redeem-mock { margin-top: 12px; background: #EDEDF0; border-radius: 16px; padding: 22px 18px 16px; }
.rm-head { display: flex; justify-content: flex-start; margin-bottom: 16px; }
.rm-terms { font-size: 13px; color: var(--ios-secondary); }
.rm-cam { width: 100%; background: #fff; border: 0; border-radius: 12px; padding: 15px; font: inherit; font-size: 16px; font-weight: 600; color: var(--ios-label); margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.rm-inputrow { display: flex; gap: 8px; }
.rm-input { flex: 1; background: #fff; border-radius: 12px; padding: 15px 16px; font-size: 15px; color: var(--ios-tertiary); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.rm-redeem { flex-shrink: 0; display: grid; place-items: center; background: var(--ios-blue); color: #fff; border-radius: 12px; padding: 0 20px; font-size: 15px; font-weight: 600; }
.rm-cap { text-align: center; font-size: 12px; color: var(--ios-tertiary); margin-top: 14px; }

/* Блок «Готово» + переход к пополнению */
.done-block { margin-top: 22px; padding: 22px 20px; text-align: center; border-radius: var(--ios-r-lg);
  background: linear-gradient(160deg, rgba(46,230,168,.14), rgba(46,230,168,.05)); border: 1px solid rgba(46,230,168,.3); }
.done-title { font-size: 18px; font-weight: 800; color: var(--ios-green); margin-bottom: 6px; }
.done-block p { color: var(--ios-secondary); font-size: 14.5px; line-height: 1.45; margin-bottom: 16px; }

/* Финальный CTA */
.help-cta { margin-top: 26px; padding: 20px; text-align: center; background: var(--ios-surface); border-radius: var(--ios-r-lg); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.help-cta p { color: var(--ios-secondary); font-size: 14.5px; line-height: 1.45; margin-bottom: 14px; }

/* Тост */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(8px); z-index: 60;
  background: rgba(0,0,0,.86); color: #fff; font-size: 14px; font-weight: 500; padding: 11px 18px; border-radius: 12px;
  opacity: 0; transition: opacity .22s, transform .22s; pointer-events: none; max-width: 80vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Режим PlayStation (тёмный) ---------- */
body[data-service="ps"] { background: var(--bg, #050816); color: var(--text, #EAF0FF); padding-bottom: 0; }
body[data-service="ps"] .apple-wrap, body[data-service="ps"] .buybar, body[data-service="ps"] .tabbar { display: none !important; }
body[data-service="ps"] .topbar { background: rgba(5,8,22,.7); border-bottom-color: var(--border, rgba(135,197,255,.08)); }
body[data-service="ps"] .tb-logo { filter: none; opacity: 1; }
body[data-service="ps"] .svc { background: rgba(135,197,255,.1); }
body[data-service="ps"] .svc-btn { color: var(--text-muted, #7D89A8); }
body[data-service="ps"] .svc-btn.is-active { color: #fff; }
body[data-service="ps"] .svc-thumb { background: var(--brand-grad, linear-gradient(135deg,#1E66FF,#87C5FF)); box-shadow: 0 8px 24px var(--brand-glow, rgba(30,102,255,.45)); }
.ps-wrap { width: 100%; margin: 0; padding: 0; }
.ps-frame { display: block; width: 100%; height: calc(100dvh - 108px); border: 0; background: var(--bg, #050816); }
.ps-wrap .hero-lite h1 { font-size: 28px; font-weight: 900; letter-spacing: -.02em; color: var(--text, #EAF0FF); }
.ps-wrap .hero-lite p { margin-top: 10px; color: var(--text-muted, #7D89A8); }
.ps-wrap .grad { background: var(--brand-grad, linear-gradient(135deg,#1E66FF,#87C5FF)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ps-stub { margin-top: 22px; padding: 28px 22px; text-align: center; border-radius: 24px; background: var(--bg-card, #0F1830); border: 1px dashed var(--border-hi, rgba(135,197,255,.18)); }
.ps-stub p { color: var(--text-muted, #7D89A8); font-size: 15px; line-height: 1.55; margin-bottom: 20px; }
