:root {
  --li-blue: #0a66c2;
  --li-blue-dark: #004182;
  --ink: #1d2226;
  --muted: #5e6b74;
  --line: #e3e6e8;
  --bg: #f3f6f8;
  --gold: #d9a400;
  --green: #057642;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, #e8f1fb 0%, transparent 60%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 18px 48px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 26px 30px;
}

/* HERO */
.hero { text-align: center; }

.badge {
  width: 116px;
  height: 116px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff5d6, #f6d96b 55%, #e0b53a 100%);
  border: 4px solid var(--gold);
  box-shadow: 0 6px 18px rgba(217, 164, 0, 0.35), inset 0 0 0 6px rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6b4e00;
  transform: rotate(-6deg);
}
.badge-top { font-size: 13px; font-weight: 800; letter-spacing: 3px; line-height: 1; }
.badge-num { font-size: 42px; font-weight: 900; line-height: 0.95; }
.badge-bottom { font-size: 9px; font-weight: 700; letter-spacing: 1px; }

h1 {
  font-size: clamp(26px, 6vw, 36px);
  font-weight: 900;
  line-height: 1.12;
  margin: 6px 0 12px;
}
.hl { color: var(--li-blue); }

.lead {
  color: var(--muted);
  font-size: 17px;
  margin: 0 auto;
  max-width: 460px;
}

/* FORM */
.check-form { margin-top: 28px; }

.field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.input-row {
  display: flex;
  gap: 10px;
}

#url {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  font-size: 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#url:focus {
  border-color: var(--li-blue);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.15);
}

#submit-btn {
  flex-shrink: 0;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--li-blue);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
#submit-btn:hover { background: var(--li-blue-dark); }
#submit-btn:active { transform: translateY(1px); }
#submit-btn:disabled { opacity: 0.6; cursor: default; }

.hint {
  margin: 10px 2px 0;
  font-size: 13px;
  color: var(--muted);
}

.error {
  margin: 10px 2px 0;
  font-size: 14px;
  font-weight: 600;
  color: #b42318;
}

/* LOADER */
.loader {
  margin-top: 30px;
  text-align: center;
}
.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  border: 4px solid #e3e6e8;
  border-top-color: var(--li-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-step {
  font-weight: 600;
  color: var(--muted);
  min-height: 1.4em;
}

/* RESULT */
.result {
  margin-top: 26px;
  text-align: center;
  animation: pop 0.35s ease;
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.result-emoji { font-size: 56px; line-height: 1; }
.result-title {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 900;
  margin: 12px 0 8px;
}
.result.win .result-title { color: var(--green); }
.result.lose .result-title { color: var(--ink); }
.result-body {
  color: var(--muted);
  font-size: 17px;
  max-width: 440px;
  margin: 0 auto;
}
.result-leadership {
  margin: 16px auto 0;
  max-width: 440px;
  padding: 12px 16px;
  background: #fff7e0;
  border: 1px solid #f1d98a;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #6b4e00;
}

.result-actions {
  margin-top: 24px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-secondary {
  text-decoration: none;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: var(--li-blue);
  border-radius: 24px;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--li-blue-dark); }
.btn-ghost {
  padding: 12px 18px;
  font-weight: 600;
  font-size: 15px;
  color: var(--li-blue);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 24px;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--li-blue); }

/* FOOTER */
.footnote {
  text-align: center;
  margin-top: 22px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.footnote a { color: var(--li-blue); }

@media (max-width: 480px) {
  .card { padding: 26px 18px 24px; }
  .input-row { flex-direction: column; }
  #submit-btn { width: 100%; }
}
