/* ============================================================
   7oLove - Global Styles (Pink/Rose Theme)
   ============================================================
   Structure:
   1. BASE - Variables, Reset, Common Components
   2. HOME - Landing page styles
   3. PAYMENT - Token purchase page styles
   4. SUCCESS - Payment success page styles
   ============================================================ */

/* ============================================================
   1. BASE - Shared across all pages
   ============================================================ */

/* CSS Variables - Love Match Pink Theme */
:root {
  --primary: #EC4899;
  --primary-dark: #DB2777;
  --primary-light: #FBCFE8;
  --secondary: #BE185D;
  --accent: #F472B6;
  --background: #0a0a0a;
  --surface: #1a1a1a;
  --surface-elevated: #242424;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --border: #333333;
  --success: #25d366;
  --error: #ff4444;
  --warning: #ffbb33;

  --font-family: "Heebo", sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(236, 72, 153, 0.3);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

/* Prevent WebView text scaling (WhatsApp, etc.) */
html {
  -webkit-text-size-adjust: none !important;
  -moz-text-size-adjust: none !important;
  text-size-adjust: none !important;
  font-size: 16px !important; /* Base for rem units - force in WebViews */
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size: 16px; /* Explicit base for WebViews */
  background: var(--background);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* WebView (WhatsApp, etc.) font scaling fix - reduce base font size */
html.webview {
  font-size: 13px !important;
}

html.webview body {
  font-size: 13px;
}

/* Background Pattern */
.background-pattern {
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(236, 72, 153, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(244, 114, 182, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(236, 72, 153, 0.04) 0%,
      transparent 70%
    );
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  margin: 0 auto;
  padding: 20px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header + breadcrumb (breadcrumb sits below header border) */
.site-header-block {
  margin-bottom: 40px;
}

/* Header */
.header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.lifepath-breadcrumb {
  display: none;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  margin-bottom: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.lifepath-breadcrumb.lifepath-breadcrumb--visible {
  display: flex;
}

.lifepath-breadcrumb-link {
  color: var(--accent);
  text-decoration: none;
}

.lifepath-breadcrumb-link:hover {
  text-decoration: underline;
}

.lifepath-breadcrumb-sep {
  color: var(--text-muted);
  user-select: none;
}

.lifepath-breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.logo-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-text .highlight {
  color: var(--primary);
}


/* Language Selector */
.language-selector {
  position: relative;
}

.language-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 0.9rem;
}

.language-toggle:hover {
  background: var(--surface-elevated);
  border-color: var(--primary);
}

.language-flag {
  font-size: 1.2rem;
  line-height: 1;
}

.language-name {
  font-weight: 500;
}

.language-chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.language-selector.open .language-chevron {
  transform: rotate(180deg);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
  overflow: hidden;
}

/* RTL: dropdown opens to the left */
[dir="rtl"] .language-dropdown {
  right: auto;
  left: 0;
}

.language-selector.open .language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
}

[dir="rtl"] .language-option {
  text-align: right;
}

.language-option:hover {
  background: var(--surface-elevated);
}

.language-option.active {
  background: rgba(236, 72, 153, 0.1);
  color: var(--primary);
}

.language-option .language-flag {
  font-size: 1.3rem;
}

.language-option .language-native {
  flex: 1;
}

/* Mobile adjustments for language selector */
@media (max-width: 480px) {
  .language-toggle {
    padding: 6px 10px;
    gap: 6px;
  }
  
  .language-name {
    display: none;
  }
  
  .language-flag {
    font-size: 1.4rem;
  }
  
  .language-dropdown {
    right: 0;
    min-width: 150px;
  }
  
  [dir="rtl"] .language-dropdown {
    right: auto;
    left: 0;
  }
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Spinner */
.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Footer */
.footer {
  text-align: center;
  padding: 30px 0;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-powered {
  margin: 0;
}

.footer-lifepath-inline {
  color: inherit;
  text-decoration: none;
}

.footer-lifepath-inline:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Error State */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
  text-align: center;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 8px;
}

.error-state h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
}

.error-state p {
  color: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ============================================================
   2. HOME - Landing page styles
   ============================================================ */

/* Hero Section */
.hero {
  text-align: center;
  /* padding: 20px 20px 20px; */
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--text-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* Sections Layout */
.sections-wrapper {
  display: flex;
  flex-direction: column;
}

.section-hero {
  order: 1;
}

.section-services {
  order: 2;
}

.section-try-free {
  order: 3;
}

.section-cta {
  order: 4;
}

/* Services Section */
.services-section {
  padding: 20px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.loading-services {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 40px;
}

.error-message {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: 40px;
}

/* Service Cards */
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.service-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  box-shadow: var(--shadow-glow);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.service-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.service-pricing {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.price-tag {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 0.85rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-wrap-mode: nowrap;
}

.price-tag .plan-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.price-tag.has-tooltip {
  cursor: help;
}

.price-tag .info-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: color 0.2s;
  flex-shrink: 0;
}

.price-tag .info-icon path {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.price-tag.has-tooltip:hover .info-icon {
  color: var(--primary);
}

.price-tag.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: pre-line;
  line-height: 1.6;
  min-width: 180px;
  max-width: 280px;
  text-align: start;
  box-shadow: var(--shadow-md);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}

.price-tag.has-tooltip::before {
  content: "";
  position: absolute;
  bottom: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--primary);
  z-index: 101;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.price-tag.has-tooltip:hover::after,
.price-tag.has-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}

.price-tag .label {
  color: var(--text-secondary);
}

.price-tag .amount {
  color: var(--primary);
  font-weight: 600;
}

/* Service Accordion - Details */
.service-accordion {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s;
}

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

.accordion-toggle-text {
  font-weight: 500;
}

.accordion-chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-toggle[aria-expanded="true"] .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Limit expanded height and add scroll if needed */
.accordion-toggle[aria-expanded="true"] + .accordion-content {
  max-height: 350px;
  overflow-y: auto;
  margin: 5px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--surface-elevated);
}

.accordion-toggle[aria-expanded="true"]
  + .accordion-content::-webkit-scrollbar {
  width: 6px;
}

.accordion-toggle[aria-expanded="true"]
  + .accordion-content::-webkit-scrollbar-track {
  background: var(--surface-elevated);
  border-radius: 3px;
}

.accordion-toggle[aria-expanded="true"]
  + .accordion-content::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

.accordion-plan {
  padding: 12px 0;
  flex: 1;
  min-width: 0;
}

.accordion-plan:not(:last-child) {
  border-bottom: 1px dashed var(--border);
}

.accordion-plan-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.accordion-plan-title::before {
  font-size: 0.9rem;
}

.accordion-plan[data-plan="standard"] .accordion-plan-title::before {
  content: "🔹";
}

.accordion-plan[data-plan="advanced"] .accordion-plan-title::before {
  content: "🔸";
}

.accordion-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

[dir="rtl"] .accordion-list {
  margin-left: 10px;
}
[dir="ltr"] .accordion-list {
  margin-right: 10px;
}

.accordion-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  background: var(--surface-elevated);
  border-radius: var(--radius-sm);
  border-inline-start: 3px solid var(--primary);
}

.accordion-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.accordion-item-detail {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Details Modal (Desktop only) */
.details-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.details-modal.active {
  display: flex;
}

.details-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.details-modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.2);
  animation: modalSlideIn 0.3s ease;
  overflow: hidden;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.details-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.details-modal-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.details-modal-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.details-modal-icon svg {
  width: 24px;
  height: 24px;
}

.details-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.details-modal-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.details-modal-body {
  padding: 20px 24px;
  margin: 5px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

.details-modal-body::-webkit-scrollbar {
  width: 4px;
}

.details-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.details-modal-body::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}

/* Screenshot Preview Button */
.screenshot-preview-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(236, 72, 153, 0.05));
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
  margin-inline-end: 10px;
  width: calc(100% - 10px);
  justify-content: center;
}

.screenshot-preview-btn:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(236, 72, 153, 0.1));
  transform: translateY(-1px);
}

