:root {
  --bg-primary: #f5f0e8;
  --bg-secondary: #ece5d8;
  --bg-card: #faf7f2;
  --text-primary: #1a1714;
  --text-secondary: #4a4540;
  --text-muted: #6b635b;
  --accent-warm: #b87d4b;
  --accent-warm-dark: #9a6838;
  --accent-cool: #6b8260;
  --accent-danger: #b85a4a;
  --accent-super: #5a7bb8;
  --border-light: #e0d8cc;
  --border-medium: #d0c8bc;
  --shadow-soft: 0 2px 20px rgba(45, 41, 38, 0.06);
  --shadow-medium: 0 8px 40px rgba(45, 41, 38, 0.1);
  --shadow-lifted: 0 12px 60px rgba(45, 41, 38, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Bricolage Grotesque', 'Outfit', sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}

/* Header */
.header {
  padding: 60px 0 40px;
  text-align: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent-warm), var(--accent-warm-dark));
  border-radius: 50%;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(196, 149, 106, 0.3);
}

.logo-icon {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: white;
}

.title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 32px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.input-wrapper {
  display: flex;
  gap: 12px;
  max-width: 540px;
  margin: 0 auto;
}

.thing-input {
  flex: 1;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.thing-input::placeholder {
  color: var(--text-muted);
}

.thing-input:focus {
  border-color: var(--accent-warm);
  box-shadow: 0 0 0 4px rgba(196, 149, 106, 0.15);
}

.submit-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.submit-btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* Main Content */
.main {
  padding-bottom: 80px;
}

/* Loading State */
.loading-state {
  padding: 60px 0;
}

.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent-warm);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Result State */
.result-state {
  padding: 20px 0;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-soft);
}

.result-header {
  text-align: center;
  margin-bottom: 32px;
}

.result-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.result-thing {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0;
}

.result-question {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Verdict */
.verdict-wrapper {
  text-align: center;
  margin-bottom: 36px;
}

.verdict {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 100px;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.verdict.yes {
  background: #e8f0e5;
  color: #4a6b42;
}

.verdict.no {
  background: #f0e5e5;
  color: #6b4242;
}

.verdict.maybe {
  background: #f0ece5;
  color: #6b5a42;
}

/* Score Section */
.score-section {
  margin-bottom: 36px;
}

.score-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}

.score-bar-wrapper {
  height: 12px;
  background: var(--bg-secondary);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.score-bar {
  height: 100%;
  width: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent-warm), var(--accent-cool));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.score-value {
  text-align: center;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Reasons */
.reasons-section {
  margin-bottom: 36px;
}

.reasons-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-align: center;
}

.reasons-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reason-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.reason-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: 6px;
  font-size: 0.85rem;
}

/* Share Section */
.share-section {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.share-btn {
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  background: var(--accent-warm-dark);
  transform: translateY(-1px);
}

.try-again-btn {
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.try-again-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* Empty State */
.empty-state {
  padding: 40px 0;
}

.examples {
  text-align: center;
}

.examples-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.chip {
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

/* Leaderboard */
.leaderboard {
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
  margin-top: 40px;
}

.leaderboard-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 24px;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.leaderboard-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.leaderboard-rank {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 32px;
  text-align: center;
}

.leaderboard-rank.gold { color: #b8860b; }
.leaderboard-rank.silver { color: #808080; }
.leaderboard-rank.bronze { color: #a0522d; }

.leaderboard-content {
  flex: 1;
}

.leaderboard-thing {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.leaderboard-verdict {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.leaderboard-score {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-warm);
}

.clear-btn {
  display: block;
  margin: 20px auto 0;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-btn:hover {
  border-color: var(--accent-danger);
  color: var(--accent-danger);
}

/* Footer */
.footer {
  padding: 40px 0;
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card {
  animation: fadeIn 0.4s ease;
}

/* Responsive */
@media (max-width: 600px) {
  .header {
    padding: 40px 0 30px;
  }

  .input-wrapper {
    flex-direction: column;
  }

  .submit-btn {
    justify-content: center;
  }

  .result-card {
    padding: 28px 20px;
  }

  .result-thing {
    font-size: 1.6rem;
  }

  .score-value {
    font-size: 2rem;
  }

  .share-section {
    flex-direction: column;
  }

  .share-btn, .try-again-btn {
    text-align: center;
  }
}