/**
 * Phone mockups — iPhone proportions, device chrome, in-app UI polish.
 */

/* iPhone 14-class logical ratio (390×844) */
:root {
  --phone-ratio: 390 / 844;
  --phone-w-hero: 188px;
  --phone-w-showcase: 210px;
  --phone-bezel: 7px;
  --phone-radius: 30px;
  --phone-screen-radius: 24px;
}

/* ── Device shell ── */
.phone {
  width: var(--phone-w-showcase);
  max-width: 100%;
}

.phone__frame {
  position: relative;
  isolation: isolate;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: var(--phone-ratio);
  padding: var(--phone-bezel) !important;
  border-radius: var(--phone-radius) !important;
  box-sizing: border-box;
}

.phone__frame::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: calc(var(--phone-radius) - 4px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 12;
}

.phone__frame--hipay {
  background: linear-gradient(160deg, #f8fafc 0%, #cbd5e1 45%, #94a3b8 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.08),
    0 24px 48px -12px rgba(15, 23, 42, 0.32) !important;
}

.phone__frame--fieldtrade,
.phone__frame--betting {
  background: linear-gradient(160deg, #475569 0%, #334155 42%, #1e293b 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 24px 48px -12px rgba(15, 23, 42, 0.38) !important;
}

/* Dynamic Island — centered on screen, not a wide “bathtub” notch */
.phone__notch {
  position: absolute !important;
  left: 50% !important;
  top: calc(var(--phone-bezel) + 8px) !important;
  transform: translateX(-50%) !important;
  width: 24% !important;
  min-width: 46px !important;
  max-width: 62px !important;
  height: 10px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #2a2a2a 0%, #0a0a0a 100%) !important;
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.35) !important;
  z-index: 16 !important;
  overflow: hidden;
  pointer-events: none;
}

/* Camera lens — inside the island, not floating beside it */
.phone__notch::before {
  content: '';
  position: absolute;
  right: 20%;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #64748b 0%, #0f172a 75%);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.15);
}

.phone__notch::after {
  display: none !important;
}

.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border-radius: var(--phone-screen-radius) !important;
  overflow: hidden !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* Status bar — flanks the island (time left, icons right) */
.phone__status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 9px 10px 0;
  min-height: 24px;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  pointer-events: none;
}

.phone__status-time {
  flex: 0 0 auto;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding-top: 1px;
}

