/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-black: #05070c;
  --bg-deep-blue: #090e17;
  --accent-blue: #1e3a5f;
  --accent-glow: #2b568a;
  --accent-highlight: #3b82f6;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-color: rgba(59, 130, 246, 0.2);
  --border-focus: rgba(59, 130, 246, 0.6);
  --glass-bg: rgba(9, 14, 23, 0.72);
  --glass-border: rgba(255, 255, 255, 0.08);
  --error-color: #ef4444;
}

html, body {
  width: 100%;
  min-height: 100%;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-black);
  color: var(--text-main);
  overflow-x: hidden;
  overscroll-behavior-y: none;
  position: relative;
}

/* ==========================================================
   Constant Background (Never moves, fixed on all devices)
   ========================================================== */
.fixed-background {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0; /* Kept above body background so it is fully visible */
  overflow: hidden;
  pointer-events: none;
  background-color: var(--bg-black);
  background-image: url('assets/bg.png?v=3');
  background-position: center 25%;
  background-repeat: no-repeat;
  background-size: cover;
}

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  /* Classy cinematic gradient & radial vignette that blends smoothly into pure dark */
  background: radial-gradient(
    ellipse at 50% 32%,
    rgba(5, 7, 12, 0.05) 0%,
    rgba(5, 7, 12, 0.45) 55%,
    rgba(5, 7, 12, 0.92) 100%
  ),
  linear-gradient(
    to bottom,
    rgba(5, 7, 12, 0.75) 0%,
    transparent 14%,
    transparent 45%,
    rgba(5, 7, 12, 0.75) 70%,
    rgba(5, 7, 12, 0.98) 100%
  );
  pointer-events: none;
}

/* ==========================================================
   Mobile-Optimized Page Container
   ========================================================== */
.page-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 2; /* Cleanly above the fixed background */
}

/* Header */
.header {
  padding-top: 16px;
  text-align: center;
}

.brand-title {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 
    0 0 16px rgba(59, 130, 246, 0.45),
    0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Center Coming Soon Section */
.center-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 20px 0;
  text-align: center;
}

.coming-soon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.coming-soon-text {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.65rem, 6.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 
    0 0 24px rgba(59, 130, 246, 0.65),
    0 3px 12px rgba(0, 0, 0, 0.95);
  user-select: none;
}

/* Bottom Action & Payment Panel */
.bottom-action-panel {
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Form Groups */
.input-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.required-star {
  color: #38bdf8;
  margin-left: 2px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(3, 7, 18, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 12px;
  transition: all 0.25s ease;
}

.input-wrapper:focus-within {
  border-color: var(--accent-highlight);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(3, 7, 18, 0.9);
}

.input-prefix {
  padding-left: 14px;
  padding-right: 2px;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 1rem;
  user-select: none;
}

.input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  padding: 13px 14px 13px 4px;
}

.input-wrapper input::placeholder {
  color: rgba(148, 163, 184, 0.4);
}

.validation-message {
  font-size: 0.75rem;
  color: var(--error-color);
  min-height: 18px;
  margin-top: 4px;
  display: block;
}

/* Terms and Conditions Checkbox */
.terms-group {
  margin-bottom: 20px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-box {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 6px;
  background: rgba(3, 7, 18, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.3);
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.custom-checkbox input:checked ~ .checkbox-box {
  background: #2563eb;
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

.custom-checkbox input:checked ~ .checkbox-box::after {
  content: "";
  display: block;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.terms-link {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.terms-link:hover, .terms-link:focus {
  color: #93c5fd;
}

/* Pay Option / Button */
.pay-action-wrapper {
  width: 100%;
}

.pay-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  border-radius: 12px;
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Pay Disabled State */
.pay-btn:disabled {
  background: rgba(30, 41, 59, 0.6);
  color: rgba(148, 163, 184, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: not-allowed;
  box-shadow: none;
}

.pay-btn:disabled .pay-lock-icon {
  stroke: rgba(148, 163, 184, 0.4);
}

/* Pay Enabled State */
.pay-btn:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
  border: 1px solid rgba(147, 197, 253, 0.4);
  box-shadow: 
    0 4px 18px rgba(29, 78, 216, 0.45),
    0 0 10px rgba(59, 130, 246, 0.3);
}

.pay-btn:not(:disabled):hover,
.pay-btn:not(:disabled):focus {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 
    0 6px 22px rgba(37, 99, 235, 0.6),
    0 0 16px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.pay-btn:not(:disabled):active {
  transform: translateY(1px);
}

.pay-btn:not(:disabled) .pay-lock-icon {
  stroke: #ffffff;
}

.pay-lock-icon {
  width: 17px;
  height: 17px;
}

/* Success State for Button (Disabled after successful payment) */
.pay-btn-success,
.pay-btn:disabled.pay-btn-success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(52, 211, 153, 0.5) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35) !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

/* Success Banner */
.booking-success-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(6, 78, 59, 0.3);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  animation: fadeIn 0.35s ease;
}

.success-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  flex-shrink: 0;
}

.success-content {
  display: flex;
  flex-direction: column;
}

.success-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #6ee7b7;
}

.success-subtitle {
  font-size: 0.76rem;
  color: #a7f3d0;
  margin-top: 1px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   Modals
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 0;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  background: #090e17;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 20px 18px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  flex-shrink: 0;
}

.modal-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: #f8fafc;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #ffffff;
}

/* Terms & Conditions Document Scrollable Area */
.terms-scroll-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
}

.terms-scroll-content::-webkit-scrollbar {
  width: 5px;
}
.terms-scroll-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}
.terms-scroll-content::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 4px;
}

.terms-legal-document {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 16px;
}

.terms-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 16px;
}

.terms-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.terms-sec-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: #60a5fa;
  letter-spacing: 0.04em;
  line-height: 1.4;
  margin-bottom: 2px;
}

.terms-clause {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.terms-clause-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}

.terms-clause p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.terms-list {
  list-style: none;
  margin: 6px 0;
  padding-left: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.terms-list li {
  position: relative;
  padding-left: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.terms-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #3b82f6;
  font-size: 1rem;
  line-height: 1;
}

.terms-modal-footer {
  position: sticky;
  bottom: 0;
  background: #090e17;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.terms-agree-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  border: 1px solid rgba(147, 197, 253, 0.3);
  border-radius: 10px;
  color: #ffffff;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.terms-agree-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

/* Payment Confirmation Modal Styling */
.payment-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.payment-notice {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.user-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(3, 7, 18, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 12px 16px;
  border-radius: 10px;
}

.summary-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.summary-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #60a5fa;
}

.price-highlight {
  color: #38bdf8;
  font-size: 1.1rem;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.confirm-pay-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 8px;
}