.screenshot-preview-btn.active {
  background: var(--primary);
  color: white;
}

.screenshot-preview-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Screenshot Container (inline in accordion/modal) */
.screenshot-container {
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.screenshot-wrapper {
  position: relative;
  background: var(--surface-elevated);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.screenshot-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

.screenshot-caption {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 8px 0 0;
  font-style: italic;
}

.screenshot-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

[dir="rtl"] .screenshot-close-btn {
  right: auto;
  left: 8px;
}

.screenshot-close-btn:hover {
  background: var(--error);
  transform: scale(1.1);
}

/* Screenshot Modal (mobile only) */
.screenshot-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.screenshot-modal.active {
  display: flex;
}

.screenshot-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.screenshot-modal-content {
  position: relative;
  max-width: 100%;
  max-height: 90vh;
  animation: modalSlideIn 0.3s ease;
}

.screenshot-modal-image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.screenshot-modal-caption {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 12px 0 0;
  font-style: italic;
}

.screenshot-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--error);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  box-shadow: var(--shadow-md);
}

[dir="rtl"] .screenshot-modal-close {
  right: auto;
  left: -12px;
}

.screenshot-modal-close:hover {
  transform: scale(1.1);
  background: #ff2222;
}

/* Try Free Section */
.try-free-section {
  padding: 20px;
  margin-bottom: 20px;
}

