/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #06060a;
  --surface: rgba(14, 12, 22, 0.75);
  --border: rgba(139, 92, 246, 0.12);
  --border-hover: rgba(139, 92, 246, 0.3);
  --violet: #8b5cf6;
  --violet-light: #a78bfa;
  --violet-bright: #c4b5fd;
  --indigo: #6366f1;
  --text: #ede9fe;
  --text-muted: #7c7394;
  --green: #34d399;
  --yellow: #fbbf24;
  --red: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --glow: 0 0 60px rgba(139, 92, 246, 0.15), 0 0 120px rgba(99, 102, 241, 0.08);
  --glow-strong: 0 0 40px rgba(139, 92, 246, 0.3), 0 0 80px rgba(99, 102, 241, 0.15);
}

html {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.06) 1px, transparent 1px);
  background-size: 52px 52px;
  overflow-x: hidden;
}

a { color: var(--violet-light); text-decoration: none; }
a:hover { color: var(--violet-bright); }

/* ── Ambient Glow ────────────────────────────────────────── */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.glow--1 {
  width: 600px; height: 600px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 70%);
}
.glow--2 {
  width: 500px; height: 500px;
  bottom: -200px; left: -100px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
}
.glow--3 {
  width: 300px; height: 300px;
  top: 40%; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.12), transparent 70%);
}

/* ── Header ──────────────────────────────────────────────── */
.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.5rem, 5vw, 3rem);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(6, 6, 10, 0.6);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: 0.01em;
  cursor: pointer;
}
.logo:hover { color: var(--violet-bright); text-decoration: none; }

.logo__dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  background: none;
  font-family: var(--font);
}
.nav__link:hover {
  color: var(--text);
  background: rgba(139, 92, 246, 0.08);
}
.nav__link--active {
  color: var(--violet-bright);
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
}

/* ── Main ────────────────────────────────────────────────── */
.main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem clamp(1.5rem, 5vw, 3rem);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.footer__sep { margin: 0 0.5rem; opacity: 0.4; }

/* ── Hero ────────────────────────────────────────────────── */
.hero { max-width: 560px; text-align: left; align-self: flex-start; }

.hero__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--violet);
  margin-bottom: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.06);
}

.hero__title {
  font-size: clamp(2.2rem, 5.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, var(--text) 60%, var(--violet-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.btn--block { width: 100%; }

.btn--primary {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #faf5ff;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2), 0 4px 24px rgba(0, 0, 0, 0.4);
}
.btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--glow-strong), 0 8px 32px rgba(0, 0, 0, 0.5);
}

.btn--outline {
  background: transparent;
  color: var(--violet-light);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.btn--outline:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.5);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  font-family: var(--font);
}
.btn--ghost:hover { color: var(--text); border-color: var(--border); }

/* ── Card / Panel ────────────────────────────────────────── */
.panel {
  width: 100%;
  max-width: 420px;
  padding: 2.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--glow), 0 30px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
}

.panel__title {
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.panel__sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ── Form elements ───────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 0.6rem; }

.label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(6, 6, 10, 0.7);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.input--upper { text-transform: uppercase; letter-spacing: 0.14em; }

.form__error {
  font-size: 0.85rem;
  color: var(--red);
  margin-top: 0.2rem;
}

/* ── Key reveal ──────────────────────────────────────────── */
.key-box {
  font-family: var(--mono);
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  padding: 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow: inset 0 0 30px rgba(139, 92, 246, 0.08);
  text-align: center;
  word-break: break-all;
  margin: 0.75rem 0;
  user-select: all;
}

.key-warning {
  font-size: 0.82rem;
  color: var(--yellow);
  margin-bottom: 1rem;
}

/* ── Shop ────────────────────────────────────────────────── */
.shop { width: 100%; align-self: stretch; }

.shop__head { margin-bottom: 1.5rem; }
.shop__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.shop__sub { color: var(--text-muted); font-size: 0.92rem; }

.banner {
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}
.banner--ok {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--green);
}
.banner--err {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: var(--red);
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}

.card__name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.card__duration {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card__price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--violet-bright);
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.25);
}
.card__currency {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.7;
  margin-left: 0.1rem;
}

/* ── Orders ──────────────────────────────────────────────── */
.orders { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); width: 100%; }
.orders__title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.orders__list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.orders__row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}
.orders__meta {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.status { text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem; font-weight: 600; }
.status--paid { color: var(--green); }
.status--pending { color: var(--yellow); }

/* ── Loading ─────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 0.6rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .header { padding: 1rem; }
  .main { padding: 2rem 1rem; }
  .panel { padding: 1.5rem; }
  .grid { grid-template-columns: 1fr; }
  .nav__link { padding: 0.4rem 0.7rem; font-size: 0.82rem; }
}
