/* A clean, modern responsive style for the birthday card */
:root {
  --bg: #0b1220;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.16);
  --text: #f6f7ff;
  --muted: rgba(246, 247, 255, 0.7);
  --accent: #ff6b6b;
  --accent2: #42d9ff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --max-width: 900px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #4029ff, #0b1220 55%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  padding: 40px 48px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.10), rgba(0, 0, 0, 0.24));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.progress {
  margin: 28px 0 14px;
}

.progress span {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--muted);
}

.progress-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
  transition: width 400ms ease;
}

.card {
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 40px rgba(0, 0, 0, 0.35);
}

.card pre {
  margin: 1rem 0;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.card p {
  margin: 0.75rem 0;
  line-height: 1.6;
}

.card .hint {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: rgba(246, 247, 255, 0.72);
}

.input-group {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

input[type="text"], input[type="number"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus {
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(66, 217, 255, 0.18);
}

button {
  cursor: pointer;
  border: none;
  padding: 14px 18px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0b1220;
  transition: transform 160ms ease, filter 160ms ease;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.25);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.35);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.meta {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.89rem;
  color: var(--muted);
}

.meta small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.celebrate {
  margin-top: 22px;
  padding: 22px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 18, 32, 0.75);
  padding: 24px;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.modal[hidden] {
  display: none;
}

.modal-content {
  width: min(580px, 100%);
  max-width: 580px;
  padding: 28px 28px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.modal-content h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 2.2vw, 2.4rem);
}

.modal-content p {
  margin: 0 0 18px;
  color: rgba(246, 247, 255, 0.82);
  line-height: 1.6;
}

.modal-content button {
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
}

.js-status {
  position: fixed;
  bottom: 18px;
  right: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.85rem;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.88;
  transition: transform 200ms ease, opacity 200ms ease;
}

.js-status.running {
  background: rgba(40, 220, 150, 0.92);
  color: #0b1220;
  transform: scale(1.05);
}

@media (max-width: 600px) {
  .container {
    padding: 26px 18px;
  }
}