.try-free-card {
  background: linear-gradient(
    135deg,
    var(--surface) 0%,
    var(--surface-elevated) 100%
  );
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  box-shadow: var(--shadow-glow);
}

.try-free-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.try-free-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 16px 0 12px;
}

.try-free-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.try-free-desc strong {
  color: var(--primary);
  font-size: 1.2rem;
}

.btn-whatsapp-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--primary);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-whatsapp-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
}

.btn-whatsapp-cta svg {
  width: 24px;
  height: 24px;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 10px 20px 30px;
}

.cta-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.cta-subtitle {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-cta svg {
  width: 24px;
  height: 24px;
}

/* Home Section Title */
.home-section-title,
.services-section .section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 32px;
  color: var(--text-primary);
}

/* Home - Responsive */
@media (max-width: 640px) {
  .btn-whatsapp-cta svg {
    width: 44px;
    height: 44px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile order: Hero -> Try Free -> Buy Tokens -> Services */
  .section-hero {
    order: 1;
  }

  .section-try-free {
    order: 2;
  }

  .section-cta {
    order: 3;
  }

  .section-services {
    order: 4;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .services-section .section-title {
    font-size: 1.4rem;
  }
}

/* ============================================================
   3. PAYMENT - Token purchase page styles
   ============================================================ */

/* Balance Display */
.balance-display {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(236, 72, 153, 0.05));
  padding: 10px 16px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(236, 72, 153, 0.3);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.1);
  font-size: 0.9rem;
  white-space: nowrap;
  height: 42px;
  min-width: 185px;
  box-sizing: border-box;
}

.balance-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.balance-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 20px;
}

.loading-state p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Plans Section */
.plans-section {
  width: 100%;
  max-width: 600px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 1.1rem;
}

/* Plans Grid */
.plans-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}

.plan-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.5s ease forwards;
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.plan-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.plan-card:hover::before {
  opacity: 1;
}

.plan-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), var(--surface));
  box-shadow: var(--shadow-glow);
}

.plan-card.selected::after {
  content: "✓";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: bold;
  color: white;
}

.plan-card:nth-child(1) {
  animation-delay: 0.1s;
}

.plan-card:nth-child(2) {
  animation-delay: 0.2s;
}

.plan-card:nth-child(3) {
  animation-delay: 0.3s;
}

