/* ============================================================
   DJ VPN — тёмная тема (минимализм, синие/фиолетовые акценты)
   Референс: avroracloud.com
   ============================================================ */

:root {
  --bg:            #0f0f23;
  --bg-2:          #14142b;
  --card:          #1a1a2e;
  --card-hover:    #1f1f38;
  --border:        #2d2d44;
  --text:          #ececf5;
  --text-muted:    #9a9ab5;
  --text-dim:      #6b6b85;
  --accent:        #7c5cff;
  --accent-2:      #4f8cff;
  --accent-glow:   rgba(124, 92, 255, 0.35);
  --success:       #34d399;
  --warn:          #fbbf24;
  --danger:        #f87171;
  --radius:        16px;
  --radius-sm:     10px;
  --shadow:        0 10px 40px rgba(0, 0, 0, 0.4);
  --grad:          linear-gradient(135deg, #7c5cff 0%, #4f8cff 100%);
  --maxw:          1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Фоновое свечение */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(124, 92, 255, 0.12), transparent 40%),
    radial-gradient(500px circle at 85% 20%, rgba(79, 140, 255, 0.10), transparent 40%);
  pointer-events: none;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { font-size: 24px; }
.brand-name { font-weight: 700; font-size: 20px; color: var(--text); letter-spacing: -0.5px; }
.site-nav { display: flex; align-items: center; gap: 14px; }
.nav-link { color: var(--text-muted); font-size: 15px; }
.nav-email { color: var(--text-muted); font-size: 14px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Main / Footer ---------- */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px;
}
.site-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-links { display: flex; gap: 18px; justify-content: center; margin-top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  color: #fff;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); box-shadow: 0 6px 20px var(--accent-glow); }
.btn-primary:hover { box-shadow: 0 8px 28px var(--accent-glow); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--card-hover); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 15px 28px; font-size: 17px; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 48px 0 32px; }
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-2);
  margin-bottom: 24px;
}
.hero-title { font-size: 52px; line-height: 1.1; margin: 0 0 18px; font-weight: 800; letter-spacing: -1.5px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { font-size: 18px; color: var(--text-muted); max-width: 620px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 22px; color: var(--text-dim); font-size: 14px; }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 48px 0;
}
.feature { text-align: center; }
.feature-icon { font-size: 36px; margin-bottom: 10px; }
.feature h3 { margin: 6px 0; font-size: 18px; }
.feature p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* ---------- Pricing ---------- */
.section-title { text-align: center; font-size: 34px; font-weight: 800; margin: 10px 0 6px; letter-spacing: -1px; }
.section-sub { text-align: center; color: var(--text-muted); margin: 0 auto 32px; max-width: 520px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.plan { text-align: center; position: relative; display: flex; flex-direction: column; gap: 6px; }
.plan-featured { border-color: var(--accent); box-shadow: 0 8px 30px var(--accent-glow); }
.plan-tag, .plan-mini-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
}
.plan-head { color: var(--text-muted); font-size: 14px; margin-bottom: 4px; }
.plan-price { font-size: 34px; font-weight: 800; }
.plan-price span { font-size: 20px; color: var(--text-muted); }
.plan-period { color: var(--text-dim); font-size: 13px; margin-bottom: 14px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; margin: 48px 0; padding: 40px 24px; }
.cta-band h2 { font-size: 28px; margin: 0 0 8px; }
.cta-band p { color: var(--text-muted); margin: 0 0 22px; }

