/* ═══════════════════════════════════════════════════════════════════
   SCROLLPIXELS V2 - CASINO DARK THEME (Refactored)
   Combines: Dark Modern Theme + 2-Column Casino Layout
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Fondo y Superficies (Unified) */
  /* Fondo y Superficies (Unified) */
  --bg-primary: #000000;
  /* Solid Black */
  --bg-secondary: #0a0a0a;
  --bg-panel: #111111;
  --bg-elevated: #1E1E28;

  /* Bordes */
  --border-color: var(--border-dim);
  --border-hover: rgba(255, 255, 255, 0.2);
  --border-active: rgba(124, 58, 237, 0.5);

  /* Acentos de Marca */
  --accent-premium: #8b5cf6;
  /* Púrpura */
  --accent-pro: #22c55e;
  /* Verde */
  --accent-free: #71717a;
  /* Gris */
  --accent-color: #8b5cf6;
  /* Fallback generic */

  /* Textos */
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Layout */
  --radius-md: 12px;
  --radius-xl: 24px;
  --max-width: 1200px;

  /* Animaciones */
  --ease-casino: cubic-bezier(0.15, 0.5, 0.25, 1.1);
}

/* ═══════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.pricing-page-wrap {
  padding: 40px 24px 40px;
  /* Reduced vertical padding */
  min-height: 100vh;
  background: var(--bg-primary);
  /* Solid Black */
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Center content vertically */
  align-items: center;
}

.wrap {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════ */
.pricing-head {
  text-align: center;
  margin-bottom: 32px;
  /* Reduced from 60px */
  z-index: 10;
}

.pricing-head h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  margin-bottom: 12px;
  /* Slightly reduced */
  background: linear-gradient(135deg, white 30%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-head p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════
   MAIN LAYOUT (2 COLUMNS)
   ═══════════════════════════════════════════════════════════════════ */
.pricing-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 80px;
  width: 100%;
  perspective: 1200px;
  align-items: start;
}

/* ═══════════════════════════════════════════════════════════════════
   LEFT COLUMN: BILLING & CARDS STACK
   ═══════════════════════════════════════════════════════════════════ */
.left-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* Reduced from 32px */
}

/* Toggle Switch (Adapted from Test) */
.toggle-container {
  display: flex;
  background: #ffffff03;
  padding: 4px;
  border-radius: 99px;
  position: relative;
  border: 1px solid var(--border-color);
  width: 100%;
  height: 54px;
  transition: opacity 0.1s ease, visibility 0.1s;
}

