:root {
  --saffron: #FF9933;
  --saffron-light: #FFB366;
  --saffron-dark: #E6821A;
  --saffron-glow: rgba(255, 153, 51, 0.3);
  --saffron-faint: rgba(255, 153, 51, 0.08);
  --bg: #0A0A0F;
  --bg-card: #12121A;
  --bg-input: #1A1A26;
  --bg-elevated: #1E1E2E;
  --text: #F0F0F5;
  --text-muted: #8888AA;
  --border: rgba(255, 153, 51, 0.2);
  --success: #4CAF7D;
  --radius: 12px;

  --cat-primes: #FF6B6B;
  --cat-figurate: #4ECDC4;
  --cat-centered_figurate: #45B7D1;
  --cat-digital_invariants: #96CEB4;
  --cat-divisors: #F7DC6F;
  --cat-sequences: #DDA0DD;
  --cat-powers: #98D8C8;
  --cat-number_theory: #F8C471;
  --cat-combinatorial: #BB8FCE;
  --cat-recreational: #FFEAA7;
}

[data-theme="light"] {
  --bg: #F5F2EE;
  --bg-card: #FFFFFF;
  --bg-input: #F0EDE8;
  --bg-elevated: #FFFFFF;
  --text: #1A1A2E;
  --text-muted: #8888AA;
  --border: rgba(255, 153, 51, 0.25);
  --saffron-faint: rgba(255, 153, 51, 0.1);
  --saffron-glow: rgba(255, 153, 51, 0.2);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,153,51,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,153,51,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridPulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,153,51,0.15), transparent 70%);
  top: -100px; right: -100px;
  animation: orbFloat 8s ease-in-out infinite, orbPulse 4s ease-in-out infinite;
  animation-delay: 0s, 0s;
}
.orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,100,0,0.1), transparent 70%);
  bottom: 100px; left: -80px;
  animation: orbFloat 8s ease-in-out infinite, orbPulse 5s ease-in-out infinite;
  animation-delay: -4s, 0s;
}
.orb-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,200,51,0.08), transparent 70%);
  top: 50%; left: 50%;
  animation: orbFloat 8s ease-in-out infinite, orbPulse 6s ease-in-out infinite;
  animation-delay: -8s, 0s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.55; }
}

.container {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

header {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.theme-toggle {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--saffron-faint);
  border: 1px solid var(--border);
  color: var(--saffron);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover {
  border-color: var(--saffron);
  box-shadow: 0 0 12px var(--saffron-glow);
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 3px 12px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--saffron-faint);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--saffron);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  animation: fadeInDown 0.6s ease;
}

.logo-badge::before {
  content: 'â—';
  font-size: 8px;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--saffron), var(--saffron-light), #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 12px;
  animation: fadeInDown 0.6s ease 0.1s both;
}

.subtitle {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 400;
  animation: fadeInDown 0.6s ease 0.2s both;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

#loader {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-bottom: 32px;
  animation: fadeIn 0.4s ease;
}

.loader-text {
  color: var(--saffron);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  margin-bottom: 16px;
}

.progress-bar-wrap {
  background: rgba(255,153,51,0.1);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--saffron-dark), var(--saffron), var(--saffron-light));
  border-radius: 100px;
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 12px var(--saffron-glow);
  animation: shimmer 1.5s linear infinite;
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

#loader-byte {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 16px;
  animation: robotBob 1.5s ease-in-out infinite;
}
#lb-head {
  width: 28px;
  height: 22px;
  background: var(--saffron);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  opacity: 0.7;
}
.lb-eye {
  width: 6px;
  height: 6px;
  background: #0A0A0F;
  border-radius: 50%;
  animation: eyeBlink 2s ease-in-out infinite;
}
#lb-body {
  width: 22px;
  height: 16px;
  background: var(--saffron-dark, #cc7a00);
  border-radius: 3px;
  opacity: 0.7;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  animation: fadeInDown 0.5s ease 0.3s both;
  position: relative;
}

.tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.tab.active {
  background: linear-gradient(135deg, var(--saffron-dark), var(--saffron));
  color: #0A0A0F;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--saffron-glow);
}