.plan-card:nth-child(4) {
  animation-delay: 0.4s;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.plan-tokens {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.plan-tokens .number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.plan-tokens .label {
  font-size: 1rem;
  color: var(--text-secondary);
}

.plan-price {
  text-align: left;
}

.plan-price .amount {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.plan-price .currency {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-right: 4px;
}

.plan-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.plan-per-token {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.plan-per-token span {
  color: var(--primary);
  font-weight: 600;
}

.plan-badge {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
}

/* Payment Method Section */
.payment-method-section {
  margin-bottom: 32px;
}

.method-title {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.payment-methods {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.payment-method-btn {
  flex: 1;
  max-width: 200px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
}

.payment-method-btn:hover {
  border-color: var(--primary);
  background: var(--surface-elevated);
}

.payment-method-btn.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), var(--surface));
  box-shadow: var(--shadow-glow);
}

.method-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.method-icon svg {
  width: 36px;
  height: 36px;
  color: var(--primary);
}

.method-icon img {
  max-width: 100%;
  max-height: 100%;
}

.bit-icon {
  font-size: 2rem;
  color: var(--primary);
}

/* Process Section */
.process-section {
  text-align: center;
}

.btn-pay {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 20px 40px;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
}

.btn-pay:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.btn-pay:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-price {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-size: 1rem;
}

/* Security Badges */
.security-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-elevated);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 10px;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 98vh;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  right: auto;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--surface-elevated);
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s;
}

/* LTR languages: close button on right */
[dir="ltr"] .modal-close {
  left: auto;
  right: 16px;
}

.modal-close:hover {
  background: var(--error);
  color: white;
}

.modal-body {
  padding: 70px 20px 20px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-body iframe {
  width: 100%;
  min-height: 450px;
  border: none;
}

/* Phone & Balance Row - Compact mode (phone from URL) */
.phone-balance-row.phone-from-url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.phone-balance-row.phone-from-url .phone-label {
  display: none; /* Hide label in compact mode */
}

.phone-balance-row.phone-from-url .phone-input-wrapper {
  flex: 0 1 auto;
  max-width: none;
  margin: 0;
}

.phone-balance-row.phone-from-url .phone-input-container {
  border-radius: var(--radius-full);
  border-width: 1px;
  height: 42px;
  box-sizing: border-box;
  width: fit-content;
  min-width: 185px;
  flex-shrink: 1;
}

.phone-balance-row.phone-from-url .country-code-select {
  padding: 8px 6px 8px 12px;
  min-width: auto;
  font-size: 0.9rem;
  border-radius: var(--radius-full) 0 0 var(--radius-full);
}

.phone-balance-row.phone-from-url .phone-input {
  padding: 8px 16px 8px 8px;
  font-size: 0.9rem;
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
}

.phone-balance-row.phone-from-url .balance-display {
  flex-shrink: 1;
  margin: 0;
}

@media (max-width: 380px) {
  .phone-balance-row.phone-from-url {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

/* Phone & Balance Row - Manual entry mode (default) */
.phone-balance-row {
  margin-bottom: 32px;
}

.phone-balance-row .phone-input-wrapper {
  max-width: 400px;
  margin: 0 auto;
}

.phone-balance-row:not(.phone-from-url) .balance-display {
  display: inline-flex !important;
  margin: 16px auto 0;
}

.phone-balance-row:not(.phone-from-url) {
  text-align: center;
}

/* Phone Input Section (legacy) */
.phone-section {
  margin-bottom: 32px;
}

.phone-input-wrapper {
  max-width: 400px;
  margin: 0 auto;
}

.phone-input-container {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s;
  direction: ltr; /* Phone numbers are always LTR */
  position: relative; /* For proper containment */
}

.phone-input-container:focus-within {
  border-color: var(--primary);
}

.country-code-select {
  padding: 16px 8px;
  color: var(--text-primary);
  background: var(--surface-elevated);
  border: none;
  border-right: 1px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  min-width: 100px;
}

.country-code-select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

[dir="rtl"] .country-code-select {
  border-right: none;
  border-left: 1px solid var(--border);
}

.phone-prefix {
  padding: 16px;
  color: var(--text-secondary);
  background: var(--surface-elevated);
  border-right: 1px solid var(--border);
}

[dir="rtl"] .phone-prefix {
  border-right: none;
  border-left: 1px solid var(--border);
}

.phone-input {
  flex: 1;
  padding: 16px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-family: inherit;
  outline: none;
}

.phone-input::placeholder {
  color: var(--text-muted);
}

.phone-input.disabled {
  opacity: 0.7;
}

.phone-input.error {
  color: var(--error);
}

.phone-error {
  display: block;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 8px;
}

/* Verify Phone Button */
.btn-verify-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-verify-phone:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-verify-phone:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-verify-phone.success {
  background: var(--success);
  pointer-events: none;
}

.btn-verify-phone svg {
  flex-shrink: 0;
}

.verify-hint {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 8px;
}

.verify-hint.success {
  color: var(--primary);
  font-weight: 500;
}

.phone-section.phone-locked .phone-input-container {
  background: var(--surface-elevated);
  border-color: var(--primary);
}

.phone-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 12px 12px 16px;
  font-size: 1.5rem;
  background: var(--surface-elevated);
  border-right: 1px solid var(--border);
}

/* GPAPI Loading Overlay */
.gpapi-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  width: 100%;
  gap: 20px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.gpapi-loading-overlay.gpapi-loading-hidden {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  pointer-events: none;
}

.gpapi-loading-overlay p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.gpapi-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* GPAPI Content */
.gpapi-content-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  pointer-events: none !important;
}

.gpapi-content-visible {
  opacity: 1 !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  position: relative !important;
  pointer-events: auto !important;
  animation: gpapiContentFadeIn 0.4s ease forwards;
  width: 100%;
}

@keyframes gpapiContentFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Payment Toast */
.payment-toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  color: white;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 500px;
  width: 90%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.payment-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.payment-toast-error {
  background: var(--error);
}

.payment-toast-success {
  background: var(--primary);
}

.payment-toast-warning {
  background: #f59e0b;
}

.payment-toast .toast-message {
  flex: 1;
}

.payment-toast .toast-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.payment-toast .toast-close:hover {
  opacity: 1;
}

/* Payment - Responsive */
@media (max-width: 300px) {
  .section-title {
    font-size: 1.6rem;
  }

  .plan-header {
    flex-direction: column;
    gap: 12px;
  }

  .plan-price {
    text-align: right;
  }

  .plan-tokens .number {
    font-size: 2rem;
  }

  .plan-price .amount {
    font-size: 1.5rem;
  }

  .payment-methods {
    flex-direction: column;
  }

  .payment-method-btn {
    max-width: 100%;
    flex-direction: row;
    justify-content: center;
  }

  .method-icon {
    width: 32px;
    height: 32px;
  }
}

/* ============================================================
   4. SUCCESS - Payment success page styles
   ============================================================ */

/* Success Container */
.success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px 20px;
}

