:root {
  --bg: #0a0e1a;
  --bg2: #111827;
  --bg3: #1a2236;
  --border: rgba(255,255,255,0.07);
  --green: #22c55e;
  --green-dim: rgba(34,197,94,0.12);
  --blue: #3b82f6;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; min-height: 100vh; }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }

/* ── NAV ── */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 64px;
  background: rgba(10,14,26,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.nav-logo .dot { width: 10px; height: 10px; background: var(--green); border-radius: 50%; box-shadow: 0 0 8px var(--green); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.9rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 12px; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 10px; font-size: 0.9rem; font-weight: 600; border: none; transition: all .2s; }
.btn-green { background: var(--green); color: #000; }
.btn-green:hover { background: #16a34a; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-danger { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #2563eb; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── HERO ── */
.hero {
  min-height: calc(100vh - 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 80px 20px;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(34,197,94,0.08) 0%, transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-dim); border: 1px solid rgba(34,197,94,0.2);
  padding: 6px 16px; border-radius: 30px; font-size: 0.82rem; color: var(--green);
  margin-bottom: 28px;
}
.hero-badge .live { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:0.4} }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.hero h1 span { color: var(--green); }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 560px; margin-bottom: 40px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hero-stats { display: flex; gap: 48px; margin-top: 72px; flex-wrap: wrap; justify-content: center; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: var(--green); }
.hero-stat .label { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

/* ── SECTION ── */
.section { padding: 80px 40px; max-width: 1100px; margin: 0 auto; }
.section-label { font-size: 0.78rem; color: var(--green); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; margin-bottom: 16px; }
.section-sub { color: var(--muted); line-height: 1.7; max-width: 600px; }
.section-header { margin-bottom: 48px; }

/* ── FEATURES ── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color .2s, transform .2s;
}
.feat-card:hover { border-color: rgba(34,197,94,0.3); transform: translateY(-3px); }
.feat-icon { font-size: 2rem; margin-bottom: 16px; }
.feat-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feat-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

/* ── PRICING ── */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; display: flex; flex-direction: column; gap: 20px;
  transition: transform .2s;
}
.plan-card.popular {
  border-color: var(--green);
  background: linear-gradient(135deg, rgba(34,197,94,0.06) 0%, var(--bg2) 100%);
  position: relative;
}
.popular-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #000; font-size: 0.72rem; font-weight: 800;
  padding: 4px 14px; border-radius: 20px; letter-spacing: .05em; text-transform: uppercase;
}
.plan-name { font-size: 1rem; font-weight: 700; color: var(--muted); }
.plan-price { font-size: 2.8rem; font-weight: 900; }
.plan-price sup { font-size: 1rem; font-weight: 600; vertical-align: super; }
.plan-price span { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan-features li { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--muted); }
.plan-features li .check { color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ── HOW IT WORKS ── */
.steps { display: flex; gap: 0; }
.step { flex: 1; text-align: center; padding: 0 20px; position: relative; }
.step:not(:last-child)::after { content: '→'; position: absolute; right: -10px; top: 28px; font-size: 1.4rem; color: var(--muted); }
.step-num { width: 56px; height: 56px; background: var(--green-dim); border: 1px solid rgba(34,197,94,0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 800; color: var(--green); margin: 0 auto 16px; }
.step h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ── AUTH PAGES ── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(34,197,94,0.07) 0%, transparent 60%); }
.auth-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; padding: 40px; width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .name { font-size: 1.4rem; font-weight: 800; margin-top: 8px; }
.auth-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 0.875rem; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.form-group input {
  width: 100%; padding: 12px 14px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 0.9rem; outline: none;
  transition: border-color .2s;
}
.form-group input:focus { border-color: var(--green); }
.form-group input::placeholder { color: var(--muted); }
.form-err { color: #f87171; font-size: 0.82rem; margin-top: 12px; display: none; }
.form-ok { color: var(--green); font-size: 0.82rem; margin-top: 12px; display: none; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--muted); }
.auth-footer a { color: var(--green); }

/* ── DASHBOARD ── */
.dash-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg2); border-right: 1px solid var(--border);
  padding: 24px 16px; display: flex; flex-direction: column; gap: 4px;
}
.sidebar-logo { padding: 8px 12px 24px; display: flex; align-items: center; gap: 10px; font-weight: 700; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.sidebar-logo .dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; }
.sidebar a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; font-size: 0.875rem; color: var(--muted); transition: all .2s;
}
.sidebar a:hover, .sidebar a.active { background: var(--bg3); color: var(--text); }
.sidebar a.active { color: var(--green); }
.sidebar-icon { font-size: 1.1rem; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--border); padding-top: 16px; }
.main-content { padding: 36px 40px; }
.page-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.page-sub { color: var(--muted); font-size: 0.875rem; margin-bottom: 32px; }

/* Cards */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.card-title { font-size: 0.78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.stat-num { font-size: 2.2rem; font-weight: 800; color: var(--green); }
.stat-label { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

/* VPN Key block */
.key-box {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; font-family: monospace; font-size: 0.78rem;
  color: var(--green); word-break: break-all; line-height: 1.6;
  cursor: pointer; transition: border-color .2s;
}
.key-box:hover { border-color: var(--green); }
.key-hint { font-size: 0.75rem; color: var(--muted); margin-top: 6px; }

/* Status badge */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-green { background: rgba(34,197,94,0.12); color: var(--green); }
.badge-red { background: rgba(239,68,68,0.12); color: #f87171; }
.badge-yellow { background: rgba(234,179,8,0.12); color: #eab308; }
.badge-gray { background: rgba(148,163,184,0.12); color: var(--muted); }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { text-align: left; padding: 12px 16px; color: var(--muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); }
td { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* QR */
.qr-img { display: block; margin: 0 auto; border-radius: 12px; }
.qr-wrap { text-align: center; padding: 16px 0; }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--bg3); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.tab { flex: 1; text-align: center; padding: 8px; border-radius: 8px; font-size: 0.875rem; color: var(--muted); cursor: pointer; transition: all .2s; }
.tab.active { background: var(--bg2); color: var(--text); font-weight: 600; }

/* Instructions */
.instructions { display: flex; flex-direction: column; gap: 12px; }
.instr-step { display: flex; gap: 14px; align-items: flex-start; }
.instr-num { width: 28px; height: 28px; background: var(--green-dim); border: 1px solid rgba(34,197,94,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; color: var(--green); flex-shrink: 0; margin-top: 2px; }
.instr-text { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }
.instr-text a { color: var(--green); }

/* Toasts */
#toast { position: fixed; bottom: 24px; right: 24px; background: var(--bg3); border: 1px solid var(--green); color: var(--green); padding: 12px 20px; border-radius: 10px; font-size: 0.875rem; font-weight: 600; transform: translateY(100px); opacity: 0; transition: all .3s; z-index: 999; }
#toast.show { transform: translateY(0); opacity: 1; }

/* Loading spinner */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(34,197,94,0.3); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; padding: 32px; width: 100%; max-width: 440px; }
.modal h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.modal-footer { display: flex; gap: 12px; margin-top: 24px; justify-content: flex-end; }

/* Responsive */
@media (max-width: 900px) {
  .features-grid, .pricing-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .step::after { display: none; }
  .dash-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 20px; }
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .section { padding: 60px 20px; }
  .hero { padding: 60px 20px; }
}