.tab:hover:not(.active) {
  color: var(--saffron);
}

.tab-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.tab-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.5s ease both;
}

.card:hover {
  border-color: var(--saffron);
  box-shadow: 0 0 24px var(--saffron-glow);
}

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

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--saffron);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: var(--saffron);
  border-radius: 2px;
}

/* Inputs */
.input-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

input[type="number"], input[type="text"], input[type="date"] {
  flex: 1;
  min-width: 180px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -moz-appearance: textfield;
}

input[type="date"] {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color-scheme: dark;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { -webkit-appearance: none; }

input:focus {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px var(--saffron-glow);
}

/* Buttons */
.btn {
  background: linear-gradient(135deg, var(--saffron-dark), var(--saffron));
  color: #0A0A0F;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.btn:active::after {
  opacity: 1;
  animation: rippleOut 0.5s ease forwards;
}

@keyframes rippleOut {
  from { transform: scale(0.5); opacity: 0.6; }
  to { transform: scale(2.5); opacity: 0; }
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--saffron-glow);
}

.btn:active:not(:disabled) {
  transform: scale(0.96);
  transition: transform 0.08s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  padding: 10px 18px;
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--saffron);
  color: var(--saffron);
  box-shadow: 0 0 16px var(--saffron-glow);
}

.btn-icon {
  background: var(--saffron-faint);
  border: 1px solid var(--border);
  color: var(--saffron);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
}

.btn-icon.success {
  background: rgba(76, 175, 125, 0.2);
  border-color: var(--success);
  color: var(--success);
  transition: all 0.3s ease;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.kbd-hint {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  padding: 0 5px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  margin-left: 6px;
  line-height: 1.6;
}

/* Results */
#result-classify, #result-search, #result-compare, #result-why {
  margin-top: 20px;
  display: none;
}

#result-classify.show, #result-search.show, #result-compare.show, #result-why.show {
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

@keyframes resultSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result-animate {
  animation: resultSlideIn 0.3s ease forwards;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.number-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--saffron), #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.number-display .digit {
  display: inline-block;
  animation: digitIn 0.3s ease both;
}

@keyframes digitIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.score-badge {
  background: var(--saffron-faint);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.3s ease;
}

.score-badge.pulse {
  animation: scorePulse 0.5s ease;
}

@keyframes scorePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 125, 0.4); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(76, 175, 125, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 125, 0); }
}

.score-count {
  display: inline-block;
  min-width: 1.2em;
  text-align: right;
}

/* Tags */
.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag {
  background: var(--saffron-faint);
  border: 1px solid rgba(255,153,51,0.25);
  color: var(--saffron-light);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s ease;
  animation: tagPop 0.18s ease forwards;
  animation-delay: calc(var(--tag-index, 0) * 18ms);
  opacity: 0;
  cursor: help;
  position: relative;
}

.tag:hover {
  background: rgba(255,153,51,0.2);
  border-color: var(--saffron);
  transform: translateY(-1px);
}

.tag[data-category] {
  border-left: 3px solid var(--tag-color, var(--saffron));
}

@keyframes tagIn {
  from { opacity: 0; transform: scale(0.9) translateY(4px) rotate(var(--tag-rotate, 0deg)); }
  to { opacity: 1; transform: scale(1) translateY(0) rotate(0deg); }
}

@keyframes tagPop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* Tooltip */
.tag-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  pointer-events: none;
}

.tag:hover .tag-tooltip {
  display: block;
}

