:root {
  --bg: #0b1021;
  --surface: rgba(17, 25, 54, 0.45);
  --surface-soft: rgba(21, 31, 69, 0.6);
  --text: #eef2ff;
  --muted: #b5c0f5;
  --primary: #6d7cff;
  --primary-strong: #5162ff;
  --border: rgba(255, 255, 255, 0.1);
  --success-bg: rgba(17, 56, 37, 0.6);
  --success-text: #bff6cf;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at 15% 10%, #1d2a5e 0, transparent 40%),
              radial-gradient(circle at 85% 90%, #2a1a4a 0, transparent 40%), 
              var(--bg);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 16, 33, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.5rem;
  transition: color 0.3s ease;
}

.nav-user {
  color: var(--muted);
  margin-left: 1.5rem;
}

.nav-form {
  display: inline;
}

.nav-linklike {
  background: transparent;
  border: none;
  color: var(--muted);
  margin-left: 1.5rem;
  padding: 0;
  cursor: pointer;
  font: inherit;
  transition: color 0.3s ease;
}

.nav-linklike:hover, .nav-links a:hover {
  color: var(--text);
  text-shadow: 0 0 8px rgba(238, 242, 255, 0.5);
}

.page-body {
  padding: 3rem 0 4rem;
}

.hero {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 3rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(109, 124, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 1rem;
  font-weight: 800;
  background: linear-gradient(to right, #ffffff, #b5c0f5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--muted);
  max-width: 760px;
  margin: 0 auto 1.5rem auto;
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 1.8rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.card h2 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1rem;
}

.card p {
  margin-bottom: 0.5rem;
  color: var(--muted);
  line-height: 1.5;
}

.muted {
  color: var(--muted);
}

.booking-form {
  margin-top: 1rem;
}

.booking-form .btn-block {
  margin-top: 1.5rem;
  padding: 1rem;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 65vh;
}

.auth-card {
  width: min(460px, 100%);
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
}

.auth-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.auth-card p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin: 1rem 0 0.4rem;
  font-weight: 500;
  color: #eef2ff;
  font-size: 0.95rem;
  text-align: left;
}

.input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 124, 255, 0.25);
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23b5c0f5' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px 12px;
}
select.input option {
  background: #111936;
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0.85rem 1.5rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: 0 4px 15px rgba(109, 124, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(109, 124, 255, 0.5);
  background: linear-gradient(135deg, #7e8bff, #6272ff);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
  border: none !important;
}

.btn-success:hover {
  background: linear-gradient(135deg, #2fd154, #26e6ab);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
  transform: translateY(-2px);
  color: white;
}

.btn-block {
  width: 100%;
}

.validation {
  color: #ffacb0;
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
}

.auth-footnote {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  text-align: center;
}

.auth-footnote a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-footnote a:hover {
  text-decoration: underline;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgba(42, 157, 94, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--muted);
  text-align: center;
  background: rgba(11, 16, 33, 0.6);
  backdrop-filter: blur(12px);
}

@keyframes float {
  0% {
    transform: translateY(0px) scale(1.0);
  }
  50% {
    transform: translateY(-12px) scale(1.02);
  }
  100% {
    transform: translateY(0px) scale(1.0);
  }
}

.floating {
  animation: float 4s ease-in-out infinite;
  display: inline-block;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Base Layout Classes */
.main-layout {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile */
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 900px) {
  .main-layout {
    grid-template-columns: 60% calc(40% - 2rem);
    align-items: stretch;
  }
}

.layout-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#book-ride {
  min-height: 100%;
}

/* Form Layout Classes */
.form-row {
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

@media (min-width: 600px) {
  .form-row {
    flex-direction: row;
  }
  .form-row .form-group {
    flex: 1;
  }
}

.form-group {
  margin-bottom: 0.5rem;
  width: 100%;
}

.form-group label {
  margin-top: 0.8rem;
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 400;
  margin: 0 !important;
}

.radio-label input[type="radio"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
}

textarea.input {
  resize: vertical;
  min-height: 80px;
}

input[type="datetime-local"] {
  color-scheme: dark; /* forces native calendar to be dark mode suited */
}

/* Floating Action Button (FAB) */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
  transition: all 0.3s ease;
  z-index: 9999;
  animation: pulseFab 2s infinite;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
  color: white;
}

@keyframes pulseFab {
  0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.5); }
  70% { box-shadow: 0 0 0 15px rgba(40, 167, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Base Utilities */
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.text-center { text-align: center !important; }
.h-100 { height: 100% !important; }
.justify-content-between { justify-content: space-between !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

/* --- NEW COMPONENT REDESIGN - BOOTSTRAP STYLES --- */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  color: #fff;
  transition: transform 0.3s ease;
}

.glass-input {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.glass-input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

.glass-input:focus {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(147, 51, 234, 0.5) !important;
  box-shadow: 0 0 0 0.25rem rgba(147, 51, 234, 0.25) !important;
}

/* Purple Theme */
.btn-purple {
  background: linear-gradient(135deg, #8b5cf6, #5b21b6) !important;
  color: white !important;
  transition: all 0.3s ease;
}

.btn-purple:hover {
  background: linear-gradient(135deg, #7c3aed, #4c1d95) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(91, 33, 182, 0.4);
}

.bg-purple {
  background-color: #7c3aed !important;
  border-color: #7c3aed !important;
}

.custom-radio:checked {
  background-color: #7c3aed !important;
  border-color: #7c3aed !important;
}
