@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Syne:wght@500;600;700;800&family=Work+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --fc-bg:          #080808;
  --fc-bg-alt:      #0b0b0b;
  --fc-panel:       #111111;
  --fc-panel-soft:  #141414;
  --fc-surface-hover: #161616;
  --fc-line:        #1e1e1e;
  --fc-line-mid:    #242424;
  --fc-line-hover:  #2a2a2a;
  --fc-ink:         #e8e8e8;
  --fc-muted:       #9a9a9a;
  --fc-dim:         #5a5a5a;
  --fc-faint:       #3a3a3a;

  --fc-green:       #4ade80;
  --fc-green-dim:   rgba(74, 222, 128, 0.10);
  --fc-green-border:rgba(74, 222, 128, 0.30);
  --fc-red:         #f87171;
  --fc-red-dim:     rgba(248, 113, 113, 0.10);
  --fc-red-border:  rgba(248, 113, 113, 0.30);
  --fc-blue:        #60a5fa;
  --fc-blue-dim:    rgba(96, 165, 250, 0.10);
  --fc-blue-border: rgba(96, 165, 250, 0.30);
  --fc-orange:      #fb923c;
  --fc-orange-dim:  rgba(251, 146, 60, 0.10);

  --fc-shadow:      0 0 0 transparent;
  --fc-mono:        'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
  --fc-sans:        'Syne', 'Work Sans', 'Helvetica Neue', sans-serif;
  --fc-body:        'Work Sans', 'Helvetica Neue', sans-serif;

  --fc-radius-xl: 18px;
  --fc-radius-lg: 14px;
  --fc-radius-md: 10px;
  --fc-radius-sm: 6px;
}

* { box-sizing: border-box; }

html,
body,
#farcaster-app-root {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--fc-body);
  color: var(--fc-ink);
  background: var(--fc-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.fc-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 20px 14px 32px;
  overflow-x: hidden;
}

.fc-frame,
.fc-grid,
.fc-thread,
.fc-card-stack,
.fc-action-grid {
  display: grid;
  gap: 12px;
}

.fc-card {
  background: var(--fc-panel);
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius-xl);
  overflow: hidden;
  min-width: 0;
}

.fc-card-inner {
  padding: 18px;
}

.fc-hero {
  position: relative;
}

.fc-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--fc-green-border) 50%, transparent 100%);
  pointer-events: none;
}

.fc-brand-row,
.fc-chip-row,
.fc-topline,
.fc-meta-grid,
.fc-action-row,
.fc-token-actions,
.fc-inline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fc-brand-row {
  align-items: center;
  justify-content: space-between;
}

.fc-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--fc-radius-md);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--fc-green);
  background: var(--fc-green-dim);
  border: 1px solid var(--fc-green-border);
}

.fc-badge,
.fc-pill,
.fc-status-pill,
.fc-action-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: var(--fc-radius-sm);
  background: var(--fc-surface-hover);
  border: 1px solid var(--fc-line);
  color: var(--fc-muted);
  font-family: var(--fc-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fc-badge-live,
.fc-status-pill.is-live {
  background: var(--fc-green-dim);
  border-color: var(--fc-green-border);
  color: var(--fc-green);
}

.fc-badge-live::before,
.fc-status-pill.is-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fc-green);
  box-shadow: 0 0 6px var(--fc-green);
}

.fc-status-pill.is-ready {
  background: var(--fc-green-dim);
  border-color: var(--fc-green-border);
  color: var(--fc-green);
}

.fc-status-pill.is-warning {
  background: var(--fc-orange-dim);
  border-color: rgba(251, 146, 60, 0.3);
  color: var(--fc-orange);
}

.fc-title {
  margin: 0;
  font-family: var(--fc-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fc-ink);
  letter-spacing: -0.01em;
}

.fc-heading {
  margin: 0;
  font-family: var(--fc-sans);
  font-size: clamp(1.9rem, 7vw, 2.8rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--fc-ink);
}