.tag-tooltip .tt-category {
  color: var(--saffron);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.empty-state {
  color: var(--text-muted);
  font-size: 14px;
  padding: 12px 0;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* Compare */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

@media (max-width: 560px) {
  .compare-grid { grid-template-columns: 1fr; }
}

.compare-col {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.compare-col-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--saffron);
  margin-bottom: 8px;
}

.compare-col .empty-state {
  font-size: 12px;
}

.shared-section {
  margin-top: 16px;
  background: rgba(76, 175, 125, 0.05);
  border: 1px solid rgba(76, 175, 125, 0.2);
  border-radius: 8px;
  padding: 16px;
}

.shared-title {
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

/* Why */
.why-output {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
}

/* NOTD */
.notd-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 64px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--saffron), #FFD700, var(--saffron-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  line-height: 1;
  margin: 12px 0;
  animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

/* Search results */
.search-result-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.search-num {
  background: var(--saffron-faint);
  border: 1px solid var(--border);
  color: var(--saffron);
  border-radius: 6px;
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: searchIn 0.25s ease both;
}

.search-num:hover {
  background: var(--saffron);
  color: #0A0A0F;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--saffron-glow);
}

@keyframes searchIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.load-more-btn {
  margin-top: 12px;
  width: 100%;
}

.did-you-mean {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(255, 153, 51, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.did-you-mean:hover {
  border-color: var(--saffron);
  color: var(--saffron);
}

.did-you-mean strong {
  color: var(--saffron);
}

/* History */
.history-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  margin-top: 12px;
  padding: 4px 0;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.history-toggle:hover {
  color: var(--saffron);
}

#history-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
  opacity: 0;
  padding: 0 4px;
}

#history-panel.open {
  max-height: 500px;
  opacity: 1;
  padding: 8px 4px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.history-item:hover {
  background: var(--saffron-faint);
}

.history-item .h-num {
  color: var(--saffron);
}

.history-item .h-score {
  color: var(--text-muted);
  font-size: 11px;
}

.clear-history {
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.clear-history:hover {
  color: #FF6B6B;
}

/* Batch table */
.batch-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.batch-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.batch-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,153,51,0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.batch-table tr:hover td {
  background: var(--saffron-faint);
}

.batch-table .b-num {
  color: var(--saffron);
  cursor: pointer;
}

.batch-table .b-tags {
  font-size: 11px;
  color: var(--text-muted);
}

/* Toast */
#toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--saffron);
  color: #0A0A0F;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

#toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* Scroll to top */
#scroll-top {
  position: fixed;
  bottom: 32px;
  left: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--saffron);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

#scroll-top:hover {
  border-color: var(--saffron);
  box-shadow: 0 0 16px var(--saffron-glow);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,153,51,0.3);
  border-top-color: var(--saffron);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

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

/* Footer */
footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--saffron);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--saffron-light);
}

.url-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 12px;
  display: inline-block;
  word-break: break-all;
}

/* Skeleton shimmer for loading */
@keyframes skeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Unselectable helper */
.no-select {
  user-select: none;
}

/* Responsive */
@media (max-width: 640px) {
  .container { padding: 24px 16px 60px; }
  .theme-toggle { position: static; margin-bottom: 12px; }
  .number-display { font-size: 32px; }
  .notd-number { font-size: 40px; }
  .tabs { gap: 2px; }
  .tab { font-size: 12px; padding: 8px 6px; }
}

/* â”€â”€ Search Autocomplete â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.autocomplete-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}

#ac-dropdown, #why-ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

#ac-dropdown.open, #why-ac-dropdown.open { display: block; }

.ac-item {
  padding: 8px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  color: var(--text);
}

.ac-item:first-child { border-radius: 7px 7px 0 0; }
.ac-item:last-child { border-radius: 0 0 7px 7px; }

.ac-item:hover, .ac-item.selected {
  background: var(--saffron-faint);
  color: var(--saffron);
}

.ac-item .ac-cat {
  float: right;
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

/* â”€â”€ Confetti â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  top: -10px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) scale(0.3);
    opacity: 0;
  }
}

/* â”€â”€ Keyboard Shortcuts Overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.shortcuts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
}

.shortcuts-overlay.open { display: flex; }

.shortcuts-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 40px;
  max-width: 400px;
  width: 90%;
  animation: slideUp 0.3s ease both;
}

.shortcuts-panel h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--saffron);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,153,51,0.06);
}

.shortcut-row:last-child { border-bottom: none; }

.shortcut-row .sk-key {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--saffron);
  min-width: 28px;
  text-align: center;
}

.shortcut-row .sk-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.shortcuts-close {
  margin-top: 20px;
  width: 100%;
}

/* â”€â”€ Reduced Motion â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

