:root {
  --bg: #0c1020;
  --card: #151b2e;
  --border: #2a3550;
  --text: #f0f4fc;
  --muted: #9aa8c4;
  --accent: #7c5cff;
  --accent2: #ff6b9d;
  --gold: #ffc857;
  --success: #3ecf8e;
  --radius: 16px;
  --font: "DM Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body.records-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: radial-gradient(1200px 800px at 10% -10%, rgba(124, 92, 255, 0.35), transparent),
    radial-gradient(900px 600px at 100% 20%, rgba(255, 107, 157, 0.22), transparent),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 40;
  display: none;
}

.confetti-layer.active {
  display: block;
}

.confetti-piece {
  position: absolute;
  top: -12px;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.95;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(var(--drift), 110vh, 0) rotate(720deg);
  }
}

.records-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  position: relative;
  z-index: 1;
}

.records-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.records-card {
  margin-top: 2rem;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.lookup-form .field {
  display: block;
  margin-bottom: 1rem;
}

.lookup-form .field span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.lookup-form input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 1rem;
}

.lookup-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25);
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5a8bff);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-secondary {
  margin-top: 1.25rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--accent);
}

.error-msg {
  margin: 1rem 0 0;
  color: #ff8a8a;
  font-size: 0.9rem;
}

.result-card {
  text-align: center;
}

.result-inner {
  animation: pop-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.records-headline {
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  background: linear-gradient(120deg, #fff, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.records-headline.soft {
  background: linear-gradient(120deg, #e8ecff, var(--muted));
}

.records-greeting {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: var(--text);
}

.records-greeting strong {
  color: #fff;
}

.records-sub {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

.records-details {
  text-align: left;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
}

.records-details dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.65rem;
}

.records-details dt:first-child {
  margin-top: 0;
}

.records-details dd {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  color: #fff;
}

.badge-done {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(62, 207, 142, 0.2);
  color: var(--success);
  border: 1px solid rgba(62, 207, 142, 0.45);
}

.badge-pending {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 200, 87, 0.15);
  color: var(--gold);
  border: 1px solid rgba(255, 200, 87, 0.4);
}

.sparkle {
  display: inline-block;
  animation: sparkle 1.2s ease-in-out infinite;
}

@keyframes sparkle {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.15) rotate(8deg);
    opacity: 0.85;
  }
}
