:root {
  --skyview-pink: #e91e63;
  --skyview-orange: #ff9800;
  --skyview-amber: #ffc107;
  --skyview-dark: #050812;
  --skyview-navy: #090d1d;
  --skyview-panel: rgba(7, 11, 24, 0.9);
  --skyview-line: rgba(255, 255, 255, 0.16);
  --skyview-text: #f8fafc;
  --skyview-muted: #aab3c5;
  --skyview-green: #2ee66b;
}

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

body.verification-page,
body,
body.portal-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--skyview-dark);
  color: var(--skyview-text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.portal-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 24px 18px 48px;
  position: relative;
  z-index: 1;
}

.portal-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.portal-logo img {
  width: clamp(142px, 18vw, 220px);
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(233,30,99,0.24));
}

.portal-admin-link {
  color: var(--skyview-text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
}

.portal-intro {
  margin: clamp(28px, 7vw, 78px) 0 24px;
}

.portal-intro p {
  color: var(--skyview-amber);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.portal-intro h1 {
  font-size: clamp(2.15rem, 7vw, 5rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.portal-games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 18px;
}

.portal-game {
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(8, 13, 28, 0.88);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 22px 58px rgba(0,0,0,0.36);
}

.portal-game a {
  color: inherit;
  text-decoration: none;
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.portal-game-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(233,30,99,0.28), rgba(255,152,0,0.24));
}

.portal-game-media picture,
.portal-game-media img,
.portal-game-placeholder {
  width: 100%;
  height: 100%;
}

.portal-game-media picture {
  display: block;
}

.portal-game-media img {
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.portal-game-placeholder {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.86);
  font-size: 4rem;
  font-weight: 900;
}

.portal-game-body {
  padding: 16px;
}

.portal-game-body span {
  display: block;
  color: var(--skyview-amber);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.portal-game-body h2 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 900;
}

.portal-game-body p {
  color: var(--skyview-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.portal-empty {
  max-width: 560px;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(8, 13, 28, 0.88);
}

.portal-empty h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.portal-empty p {
  color: var(--skyview-muted);
}

.skyview-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(233, 30, 99, 0.24), transparent 34%),
    radial-gradient(circle at 88% 72%, rgba(255, 152, 0, 0.22), transparent 36%),
    linear-gradient(180deg, #060917 0%, #080d1b 52%, #03050d 100%);
  z-index: -2;
}

.skyview-bg::before,
.skyview-bg::after {
  content: "";
  position: absolute;
  inset: 0;
}

.skyview-bg::before {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 0 38%, transparent 76%);
  opacity: 0.34;
}

.skyview-bg::after {
  background:
    linear-gradient(115deg, transparent 0 22%, rgba(233,30,99,0.18) 22.1% 22.35%, transparent 22.45% 100%),
    linear-gradient(68deg, transparent 0 70%, rgba(255,152,0,0.18) 70.1% 70.35%, transparent 70.45% 100%);
}

.game-tile {
  position: absolute;
  width: clamp(150px, 24vw, 300px);
  aspect-ratio: 1.78;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 28px 70px rgba(0,0,0,0.42);
  opacity: 0.48;
  transform: rotate(var(--r));
}

.game-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(233,30,99,0.2), rgba(255,152,0,0.18));
}

.game-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.06);
}

.tile-racing {
  --r: -8deg;
  top: 7%;
  left: 8%;
}

.tile-action {
  --r: 7deg;
  top: 10%;
  right: 7%;
}

.tile-puzzle {
  --r: -5deg;
  bottom: 14%;
  left: 4%;
  opacity: 0.3;
}

.brand-beam {
  position: absolute;
  height: 7px;
  width: 38vw;
  border-radius: 999px;
  filter: blur(0.2px);
  opacity: 0.75;
}

.beam-one {
  top: 22%;
  right: -8%;
  background: linear-gradient(90deg, transparent, var(--skyview-pink), var(--skyview-orange));
  transform: rotate(-22deg);
}

