:root {
  --tennis-blue: #1e40af;
  --tennis-light-blue: #3b82f6;
  --tennis-accent: #06b6d4;
  --success-green: #059669;
  --error-red: #dc2626;
  --warning-orange: #ea580c;
  --bg-light: #f8fafc;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(135deg, var(--bg-light) 0%, #e2e8f0 100%);
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--tennis-blue), var(--tennis-light-blue));
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.logo-container {
  text-align: center;
  margin-bottom: 1rem;
}

.logo-container img {
  max-width: 200px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
  background: rgba(255, 255, 255, 0.7);
  padding: 15px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.header p {
  text-align: center;
  font-size: 1.1rem;
  margin: 0.5rem 0 0;
  opacity: 0.9;
}

/* Container */
.main-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem 8rem;
}

/* Progress Bar */
.progress-container {
  margin-bottom: 2rem;
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 60%;
  right: -40%;
  height: 2px;
  background: var(--border-light);
  z-index: 1;
}

.step.active:not(:last-child)::after {
  background: var(--tennis-blue);
}

.step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.step.active .step-icon {
  background: var(--tennis-blue);
  color: white;
}

.step.completed .step-icon {
  background: var(--success-green);
  color: white;
}

.step-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.step.active .step-label {
  color: var(--tennis-blue);
  font-weight: 600;
}

/* Form Card */
.form-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
  border: none;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--tennis-blue);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.required::after {
  content: '*';
  color: var(--error-red);
  margin-left: 0.25rem;
}

.form-control {
  border: 2px solid var(--border-light);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  width: 100%;
}

.form-control:focus {
  border-color: var(--tennis-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
  outline: none;
}

.form-control.is-valid {
  border-color: var(--success-green);
  background-image: none;
}

.form-control.is-invalid {
  border-color: var(--error-red);
  background-image: none;
}

/* Grid Layout */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Special Fields */
.membership-card {
  border: 2px solid var(--border-light);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.membership-card:hover {
  border-color: var(--tennis-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.membership-card.selected {
  border-color: var(--tennis-blue);
  background: rgba(30, 64, 175, 0.05);
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.membership-card.selected::after {
  content: '✓';
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--tennis-blue);
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
}

.membership-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tennis-blue);
}

/* Conditional Fields */
.conditional-field {
  background: var(--bg-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-top: 1rem;
  border-left: 4px solid var(--tennis-accent);
}

/* Checkbox */
.form-check {
  background: var(--bg-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--tennis-blue);
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
}

.form-check-label {
  font-size: 0.95rem;
  line-height: 1.6;
  cursor: pointer;
}

/* Action Buttons */
.actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 1.5rem;
  box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
  z-index: 1000;
}

.actions .container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-transform: none;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--tennis-blue), var(--tennis-light-blue));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-secondary {
  background: var(--border-light);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background: #cbd5e1;
  color: var(--text-dark);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Animations */
.shake {
  animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-pulse {
  animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0.1); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* Success Alert */
.success-container {
  text-align: center;
  padding: 3rem 2rem;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success-green);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  color: white;
  font-size: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 1.5rem 0;
  }

  .header h1 {
    font-size: 2rem;
  }

  .form-card {
    padding: 1.5rem;
    border-radius: 1rem;
  }

  .actions .container {
    flex-direction: column;
  }

  .progress-steps {
    flex-direction: column;
    gap: 1rem;
  }

  .step::after {
    display: none;
  }

  .main-container {
    padding-bottom: 12rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Loading State */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Utilities */
.hidden {
  display: none !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.d-flex {
  display: flex !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.align-items-center {
  align-items: center !important;
}

/* Bootstrap Override */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}