/* Sk Services — premium recharge UI */
:root {
  --ink: #0c2430;
  --ink-soft: #3d5a66;
  --muted: #6b8590;
  --paper: #f4f7f5;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --line: rgba(12, 36, 48, 0.08);
  --teal: #0b6e7a;
  --teal-deep: #0b3d4a;
  --teal-bright: #1a9aa8;
  --gold: #c7923e;
  --gold-soft: #e8c57a;
  --success: #1f8a5b;
  --danger: #c23b3b;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 12px 40px rgba(11, 61, 74, 0.08);
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --dock-h: 132px;
  --nav-h: 68px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--dock-h) + var(--nav-h) + env(safe-area-inset-bottom, 0px));
}

img,
video {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Atmosphere */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 10% -10%, #d7f0f2 0%, transparent 55%),
    radial-gradient(900px 600px at 100% 0%, #f3e7cf 0%, transparent 50%),
    radial-gradient(800px 500px at 50% 100%, #cfe8e4 0%, transparent 55%),
    linear-gradient(180deg, #eef6f4 0%, #f7f3eb 100%);
}

.mesh {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: drift 14s var(--ease-out) infinite alternate;
}

.mesh-a {
  width: 420px;
  height: 420px;
  background: #9fd4d8;
  top: -120px;
  left: -80px;
}

.mesh-b {
  width: 380px;
  height: 380px;
  background: #e4d0a4;
  top: 30%;
  right: -120px;
  animation-delay: -4s;
}

.mesh-c {
  width: 460px;
  height: 460px;
  background: #b9dcc8;
  bottom: -160px;
  left: 20%;
  animation-delay: -8s;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(24px, 36px, 0) scale(1.08); }
}

/* Shell */
.app-shell {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem 0;
  animation: rise-in 0.7s var(--ease-out);
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 900px) {
  .app-shell {
    width: min(980px, calc(100% - 3rem));
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding: 1.5rem 1.75rem 0.5rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(11, 61, 74, 0.1);
    backdrop-filter: blur(18px);
  }

  .brand-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    grid-template-areas:
      "top top"
      "title aside";
    gap: 0.5rem 1.5rem;
    align-items: end;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0.5rem;
  }

  .brand-hero-top { grid-area: top; margin-bottom: 0.5rem; }
  .hero-line { grid-area: title; max-width: none; font-size: 2.55rem; }
  .hero-sub {
    grid-area: aside;
    max-width: none;
    font-size: 1.05rem;
    padding-bottom: 0.35rem;
  }

  .flow {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 1.5rem 1.75rem;
  }

  .step-profile { grid-column: 1; }
  .step-packs { grid-column: 1 / -1; }
  .step-support { grid-column: 2; grid-row: 1; }

  .credit-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  body {
    padding-bottom: calc(var(--dock-h) + var(--nav-h) + 24px);
  }
}

/* Brand hero */
.brand-hero {
  padding: 1.25rem 0.25rem 1.5rem;
}

.brand-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.35rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-orb {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    linear-gradient(145deg, var(--teal-bright), var(--teal-deep)),
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 50%);
  box-shadow: 0 10px 24px rgba(11, 61, 74, 0.22);
  position: relative;
  overflow: hidden;
}

.brand-orb::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  transform: rotate(18deg);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -0.025em;
  color: var(--teal-deep);
  line-height: 1.15;
}

.brand-tag {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 0.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-line {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 5.5vw, 2.15rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--ink);
  max-width: 14ch;
  animation: rise-in 0.8s var(--ease-out) 0.08s;
}

.hero-sub {
  margin-top: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 28ch;
  animation: rise-in 0.8s var(--ease-out) 0.16s;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--teal-deep);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 0.2s var(--ease-out), background 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  background: var(--surface-solid);
}

.icon-btn.light {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Flow sections */
.flow {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.step {
  animation: rise-in 0.75s var(--ease-out);
}

.step-profile { animation-delay: 0.12s; }
.step-packs { animation-delay: 0.2s; }
.step-support { animation-delay: 0.28s; }

.step-label-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.step-label-row h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Profile */
.profile-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-field:focus-within {
  border-color: rgba(11, 110, 122, 0.45);
  box-shadow: 0 0 0 4px rgba(26, 154, 168, 0.12), var(--shadow-soft);
}

.profile-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  min-width: 0;
  padding: 0.85rem 0;
}

.profile-input::placeholder {
  color: #9aafb6;
  font-weight: 500;
  letter-spacing: 0;
}

.help-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
  background: #e8f4f5;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.help-chip:hover {
  background: #d6ecee;
  transform: translateY(-1px);
}

.field-hint {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  color: var(--muted);
  padding-left: 0.25rem;
}

/* Package grid */
.credit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

@media (min-width: 480px) {
  .credit-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
  }
}

.pack-skeleton {
  height: 96px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #e7efed 25%, #f4f8f7 50%, #e7efed 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.credit-item {
  position: relative;
  border: 1.5px solid var(--line);
  background: var(--surface-solid);
  border-radius: var(--radius-sm);
  padding: 1rem 0.45rem 0.85rem;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease-out),
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(12, 36, 48, 0.03);
  user-select: none;
}

