/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8f9fa;
  color: #374151;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 420px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  padding: 52px 24px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 260px;
  overflow: hidden;
  background-color: #000000;
}

.hero--success {
  padding: 40px 24px 48px;
  min-height: 200px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-bg--faded {
  opacity: 0.2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.85) 100%);
}

.hero > *:not(.hero-bg):not(.hero-overlay) {
  position: relative;
  z-index: 1;
}

.hero-logo {
  height: 52px;
  object-fit: contain;
}

.hero-logo--sm {
  height: 36px;
}

.hero-logo-text {
  font-family: 'Oswald', sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #ffffff;
}

.hero-logo-text--sm {
  font-size: 22px;
  letter-spacing: 2px;
}

.hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: #e2e8f0;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: 14px;
  color: #b8c0cc;
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
}

/* ============================================
   Form Section
   ============================================ */
.form-section {
  padding: 0 24px 32px;
  background-color: #f8f9fa;
}

.form-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-top: -24px;
  position: relative;
  z-index: 2;
}

.field-row {
  display: flex;
  gap: 12px;
}

.field-row .form-group {
  flex: 1;
}

.form-group {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  background-color: #f3f4f6;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  color: #374151;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder {
  color: #9ca3af;
}

input[type="text"]:focus,
input[type="email"]:focus {
  border-color: #64DB9F;
}

/* Waiver */
.waiver-group {
  margin-top: 4px;
  margin-bottom: 20px;
}

.waiver-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-weight: normal;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  appearance: none;
  -webkit-appearance: none;
  background-color: #f9fafb;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s;
}

input[type="checkbox"]:checked {
  background-color: #64DB9F;
  border-color: #64DB9F;
}

input[type="checkbox"]:checked::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #ffffff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

input[type="checkbox"]:focus {
  outline: 2px solid #64DB9F;
  outline-offset: 2px;
}

.waiver-text {
  flex: 1;
}

/* Error Message */
.error-message {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #dc2626;
  font-size: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 14px;
  background-color: #333333;
  color: #ffffff;
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  -webkit-appearance: none;
  appearance: none;
}

.submit-btn:hover {
  background-color: #1a1a1a;
}

.submit-btn:active {
  transform: scale(0.98);
}

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

/* ============================================
   QR Success View
   ============================================ */
.success-title {
  font-family: 'Oswald', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #64DB9F;
  letter-spacing: 2px;
  text-align: center;
}

.success-subtitle {
  font-size: 14px;
  color: #c8d0db;
  text-align: center;
}

.qr-section {
  padding: 0 24px 32px;
  background-color: #f8f9fa;
}

.qr-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-top: -20px;
  position: relative;
  z-index: 2;
  text-align: center;
}

.qr-container {
  display: inline-block;
  margin-bottom: 20px;
  line-height: 0;
}

.qr-container canvas {
  display: block;
}

.athlete-info {
  background-color: #f3f4f6;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: left;
}

.athlete-name {
  font-weight: 600;
  color: #374151;
  font-size: 15px;
}

.athlete-email {
  color: #6b7280;
  font-size: 13px;
  margin-top: 2px;
}

.instructions-box {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 16px;
  text-align: left;
}

.instructions-title {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #166534;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.instructions-text {
  font-size: 13px;
  color: #15803d;
  line-height: 1.5;
}

/* ============================================
   Footer
   ============================================ */
.page-footer {
  text-align: center;
  padding: 16px;
  font-size: 11px;
  color: #9ca3af;
  background-color: #f8f9fa;
}
