/**
 * Cricket Local Premium — Sporty / Dribbble-inspired welcome & auth
 */

html.premium-v3 .auth-modal--opening {
  padding: 0 !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  z-index: 9000;
  background: #0a1812 !important;
  height: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

html.premium-v3 .auth-modal--opening .auth-modal-backdrop {
  display: none !important;
}

html.premium-v3 .auth-modal-panel--opening {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  height: 100% !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
  display: flex !important;
  overflow: hidden !important;
}

html.premium-v3 body.opening-page-active .app {
  visibility: hidden;
}

html.premium-v3 body.opening-page-active {
  overflow: hidden;
  height: 100%;
  height: 100dvh;
  background: #0a1812 !important;
}

html.premium-v3 .opening-page:not(.pv3-welcome) {
  display: none !important;
}

/* ── Welcome shell — whole page scrolls (Chrome-safe) ── */
.pv3-welcome {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: #0a1812;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.pv3-welcome__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.pv3-welcome__bg-layer {
  position: absolute;
  inset: -5%;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.2;
  filter: blur(1px);
}

.pv3-welcome__bg-layer--1 {
  background-image: url("../assets/heroes/cricket-stadium-crowd-bg.jpg");
  background-position: 60% 20%;
}

.pv3-welcome__bg-layer--2 {
  background-image: url("../assets/heroes/cricket-youth-batsman-bg.jpg");
  background-position: 90% 80%;
  opacity: 0.14;
}

.pv3-welcome > *:not(.pv3-welcome__bg) {
  position: relative;
  z-index: 1;
}

/* High-contrast text panels on imagery */
.pv3-text-panel {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.pv3-text-panel--sheet {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(8, 20, 14, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Top bar — Sporty logo row */
.pv3-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 12px;
}

.pv3-topbar__logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.pv3-topbar__name {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.pv3-topbar__badge {
  margin-left: auto;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #052e16;
  background: linear-gradient(135deg, #4ade80, #22c55e);
}

/* Hero photo — compact so content below is reachable */
.pv3-hero-photo {
  position: relative;
  flex: 0 0 auto;
  height: clamp(140px, 24vh, 200px);
  min-height: 140px;
  max-height: 200px;
  background-size: cover;
  background-position: center 20%;
  overflow: hidden;
}

.pv3-hero-photo__slides {
  position: absolute;
  inset: 0;
}

.pv3-hero-photo__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.pv3-hero-photo__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.pv3-hero-fg {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.55));
}

.pv3-hero-fg--brand,
.pv3-hero-fg--ball {
  right: 10px;
  top: 36%;
  width: clamp(56px, 14vw, 88px);
  height: auto;
  object-fit: contain;
  opacity: 0.95;
  transform: rotate(0deg);
  animation: pv3FloatBall 5s ease-in-out infinite;
}

.pv3-welcome-brand {
  display: flex;
  justify-content: center;
  padding: 0.35rem 1rem 0.85rem;
}

.pv3-welcome-brand__logo {
  width: min(72vw, 260px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.5));
}

.pv3-hero-fg--player {
  right: 8px;
  bottom: 12%;
  width: clamp(64px, 16vw, 96px);
  height: auto;
  border-radius: 12px;
  border: 2px solid rgba(74, 222, 128, 0.35);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  object-fit: cover;
}

.pv3-hero-photo__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(10, 24, 18, 0.45) 0%, rgba(10, 24, 18, 0.15) 32%, rgba(6, 16, 11, 0.92) 76%, #0a1812 100%),
    linear-gradient(90deg, rgba(6, 16, 11, 0.65) 0%, transparent 58%);
  pointer-events: none;
}

.pv3-hero-copy {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 14px;
  z-index: 3;
}

.pv3-hero-headline {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(1.85rem, 7vw, 2.6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #f8faf9;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.65), 0 0 40px rgba(74, 222, 128, 0.12);
}

.pv3-hero-sub {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  max-width: 28ch;
  line-height: 1.4;
}

/* Lower section grows with content; parent .pv3-welcome scrolls */
.pv3-welcome__body {
  flex: 1 0 auto;
  overflow: visible;
  padding: 0 20px calc(28px + env(safe-area-inset-bottom, 0px));
}

/* Sport category pills — betting app style */
.pv3-sport-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 4px 0 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pv3-sport-pills::-webkit-scrollbar {
  display: none;
}

.pv3-sport-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.pv3-sport-pill i {
  font-size: 0.85rem;
  opacity: 0.9;
}

.pv3-sport-pill--active {
  color: #052e16;
  background: linear-gradient(135deg, #86efac, #4ade80, #22c55e);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}

/* Featured live card — Dribbble sports betting */
.pv3-featured {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  min-height: 160px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.pv3-featured__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.pv3-featured__fg,
.pv3-topbar__logo {
  object-fit: contain;
}

.pv3-featured__fg {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  opacity: 0.9;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
  transform: rotate(10deg);
}

.pv3-featured__overlay {
  position: relative;
  z-index: 1;
  padding: 1.1rem 1.15rem;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(0deg, rgba(5, 15, 10, 0.96) 0%, rgba(5, 15, 10, 0.5) 55%, transparent 100%);
}

.pv3-featured__live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  margin-bottom: 0.5rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.pv3-featured__live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pv3Pulse 1.5s ease-in-out infinite;
}

.pv3-featured__title {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8faf9;
}

.pv3-featured__sub {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}

/* Login sheet */
.pv3-login-sheet {
  padding: 0 0 0.5rem;
}

.pv3-login-lead {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.pv3-login-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

/* Primary welcome CTA — hard to miss */
.pv3-btn--club {
  min-height: 58px;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  color: #052e16;
  background: linear-gradient(135deg, #ecfccb 0%, #86efac 35%, #22c55e 100%);
  box-shadow:
    0 0 0 3px rgba(74, 222, 128, 0.35),
    0 12px 36px rgba(34, 197, 94, 0.55);
  animation: pv3CtaGlow 2.4s ease-in-out infinite;
}

.pv3-btn--club:hover {
  filter: brightness(1.06);
  box-shadow:
    0 0 0 4px rgba(74, 222, 128, 0.45),
    0 14px 40px rgba(34, 197, 94, 0.6);
}

.pv3-btn--club i {
  font-size: 1.15rem;
}

.pv3-btn--secondary {
  min-height: 48px;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.pv3-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

@keyframes pv3CtaGlow {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(74, 222, 128, 0.3),
      0 12px 36px rgba(34, 197, 94, 0.45);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(74, 222, 128, 0.5),
      0 14px 42px rgba(34, 197, 94, 0.65);
  }
}

.pv3-field-hint {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.pv3-field-hint i {
  color: #4ade80;
  width: 1rem;
  text-align: center;
}

.pv3-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 14px;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.pv3-btn:active {
  transform: scale(0.98);
}

.pv3-btn--primary {
  color: #052e16;
  background: linear-gradient(135deg, #bbf7d0 0%, #4ade80 45%, #22c55e 100%);
  box-shadow: 0 8px 28px rgba(34, 197, 94, 0.4);
}

.pv3-btn--primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.5);
}

.pv3-btn--outline {
  margin-top: 0.65rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
}

.pv3-btn--text {
  margin-top: 0.55rem;
  min-height: 44px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
  font-weight: 600;
}

.pv3-btn--text i {
  color: #86efac;
}

.pv3-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
}

.pv3-divider::before,
.pv3-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.pv3-btn--guest {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  font-size: 0.92rem;
  min-height: 48px;
}

.pv3-login-note {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
}

/* Mini stat row — Sporty dashboard scores */
.pv3-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.pv3-stat {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  color: #fff;
}

.pv3-stat--green {
  background: linear-gradient(145deg, #166534, #15803d);
  box-shadow: 0 8px 24px rgba(22, 101, 52, 0.35);
}

.pv3-stat--lime {
  background: linear-gradient(145deg, #3f6212, #4d7c0f);
  box-shadow: 0 8px 24px rgba(63, 98, 18, 0.3);
}

.pv3-stat__label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.25rem;
}

.pv3-stat__value {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.pv3-stat__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.65rem;
  opacity: 0.75;
}

@keyframes pv3Pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pv3FloatBall {
  0%, 100% { transform: rotate(14deg) translateY(0); }
  50% { transform: rotate(18deg) translateY(-6px); }
}

/* Auth forms — match welcome */
html.premium-v3 .auth-modal:not(.auth-modal--opening) {
  background: #0a1812 !important;
}

html.premium-v3 .auth-modal:not(.auth-modal--opening) .auth-modal-backdrop {
  background: rgba(5, 15, 10, 0.92) !important;
}

html.premium-v3 .auth-card {
  background: #132820 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 22px !important;
  color: #fff !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
}

html.premium-v3 .auth-title {
  font-family: "Outfit", system-ui, sans-serif !important;
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: #fff !important;
}

html.premium-v3 .auth-sub,
html.premium-v3 .auth-hint {
  color: rgba(255, 255, 255, 0.65) !important;
}

html.premium-v3 .auth-tabs {
  background: rgba(0, 0, 0, 0.25) !important;
  border-radius: 12px !important;
}

html.premium-v3 .auth-tab--active,
html.premium-v3 .auth-tab.active {
  background: linear-gradient(135deg, #4ade80, #22c55e) !important;
  color: #052e16 !important;
  font-weight: 700 !important;
}

html.premium-v3 .auth-field input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  border-radius: 14px !important;
  min-height: 48px;
}

html.premium-v3 .auth-field input:focus {
  border-color: #4ade80 !important;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15) !important;
}

html.premium-v3 .auth-btn:not(.auth-btn--ghost) {
  background: linear-gradient(135deg, #bbf7d0, #4ade80, #22c55e) !important;
  color: #052e16 !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
  min-height: 50px;
}

html.premium-v3 .auth-btn--forgot {
  margin-top: 10px;
}

html.premium-v3 .auth-btn--ghost {
  color: #4ade80 !important;
  border: 1px solid rgba(74, 222, 128, 0.3) !important;
}

@media (min-width: 768px) {
  .pv3-hero-photo {
    height: clamp(130px, 20vh, 180px);
    max-height: 180px;
  }

  .pv3-hero-fg--player {
    width: clamp(72px, 12vw, 100px);
  }

  .pv3-welcome-brand__logo {
    width: min(40vw, 200px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pv3-hero-photo__slide,
  .pv3-featured__live::before,
  .pv3-hero-fg--ball,
  .pv3-btn--club {
    animation: none;
    transition: none;
  }
}