:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #182026;
  --muted: #5f6b7a;
  --border: #e3e7ed;
  --primary: #1f6feb;
  --primary-hover: #1558c0;
  --green-bg: #e6f4ea;
  --green-text: #137333;
  --pending-bg: #f1f3f5;
  --pending-text: #5f6b7a;
  --reveal: #d93025;
  --reveal-hover: #b3261e;
  --danger-bg: #fce8e6;
  --danger-text: #a50e0e;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 540px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff0ed;
  color: #b3261e;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}

.card h2 {
  margin: 0 0 6px;
  font-size: 1.125rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-header h2 {
  margin: 0;
}

.hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pending-bg);
  color: var(--text);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--pending-bg);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background: #1e8e3e;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.status-item:first-child {
  border-top: none;
  padding-top: 0;
}

.status-item:last-child {
  padding-bottom: 0;
}

.status-name {
  font-weight: 600;
}

.badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge-done {
  background: var(--green-bg);
  color: var(--green-text);
}

.badge-pending {
  background: var(--pending-bg);
  color: var(--pending-text);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
}

.field select,
.field input {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.field select:disabled {
  background: var(--pending-bg);
  color: var(--muted);
}

.btn {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.99);
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--pending-bg);
  color: var(--text);
}

.btn-reveal {
  background: var(--reveal);
  color: #fff;
  letter-spacing: 0.03em;
}

.btn-reveal:hover:not(:disabled) {
  background: var(--reveal-hover);
}

.reveal-result {
  margin-top: 20px;
  padding: 24px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff5f5 0%, #fef9e7 100%);
  border: 2px solid #f6c7c2;
  text-align: center;
  animation: popIn 0.35s ease;
}

.reveal-label {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.reveal-name {
  font-size: clamp(2.25rem, 9vw, 3.25rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--reveal);
  word-break: break-word;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.alert-success {
  background: var(--green-bg);
  color: var(--green-text);
}

.footer {
  text-align: center;
  margin-top: 12px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 8px;
}

.btn-link:hover {
  color: var(--text);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.2);
}

.modal h3 {
  margin: 0 0 8px;
}

.modal p {
  margin: 0 0 18px;
  color: var(--muted);
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hidden {
  display: none !important;
}

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