.credit-item:hover {
  transform: translateY(-3px);
  border-color: rgba(11, 110, 122, 0.28);
}

.credit-item.selected {
  border-color: var(--teal);
  background: linear-gradient(180deg, #f2fbfb 0%, #ffffff 100%);
  box-shadow: 0 10px 28px rgba(11, 110, 122, 0.14);
  transform: translateY(-2px);
}

.credit-item .diamond-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  letter-spacing: -0.02em;
}

.credit-item .price-val {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.credit-item .bonus-tag {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--success);
}

.selected-badge {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal-deep);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.check-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 0.6rem;
  display: none;
  place-items: center;
}

.credit-item.selected .check-icon {
  display: grid;
}

.pack-enter {
  animation: rise-in 0.45s var(--ease-out);
}

.imo-diamond,
.gem {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  color: var(--gold);
}

/* Support */
.support-lead {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.support-row {
  display: grid;
  gap: 0.65rem;
}

.support-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease;
}

.support-link:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 110, 122, 0.25);
}

.support-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}

.support-ico.imo {
  background: #e5f3f8;
  color: #1a6d8c;
}

.support-ico.wa {
  background: #e6f6ec;
  color: #1f8a5b;
}

.support-link strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}

.support-link small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.1rem;
}

.support-link .chev {
  color: var(--muted);
  font-size: 0.75rem;
}

/* Checkout dock */
.checkout-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  padding: 0 0.75rem 0.65rem;
  pointer-events: none;
}

.dock-inner {
  pointer-events: auto;
  width: min(720px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "qty totals"
    "cta cta";
  gap: 0.75rem 1rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  padding: 0.9rem 1rem 1rem;
  box-shadow: 0 -8px 40px rgba(11, 61, 74, 0.12);
  animation: dock-in 0.7s var(--ease-out) 0.25s;
}

@keyframes dock-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.qty-block {
  grid-area: qty;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.qty-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #eef5f4;
  border-radius: 999px;
  padding: 0.2rem;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--teal-deep);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(12, 36, 48, 0.06);
  transition: transform 0.15s ease;
}

.qty-btn:active {
  transform: scale(0.94);
}

.qty-input {
  width: 28px;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}

.totals-block {
  grid-area: totals;
  text-align: right;
}

.total-diamonds {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.total-price {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.15;
}

.btn-proceed {
  grid-area: cta;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0.95rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 12px 28px rgba(11, 61, 74, 0.28);
}

.btn-proceed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 3.2s ease-in-out infinite;
}

@keyframes sheen {
  0%, 55% { transform: translateX(-120%); }
  80%, 100% { transform: translateX(120%); }
}

.btn-proceed:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(11, 61, 74, 0.34);
}

.btn-proceed:disabled {
  background: #d5e0e3;
  color: #8aa0a8;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-proceed:disabled::after {
  display: none;
}

.btn-proceed i {
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.btn-proceed:hover:not(:disabled) i {
  transform: translateX(3px);
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.55rem 1rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-item i {
  font-size: 1.1rem;
}

.nav-item.active,
.nav-item:hover {
  color: var(--teal-deep);
  background: #eef6f5;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 28, 36, 0.45);
  backdrop-filter: blur(6px);
}

.modal-overlay.active {
  display: flex;
}

.modal-sheet {
  width: min(480px, 100%);
  background: #fff;
  border-radius: 22px 22px 18px 18px;
  overflow: hidden;
  animation: sheet-up 0.35s var(--ease-out);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

@keyframes sheet-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
}

.modal-head h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-body {
  padding: 0 1rem 1.15rem;
}

.modal-body video {
  width: 100%;
  border-radius: 14px;
  background: #0c2430;
}

.payment-modal {
  align-items: stretch;
  padding: 0;
}

.payment-sheet {
  width: 100%;
  max-width: none;
  height: 100%;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.payment-head {
  background: var(--teal-deep);
  color: #fff;
}

.payment-sheet iframe {
  flex: 1;
  width: 100%;
  border: 0;
}

/* Maintenance */
.maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(800px 500px at 20% 0%, #d7f0f2, transparent 60%),
    #f4f7f5;
}

.maintenance-overlay[style*="flex"],
.maintenance-overlay.is-active {
  display: flex;
}

.maintenance-panel {
  width: min(420px, 100%);
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-soft);
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--teal-deep);
  margin-bottom: 0.75rem;
}

.maintenance-panel h1 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.maintenance-copy {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.maintenance-timer {
  background: #f3f8f7;
  border-radius: 16px;
  padding: 1rem;
}

.maintenance-timer span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

#maintenance-countdown {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--danger);
  letter-spacing: 0.04em;
}

.maintenance-img {
  max-width: 80%;
  max-height: 220px;
  margin: 0 auto 1.25rem;
  border-radius: 16px;
}

/* Legacy class hooks kept for safety */
.imo-header,
.imo-card,
.action-bar,
.section,
.section-header,
.support-item {
  /* superseded by new layout */
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
  }

  .modal-sheet {
    border-radius: 22px;
  }
}
