*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a12;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f0f5;
  --text-muted: #9ca3b8;
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --primary-glow: rgba(124, 58, 237, 0.35);
  --accent: #ec4899;
  --success: #10b981;
  --error: #ef4444;
  --instagram: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  --telegram: linear-gradient(135deg, #2aabee, #229ed9);
  --rubika: linear-gradient(135deg, #7c3aed, #5b21b6);
  --bale: linear-gradient(135deg, #00c853, #009624);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --font: 'Vazirmatn', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: var(--primary-glow);
  top: -150px;
  right: -100px;
}

.bg-glow-2 {
  width: 400px;
  height: 400px;
  background: rgba(236, 72, 153, 0.15);
  bottom: 10%;
  left: -100px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 18, 0.75);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.35rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text span {
  color: var(--primary-light);
}

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.btn-loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: 4rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--primary-light);
  margin-bottom: 1.25rem;
}

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.hero-content h1 span {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content > p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
}

.hero-stats div {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font-size: 1.5rem;
  color: var(--primary-light);
}

.hero-stats span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Phone mockup */
.phone-mockup {
  width: 280px;
  margin: 0 auto;
  background: #1a1a2e;
  border-radius: 36px;
  padding: 12px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}

.phone-notch {
  width: 100px;
  height: 24px;
  background: #0a0a12;
  border-radius: 0 0 16px 16px;
  margin: 0 auto 8px;
}

.phone-screen {
  background: #12121f;
  border-radius: 24px;
  padding: 1rem;
  min-height: 340px;
}

.mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.mock-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

.mock-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mock-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.mock-card span:first-child {
  font-size: 1.5rem;
}

.mock-card small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.mock-card strong {
  font-size: 0.85rem;
}

.mock-card.instagram { border-right: 3px solid #e1306c; }
.mock-card.telegram { border-right: 3px solid #229ed9; }
.mock-card.rubika { border-right: 3px solid #7c3aed; }
.mock-card.bale { border-right: 3px solid #00c853; }

/* Platform tabs */
.platforms {
  position: relative;
  z-index: 1;
  padding: 0 0 1rem;
}

.platform-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.platform-tab {
  padding: 0.6rem 1.25rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.platform-tab:hover {
  border-color: var(--primary-light);
  color: var(--text);
}

.platform-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #fff;
}

/* Products */
.products {
  position: relative;
  z-index: 1;
  padding: 2rem 0 4rem;
}

.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-head p {
  color: var(--text-muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
}

.product-card.instagram::before { background: var(--instagram); }
.product-card.telegram::before { background: var(--telegram); }
.product-card.rubika::before { background: var(--rubika); }
.product-card.bale::before { background: var(--bale); }

.product-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product-platform {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.platform-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.product-card.instagram .platform-icon { background: rgba(225, 48, 108, 0.15); }
.product-card.telegram .platform-icon { background: rgba(34, 158, 217, 0.15); }
.product-card.rubika .platform-icon { background: rgba(124, 58, 237, 0.15); }
.product-card.bale .platform-icon { background: rgba(0, 200, 83, 0.15); }

.platform-name {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.product-type {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
  width: fit-content;
}

.product-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.product-price {
  display: flex;
  flex-direction: column;
}

.product-price .amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-light);
}

.product-price .currency {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Features */
.features {
  position: relative;
  z-index: 1;
  padding: 3rem 0;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* FAQ */
.faq {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-list details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-list summary {
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list details[open] summary {
  border-bottom: 1px solid var(--border);
}

.faq-list p {
  padding: 1rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-inner p + p {
  margin-top: 0.35rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #14141f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: min(420px, 100%);
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: rgba(124, 58, 237, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.25rem;
}

.modal-icon.error {
  background: rgba(239, 68, 68, 0.15);
}

.modal h2 {
  text-align: center;
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.modal-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.modal-desc.error-text {
  color: var(--error);
  font-weight: 600;
  font-size: 1rem;
}

.modal label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.phone-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}

.phone-input-wrap:focus-within {
  border-color: var(--primary-light);
}

.phone-prefix {
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.9rem;
  border-left: 1px solid var(--border);
}

.phone-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  direction: ltr;
  text-align: left;
}

.phone-input-wrap input:focus {
  outline: none;
}

.phone-input-wrap input::placeholder {
  color: rgba(156, 163, 184, 0.5);
}

#retryBtn {
  margin-bottom: 0.75rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content > p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .nav {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    gap: 1.5rem;
  }

  .product-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .product-footer .btn {
    width: 100%;
  }
}
