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

:root {
  --bg: #08080a;
  --surface: #0e0e10;
  --surface-hover: #141416;
  --border: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(34, 211, 238, 0.5);
  --text: #fafafa;
  --text-muted: #71717a;
  --text-soft: #a1a1aa;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.15);
  --error: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
}

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0.75rem;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ——— Loader ——— */
.loader-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg) url('https://images.unsplash.com/photo-1639762681485-074b7f938ba0?w=1920&q=80') center/cover;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.85);
  z-index: 0;
}
.loader-screen-inner {
  position: relative;
  z-index: 1;
}
.loader-screen.loader-screen-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-screen-inner {
  text-align: center;
}
.loader-logo {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.loader-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
}
.loader-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loaderSpin 0.7s linear infinite;
}
@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

/* ——— Page visibility ——— */
.page {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.page.page-visible {
  opacity: 1;
  visibility: visible;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.page-visible .reveal-1 { transition-delay: 0.05s; }
.page-visible .reveal-2 { transition-delay: 0.12s; }
.page-visible .reveal-3 { transition-delay: 0.2s; }
.page-visible .reveal-4 { transition-delay: 0.28s; }
.page-visible .reveal-5 { transition-delay: 0.36s; }
.page-visible .reveal-6 { transition-delay: 0.48s; }
.page-visible .reveal {
  opacity: 1;
  transform: translateY(0);
}

/* ——— Background (Polymarket-style: image + texture + orbs) ——— */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.bg-image {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1639762681485-074b7f938ba0?w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.22;
  pointer-events: none;
}
.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #08080a 0%, #08080a 40%, rgba(8,8,10,0.97) 100%);
  pointer-events: none;
}
.bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(34, 211, 238, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 85% 70%, rgba(34, 211, 238, 0.06) 0%, transparent 45%),
    radial-gradient(ellipse 60% 40% at 15% 80%, rgba(34, 211, 238, 0.05) 0%, transparent 45%);
  pointer-events: none;
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
}
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  pointer-events: none;
}
.bg-glow-1 {
  width: 480px;
  height: 480px;
  background: rgba(34, 211, 238, 0.15);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
}
.bg-glow-2 {
  width: 320px;
  height: 320px;
  background: rgba(34, 211, 238, 0.08);
  bottom: -100px;
  right: 5%;
}
.bg-glow-3 {
  width: 260px;
  height: 260px;
  background: rgba(34, 211, 238, 0.06);
  top: 50%;
  left: -80px;
  filter: blur(80px);
}
.bg-glow-4 {
  width: 220px;
  height: 220px;
  background: rgba(34, 211, 238, 0.05);
  top: 60%;
  right: -60px;
  filter: blur(70px);
}
.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ——— Layout (full-width sections, no center widget) ——— */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.site-header {
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 10, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-section {
  width: 100%;
  padding: 3rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem 3rem;
  align-items: start;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 3rem;
    align-items: start;
  }
}

.hero-left {
  min-width: 0;
  text-align: left;
}

.hero-right {
  min-width: 0;
  text-align: left;
}

.hero-content {
  width: 100%;
  max-width: 560px;
}

/* ——— Token preview ——— */
.token-preview {
  width: 100%;
  margin-bottom: 1.75rem;
}
.token-preview.hidden {
  display: none !important;
}
.token-preview-images {
  position: relative;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1rem;
}
.token-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
}
.token-logo-placeholder {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-soft);
}
.token-preview-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius);
}
.token-preview-loading.hidden {
  display: none !important;
}
.token-cta, .token-cta-primary {
  font-size: 1.0625rem;
  color: var(--text-soft);
  margin: 0;
}
.token-symbol {
  font-weight: 600;
  color: var(--text);
}
.token-cta-block {
  margin-top: 0.75rem;
}
.token-cta-block.hidden {
  display: none !important;
}
.token-cta-primary {
  margin-bottom: 0.5rem;
}
.token-dex-link {
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
}
.token-dex-link:hover {
  text-decoration: underline;
}
.token-error {
  font-size: 1rem;
  color: var(--error);
  margin: 0 0 0.75rem 0;
}
.token-error a {
  color: var(--accent);
  text-decoration: underline;
}
.token-error.hidden {
  display: none !important;
}