.beam-two {
  bottom: 16%;
  left: -10%;
  background: linear-gradient(90deg, transparent, var(--skyview-orange), var(--skyview-pink));
  transform: rotate(18deg);
}

.return-modal-backdrop,
.payment-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  padding:
    max(20px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  background: rgba(5, 8, 18, 0.82);
}

.return-modal,
.payment-modal {
  width: 100%;
  max-width: 420px;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.payment-modal {
  max-width: 460px;
}

.return-modal h1,
.payment-modal h1 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.return-modal p,
.payment-modal p {
  margin: 0 0 18px;
  color: #4b5563;
  line-height: 1.5;
}

.return-status,
.payment-status {
  min-height: 24px;
  margin-top: 14px;
  color: #0f766e;
  font-weight: 700;
  line-height: 1.45;
}

.consent-reference {
  margin: 18px 0 0 !important;
  color: #6b7280 !important;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.consent-reference code {
  color: #374151;
  font-size: inherit;
}

.return-spinner,
.payment-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  border: 4px solid #d1fae5;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .return-spinner,
  .payment-spinner {
    animation-duration: 1.8s;
  }
}

.verify-shell {
  min-height: 100vh;
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 28px 18px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.verify-brand {
  margin-bottom: 14px;
  text-align: center;
}

.verify-brand img {
  width: clamp(150px, 28vw, 260px);
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(233,30,99,0.24));
}

.portal-alert {
  width: min(100%, 680px);
  margin: 0 auto 14px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
}

.portal-alert-danger {
  border-color: rgba(244,67,54,0.36);
  color: #ffd7d7;
  background: rgba(244,67,54,0.13);
}

.portal-alert-success {
  border-color: rgba(46,230,107,0.3);
  color: #d9ffe4;
  background: rgba(46,230,107,0.12);
}

.portal-alert-info {
  border-color: rgba(255,152,0,0.35);
  color: #ffe8bd;
  background: rgba(255,152,0,0.12);
}

.verify-card {
  width: min(100%, 680px);
  padding: clamp(18px, 3.4vw, 36px);
  border-radius: 28px;
  position: relative;
  background:
    linear-gradient(180deg, rgba(12,18,35,0.96), rgba(4,8,18,0.94)),
    radial-gradient(circle at 50% 0%, rgba(233,30,99,0.16), transparent 48%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    0 30px 90px rgba(0,0,0,0.56),
    0 0 0 1px rgba(233,30,99,0.13) inset;
  overflow: hidden;
}

.verify-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(233,30,99,0.72), rgba(255,152,0,0.56), rgba(255,255,255,0.06));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.verify-card-top {
  text-align: center;
  position: relative;
  z-index: 1;
}

.lock-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: var(--skyview-amber);
  background: rgba(255,193,7,0.09);
  border: 1px solid rgba(255,193,7,0.28);
  box-shadow: 0 0 30px rgba(255,152,0,0.18);
}

.lock-mark svg,
.secure-footer svg,
.trust-icon svg,
.verify-input-icon svg,
.identity-detection-state svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.verify-card h1 {
  margin: 0;
  font-size: clamp(1.85rem, 6vw, 3.4rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0;
}

.verify-card h1 span {
  display: block;
  color: var(--skyview-amber);
  text-shadow: 0 0 24px rgba(255,152,0,0.26);
}

.verify-card-top p {
  margin: 14px auto 0;
  color: var(--skyview-muted);
  font-size: clamp(0.9rem, 2.2vw, 1.08rem);
  line-height: 1.45;
}

.verification-panel {
  margin-top: clamp(16px, 3.5vw, 28px);
  border-radius: 18px;
  padding: clamp(14px, 3vw, 24px);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.12);
  position: relative;
  z-index: 1;
}

.card-inner {
  min-height: 220px;
}

.identity-detection-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
}

.identity-detection-state h2 {
  color: #fff;
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.2;
  text-align: center;
  font-weight: 850;
}

