@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --background: 222 47% 6%;
  --foreground: 210 40% 96%;

  --card: 222 47% 9%;
  --card-foreground: 210 40% 96%;

  --popover: 222 47% 9%;
  --popover-foreground: 210 40% 96%;

  --primary: 217 91% 62%;
  --primary-foreground: 222 47% 7%;

  --secondary: 187 82% 53%;
  --secondary-foreground: 222 47% 7%;

  --muted: 222 30% 15%;
  --muted-foreground: 215 20% 55%;

  --accent: 263 70% 76%;
  --accent-foreground: 222 47% 7%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 210 40% 98%;

  --border: 222 30% 18%;
  --input: 222 30% 16%;
  --ring: 217 91% 60%;

  --radius: 0.875rem;

  --neon-glow:      0 0 20px hsl(217 91% 60% / 0.35), 0 0 60px hsl(217 91% 60% / 0.10);
  --neon-glow-cyan: 0 0 20px hsl(187 82% 53% / 0.35), 0 0 60px hsl(187 82% 53% / 0.10);
  --shadow-card:    0 4px 32px hsl(222 47% 4% / 0.5);
  --shadow-glow-sm: 0 0 0 1px hsl(217 91% 60% / 0.15), 0 4px 24px hsl(217 91% 60% / 0.12);

  --gradient-primary:  linear-gradient(135deg, hsl(217 91% 60%), hsl(187 82% 53%));
  --gradient-accent:   linear-gradient(135deg, hsl(217 91% 60%), hsl(263 70% 76%));
  --gradient-subtle:   linear-gradient(135deg, hsl(217 91% 60% / 0.12), hsl(187 82% 53% / 0.08));
  --gradient-surface:  linear-gradient(180deg, hsl(222 47% 10%), hsl(222 47% 8%));

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground)); }

/* ─── TEXT ───────────────────────────────────────────────── */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: var(--gradient-primary);
}
.text-gradient-accent {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: var(--gradient-accent);
}

/* ─── BACKGROUNDS ────────────────────────────────────────── */
.bg-gradient-primary { background-image: var(--gradient-primary); }
.bg-gradient-accent  { background-image: var(--gradient-accent); }

/* ─── GLASS ──────────────────────────────────────────────── */
.glass {
  background: hsl(var(--card) / 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid hsl(var(--border) / 0.55);
  box-shadow: var(--shadow-card);
}
.glass-solid {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-card);
}

/* ─── GLOW ───────────────────────────────────────────────── */
.neon-glow       { box-shadow: var(--neon-glow); }
.neon-glow-cyan  { box-shadow: var(--neon-glow-cyan); }
.glow-sm         { box-shadow: var(--shadow-glow-sm); }

/* ─── STAT CARD ──────────────────────────────────────────── */
.stat-card {
  background: var(--gradient-surface);
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px hsl(222 47% 4% / 0.6);
  border-color: hsl(var(--primary) / 0.25);
}
.stat-card .stat-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--primary) / 0.12);
}
.stat-card.variant-cyan  .stat-icon { background: hsl(var(--secondary) / 0.12); }
.stat-card.variant-accent .stat-icon { background: hsl(var(--accent) / 0.12); }
.stat-card .stat-label { font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin-top: 0.875rem; }
.stat-card .stat-value { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; margin-top: 0.25rem; }

/* ─── PROGRESS ───────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: hsl(var(--muted));
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gradient-primary);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-bar__fill.cyan { background: var(--gradient-accent); }

/* ─── PLAN CARD ──────────────────────────────────────────── */
.plan-card {
  background: var(--gradient-surface);
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  box-shadow: var(--shadow-card);
}
.plan-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px hsl(222 47% 4% / 0.7);
}
.plan-card.featured {
  border-color: hsl(var(--secondary) / 0.45);
  box-shadow: 0 0 0 1px hsl(var(--secondary) / 0.15), var(--shadow-card);
}
.plan-card.featured:hover {
  border-color: hsl(var(--secondary) / 0.65);
  box-shadow: 0 0 0 1px hsl(var(--secondary) / 0.3), 0 16px 48px hsl(222 47% 4% / 0.7);
}
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  background: hsl(var(--secondary) / 0.18);
  color: hsl(var(--secondary));
  border: 1px solid hsl(var(--secondary) / 0.35);
}

