:root {
  --bg: #0b0b10;
  --panel: #13131c;
  --panel-2: #1c1c2a;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #a78bfa;
  --accent-2: #818cf8;
  --link: #c4b5fd;
  --good: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 140px;
}

a { color: var(--link); text-decoration: underline; }
a:hover { color: var(--text); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--panel-2);
  position: sticky;
  top: 0;
  background: rgba(11,11,16,0.92);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.brand img { display: block; }
.site-header nav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
}
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--text); }

main { padding: 24px 20px 120px; max-width: 1100px; margin: 0 auto; }

.hero { margin-bottom: 32px; }
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 12px;
  background: linear-gradient(90deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 620px; margin: 0 0 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s, opacity .15s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--panel-2);
}
.btn-small { padding: 6px 12px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 12px; font-size: 1.25rem; }
.panel-note { color: var(--muted); font-size: 0.92rem; margin: -6px 0 16px; }

.form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 160px; }
.field label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select {
  background: var(--panel-2);
  border: 1px solid #2e2e45;
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.form-note { color: var(--muted); font-size: 0.85rem; margin: 12px 0 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-header h2 { margin: 0; }
.badge {
  background: var(--panel-2);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
}
.launch-card {
  background: var(--panel-2);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid transparent;
  transition: border-color .15s;
  min-height: 0;
}
.launch-card:hover { border-color: #3f3f5f; }
.launch-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.token-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  flex-shrink: 0;
}
.token-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.launch-meta { min-width: 0; }
.launch-meta h3 {
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.launch-meta .sym { color: var(--muted); font-size: 0.85rem; }
.launch-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.85rem;
}
.stat { display: flex; flex-direction: column; }
.stat .label { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }
.stat .value { font-weight: 700; }
.stat .up { color: var(--good); }
.stat .down { color: var(--bad); }
.launch-age { color: var(--warn); font-weight: 700; font-size: 0.85rem; }

.loading, .empty {
  color: var(--muted);
  padding: 30px 0;
  text-align: center;
  grid-column: 1 / -1;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 30px 20px;
  border-top: 1px solid var(--panel-2);
}

@media (max-width: 640px) {
  .site-header nav { gap: 12px; font-size: 0.85rem; }
  .form-row { flex-direction: column; align-items: stretch; }
  .form-row .btn { width: 100%; }
  .launch-grid { grid-template-columns: 1fr; }
}