.phone__status-icons {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

.phone__status-signal {
  width: 12px;
  height: 8px;
  background:
    linear-gradient(to top, #0f172a 0 100%) 0 100% / 2px 40% no-repeat,
    linear-gradient(to top, #0f172a 0 100%) 3px 100% / 2px 60% no-repeat,
    linear-gradient(to top, #0f172a 0 100%) 6px 100% / 2px 80% no-repeat,
    linear-gradient(to top, #0f172a 0 100%) 9px 100% / 2px 100% no-repeat;
  opacity: 0.85;
}

.phone__status-wifi {
  width: 10px;
  height: 7px;
  border: 2px solid transparent;
  border-top-color: #0f172a;
  border-radius: 50% 50% 0 0;
  transform: scale(0.85);
  opacity: 0.85;
}

.phone__status-battery {
  width: 16px;
  height: 8px;
  border: 1.5px solid #0f172a;
  border-radius: 2px;
  opacity: 0.85;
  position: relative;
}

.phone__status-battery::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  bottom: 2px;
  width: 58%;
  background: #22c55e;
  border-radius: 1px;
}

.phone__status-battery::before {
  content: '';
  position: absolute;
  right: -3px;
  top: 2px;
  width: 2px;
  height: 4px;
  background: #0f172a;
  border-radius: 0 1px 1px 0;
}

.phone__home-indicator {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  max-width: 96px;
  min-width: 64px;
  height: 3px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.22);
  z-index: 13;
}

/* App fits one screen — no endless scroll look */
.phone__screen > .app {
  flex: 1;
  min-height: 0;
  overflow: hidden !important;
  padding: 26px 10px 14px !important;
  font-size: 8.25px !important;
  line-height: 1.35;
}

.phone .app__brand {
  font-size: 13px !important;
}

.phone .app__balance-amount {
  font-size: 18px !important;
}

.phone .app__balance-amount--sm {
  font-size: 14px !important;
}

.phone .app__bet-feed {
  max-height: 42%;
  mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
}

.phone .app__agent-list {
  max-height: 52px;
  overflow: hidden;
}

.phone .app__field-stats {
  padding: 6px !important;
  font-size: 7px;
}

.phone .app__tx-list {
  max-height: 72px;
  overflow: hidden;
}

.phone .app__cards {
  margin-top: auto;
  padding: 8px !important;
}

.phone .app__nav {
  flex-shrink: 0;
  margin-top: 4px;
}

/* ── HiPay UI ── */
.app--hipay::before,
.app--hipay::after {
  opacity: 0.22 !important;
  filter: blur(12px) !important;
}

.app--hipay .app__brand {
  background: linear-gradient(135deg, #0f766e, #0d9488) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.app--hipay .app__balance-card {
  border-radius: 12px !important;
  padding: 10px !important;
  background: rgba(255, 255, 255, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.1) !important;
}

.app--hipay .app__quick-actions {
  margin-bottom: 8px !important;
}

.app--hipay .app__action-icon {
  width: 26px !important;
  height: 26px !important;
  border-radius: 10px !important;
}

.app--hipay .app__action-icon--pay {
  background: rgba(13, 148, 136, 0.14) !important;
}

.app--hipay .app__action-icon--topup {
  background: rgba(45, 212, 191, 0.18) !important;
}

.app--hipay .app__tx {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 3px;
  border-bottom: none !important;
}

.app--hipay .app__cards {
  border-radius: 10px !important;
  background: linear-gradient(135deg, #0d9488 0%, #134e4a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25) !important;
  color: #ecfdf5 !important;
}

.app--hipay .app__card-number,
.app--hipay .app__card-meta {
  color: rgba(236, 253, 245, 0.95) !important;
}

.app--hipay .app__nav-item--active {
  background: linear-gradient(90deg, #2dd4bf, #0f766e) !important;
}

.app--hipay .app__link {
  color: #0f766e !important;
}

.app--hipay::before {
  background: rgba(45, 212, 191, 0.35) !important;
}

.app--hipay::after {
  background: rgba(15, 118, 110, 0.28) !important;
}

.app--hipay .app__nav {
  padding: 6px 8px 2px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 12px 12px 0 0;
}

.app--hipay .app__nav-item {
  width: 18px !important;
  height: 3px !important;
}

/* ── FieldTrade UI ── */
.phone .app--fieldtrade {
  background: #f3f5f7 !important;
  color: #12181c !important;
}

.phone .app--fieldtrade .app__brand {
  color: #134e4a !important;
}

.phone .app--fieldtrade .app__feature-grid {
  gap: 4px !important;
  margin-bottom: 6px !important;
}

.phone .app--fieldtrade .app__feature {
  padding: 5px 4px !important;
  border-radius: 8px !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
}

.phone .app--fieldtrade .app__feature-name {
  font-size: 5.5px !important;
  line-height: 1.25;
}

.phone .app--fieldtrade .app__map-block {
  padding: 6px !important;
  margin-bottom: 6px !important;
}

.phone .app--fieldtrade .app__map {
  min-height: 48px !important;
  max-height: 52px;
}

.phone .app--fieldtrade .app__live-badge--field {
  background: #0f766e !important;
  animation: none !important;
}

/* ── Betting UI (light teal — matches FieldTrade / HiPay) ── */
.phone .app--betting {
  background: #f3f5f7 !important;
}

.phone .app--betting .app__brand--betting {
  color: #134e4a !important;
}

.phone .app--betting .app__balance-row--bet {
  padding: 8px !important;
  margin-bottom: 6px !important;
  background: #fff !important;
  border: 1px solid #dde3ea !important;
}

.phone .app--betting .app__bet-slip-count {
  background: #ccfbf1 !important;
  color: #0f766e !important;
}

.phone .app--betting .app__sport-tabs {
  margin-bottom: 6px !important;
}

.phone .app--betting .app__sport-tab--active {
  background: #ecfdf5 !important;
  color: #0f766e !important;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #99f6e4;
}

.phone .app--betting .app__jackpot {
  padding: 8px !important;
  margin-bottom: 6px !important;
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1) !important;
  border: 1px solid #99f6e4 !important;
}

.phone .app--betting .app__jackpot-cta {
  background: #0f766e !important;
  color: #fff !important;
}

.phone .app--betting .app__game-card {
  padding: 6px !important;
  margin-bottom: 4px !important;
  background: #fff !important;
  border: 1px solid #dde3ea !important;
}

.phone .app--betting .app__game-card-live,
.phone .app--betting .app__game-card-tag--gold {
  background: #0f766e !important;
  color: #fff !important;
}

.phone .app--betting .app__odd--hot {
  background: #ecfdf5 !important;
  box-shadow: inset 0 0 0 1px #5eead4 !important;
}

.phone .app--betting .app__match {
  background: #fff !important;
  border: 1px solid #dde3ea !important;
}

.phone .app--betting .app__live-badge {
  animation: none !important;
  background: #0f766e !important;
}

.phone .app--betting .app__nav--bet .app__nav-item--active {
  background: #0f766e !important;
}

/* ── Hero: smaller fan ── */
.hero__phones {
  height: auto !important;
  min-height: 0 !important;
  max-width: 480px;
  padding-bottom: 24px;
}

.hero__phones .phone {
  width: var(--phone-w-hero);
}

.hero__phones .phone__frame {
  width: 100% !important;
}

.hero__phone--left {
  transform: translateX(-92px) translateY(14px) rotate(-10deg) scale(0.88) !important;
}

.hero__phone--center {
  transform: translateX(0) rotate(0deg) scale(1) !important;
}

.hero__phone--right {
  transform: translateX(92px) translateY(14px) rotate(10deg) scale(0.88) !important;
}

.hero__phones:hover .hero__phone--left {
  transform: translateX(-102px) translateY(10px) rotate(-11deg) scale(0.9) !important;
}

.hero__phones:hover .hero__phone--right {
  transform: translateX(102px) translateY(10px) rotate(11deg) scale(0.9) !important;
}

.hero__phones:hover .hero__phone--center {
  transform: translateX(0) scale(1.02) !important;
}

/* ── Showcase ── */
.showcase__device {
  min-height: 380px !important;
}

.showcase__device .phone {
  width: var(--phone-w-showcase);
}

.showcase__device .phone__frame {
  width: 100% !important;
}

.showcase__device .phone__frame--hipay .phone__screen {
  background: linear-gradient(165deg, #ecfdf5 0%, #f0fdfa 42%, #f8fafc 100%) !important;
}

.showcase__device .phone__frame--fieldtrade .phone__screen,
.showcase__device .phone__frame--betting .phone__screen {
  background: #f3f5f7 !important;
}

.showcase--hipay .showcase__device .phone {
  transform: translateY(-4px);
}

.showcase--fieldtrade .showcase__device .phone,
.showcase--betting .showcase__device .phone {
  transform: translateY(-4px);
}

.showcase__device:hover .phone {
  transform: translateY(-8px) !important;
}

.showcase__device::before {
  width: calc(var(--phone-w-showcase) - 12px) !important;
  height: auto !important;
  aspect-ratio: var(--phone-ratio);
  opacity: 0.25 !important;
}

@media (max-width: 900px) {
  :root {
    --phone-w-hero: 168px;
    --phone-w-showcase: 190px;
  }

  .hero__phone--left {
    transform: translateX(-78px) translateY(12px) rotate(-8deg) scale(0.85) !important;
  }

  .hero__phone--right {
    transform: translateX(78px) translateY(12px) rotate(8deg) scale(0.85) !important;
  }

  .showcase__device::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app--hipay::before,
  .app--hipay::after {
    animation: none !important;
  }
}