.fc-copy,
.fc-muted,
.fc-response-meta,
.fc-field-note,
.fc-footer {
  color: var(--fc-muted);
  font-family: var(--fc-body);
}

.fc-copy {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.fc-art-shell {
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
  border: 1px solid var(--fc-line);
  background: var(--fc-bg);
}

.fc-art-shell img {
  width: 100%;
  display: block;
}

.fc-profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.fc-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--fc-radius-md);
  overflow: hidden;
  border: 1px solid var(--fc-line);
  background: var(--fc-surface-hover);
}

.fc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fc-avatar-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--fc-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--fc-green);
  background: var(--fc-green-dim);
}

.fc-meta-grid {
  justify-content: space-between;
  align-items: center;
}

.fc-field {
  display: grid;
  gap: 6px;
}

.fc-field-label {
  font-family: var(--fc-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fc-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fc-field-note {
  font-family: var(--fc-mono);
  font-size: 0.7rem;
  color: var(--fc-dim);
  letter-spacing: 0.02em;
}

.fc-input {
  width: 100%;
  min-height: 42px;
  padding: 11px 14px;
  border-radius: var(--fc-radius-md);
  border: 1px solid var(--fc-line);
  background: var(--fc-bg);
  color: var(--fc-ink);
  font-family: var(--fc-mono);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.fc-input::placeholder {
  color: var(--fc-dim);
}

.fc-input:focus {
  border-color: var(--fc-green-border);
  box-shadow: 0 0 0 3px var(--fc-green-dim);
}

.fc-button,
.fc-token-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: var(--fc-radius-md);
  border: 1px solid var(--fc-line);
  background: var(--fc-surface-hover);
  color: var(--fc-ink);
  font-family: var(--fc-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.fc-button:hover,
.fc-token-link:hover {
  border-color: var(--fc-line-hover);
  background: var(--fc-panel-soft);
  transform: translateY(-1px);
}

.fc-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.fc-button-primary {
  background: var(--fc-green);
  color: #062c14;
  border-color: var(--fc-green);
}

.fc-button-primary:hover {
  background: #5bf198;
  border-color: #5bf198;
}

.fc-button-accent {
  background: var(--fc-surface-hover);
  border-color: var(--fc-green-border);
  color: var(--fc-green);
}

.fc-button-accent:hover {
  background: var(--fc-green-dim);
}

.fc-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fc-response-list {
  display: grid;
  gap: 8px;
}

.fc-response-item {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--fc-radius-md);
  border: 1px solid var(--fc-line);
  background: var(--fc-bg);
  min-width: 0;
}

.fc-response-item.is-user {
  background: var(--fc-green-dim);
  border-color: var(--fc-green-border);
}

.fc-response-text {
  margin: 0;
  font-family: var(--fc-body);
  font-size: 0.9rem;
  white-space: pre-line;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: break-word;
  word-break: break-word;
  color: var(--fc-ink);
}

.fc-response-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--fc-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--fc-dim);
}

.fc-token-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--fc-radius-md);
  border: 1px solid var(--fc-green-border);
  background: var(--fc-green-dim);
}

.fc-footer {
  font-family: var(--fc-mono);
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--fc-dim);
  letter-spacing: 0.02em;
}

.fc-footer a {
  color: var(--fc-green);
  text-decoration: underline;
  text-decoration-color: var(--fc-green-border);
  text-underline-offset: 2px;
}

.fc-predict {
  position: relative;
}

.fc-predict-card {
  background: var(--fc-panel);
  border: 1px solid var(--fc-line);
  border-radius: var(--fc-radius-xl);
  overflow: hidden;
}

.fc-predict-card::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--fc-green-border) 50%, transparent 100%);
}

