:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --card: #1a1a28;
  --accent: #00ff88;
  --accent2: #7c3aed;
  --text: #e5e7eb;
  --text-muted: #6b7280;
  --border: #242436;
  --danger: #ef4444;
  --warning: #f59e0b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Navigation ── */
nav {
  background: rgba(17,17,24,0.95);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: 3rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover, .nav-links a.active { color: var(--accent); }

.nav-actions {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #00cc70; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,255,136,0.25); }

.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 7rem 2rem 5rem;
  background: radial-gradient(ellipse 100% 60% at 50% -10%, #1a1a4e 0%, var(--bg) 70%);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.server-ip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.15s;
  user-select: none;
}

.server-ip:hover { border-color: var(--accent); }

/* ── Features ── */
.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.4rem; }
.section-title p { color: var(--text-muted); }

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

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.15s, transform 0.15s;
}

.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.65; }

/* ── Store ── */
.store-header {
  text-align: center;
  padding: 4rem 2rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.store-header h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: 0.5rem; }
.store-header p { color: var(--text-muted); line-height: 1.6; }

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

.product-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--card-accent, #00ff88);
  border-radius: 16px 16px 0 0;
}

.product-card:hover {
  border-color: var(--card-accent, #00ff88);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.4);
}

.product-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 0.75rem;
}

.product-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--card-accent, #00ff88);
  margin-bottom: 0.35rem;
}

.product-desc { color: var(--text-muted); font-size: 0.875rem; line-height: 1.5; margin-bottom: 1rem; }

.product-price { font-size: 2.75rem; font-weight: 900; line-height: 1; margin-bottom: 1.5rem; }
.product-price sup { font-size: 1.2rem; vertical-align: super; font-weight: 600; }
.product-price .period { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }

.product-features { list-style: none; flex: 1; margin-bottom: 1.75rem; }
.product-features li {
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.product-features li:last-child { border-bottom: none; }
.product-features li::before { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; }

/* ── Auth Forms ── */
.form-container { max-width: 440px; margin: 4rem auto; padding: 0 1rem; }

.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
}

.form-card h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.35rem; }
.form-card .subtitle { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.9rem; }

.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,255,136,0.1);
}

.form-full { width: 100%; justify-content: center; }

.form-footer { margin-top: 1.25rem; text-align: center; font-size: 0.875rem; color: var(--text-muted); }
.form-footer a { color: var(--accent); text-decoration: none; }

/* ── Alerts ── */
.alert { padding: 0.875rem 1rem; border-radius: 8px; font-size: 0.875rem; margin-bottom: 1.25rem; }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(0,255,136,0.1); border: 1px solid rgba(0,255,136,0.3); color: var(--accent); }

/* ── Dashboard ── */
.page { max-width: 1100px; margin: 0 auto; padding: 2.5rem 2rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.9rem; font-weight: 700; }
.page-header p { color: var(--text-muted); margin-top: 0.25rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
}

.stat-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 0.5rem; }
.stat-value { font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.stat-value.sm { font-size: 0.9rem; padding-top: 0.2rem; word-break: break-all; }

.table-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 1.5rem; }
.table-card-header { padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; justify-content: space-between; }

table { width: 100%; border-collapse: collapse; }
th { padding: 0.65rem 1.5rem; text-align: left; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.2); }
td { padding: 0.9rem 1.5rem; font-size: 0.875rem; border-bottom: 1px solid rgba(36,36,54,0.6); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

.badge { display: inline-block; padding: 0.2rem 0.55rem; border-radius: 4px; font-size: 0.75rem; font-weight: 700; }
.badge-active { background: rgba(0,255,136,0.12); color: #00ff88; }
.badge-pending { background: rgba(245,158,11,0.12); color: #fbbf24; }
.badge-cancelled { background: rgba(239,68,68,0.12); color: #f87171; }
.badge-completed { background: rgba(0,255,136,0.12); color: #00ff88; }

/* ── Empty state ── */
.empty-state { padding: 3.5rem 2rem; text-align: center; color: var(--text-muted); }
.empty-state p { margin-bottom: 1rem; }

/* ── Loading ── */
.loading { text-align: center; padding: 5rem 2rem; color: var(--text-muted); }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 1rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.hidden { display: none !important; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.w-full { width: 100%; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 3rem;
}
footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
.footer-eula { margin-top: 0.5rem; font-size: 0.78rem; opacity: 0.6; }

/* ── Responsive ── */
@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  .hero { padding: 5rem 1.5rem 4rem; }
  .store-grid { padding: 1.5rem 1rem 3rem; }
  table { font-size: 0.8rem; }
  th, td { padding: 0.7rem 1rem; }
}
