/* ========================================
   AGENTZ.BET — Light Theme / Prompt Anim
   ======================================== */

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

:root {
  --bg: #f8f8f8;
  --white: #ffffff;
  --text: #111111;
  --text2: #555555;
  --text3: #999999;
  --text4: #bbbbbb;
  --border: rgba(0,0,0,0.06);
  --border2: rgba(0,0,0,0.1);
  --accent: #111;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --display: 'Space Grotesk', 'Inter', sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── Page ───────────────────────── */

.page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(20px, 5vw, 64px);
  overflow: hidden;
  position: relative;
}

/* ── Nav ────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo-name {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo-dot { color: var(--text3); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-size: 0.8125rem;
  color: var(--text2);
  cursor: pointer;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }

.nav-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--white);
  background: var(--text);
  border: none;
  padding: 9px 22px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-cta:hover {
  background: #333;
  transform: translateY(-1px);
}

/* ── Center ─────────────────────── */

.center {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  gap: 0;
  padding-bottom: 20px;
}

.headline {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}
.hl-line { display: block; }
.hl-1 {
  opacity: 0;
  animation: fadeIn 0.6s 0.2s ease forwards;
}
.hl-2 {
  opacity: 0;
  animation: fadeIn 0.6s 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.tagline {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  color: var(--text3);
  text-align: center;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeIn 0.6s 0.55s ease forwards;
}

/* ── Demo Area (the animated card) ── */

.demo-area {
  position: relative;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  opacity: 0;
  animation: fadeIn 0.7s 0.7s ease forwards;
}

/* Rainbow glow */
.glow-bg {
  position: absolute;
  top: -30px;
  left: -40px;
  right: -40px;
  bottom: -20px;
  border-radius: 28px;
  background: conic-gradient(
    from 0deg,
    rgba(255,200,120,0.25),
    rgba(180,255,180,0.2),
    rgba(140,200,255,0.25),
    rgba(220,160,255,0.25),
    rgba(255,160,200,0.2),
    rgba(255,200,120,0.25)
  );
  filter: blur(30px);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
  z-index: 0;
}
.glow-bg.active {
  opacity: 1;
  transform: scale(1);
}

/* Thinking bar */
.thinking-bar {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-radius: 16px 16px 0 0;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  margin-bottom: -1px;
}
.thinking-bar.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

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

.thinking-dots {
  display: flex;
  gap: 3px;
}
.thinking-dots span {
  width: 5px;
  height: 5px;
  background: var(--text3);
  border-radius: 50%;
  animation: dotBounce 1.2s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.thinking-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text2);
}

.thinking-right {
  display: flex;
  align-items: center;
}
.thinking-status {
  font-size: 0.7rem;
  color: var(--text4);
  transition: opacity 0.3s;
}

/* Results card */
.results-card {
  position: relative;
  z-index: 2;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  padding: 0;
  margin-bottom: -1px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, max-height 0.6s ease;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
}
.results-card.active {
  opacity: 1;
  transform: translateY(0);
  max-height: 400px;
  pointer-events: auto;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 10px;
}
.results-title {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.results-count {
  font-size: 0.75rem;
  color: var(--text4);
}

.results-agents {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 22px 14px;
}

/* Agent chip */
.agent-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 14px 8px 10px;
  opacity: 0;
  transform: scale(0.9) translateY(8px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.agent-chip.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.agent-chip.winner {
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.05);
}

.chip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.chip-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.chip-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
}
.chip-bet {
  font-size: 0.65rem;
  color: var(--text3);
}
.chip-bet .yes { color: #16a34a; font-weight: 600; }
.chip-bet .no { color: #dc2626; font-weight: 600; }
.chip-bet .amt { color: var(--text2); font-weight: 600; }

/* Result action rows */
.results-actions {
  border-top: 1px solid var(--border);
  padding: 6px 22px 10px;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.35s ease;
}
.action-row:last-child { border-bottom: none; }
.action-row.visible {
  opacity: 1;
  transform: translateY(0);
}
.action-row.winner-row .action-label {
  color: #16a34a;
  font-weight: 600;
}

.action-label {
  font-size: 0.8rem;
  color: var(--text2);
}
.action-arrow {
  font-size: 0.75rem;
  color: var(--text4);
}

/* Prompt bar */
.prompt-bar {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
  transition: border-radius 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.prompt-bar.connected {
  border-radius: 0 0 18px 18px;
  border-top-color: var(--border);
}
.prompt-bar.glowing {
  box-shadow: 0 4px 30px rgba(0,0,0,0.06);
}

.prompt-icon {
  width: 40px;
  height: 40px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prompt-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text4);
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.3s;
  min-height: 1.3em;
}
.prompt-text.typing {
  color: var(--text);
}
.prompt-text .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--text);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: cursorBlink 0.8s step-end infinite;
}

@keyframes cursorBlink {
  50% { opacity: 0; }
}

.prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.prompt-send {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.prompt-send.visible { opacity: 1; }

/* ── Footer ─────────────────────── */

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  flex-shrink: 0;
}

.coming-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text3);
}
.coming-dot {
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.foot-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.foot-link {
  font-size: 0.7rem;
  color: var(--text4);
  cursor: pointer;
  transition: color 0.2s;
}
.foot-link:hover { color: var(--text2); }
.foot-copy {
  font-size: 0.65rem;
  color: var(--text4);
}

/* ── Modal ──────────────────────── */

.modal-bg {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-bg.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}
.modal-bg.open .modal-box {
  transform: translateY(0) scale(1);
}
.modal-x {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; font-size: 1.3rem;
  color: var(--text4); cursor: pointer;
}
.modal-x:hover { color: var(--text); }
.modal-box h2 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.modal-box p {
  font-size: 0.85rem;
  color: var(--text3);
  margin-bottom: 20px;
}
.modal-form {
  display: flex; gap: 8px;
}
.modal-form input {
  flex: 1;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  font-size: 0.85rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
  background: var(--bg);
}
.modal-form input:focus { border-color: var(--text3); }
.modal-form input::placeholder { color: var(--text4); }
.modal-form button {
  padding: 11px 24px;
  border-radius: 10px;
  border: none;
  background: var(--text);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s;
}
.modal-form button:hover { background: #333; }
.modal-note {
  display: block;
  margin-top: 10px;
  font-size: 0.65rem;
  color: var(--text4);
}

/* ── Responsive ─────────────────── */

@media (max-width: 700px) {
  .nav-link { display: none; }
  .headline { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .tagline { margin-bottom: 24px; }
  .demo-area { max-width: 100%; }
  .foot-link { display: none; }
  .results-agents { gap: 8px; }
  .agent-chip { padding: 6px 10px 6px 8px; }
  .chip-avatar { width: 28px; height: 28px; font-size: 0.85rem; }
  .chip-name { font-size: 0.7rem; }
  .chip-bet { font-size: 0.6rem; }
}

/* ── Scrollbar / Selection ──────── */

::-webkit-scrollbar { width: 0; }
::selection { background: rgba(0,0,0,0.08); }