/* ---------- Auth ---------- */
.auth-wrap { display: flex; justify-content: center; align-items: flex-start; padding: 40px 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-title { font-size: 26px; margin: 0 0 6px; }
.auth-sub { color: var(--text-muted); margin: 0 0 22px; font-size: 15px; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--text-muted); font-size: 14px; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.field-hint { font-size: 12px; color: var(--text-dim); margin: -8px 0 0; }
input[type="email"], input[type="password"], input[type="text"] {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.code-input { text-align: center; font-size: 28px; letter-spacing: 12px; font-weight: 700; }
.form-msg { font-size: 14px; min-height: 18px; }
.form-msg.error { color: var(--danger); }
.form-msg.success { color: var(--success); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; background: var(--bg-2); padding: 5px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.tab {
  flex: 1; padding: 9px; border: none; background: transparent; color: var(--text-muted);
  font-weight: 600; font-size: 14px; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.tab.active { background: var(--card); color: var(--text); }

/* ---------- Dashboard ---------- */
.dash { display: flex; flex-direction: column; gap: 20px; max-width: 780px; margin: 0 auto; }
.dash-title { font-size: 30px; margin: 8px 0 4px; }
.dash-card { }
.dash-card h2 { font-size: 19px; margin: 0 0 12px; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dash-card-head h2 { margin: 0; }
.muted { color: var(--text-muted); font-size: 14px; margin: 0 0 16px; }

.status-body { margin-bottom: 12px; }
.status-loading { display: flex; align-items: center; gap: 10px; color: var(--text-muted); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.status-pill.active { background: rgba(52, 211, 153, 0.15); color: var(--success); border: 1px solid rgba(52,211,153,0.3); }
.status-pill.pending { background: rgba(251, 191, 36, 0.15); color: var(--warn); border: 1px solid rgba(251,191,36,0.3); }
.status-pill.none { background: var(--bg-2); color: var(--text-muted); border: 1px solid var(--border); }
.status-desc { color: var(--text-muted); font-size: 14px; margin-top: 8px; }

.config-block { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.copy-row { display: flex; gap: 8px; margin-top: 6px; }
.copy-row input { flex: 1; font-size: 13px; }

.plans-dash { grid-template-columns: repeat(4, 1fr); }
.plan-mini {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 12px; text-align: center; position: relative; display: flex; flex-direction: column; gap: 4px;
}
.plan-mini.featured { border-color: var(--accent); }
.plan-mini-head { font-size: 13px; color: var(--text-muted); }
.plan-mini-price { font-size: 22px; font-weight: 800; }
.plan-mini-period { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }

.guide { color: var(--text-muted); font-size: 14px; padding-left: 20px; line-height: 1.8; margin: 0 0 14px; }
.guide b { color: var(--text); }

/* Инструкция: акцент «VPN ВКЛЮЧЕН» и блок управления кнопкой */
.guide-highlight {
  font-size: 16px; font-weight: 800; color: var(--success);
  text-align: center; margin: 6px 0 14px; letter-spacing: 0.3px;
}
.guide-manage {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 16px;
}
.guide-manage-title { font-weight: 700; color: var(--text); font-size: 14px; }
.guide-manage ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-muted); font-size: 14px; line-height: 1.7; }

/* Секция ссылок на клиентские приложения */
.client-apps {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 0 0 18px;
}
.client-apps h4 { margin: 0 0 10px; font-size: 15px; color: var(--text); }
.client-apps ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.client-apps li { font-size: 14px; color: var(--text-muted); }
.client-apps a { color: var(--accent-2); font-weight: 600; }
.client-apps a:hover { color: var(--accent); }

/* ---------- State screens ---------- */
.state-wrap { display: flex; justify-content: center; padding: 48px 0; }
.state-card { max-width: 480px; text-align: center; }
.state-emoji { font-size: 64px; margin-bottom: 12px; }
.state-card h1 { font-size: 26px; margin: 0 0 10px; }
.state-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Spinner ---------- */
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  display: inline-block; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Turnstile ---------- */
.cf-turnstile { display: flex; justify-content: center; }

/* ---------- Utilities ---------- */
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .plans, .plans-dash { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 38px; }
}
@media (max-width: 520px) {
  .site-main { padding: 16px; }
  .features, .plans, .plans-dash { grid-template-columns: 1fr; }
  .hero-title { font-size: 32px; }
  .hero-sub { font-size: 16px; }
  .brand-name { font-size: 18px; }
  .nav-email { max-width: 110px; }
  .copy-row { flex-direction: column; }
}
