/* ================================================================
   CALLEDIT — Tool styles (Sharpen)
   Brand: deep arena (purple/indigo), neon accent gold + cyan
   Vibe: prediction-arena gameshow meets developer terminal
   ================================================================ */

:root {
  --primary: #7C3AED;
  --primary-dark: #5B21B6;
  --primary-glow: rgba(124, 58, 237, 0.35);
  --accent: #FBBF24;
  --accent-alt: #22D3EE;
  --bg-page: #0B0B14;
  --bg-elev: #15152A;
  --bg-card: #1B1B33;
  --bg-input: #0F0F20;
  --border: #2A2A45;
  --border-strong: #3D3D5C;
  --text: #F8F8FF;
  --text-muted: #9CA3B8;
  --text-dim: #6B7280;
  --success: #34D399;
  --danger: #F87171;
  --shadow-card: 0 20px 60px -20px rgba(0,0,0,0.6), 0 4px 20px -8px var(--primary-glow);
  --radius-card: 18px;
  --radius-pill: 999px;
  --font-mono: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

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

html, body {
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
}

body {
  background-image:
    radial-gradient(circle at 20% 0%, rgba(124, 58, 237, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(34, 211, 238, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(251, 191, 36, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ----------- Topbar ----------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(11,11,20,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}
.brand-name {
  background: linear-gradient(120deg, var(--text) 0%, var(--accent-alt) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
}
.nav-link:hover { color: var(--text); }
.cta-link {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 6px 20px -8px var(--primary-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -6px var(--primary-glow);
}

/* ----------- Tool shell ----------- */
.tool-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

/* ----------- Hero ----------- */
.hero-tool {
  text-align: center;
  margin-bottom: 48px;
}
.badge-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(124,58,237,0.14);
  border: 1px solid rgba(124,58,237,0.4);
  color: #C4B5FD;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
}
.badge.alt {
  background: rgba(251,191,36,0.10);
  border-color: rgba(251,191,36,0.3);
  color: var(--accent);
}
.dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.tool-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 96px);
  font-weight: 700;
  letter-spacing: -3px;
  line-height: 1;
  margin-bottom: 18px;
  background: linear-gradient(180deg, var(--text) 0%, #B8B8D8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cursor {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.tool-tagline {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 28px;
  line-height: 1.55;
}
.tool-tagline strong {
  color: var(--text);
  font-weight: 600;
}
.rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.rule {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ----------- Card primitive ----------- */
.card {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.6), transparent);
}

/* ----------- Composer ----------- */
.composer-section { margin-bottom: 32px; }

.field-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.label-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
}

#predictionInput {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 17px;
  color: var(--text);
  resize: vertical;
  font-family: var(--font-body);
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#predictionInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.18);
}
#predictionInput::placeholder { color: var(--text-dim); font-style: italic; }

.char-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.hint-tip { color: var(--text-muted); font-family: var(--font-body); font-style: italic; }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
@media (max-width: 700px) {
  .meta-grid { grid-template-columns: 1fr; }
}
.meta-field { display: flex; flex-direction: column; }
.meta-field select,
.meta-field input[type="date"] {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  color: var(--text);
  width: 100%;
  font-family: var(--font-body);
}
.meta-field select:focus,
.meta-field input[type="date"]:focus {
  outline: none;
  border-color: var(--primary);
}
.meta-field input[type="date"] {
  color-scheme: dark;
}

.conf-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.star {
  font-size: 26px;
  color: var(--border-strong);
  padding: 2px 4px;
  cursor: pointer;
  transition: color 0.12s ease, transform 0.1s ease;
}
.star.active,
.star:hover {
  color: var(--accent);
  transform: scale(1.1);
}
.conf-label {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ----------- Buttons ----------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 8px 24px -10px var(--primary-glow);
  width: 100%;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -8px var(--primary-glow);
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled {
  background: var(--bg-input);
  color: var(--text-dim);
  cursor: wait;
  box-shadow: none;
  transform: none;
}
.btn-xl {
  padding: 16px 28px;
  font-size: 16px;
  border-radius: 14px;
}
.btn-emoji { font-size: 18px; }
.btn-accent {
  background: var(--accent);
  color: #1a1300;
  box-shadow: 0 6px 20px -10px rgba(251,191,36,0.7);
}
.btn-accent:hover {
  background: #ffd24a;
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 9px 16px;
  font-size: 13px;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--primary);
}

.composer-foot {
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ----------- Result section ----------- */
.result-section { margin-bottom: 32px; }
.result-section.hidden { display: none; }

.result-card {
  animation: slideUp 0.4s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.score-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 600px) {
  .score-block { grid-template-columns: 1fr; gap: 20px; }
}

.big-score-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.big-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 92px;
  line-height: 1;
  background: linear-gradient(180deg, var(--accent) 0%, #ff9d3a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -3px;
}
.score-out-of {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--text-dim);
}
.score-meta { display: flex; flex-direction: column; gap: 12px; }
.score-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--text);
}
.score-bar {
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}
.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--danger) 0%, var(--accent) 50%, var(--success) 100%);
  border-radius: var(--radius-pill);
  width: 0%;
  transition: width 0.8s cubic-bezier(.2,.8,.2,1);
}
.score-tier-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tier-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
}
.tier-pill.active {
  color: var(--bg-page);
  background: var(--accent);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
@media (max-width: 700px) {
  .result-grid { grid-template-columns: 1fr; }
}
.result-block { }
.result-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 12px;
}
.rh-icon { font-size: 16px; }
.result-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.result-list li {
  background: var(--bg-input);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}