/* Success Icon */
.success-icon {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  box-shadow: var(--shadow-glow);
  animation: scaleIn 0.5s ease;
}

.success-icon svg {
  width: 60px;
  height: 60px;
  color: white;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Success Title & Message */
.success-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--text-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeIn 0.5s ease 0.2s both;
}

.success-message {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 400px;
  animation: fadeIn 0.5s ease 0.3s both;
}

/* Success Details */
.success-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  margin-bottom: 40px;
  width: 100%;
  max-width: 400px;
  animation: fadeIn 0.5s ease 0.4s both;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--text-secondary);
}

.detail-value {
  font-weight: 600;
  color: var(--text-primary);
}

.detail-value.highlight {
  color: var(--primary);
  font-size: 1.3rem;
}

.detail-value-with-copy {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Copy Button */
.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.copy-btn:hover {
  color: var(--primary);
  background: var(--surface-elevated);
}

.copy-btn.copied {
  color: var(--primary);
}

.copy-btn svg {
  width: 16px;
  height: 16px;
}

/* Success Actions */
.success-actions {
  animation: fadeIn 0.5s ease 0.5s both;
}

.btn-whatsapp {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-whatsapp svg {
  width: 24px;
  height: 24px;
}

/* Processing State */
.processing-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Confetti */
.confetti {
  position: fixed;
  pointer-events: none;
  z-index: 100;
}
