/* ===========================
   DESIGN TOKENS — DARK (default)
=========================== */
:root {
  --bg: #080b14;
  --bg2: #0d1120;
  --bg3: #111827;
  --surface: #141c2e;
  --surface2: #1a2540;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);

  --accent: #4f8ef7;
  --accent2: #7c5cfc;
  --accent3: #00d4aa;
  --accent-glow: rgba(79,142,247,0.3);

  --text: #f0f4ff;
  --text2: #a0aec0;
  --text3: #64748b;

  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  --font: 'Inter', -apple-system, sans-serif;
}

/* ===========================
   DESIGN TOKENS — LIGHT
=========================== */
body.light {
  --bg: #f0f4fc;
  --bg2: #e8edf7;
  --bg3: #dde4f0;
  --surface: #ffffff;
  --surface2: #f4f7fe;
  --border: rgba(0,0,0,0.07);
  --border2: rgba(0,0,0,0.12);

  --accent: #3b7de8;
  --accent2: #6c4ef0;
  --accent3: #00b894;
  --accent-glow: rgba(59,125,232,0.2);

  --text: #0f1a2e;
  --text2: #4a5568;
  --text3: #94a3b8;
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================
   HEADER
=========================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.1);
}

body.light .logo-img {
  filter: brightness(0.85) saturate(1.2);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-tagline {
  font-size: 13px;
  color: var(--text2);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ===========================
   THEME TOGGLE BUTTON
=========================== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--surface);
  cursor: pointer;
  font-size: 18px;
  transition: all var(--transition);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--surface2);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: rotate(20deg) scale(1.05);
}

.theme-toggle:active {
  transform: rotate(20deg) scale(0.95);
}

.theme-icon {
  display: block;
  line-height: 1;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

/* ===========================
   HERO
=========================== */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(79,142,247,0.15) 0%, rgba(124,92,252,0.08) 40%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text2);
  font-weight: 400;
  margin-bottom: 40px;
}

.stats-row {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 50px;
  padding: 12px 32px;
  gap: 24px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-num {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-div {
  width: 1px;
  height: 32px;
  background: var(--border2);
}

/* ===========================
   HOW IT WORKS
=========================== */
.how {
  padding: 60px 24px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  text-align: center;
  flex: 1;
  min-width: 200px;
  max-width: 260px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.step:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.step-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.step h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.step-arrow {
  font-size: 28px;
  color: var(--text3);
  flex-shrink: 0;
}

/* ===========================
   STORE SECTION
=========================== */
.store {
  padding: 48px 0 80px;
}

/* ===========================
   FILTERS
=========================== */
.filters-bar {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 13px 48px 13px 44px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.search-input::placeholder { color: var(--text3); }

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.clear-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition);
  display: none;
}

.clear-btn:hover { color: var(--text); }
.clear-btn.visible { display: block; }

.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
  text-align: center;
}

.region-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pill {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 50px;
  padding: 7px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.pill.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(79,142,247,0.4);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group-inline .filter-label {
  margin-bottom: 0;
  white-space: nowrap;
}

.filter-select {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.filter-select:focus { border-color: var(--accent); }

.results-count {
  font-size: 13px;
  color: var(--text3);
  font-weight: 500;
  text-align: center;
}

.results-count strong {
  color: var(--accent);
  font-weight: 700;
}

/* ===========================
   PLANS GRID
=========================== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text3);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

/* ===========================
   PLAN CARD
=========================== */
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  animation: fadeIn 0.3s ease both;
}

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

.plan-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity var(--transition);
}

.plan-card:hover {
  transform: translateY(-3px);
  border-color: var(--border2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

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

.plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.plan-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
}

.plan-region-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  background: rgba(79,142,247,0.12);
  color: var(--accent);
  border: 1px solid rgba(79,142,247,0.2);
  flex-shrink: 0;
}

.plan-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  background: var(--bg3);
  padding: 4px 10px;
  border-radius: 6px;
}

.meta-tag .tag-icon { font-size: 13px; }

.plan-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.plan-price {
  display: flex;
  flex-direction: column;
}

.price-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.price-currency {
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
}

.buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(79,142,247,0.3);
  white-space: nowrap;
}

.buy-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(79,142,247,0.5);
}

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

/* ===========================
   NO RESULTS
=========================== */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text3);
}

.no-results-icon { font-size: 48px; margin-bottom: 16px; }
.no-results h3 { font-size: 20px; color: var(--text2); margin-bottom: 8px; }
.no-results p { font-size: 14px; }

/* ===========================
   PAGINATION
=========================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0 12px;
}

.page-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.page-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,142,247,0.4);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-dots {
  color: var(--text3);
  font-size: 14px;
  padding: 0 4px;
}

/* ===========================
   FOOTER
=========================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  background: var(--bg2);
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo-img {
  height: 30px;
  width: auto;
  opacity: 0.7;
  filter: grayscale(0.3);
}

.footer-copy {
  font-size: 13px;
  color: var(--text3);
}

.footer-note {
  font-size: 12px;
  color: var(--text3);
  opacity: 0.6;
}

/* ===========================
   SCROLLBAR
=========================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border2); }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .hero { padding: 48px 20px 40px; }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 15px; }
  .stats-row { padding: 10px 20px; gap: 16px; }
  .stat-num { font-size: 18px; }
  .steps { flex-direction: column; align-items: stretch; }
  .step { max-width: 100%; }
  .step-arrow { transform: rotate(90deg); text-align: center; }
  .header-tagline { display: none; }
  .filter-row { flex-direction: column; align-items: flex-start; }
  .header-right { gap: 8px; }
  .results-count { margin-left: 0; }
  .plans-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
}

@media (max-width: 480px) {
  .plans-grid { grid-template-columns: 1fr; }
  .pill { font-size: 12px; padding: 6px 12px; }
}