.result-list li.weak { border-left-color: var(--danger); }
.result-list li.good { border-left-color: var(--success); }

.sharper-block {
  background: linear-gradient(135deg, rgba(124,58,237,0.10) 0%, rgba(34,211,238,0.06) 100%);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
}
.sharper-version {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  margin: 8px 0 14px;
  font-style: italic;
}
.sharper-version::before { content: '"'; color: var(--primary); margin-right: 2px; }
.sharper-version::after { content: '"'; color: var(--primary); margin-left: 2px; }
.sharper-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.xp-toast {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.xp-emoji { font-size: 28px; }
.xp-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--success);
}
.xp-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.email-form {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
@media (max-width: 600px) { .email-form { flex-direction: column; } }
.email-form input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
}
.email-form input:focus {
  outline: none;
  border-color: var(--accent);
}
.form-status {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  min-height: 18px;
}
.form-status.success { color: var(--success); }
.form-status.error { color: var(--danger); }

/* ----------- Examples ----------- */
.examples-section { margin-bottom: 48px; }
.section-h {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--text);
}
.section-h .sub {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dim);
  margin-left: 8px;
}
.examples-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 700px) { .examples-grid { grid-template-columns: 1fr; } }
.example-btn {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.example-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.ex-cat {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ex-text {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.4;
}

/* ----------- Feed ----------- */
.feed-section { margin-bottom: 48px; }
.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}
.feed-sub {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feed-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  transition: border-color 0.15s ease;
}
.feed-item:hover { border-color: var(--border-strong); }
.feed-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  width: 50px;
}
.feed-score-num {
  font-weight: 700;
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
}
.feed-score-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.feed-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.feed-pred {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.feed-meta {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.feed-cat-tag {
  background: rgba(124,58,237,0.15);
  color: #C4B5FD;
  padding: 2px 8px;
  border-radius: 4px;
}
.feed-time {}
.feed-empty {
  text-align: center;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 24px;
}
.feed-tier {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
}
.feed-tier-receipts { background: rgba(52,211,153,0.18); color: var(--success); }
.feed-tier-sharp    { background: rgba(34,211,238,0.18); color: var(--accent-alt); }
.feed-tier-solid    { background: rgba(251,191,36,0.16); color: var(--accent); }
.feed-tier-soft     { background: rgba(124,58,237,0.18); color: #C4B5FD; }
.feed-tier-weasel   { background: rgba(248,113,113,0.18); color: var(--danger); }

@media (max-width: 600px) {
  .feed-item { grid-template-columns: auto 1fr; }
  .feed-tier { grid-column: 2; justify-self: start; }
}

/* ----------- CTA ----------- */
.cta-section { margin-bottom: 32px; }
.cta-card {
  text-align: center;
  padding: 48px 32px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124,58,237,0.16) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-card) 0%, var(--bg-elev) 100%);
}
.cta-emoji {
  font-size: 56px;
  margin-bottom: 14px;
  filter: drop-shadow(0 6px 18px rgba(251,191,36,0.4));
}
.cta-card h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.cta-card p {
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.cta-card p strong { color: var(--accent); font-weight: 600; }

/* ----------- Footer ----------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 28px;
  background: var(--bg-page);
}
.footer-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-left { display: flex; align-items: baseline; gap: 12px; }
.brand-name-small {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.footer-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.footer-right { display: flex; gap: 16px; }
.footer-right a { color: var(--text-muted); }
.footer-right a:hover { color: var(--text); }

/* ----------- Loading state ----------- */
.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
