:root {
  --bg: #030303;
  --surface: rgba(12, 12, 12, 0.75);
  --surface-hover: rgba(18, 18, 18, 0.95);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(0, 255, 157, 0.4);
  --text: #e6edf3;
  --text-muted: #7d8590;
  --accent: #00ff9d;
  --accent-dim: rgba(0, 255, 157, 0.12);
  --danger: #f85149;
  --danger-dim: rgba(248, 81, 73, 0.12);
  --warning: #d29922;
  --warning-dim: rgba(210, 153, 34, 0.12);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Dot Grid Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: -1;
}

/* Ambient Glow */
body::after {
  content: '';
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0,255,157,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.ash-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(3,3,3,0.8);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ash-nav .logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.ash-nav .logo::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s infinite;
}

.ash-nav .links { display: flex; gap: 24px; }
.ash-nav .links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.ash-nav .links a:hover { color: var(--text); }

.ash-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

h1 { font-size: 42px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 24px; }
h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }

.gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle { color: var(--text-muted); font-size: 16px; margin-bottom: 48px; max-width: 600px; }

/* Cards & Surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 0 1px var(--border-hover);
}

.card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-dim);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

/* Badges */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 16px;
}
.badge.warning { background: var(--warning-dim); color: var(--warning); }
.badge.danger { background: var(--danger-dim); color: var(--danger); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: #33ffb1;
  box-shadow: 0 4px 16px var(--accent-dim);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: rgba(255,255,255,0.03);
}

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

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }

/* Inputs */
.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

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

.mono { font-family: var(--font-mono); font-size: 13px; word-break: break-all; }
.status-active { color: var(--accent); font-weight: 600; }
.status-revoked { color: var(--danger); font-weight: 600; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.stat-card .label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.stat-card .value { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--accent); }

/* Checkout Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-box {
  width: 100%;
  max-width: 480px;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.qr-container {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  margin: 24px 0;
}
.qr-container img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }

.address-box {
  background: rgba(0,0,0,0.5);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  word-break: break-all;
  text-align: center;
  margin-bottom: 16px;
  user-select: all;
}

.countdown {
  text-align: center;
  font-family: var(--font-mono);
  color: var(--warning);
  font-size: 14px;
  margin-top: 16px;
}

/* Toast System */
#ash-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ash-toast {
  background: #161b22;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 280px;
}
.ash-toast.error { border-left-color: var(--danger); }
.ash-toast.warning { border-left-color: var(--warning); }

/* Utilities */
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.fade-in-up { animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
  .ash-container { padding: 32px 16px; }
  h1 { font-size: 32px; }
  .grid { grid-template-columns: 1fr; }
  .ash-nav .links { gap: 16px; }
  .ash-nav .links a { font-size: 13px; }
}