.identity-detection-state p {
  color: var(--skyview-muted);
  line-height: 1.6;
  text-align: center;
}

.detection-spinner {
  position: relative;
  width: 62px;
  height: 62px;
  margin: 0 auto 2px;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-top-color: var(--skyview-pink);
  border-right-color: rgba(233,30,99,0.4);
  border-radius: 50%;
  animation: spin 1.15s linear infinite;
}

.spinner-ring:nth-child(2) {
  inset: 12px;
  border-top-color: var(--skyview-orange);
  animation-duration: 1.55s;
  animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
  inset: 24px;
  border-top-color: var(--skyview-amber);
  animation-duration: 0.95s;
}

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

.progress-bar {
  width: min(100%, 420px);
  height: 8px;
  margin: 10px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
}

.progress-fill {
  height: 100%;
  width: 88%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--skyview-pink), var(--skyview-orange), var(--skyview-amber));
  animation: progress 2.8s ease-in-out infinite;
}

@keyframes progress {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(114%); }
}

.verify-input-shell {
  text-align: left;
}

.verify-input-shell label {
  display: block;
  margin-bottom: 9px;
  color: #fff;
  font-weight: 750;
  font-size: 1rem;
}

.verify-number-box {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto auto 1px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 0 16px;
  border-radius: 16px;
  border: 2px solid rgba(255,152,0,0.55);
  background: rgba(4,8,18,0.72);
  box-shadow: 0 0 26px rgba(233,30,99,0.12);
}

.verify-number-box .divider {
  width: 1px;
  height: 38px;
  background: rgba(255,255,255,0.22);
}

.verify-input-icon {
  color: rgba(255,255,255,0.7);
}

.country-code {
  color: #fff;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 800;
}

.detected-number,
.number-placeholder {
  min-width: 0;
  color: rgba(255,255,255,0.48);
  font-size: clamp(1rem, 3vw, 1.45rem);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detected-number {
  color: #fff;
}

.verify-action,
.retry-button {
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 16px;
  margin-top: 16px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #190716;
  background: linear-gradient(90deg, var(--skyview-pink), var(--skyview-orange), var(--skyview-amber));
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(233,30,99,0.22), 0 10px 24px rgba(255,152,0,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.verify-action:hover,
.retry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(233,30,99,0.28), 0 14px 32px rgba(255,152,0,0.24);
}

.trust-list {
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.trust-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.trust-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--skyview-amber);
  background: rgba(255,193,7,0.09);
  border: 1px solid rgba(255,193,7,0.22);
}

.trust-row strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

.trust-row span,
.trust-row p {
  color: var(--skyview-muted);
  line-height: 1.45;
  margin: 0;
}

.trust-row .brand-word {
  color: var(--skyview-amber);
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.trust-grid .trust-row {
  border-bottom: 0;
  padding-right: 18px;
}

.trust-grid .trust-row + .trust-row {
  padding-left: 18px;
  border-left: 1px solid rgba(255,255,255,0.14);
}

.success-icon,
.error-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.success-icon {
  color: var(--skyview-green);
  background: rgba(46,230,107,0.1);
  border: 1px solid rgba(46,230,107,0.36);
}

.error-icon {
  color: #ff6b6b;
  background: rgba(244,67,54,0.1);
  border: 1px solid rgba(244,67,54,0.36);
}

.error-message,
.success-message {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

.network-requirements {
  text-align: left;
  margin-top: 14px;
}

.network-requirements h4 {
  color: #fff;
  margin-bottom: 12px;
  font-size: 1rem;
}

.network-requirements ol {
  list-style: none;
  counter-reset: network-step;
  display: grid;
  gap: 10px;
}

.network-requirements li {
  counter-increment: network-step;
  position: relative;
  padding-left: 40px;
  color: var(--skyview-muted);
  line-height: 1.45;
}

.network-requirements li::before {
  content: counter(network-step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1d0b06;
  background: var(--skyview-amber);
  font-weight: 900;
  font-size: 0.82rem;
}

.secure-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  color: var(--skyview-amber);
}

.secure-footer span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,152,0,0.68));
}