/* ─── BUTTON ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.625rem;
  padding: 0.55rem 1.1rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  box-shadow: var(--neon-glow);
}
.btn-primary:hover { opacity: 0.9; box-shadow: 0 0 28px hsl(217 91% 60% / 0.5), 0 0 80px hsl(187 82% 53% / 0.15); }

.btn-outline {
  background: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}
.btn-outline:hover { background: hsl(var(--muted) / 0.6); border-color: hsl(var(--primary) / 0.4); }

.btn-ghost {
  background: transparent;
  color: hsl(var(--muted-foreground));
  border: none;
}
.btn-ghost:hover { background: hsl(var(--muted) / 0.5); color: hsl(var(--foreground)); }

/* ─── BADGE ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
}
.badge-primary {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.3);
}
.badge-success {
  background: hsl(142 71% 45% / 0.15);
  color: hsl(142 71% 55%);
  border: 1px solid hsl(142 71% 45% / 0.3);
}
.badge-warning {
  background: hsl(38 92% 50% / 0.15);
  color: hsl(38 92% 60%);
  border: 1px solid hsl(38 92% 50% / 0.3);
}
.badge-error {
  background: hsl(var(--destructive) / 0.15);
  color: hsl(var(--destructive));
  border: 1px solid hsl(var(--destructive) / 0.3);
}
.badge-secondary {
  background: hsl(var(--muted) / 0.35);
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border) / 0.6);
}

/* ─── INPUT ──────────────────────────────────────────────── */
.input {
  display: flex;
  width: 100%;
  height: 2.5rem;
  border-radius: 0.625rem;
  border: 1px solid hsl(var(--input));
  background: hsl(var(--muted) / 0.5);
  padding: 0 0.875rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
}
.input::placeholder { color: hsl(var(--muted-foreground)); }
.input:focus {
  border-color: hsl(var(--primary) / 0.6);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}

/* ─── DIVIDER ────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: hsl(var(--border));
}

/* ─── NAV ITEM ───────────────────────────────────────────── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: hsl(var(--muted) / 0.6); color: hsl(var(--foreground)); }
.nav-item.active {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  box-shadow: inset 3px 0 0 hsl(var(--primary));
}

/* ─── SECTION HEADER ─────────────────────────────────────── */
.section-header { margin-bottom: 1.25rem; }
.section-header h2 { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; margin: 0; }
.section-header p  { font-size: 0.8125rem; color: hsl(var(--muted-foreground)); margin: 0.25rem 0 0; }

/* ─── GRID PATTERN ───────────────────────────────────────── */
.grid-pattern {
  background-image:
    linear-gradient(hsl(var(--border) / 0.25) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--border) / 0.25) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ─── TELEGRAM BUTTON ────────────────────────────────────── */
.btn-telegram {
  background: linear-gradient(135deg, #0088cc, #0099e0);
  color: #fff;
  box-shadow: 0 0 18px rgba(0, 136, 204, 0.35);
  transition: all 0.2s;
}
.btn-telegram:hover {
  background: linear-gradient(135deg, #0099e0, #00aaff);
  box-shadow: 0 0 28px rgba(0, 136, 204, 0.5);
  opacity: 1;
}
.btn-telegram:disabled { opacity: 0.6; }

/* ─── ANIMATIONS ─────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-18px); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(1.05); }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.animate-float      { animation: float 6s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 4s ease-in-out infinite; }
.animate-fade-in    { animation: fade-in 0.4s ease both; }
.animate-slide-left { animation: slide-in-left 0.35s ease both; }

.skeleton {
  background: linear-gradient(90deg,
    hsl(var(--muted)) 0%,
    hsl(var(--muted-foreground) / 0.12) 50%,
    hsl(var(--muted)) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 0.375rem;
}

/* ─── RANGE SLIDER ───────────────────────────────────────── */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: hsl(var(--muted));
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  box-shadow: 0 0 8px hsl(var(--primary) / 0.5);
  transition: box-shadow 0.15s;
}
input[type=range]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 16px hsl(var(--primary) / 0.7);
}

/* ─── COPY TOAST ─────────────────────────────────────────── */
.copy-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  padding: 0.65rem 1.1rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  box-shadow: 0 8px 32px hsl(222 47% 4% / 0.6);
  animation: fade-in 0.25s ease both;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .stat-card .stat-value { font-size: 1.25rem; }
  .plan-card { border-radius: 0.75rem; }
}
