/* ==========================================================================
   StarPlay Cine - Universal Luxury Multi-Device Stylesheet
   Optimized for: Smart TVs (Remote/D-Pad), Tablets, and Mobile Phones
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

/* Base & Safe Areas */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #060813;
}

body {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom, 1.5rem);
  background: radial-gradient(circle at 50% -10%, rgba(99, 102, 241, 0.18) 0%, transparent 50%),
              radial-gradient(circle at 90% 60%, rgba(168, 85, 247, 0.10) 0%, transparent 45%),
              radial-gradient(circle at 10% 90%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
              #060813;
  color: #f3f4f6;
  min-height: 100vh;
}

/* 1. Glassmorphism Bento Containers */
.glass-card {
  background: rgba(13, 19, 33, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.glass-card-hover {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 20px 45px -10px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 2. Interactive Focus States for TV Remote & Keyboard (Spatial Navigation) */
.tv-focused,
:focus-visible,
.dpad-focusable:focus,
.plan-card:focus,
.payment-method-card:focus,
.screen-tab:focus,
button:focus,
input:focus,
a:focus {
  outline: 4px solid #818cf8 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 35px rgba(129, 140, 248, 0.95), inset 0 0 12px rgba(129, 140, 248, 0.35) !important;
  transform: scale(1.025);
  z-index: 35 !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, outline 0.15s ease !important;
}

.plan-card:focus .btn-select-plan,
.plan-card.tv-focused .btn-select-plan {
  filter: brightness(1.2) drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
}

/* 3. Plan Cards */
.plan-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 1.75rem;
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.plan-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 20px 50px -10px rgba(99, 102, 241, 0.28);
}

.plan-card.is-popular {
  border-color: rgba(99, 102, 241, 0.6) !important;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.16) 0%, rgba(13, 19, 33, 0.85) 75%) !important;
  box-shadow: 0 20px 50px -10px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.plan-card.is-best-value {
  border-color: rgba(16, 185, 129, 0.55) !important;
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.14) 0%, rgba(13, 19, 33, 0.85) 75%) !important;
  box-shadow: 0 20px 50px -10px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.plan-card.selected {
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 2px #818cf8, 0 20px 50px -10px rgba(99, 102, 241, 0.4) !important;
}

/* 4. Payment Method Cards */
.payment-method-card {
  transition: all 0.2s ease;
  min-height: 72px;
  cursor: pointer;
  border-radius: 1.25rem;
}

.payment-method-card:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.payment-method-card:has(input:checked) {
  border-color: #818cf8 !important;
  background: rgba(99, 102, 241, 0.14) !important;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* 5. Inputs (Min 16px to prevent iOS auto-zoom) */
input[type="text"],
input[type="tel"],
input[type="email"] {
  font-size: 16px !important;
  min-height: 52px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: #818cf8 !important;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25) !important;
}

/* 6. TV Remote Helper Badge */
.tv-remote-badge {
  display: none;
}

@media (min-width: 1024px) {
  .tv-remote-badge {
    display: inline-flex;
  }
}

/* 7. QR Scanner Target Frame */
.qr-scanner-frame {
  position: relative;
  padding: 18px;
  background: #ffffff;
  border-radius: 1.5rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(16, 185, 129, 0.25);
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, outline 0.2s ease;
}

.qr-scanner-frame:focus,
.qr-scanner-frame.tv-focused {
  outline: 5px solid #10b981 !important;
  outline-offset: 5px !important;
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.9), 0 20px 45px rgba(0, 0, 0, 0.6) !important;
  transform: scale(1.04) !important;
  z-index: 35 !important;
}

.qr-scanner-frame:focus .qr-tv-hint,
.qr-scanner-frame.tv-focused .qr-tv-hint {
  color: #059669 !important;
  font-weight: 800 !important;
}

.qr-scanner-frame::before,
.qr-scanner-frame::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #10b981;
  pointer-events: none;
}

.qr-scanner-frame::before {
  top: 8px;
  left: 8px;
  border-top: 3px solid;
  border-left: 3px solid;
  border-top-left-radius: 8px;
}

.qr-scanner-frame::after {
  bottom: 8px;
  right: 8px;
  border-bottom: 3px solid;
  border-right: 3px solid;
  border-bottom-right-radius: 8px;
}

/* 8. Stepper Animations */
.step-tab {
  transition: all 0.25s ease;
}

.step-tab.is-active {
  color: #818cf8 !important;
}

/* 9. FAQ Accordion */
details summary::-webkit-details-marker {
  display: none;
}

details summary {
  list-style: none;
}

details[open] summary .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform 0.25s ease;
}

/* 10. Shimmer effect */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

/* 11. 10-Foot UI for Large Screens and TV */
@media (min-width: 1440px) {
  .plan-card {
    min-height: 520px;
    padding: 2.25rem !important;
  }
  #qrcodeWrapper {
    width: 240px !important;
    height: 240px !important;
  }
}

.border-rose-500 {
  border-color: #f43f5e !important;
  box-shadow: 0 0 0 1px #f43f5e !important;
}

/* 12. Countdown Timer & Urgency Pulses */
.animate-spin-slow {
  animation: spin 6s linear infinite;
}

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

@keyframes pulse-urgent {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.35);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(244, 63, 94, 0.7);
  }
}

.pix-timer-urgent {
  animation: pulse-urgent 1.5s infinite ease-in-out !important;
  border-color: rgba(244, 63, 94, 0.6) !important;
  background-color: rgba(244, 63, 94, 0.15) !important;
}

.pix-timer-urgent #pixCountdownClock {
  color: #fb7185 !important;
}

/* 13. Social Proof Floating Toast */
#socialProofToast.toast-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#socialProofToast .glass-card {
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(16, 185, 129, 0.25);
}

@media (max-width: 640px) {
  #socialProofToast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: auto;
  }
}

/* 14. Exit-Intent Modal */
#exitIntentModal.modal-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

#exitIntentModal.modal-open > div {
  transform: scale(1) !important;
}

#exitIntentModal:focus,
#exitIntentModal .dpad-focusable:focus {
  outline: 3px solid #6366f1 !important;
  outline-offset: 2px !important;
}

/* 15. Order Bump Card (Upsell 2ª Tela) */
.order-bump-box {
  border-style: dashed;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.12);
  transition: all 0.3s ease;
}

.order-bump-box.is-bumped {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.6) !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%) !important;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.25) !important;
}

.order-bump-box:hover {
  border-color: rgba(245, 158, 11, 0.7);
}