.secure-footer span:last-child {
  background: linear-gradient(90deg, rgba(255,152,0,0.68), transparent);
}

.secure-footer strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.85rem, 2.6vw, 1.05rem);
  white-space: nowrap;
}

.secure-footer svg {
  width: 22px;
  height: 22px;
}

.game-preview,
.preview-carousel,
.floating-shapes,
.bg-animation {
  display: none;
}

@media (max-width: 760px) {
  .verify-shell {
    justify-content: flex-start;
    padding-top: 14px;
    padding-bottom: 18px;
    width: min(100%, 430px);
  }

  .game-tile {
    width: 150px;
    border-radius: 16px;
    opacity: 0.18;
  }

  .tile-racing {
    left: -8%;
  }

  .tile-action {
    right: -12%;
  }

  .tile-puzzle {
    display: none;
  }

  .verification-panel {
    padding: 12px;
  }

  .verify-number-box {
    grid-template-columns: auto auto 1px minmax(0, 1fr);
    min-height: 58px;
    gap: 9px;
    padding: 0 12px;
  }

  .verify-card {
    border-radius: 22px;
    padding: 16px;
  }

  .verify-brand {
    margin-bottom: 10px;
  }

  .verify-brand img {
    width: 142px;
  }

  .lock-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    margin-bottom: 10px;
  }

  .lock-mark svg,
  .secure-footer svg,
  .trust-icon svg,
  .verify-input-icon svg,
  .identity-detection-state svg {
    width: 22px;
    height: 22px;
  }

  .verify-card h1 {
    font-size: 1.9rem;
    line-height: 1.04;
  }

  .verify-card-top p {
    margin-top: 10px;
    font-size: 0.86rem;
  }

  .verification-panel {
    margin-top: 14px;
  }

  .identity-detection-state h2 {
    font-size: 1.2rem;
  }

  .identity-detection-state p {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .detection-spinner {
    width: 48px;
    height: 48px;
  }

  .spinner-ring:nth-child(2) {
    inset: 8px;
  }

  .spinner-ring:nth-child(3) {
    inset: 16px;
  }

  .card-inner,
  .identity-detection-state {
    min-height: 0;
  }

  .verify-input-shell label {
    font-size: 0.84rem;
  }

  .country-code,
  .detected-number,
  .number-placeholder {
    font-size: 0.98rem;
  }

  .verify-action,
  .retry-button {
    min-height: 54px;
    margin-top: 14px;
    font-size: 0.98rem;
  }

  .trust-list {
    margin-top: 14px;
  }

  .trust-row {
    grid-template-columns: 38px 1fr;
    gap: 10px;
    padding: 11px 0;
  }

  .trust-icon {
    width: 38px;
    height: 38px;
  }

  .trust-row strong {
    font-size: 0.85rem;
    margin-bottom: 2px;
  }

  .trust-row span,
  .trust-row p {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .trust-grid {
    grid-template-columns: 1fr;
    margin-top: 14px;
  }

  .trust-grid .trust-row + .trust-row {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  .secure-footer {
    gap: 10px;
    margin-top: 14px;
  }

  .secure-footer strong {
    gap: 7px;
    font-size: 0.76rem;
  }

  .secure-footer svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 430px) {
  .verify-shell {
    padding: 10px 10px 14px;
  }

  .verify-card {
    border-radius: 20px;
    padding: 14px;
  }

  .verify-brand img {
    width: 128px;
  }

  .verify-card h1 {
    font-size: 1.62rem;
  }

  .verify-card h1 span {
    margin-top: 2px;
  }

  .verification-panel {
    border-radius: 16px;
    padding: 10px;
  }

  .verify-number-box {
    min-height: 52px;
    border-width: 1px;
  }

  .verify-number-box .divider {
    height: 28px;
  }

  .verify-action,
  .retry-button {
    min-height: 50px;
  }

  .secure-footer span {
    display: none;
  }
}