.toggle-container.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.toggle-bg {
  position: absolute;
  left: 4px;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: var(--bg-elevated);
  border-radius: 99px;
  transition: transform 0.1s ease-out;
  /* Much faster */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.toggle-btn {
  flex: 1;
  position: relative;
  z-index: 2;
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-btn:hover {
  color: var(--text-primary);
}

.toggle-btn.active {
  color: white;
}

.toggle-container.annual-mode .toggle-bg {
  transform: translateX(100%);
  /* If width is 50%, moving 100% moves it correctly to the right half */
  transform: translateX(calc(100% + 4px));
  /* Adjust for gap? No, standard 100% usually fine if calc is correct */
  transform: translateX(calc(100% + 1px));
  /* Fine tune */
  width: calc(50% - 5px);
  /* Fine tune */
  background: var(--accent-premium);
  transform: translateX(156px);
  /* Specific width override if needed, using flex calculation safer */
}

/* Using JS class toggle on wrapper is safer for generic widths: */
.toggle-container.annual-mode .toggle-bg {
  /* Reset specific calc, trust flex logic if we set width explicitly or rely on parent width */
  transform: translateX(100%);
  /* For simple flex 2 items, 100% is safe if no gap */
  /* Wait, we have padding 4px. So it moves (TotalWidth - Padding*2) / 2 */
  /* Let's use simple left/right logic if transform is tricky without fixed width */
  left: 50%;
  transform: translateX(0);
  /* But we want transition. */
}

/* REVERT TO SIMPLE TRANSFORM based on fixed width logic from test-pricing.html or simple percentage */
.toggle-container .toggle-bg {
  width: calc(50% - 4px);
  left: 4px;
}

.toggle-container.annual-mode .toggle-bg {
  transform: translateX(100%);
  left: 0;
  transform: translateX(calc(100% + 0px));
}

/* Actually, simpler: */
.toggle-container.annual-mode .toggle-bg {
  transform: translateX(calc(100% + 4px));
  /* Push past the middle? */
  /* Let's stick to the tested CSS from user input which used transform: translateX(100%) and seemed to work in their context. */
  transform: translateX(100%);
  background: var(--accent-premium);
}


.badge-discount {
  position: absolute;
  top: -12px;
  right: 10px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  transform: rotate(12deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* Stacked Mini Cards */
.cards-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mini-card {
  background: rgba(21, 21, 29, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px 20px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-style: preserve-3d;
  overflow: hidden;
}

.mini-card:hover {
  border-color: var(--border-hover);
  background: rgba(21, 21, 29, 0.9);
}

/* Exact Navbar Active Tab Style */
.mini-card.selected {
  background: linear-gradient(90deg, color-mix(in srgb, var(--selected-color), transparent 85%) 0%, transparent 100%);
  border-color: transparent;
  /* Reset standard border */
  border-left: 3px solid var(--selected-color);
  /* The "Stick" */

  transform: translateX(12px);
  /* Slight push, less dramatic than before */
  box-shadow: none;
  /* Navbar tabs don't have heavy shadow, keeping it clean or subtle */

  z-index: 5;
  opacity: 1;
}

.mini-card.selected .plan-name svg {
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--selected-color), transparent 40%));
  transform: scale(1.1);
}

.mini-card:not(.selected) {
  opacity: 0.6;
  transform: scale(0.98);
}

/* Selection Indicator Line */
.mini-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  opacity: 0;
  transition: opacity 0.15s;
}

.mini-card.selected::before {
  opacity: 1;
}

.card-header-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.plan-name {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.plan-name svg {
  width: 24px;
  height: 24px;
  transition: all 0.15s ease;
}

/* Plan Specific Colors & Icons */
.plan-free {
  --selected-color: var(--accent-free);
}

.plan-premium {
  --selected-color: var(--accent-premium);
}

.plan-pro {
  --selected-color: var(--accent-pro);
}

/* Icon Colors - Force overrides for SVGs */
.plan-premium .plan-icon-premium,
.plan-premium svg.plan-icon-premium {
  color: var(--accent-premium) !important;
  fill: currentColor;
}

.plan-pro .plan-icon-pro,
.plan-pro svg.plan-icon-pro {
  color: var(--accent-pro) !important;
  fill: currentColor;
}

/* Animation when Selected */
.mini-card.selected .plan-name svg {
  transform: scale(1.15) rotate(-5deg);
  filter: drop-shadow(0 0 8px currentColor);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Elastic ease */
}

/* Slot Reel Pricing Styles */
.card-price-container {
  display: flex;
  align-items: baseline;
  position: relative;
}

.reel-window {
  height: 48px;
  /* Fixed height for number window */
  overflow: hidden;
  position: relative;
  display: inline-block;
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.slot-reel {
  display: flex;
  flex-direction: column;
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
  line-height: 48px;
  /* Matches window height for alignment */
  will-change: transform, filter;
  transform: translateY(0);
}

.slot-reel.blur-move {
  filter: url(#motionBlur);
  /* Use SVG filter */
}

.slot-reel.blur-move div {
  transform: scaleY(1.5);
  opacity: 0.7;
}

.currency-symbol {
  font-size: 1.5rem;
  font-weight: 700;
  margin-left: 2px;
  color: var(--text-muted);
}

.card-period {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 6px;
}

/* Plan Specific Colors */
.plan-free {
  --selected-color: var(--accent-free);
}

.plan-premium {
  --selected-color: var(--accent-premium);
}

.plan-pro {
  --selected-color: var(--accent-pro);
}

/* ═══════════════════════════════════════════════════════════════════
   RIGHT COLUMN: FEATURES PANEL (Tools Card Style)
   ═══════════════════════════════════════════════════════════════════ */
.features-panel {
  /* Base Dark + Radial Glow (Tools Style) */
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--dynamic-color, #fff), transparent 85%), transparent 70%),
    linear-gradient(135deg, rgba(20, 15, 35, 1) 0%, rgba(10, 5, 20, 1) 100%);

  border: 1px solid rgba(255, 255, 255, 0.08);
  /* Removed 'none' from previous diff to ensure clean apply, actually user wanted NO border later, but I see current file has border: 1px. User said 'No vea nada, empieza de nuevo'. Wait, user said 'Quitale los bordes' in step 487. But reverted file has border. I should ensure border is NONE as requested earlier. */
  border: none;
  /* Enforcing NO BORDER as requested */

  border-radius: 24px;
  padding: 40px 50px 18px;
  min-height: 520px;
  position: relative;
  overflow: hidden;
  /* Important for bg icon */
  transition: opacity 0.15s, filter 0.15s, border-color 0.3s;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Big Background Icon (Premium Watermark - Top Right) */
.bg-icon-large {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 360px;
  height: 360px;
  color: var(--dynamic-color);
  opacity: 0.12;
  /* Increased visibility from 0.05 */
  transform: rotate(15deg);
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}


.bg-icon-large svg {
  width: 100% !important;
  height: 100% !important;
  stroke-width: 1.5px;
}

/* Hover Effect */
.features-panel:hover .bg-icon-large {
  transform: rotate(0deg) scale(1.05);
  opacity: 0.1;
}

/* Ensure content is above icon */
.features-panel>* {
  position: relative;
  z-index: 1;
}

/* Optional: Subtle border tint match */
.features-panel {
  border-color: color-mix(in srgb, var(--dynamic-color, rgba(255, 255, 255, 0.1)), transparent 80%);
}

.features-panel.blur-active {
  filter: blur(8px);
  opacity: 0.6;
  transform: scale(0.995);
}

#features-content h2 {
  font-size: 2.2rem;
  /* Reduced size */
  margin-bottom: 8px;
  /* Reduced margin */
  color: var(--dynamic-color, white);
  line-height: 1.1;
}

.panels-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  /* Reduced margin */
  display: block;
}

/* HIDE FREE PLAN IF LOGGED IN */
body.is-logged-in #card-free,
html.auth-in #card-free,
body[data-session="in"] #card-free {
  display: none !important;
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 10px;
  /* Reduced gap */
  margin-bottom: 24px;
  /* Reduced margin */
  padding: 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  /* Slight reduce */
  padding: 10px 16px;
  /* Reduced padding */
  border-radius: 12px;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  color: var(--text-secondary);
}

.feature-item.highlight {
  color: white;
  font-weight: 500;
}

.feature-icon {
  color: var(--dynamic-color);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* CTA Button Dynamic */
.cta-button {
  width: 100%;
  padding: 20px;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  background: var(--dynamic-color);
  color: white;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px -5px rgba(0, 0, 0, 0.7);
  filter: brightness(1.1);
}

/* Disabled Button State */
.cta-button:disabled,
.cta-button.plan-current-disabled {
  background: var(--bg-elevated) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
  border: 1px solid var(--border-color);
  opacity: 0.6;
}

.cta-button:disabled:hover,
.cta-button.plan-current-disabled:hover {
  transform: none;
  box-shadow: none;
  filter: none;
}

.pricing-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  display: block;
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .pricing-layout {
    grid-template-columns: 1fr;
    /* Stack vertically */
    gap: 24px;
  }

  .mini-card.selected {
    transform: scale(1.02);
    /* Less dramatic on mobile */
  }

  .features-panel {
    min-height: auto;
    padding: 32px 24px;
  }
}



/* ═══════════════════════════════════════════════════════════════════
   FAQ SECTION
   ═══════════════════════════════════════════════════════════════════ */
.faq {
  max-width: 800px;
  margin: 60px auto 100px;
  /* Bottom spacing */
  padding: 0 24px;
}

.faq h3 {
  font-size: 1.8rem;
  margin-bottom: 32px;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
}

.faq-question {
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.15s ease;
  color: var(--text-primary);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  color: var(--accent-color);
}

/* Fast Icon Animation */
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

details[open] .faq-question::after {
  transform: rotate(45deg);
  color: var(--text-primary);
}

details[open] .faq-question {
  padding-bottom: 12px;
}

.faq-answer {
  padding-bottom: 24px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1rem;
  /* Fast Fade In */
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Table Adjustments */
@media (max-width: 768px) {
  .comparison-section {
    padding: 0 16px;
    margin-top: 60px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 16px 12px;
    font-size: 0.85rem;
  }

  .feature-note {
    display: none;
  }

  /* Save space on mobile */

  /* Make horizontal scroll obvious */
  .table-container {
    box-shadow: inset -10px 0 20px rgba(0, 0, 0, 0.5);
  }
}