:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-input: #1a1a24;
  --primary: #7f00ff;
  --primary-hover: #9b30ff;
  --primary-dim: rgba(127, 0, 255, 0.15);
  --text: #e8e8f0;
  --text-muted: #9a9ab0;
  --border: #2a2a3a;
  --success: #00c853;
  --error: #ff5252;
  --radius: 12px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.main {
  flex: 1;
  padding: 40px 0 80px;
}

/* ===== HEADER ===== */
.header {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
}
.logo span {
  color: var(--primary);
}
.logo:hover {
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
  background: var(--primary-dim);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.nav-user span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}
.btn-block {
  width: 100%;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero h1 span {
  color: var(--primary);
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== CARDS / GRID ===== */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.card:hover {
  border-color: var(--primary);
}
.card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}
.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-dim);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--primary);
}

/* ===== PRICE WIDGET ===== */
.price-widget {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 24px;
}
.price-widget .label {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.price-widget .value {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

/* ===== NEWS ===== */
.section-title {
  font-size: 1.6rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.news-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.2s;
}
.news-item:hover {
  border-color: var(--primary);
}
.news-item h3 {
  margin-bottom: 6px;
}
.news-item .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.news-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.news-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 720px;
}
.news-content h1 {
  margin-bottom: 8px;
}
.news-content .meta {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}
.news-content h2 {
  margin: 28px 0 12px;
  font-size: 1.3rem;
}
.news-content p {
  margin-bottom: 12px;
  color: var(--text-muted);
}
.news-content ul {
  margin: 12px 0 12px 20px;
  color: var(--text-muted);
}

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at top, rgba(127, 0, 255, 0.12), transparent 60%);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
}
.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  text-align: center;
}
.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.95rem;
}
.auth-logo {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.8rem;
  font-weight: 800;
}
.auth-logo span {
  color: var(--primary);
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.alert-error {
  background: rgba(255, 82, 82, 0.12);
  border: 1px solid rgba(255, 82, 82, 0.3);
  color: var(--error);
}
.alert-success {
  background: rgba(0, 200, 83, 0.12);
  border: 1px solid rgba(0, 200, 83, 0.3);
  color: var(--success);
}

.auth-links {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-links a {
  font-weight: 500;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 720px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--primary);
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item .faq-body {
  padding: 0 24px 20px;
  color: var(--text-muted);
}

/* ===== WALLET ===== */
.wallet-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 800px;
}
.wallet-qr {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.wallet-qr img {
  border-radius: 8px;
  margin-bottom: 12px;
}
.steps {
  counter-reset: step;
}
.steps li {
  list-style: none;
  position: relative;
  padding-left: 48px;
  margin-bottom: 20px;
  color: var(--text-muted);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--primary-dim);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer h4 {
  margin-bottom: 14px;
  font-size: 0.95rem;
  color: var(--text);
}
.footer a {
  display: block;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.footer a:hover {
  color: var(--primary);
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 8px;
  max-width: 260px;
}
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.social-links a {
  width: 40px;
  height: 40px;
  background: var(--bg-input);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0;
}
.social-links a:hover {
  background: var(--primary-dim);
  color: var(--primary);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.subscribe-form {
  display: flex;
  gap: 8px;
}
.subscribe-form input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
}
.subscribe-form button {
  padding: 10px 16px;
}

/* ===== ADMIN ===== */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
}
.admin-nav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  height: fit-content;
}
.admin-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.admin-nav a:hover,
.admin-nav a.active {
  background: var(--primary-dim);
  color: var(--primary);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-card .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}
.stat-card .label {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
}

/* ===== UTILS ===== */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .wallet-box {
    grid-template-columns: 1fr;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .menu-toggle {
    display: block;
  }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }
  .nav.open {
    display: flex;
  }
  .nav-user {
    margin: 12px 0 0;
    padding: 12px 0 0;
    border-left: none;
    border-top: 1px solid var(--border);
    width: 100%;
    justify-content: space-between;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .hero {
    padding: 40px 0 30px;
  }
}