.fc-predict-inner {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.fc-predict-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 10px;
  align-self: start;
  border-radius: var(--fc-radius-sm);
  background: var(--fc-green-dim);
  border: 1px solid var(--fc-green-border);
  color: var(--fc-green);
  font-family: var(--fc-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fc-predict-kicker .fc-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fc-green);
  box-shadow: 0 0 6px var(--fc-green);
  animation: fc-pulse 1.6s ease-in-out infinite;
}

@keyframes fc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.fc-predict-title {
  margin: 0;
  font-family: var(--fc-sans);
  font-size: clamp(1.75rem, 7vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--fc-ink);
}

.fc-predict-title .fc-accent-green {
  color: var(--fc-green);
}

.fc-predict-lead {
  margin: 0;
  color: var(--fc-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.fc-predict-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fc-predict-stat {
  padding: 10px 12px;
  border-radius: var(--fc-radius-md);
  border: 1px solid var(--fc-line);
  background: var(--fc-bg);
  display: grid;
  gap: 4px;
  min-width: 0;
}

.fc-predict-stat.is-green {
  border-color: var(--fc-green-border);
  background: var(--fc-green-dim);
}

.fc-predict-stat.is-orange {
  border-color: rgba(251, 146, 60, 0.3);
  background: var(--fc-orange-dim);
}

.fc-stat-label {
  font-family: var(--fc-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--fc-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fc-stat-value {
  font-family: var(--fc-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fc-ink);
}

.fc-predict-stat.is-green .fc-stat-value { color: var(--fc-green); }
.fc-predict-stat.is-orange .fc-stat-value { color: var(--fc-orange); }

.fc-predict-markets {
  display: grid;
  gap: 8px;
}

.fc-market {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--fc-radius-md);
  border: 1px solid var(--fc-line);
  background: var(--fc-bg);
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease;
}

.fc-market:hover {
  border-color: var(--fc-green-border);
  transform: translateY(-1px);
}

.fc-market-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--fc-mono);
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fc-market-cat { color: var(--fc-green); }
.fc-market-time { color: var(--fc-dim); }

.fc-market-q {
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--fc-ink);
  font-weight: 500;
}

.fc-market-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--fc-line);
  overflow: hidden;
}

.fc-market-bar-yes {
  height: 100%;
  background: var(--fc-green);
}

.fc-market-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--fc-mono);
  font-size: 0.72rem;
}

.fc-market-odds {
  display: flex;
  gap: 12px;
}

.fc-market-odds > span {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
}

.fc-market-odds-yes { color: var(--fc-green); font-weight: 700; }
.fc-market-odds-no  { color: var(--fc-red);   font-weight: 700; }

.fc-market-odds-label {
  color: var(--fc-dim);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}

.fc-market-vol {
  color: var(--fc-muted);
  font-weight: 600;
}

.fc-predict-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: var(--fc-radius-md);
  background: var(--fc-green);
  color: #062c14;
  border: 1px solid var(--fc-green);
  font-family: var(--fc-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 140ms ease;
}

.fc-predict-cta:hover { background: #5bf198; border-color: #5bf198; }

.fc-predict-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fc-builder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fc-builder-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--fc-radius-md);
  border: 1px solid var(--fc-line);
  background: var(--fc-bg);
}

.fc-builder-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 5px 8px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-green-border);
  background: var(--fc-green-dim);
  color: var(--fc-green);
  font-family: var(--fc-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fc-builder-card strong {
  font-family: var(--fc-sans);
  font-size: 0.9rem;
  line-height: 1.15;
  color: var(--fc-ink);
}

.fc-builder-copy {
  color: var(--fc-muted);
  font-family: var(--fc-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .fc-shell {
    padding: 14px 10px 24px;
  }

  .fc-card-inner {
    padding: 16px;
  }

  .fc-action-grid {
    grid-template-columns: 1fr;
  }

  .fc-predict-inner {
    padding: 16px;
  }

  .fc-predict-stats {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  .fc-stat-value {
    font-size: 1rem;
  }

  .fc-builder-grid {
    grid-template-columns: 1fr;
  }
}