/* ——— Paste token ——— */
.paste-token {
  width: 100%;
  max-width: 440px;
  margin-bottom: 1.75rem;
  text-align: left;
}
.paste-token-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.paste-token-row {
  display: flex;
  gap: 0.5rem;
}
.paste-token-input {
  flex: 1;
  padding: 0.875rem 1.125rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.paste-token-input::placeholder {
  color: var(--text-muted);
}
.paste-token-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.btn-paste {
  flex-shrink: 0;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-soft);
  border: 1px solid var(--border);
  font-family: inherit;
}
.btn-paste:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* ——— Hero ——— */
.title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}
.subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* ——— Auth ——— */
.auth, .connected {
  width: 100%;
  max-width: 320px;
}
.btn {
  display: inline-block;
  padding: 1rem 1.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-connect {
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(34, 211, 238, 0.25);
}
.btn-connect:hover {
  background: #2dd4e8;
  box-shadow: 0 6px 28px rgba(34, 211, 238, 0.35);
}
.btn-outline {
  margin-top: 1rem;
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.connected .wallet-label {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.connected .wallet-address {
  font-family: ui-monospace, monospace;
  font-size: 0.9375rem;
  word-break: break-all;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}
.connected-hint {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hidden {
  display: none !important;
}

/* ——— Trust (full-width section) ——— */
.trust {
  width: 100%;
  padding: 3rem 0 4rem;
  text-align: left;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid var(--border);
}

.trust-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.features {
  list-style: none;
  margin-bottom: 1.75rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
}
@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2rem;
  }
}
.features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: var(--text-soft);
  font-size: 1.0625rem;
}
.feature-icon {
  font-size: 1.125rem;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.stat:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(34, 211, 238, 0.2);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.06);
}
.stat-num {
  display: block;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.security {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.65;
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background 0.2s, border-color 0.2s;
}
.security:hover {
  background: rgba(34, 211, 238, 0.04);
  border-color: rgba(34, 211, 238, 0.15);
}
.steps {
  padding-left: 1.5rem;
  color: var(--text-soft);
  font-size: 1.0625rem;
  line-height: 1.7;
}
.steps li {
  margin-bottom: 0.5rem;
}

/* ——— Ask widget ——— */
.ask-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(34, 211, 238, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ask-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 28px rgba(34, 211, 238, 0.4);
}
.ask-btn:active {
  transform: scale(0.96);
}
.ask-btn-icon { line-height: 1; }
.ask-btn-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ask-panel {
  position: fixed;
  bottom: 4.5rem;
  right: 1.5rem;
  left: 1.5rem;
  z-index: 99;
  width: auto;
  max-width: 360px;
  margin-left: auto;
  max-height: 68vh;
  background: rgba(14, 14, 16, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  visibility: hidden;
}
.ask-panel.ask-panel-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}
.ask-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ask-panel-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.ask-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, color 0.2s;
}
.ask-close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.ask-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}
.ask-messages:empty::before {
  content: 'Click a question below or type your own.';
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.ask-msg {
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  max-width: 92%;
  opacity: 0;
  transform: translateY(8px);
  animation: askMsgIn 0.3s ease forwards;
}
.ask-msg.user {
  align-self: flex-end;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--text);
  transform-origin: bottom right;
}
.ask-msg.bot {
  align-self: flex-start;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transform-origin: bottom left;
  animation-delay: 0.04s;
}
@keyframes askMsgIn {
  to { opacity: 1; transform: translateY(0); }
}
.ask-msg.bot p { margin: 0 0 0.5rem 0; }
.ask-msg.bot p:last-child { margin-bottom: 0; }

.ask-suggestions {
  padding: 0 1.25rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
}
.ask-suggestions-title {
  width: 100%;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem 0;
}
.ask-suggestion {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-soft);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ask-suggestion:hover {
  background: var(--accent-dim);
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.3);
}

.ask-input-wrap {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.ask-input {
  flex: 1;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ask-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
.ask-send {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.ask-send:hover {
  background: #2dd4e8;
  transform: scale(1.02);
}
.ask-send:active {
  transform: scale(0.98);
}
