:root {
  --bg: #07131d;
  --bg-2: #0b1c2a;
  --panel: rgba(10, 26, 40, 0.72);
  --line: rgba(160, 200, 220, 0.16);
  --text: #e8f1f6;
  --muted: #8ea3b3;
  --soft: #b7c9d4;
  --accent: #6ec4d9;
  --ok: #4ad6a3;
  --warn: #e0b45a;
  --bad: #e07070;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  font-size: 16px;
  letter-spacing: 0;
}

.ocean-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 42% at 50% -8%, rgba(70, 150, 190, 0.22), transparent 58%),
    linear-gradient(180deg, #0c2436 0%, #07131d 46%, #050e16 100%);
}
.rays {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(98deg, transparent 46%, rgba(180, 220, 240, 0.05) 50%, transparent 54%),
    linear-gradient(78deg, transparent 58%, rgba(180, 220, 240, 0.035) 62%, transparent 68%);
}
.bubbles { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bubbles span {
  position: absolute;
  bottom: -24px;
  border-radius: 50%;
  background: rgba(180, 220, 240, 0.14);
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: .45; }
  100% { transform: translateY(-105vh); opacity: 0; }
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }

header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 19, 29, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  flex: 0 0 38px;
}
.x-link {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--soft);
  padding: 0 !important;
}
.x-link svg { width: 16px; height: 16px; fill: currentColor; }
.x-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a, .nav-links button.linkish {
  color: var(--soft);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.nav-links a:hover, .nav-links button.linkish:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s ease;
}
.btn-primary {
  background: #dff3fa;
  color: #0a1a24;
}
.btn-primary:hover { filter: brightness(0.96); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.04); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

main { max-width: 1080px; margin: 0 auto; padding: 0 22px 72px; }
section { padding: 64px 0 8px; }
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
h1, h2, h3 { color: #fff; font-weight: 650; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.22; margin-bottom: 18px; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); margin-bottom: 14px; line-height: 1.3; }
h3 { font-size: 1.02rem; line-height: 1.35; margin-bottom: 8px; }
p.lead { color: var(--soft); max-width: 540px; line-height: 1.7; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding-top: 36px;
  min-height: 70vh;
}
.hero-art {
  justify-self: center;
  width: min(100%, 380px);
}
.hero-art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 28px;
}
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  backdrop-filter: blur(10px);
}
.card p { color: var(--muted); font-size: 0.94rem; }
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.split .pct { font-size: 1.6rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; line-height: 1.2; }
.split .lbl { color: var(--muted); font-size: 0.88rem; margin-top: 10px; line-height: 1.5; }

.arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  margin-top: 22px;
  align-items: stretch;
}
.token-card { text-align: center; padding: 24px 18px; }
.token-logo {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  object-fit: cover;
  margin: 0 auto 14px;
  display: block;
  box-shadow: 0 0 0 2px rgba(190,220,235,0.35);
  background: #0a2030;
}
.ticker { font-size: 1.35rem; font-weight: 700; color: #fff; letter-spacing: -0.03em; }
.token-name { color: var(--muted); font-size: 0.88rem; margin: 4px 0 8px; }
.ca {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--muted);
  word-break: break-all;
  margin-bottom: 12px;
}
.votes-num { font-size: 1.55rem; font-weight: 700; color: var(--accent); letter-spacing: -0.04em; }
.votes-label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  margin: 12px 0 16px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .4s ease;
}
.vs {
  align-self: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.narrative { margin-top: 14px; color: var(--muted); font-size: 0.92rem; }
.round-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.timer-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
  max-width: 320px;
}
.timer-card .clock {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-top: 10px;
  color: #fff;
}
.pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--soft);
}
.pill.ok { color: var(--ok); border-color: rgba(74,214,163,.3); }
.pill.wait { color: var(--warn); border-color: rgba(224,180,90,.3); }
.pill.lock { color: var(--bad); border-color: rgba(224,112,112,.3); }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.stat .k {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.4;
}
.stat .v {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-top: 12px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.stat .s { font-size: 0.84rem; color: var(--muted); margin-top: 8px; line-height: 1.45; }

.ca-box {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 22px 22px 24px;
}
.ca-box .k {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 14px;
}
.ca-box .addr {
  margin: 0 0 16px;
  padding: 14px 16px;
  line-height: 1.6;
}
.ca-actions {
  display: flex;
  gap: 10px;
  margin: 0;
}
.wallet-box {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wallet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.wallet-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.addr {
  display: block;
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.threshold {
  margin-top: 14px;
}
.track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-top: 8px;
}
.track > i {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width .4s ease;
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px 22px 36px;
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
}
footer a { color: var(--soft); }

.admin-wrap { max-width: 860px; margin: 36px auto 72px; padding: 0 20px; }
.login-card { max-width: 400px; margin: 72px auto; }
label { display: block; font-size: 0.8rem; color: var(--soft); margin: 12px 0 6px; font-weight: 550; }
input[type="text"], input[type="password"], input[type="number"], input[type="url"], textarea {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.94rem;
}
textarea { min-height: 78px; resize: vertical; }
.pair-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.preview {
  width: 72px; height: 72px; border-radius: 16px;
  object-fit: cover; margin-top: 8px;
  box-shadow: 0 0 0 2px rgba(190,220,235,0.35);
}
.msg { margin-top: 10px; font-size: 0.88rem; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--bad); }
.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: #102433;
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 12px;
  display: none;
  z-index: 80;
  font-size: 0.9rem;
}
.menu-btn { display: none; }
.mobile-menu { display: none; flex-direction: column; padding: 8px 22px 14px; }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 8px 0; color: var(--text); }
.empty-vote { text-align: center; padding: 40px 16px; color: var(--muted); }

@media (max-width: 860px) {
  .hero, .arena, .grid-3, .split, .stats, .pair-form, .timer-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .vs { text-align: center; padding: 4px 0; }
}
