/* Base Styles */
:root {
  --primary-color: #ff6b81;
  --secondary-color: #5f27cd;
  --accent-color: #ff9ff3;
  --dark-color: #2f3542;
  --light-color: #f1f2f6;
  --success-color: #2ed573;
  --warning-color: #ffa502;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --primary-color-rgb: 255, 107, 129;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--dark-color);
  background-color: var(--light-color);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

button {
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  transition: var(--transition);
}

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

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section {
  padding: 60px 0;
  scroll-margin-top: 80px;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--box-shadow);
  position: fixed;
  width: 100%;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo i {
  color: var(--primary-color);
  font-size: 24px;
  margin-right: 10px;
}

.logo h2 {
  color: var(--secondary-color);
  font-size: 24px;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a {
  color: var(--dark-color);
  font-weight: 500;
}

nav ul li a:hover {
  color: var(--primary-color);
}

.auth-buttons {
  display: flex;
  gap: 15px;
}

.btn {
  padding: 10px 20px;
  border-radius: 30px;
  border: none;
  font-weight: 500;
  text-align: center;
  display: inline-block;
  transition: var(--transition);
}

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

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.menu-toggle {
  display: none;
  font-size: 24px;
  color: var(--dark-color);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url("https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80");
  background-size: cover;
  background-position: center;
  color: white;
  position: relative;
}

.hero-content {
  max-width: 600px;
  margin-left: 50px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  color: white;
  font-size: 30px;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-30px) translateX(-50%);
  }
  60% {
    transform: translateY(-15px) translateX(-50%);
  }
}

/* Planner Section */
#planner {
  padding-top: 90px; /* Increase top margin，Prevent title from being covered by navbar */
}

.planner {
  background-color: white;
  border-radius: 15px;
  box-shadow: var(--box-shadow);
  padding: 40px;
  margin-top: -60px; /* Adjust to smaller negative margin，Avoid conflict with increased top margin */
  position: relative;
  z-index: 10;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.section-title p {
  color: var(--dark-color);
  max-width: 700px;
  margin: 0 auto;
}

.planner-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.1);
}

.form-buttons {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.btn-lg {
  padding: 12px 30px;
  font-size: 1.1rem;
}

/* Results Section */
.results {
  display: none;
  margin-top: 40px;
}

.results.active {
  display: block;
}

.plan-card {
  background-color: white;
  border-radius: 15px;
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 30px;
}

.plan-header {
  background-color: var(--secondary-color);
  color: white;
  padding: 20px;
  text-align: center;
}

.plan-body {
  padding: 30px;
}

.plan-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.meta-item {
  display: flex;
  align-items: center;
}

.meta-item i {
  color: var(--primary-color);
  margin-right: 10px;
  font-size: 20px;
}

.timeline {
  position: relative;
  padding-left: 50px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--accent-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 30px;
}

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

.timeline-item::before {
  content: "";
  position: absolute;
  left: -50px;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 4px solid white;
  box-shadow: var(--box-shadow);
}

.timeline-time {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 5px;
}

.timeline-title {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.timeline-desc {
  color: #666;
}

.plan-actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 10px;
}

/* Pricing Section */
.pricing {
  background-color: var(--light-color);
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
  align-items: stretch;
}

.pricing-card {
  background-color: white;
  border-radius: 15px;
  box-shadow: var(--box-shadow);
  overflow: hidden;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.pricing-card.fade-in-card {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation for multiple cards */
.pricing-card:nth-child(1) {
  transition-delay: 0.1s;
}

.pricing-card:nth-child(2) {
  transition-delay: 0.2s;
}

.pricing-card:nth-child(3) {
  transition-delay: 0.3s;
}

.pricing-card:nth-child(4) {
  transition-delay: 0.4s;
}

.pricing-card:hover {
  transform: translateY(-10px);
}

.pricing-header {
  background-color: var(--secondary-color);
  color: white;
  padding: 30px 20px;
}

.pricing-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 700;
}

.pricing-period {
  font-size: 0.9rem;
  opacity: 0.8;
}

.pricing-body {
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.pricing-features {
  list-style: none;
  margin-bottom: 30px;
  flex-grow: 1;
}

.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.best-value {
  position: relative;
}

.best-value::after {
  content: "Best Value";
  position: absolute;
  top: 20px;
  right: -30px;
  background-color: var(--success-color);
  color: white;
  padding: 5px 30px;
  transform: rotate(45deg);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: white;
  border-radius: 15px;
  width: 100%;
  max-width: 500px;
  padding: 30px;
  box-shadow: var(--box-shadow);
  transform: translateY(-50px);
  transition: all 0.3s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.5rem;
  color: var(--secondary-color);
}

.modal-close {
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--primary-color);
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.login-form,
.signup-form {
  display: none;
}

.login-form.active,
.signup-form.active {
  display: block;
}

.form-switch {
  text-align: center;
  margin-top: 20px;
}

/* History Section */
.history {
  padding-top: 40px;
  display: none;
}

.history.active {
  display: block;
}

.history .section-title {
  margin-bottom: 30px;
}

.history-info {
  text-align: center;
  margin-bottom: 20px;
  color: #666;
  font-size: 0.9rem;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  padding: 10px 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Empty history state styles */
.empty-history {
  text-align: center;
  padding: 40px 20px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  color: #666;
  max-width: 600px;
  margin: 30px auto;
}

.history-list {
  min-height: 120px;
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 8px rgba(79, 140, 255, 0.04);
  padding: 24px 18px;
}

.history-list[style*="display: none"] {
  display: none !important;
}

.purchase-list[style*="display: none"] {
  display: none !important;
}

.history-card-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.history-card {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: row;
  width: 100%;
  margin: 0;
  cursor: pointer;
  position: relative;
}

.history-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.history-card:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(var(--primary-color-rgb), 0.05);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.history-card:hover:after {
  opacity: 1;
}

.history-header {
  background-color: var(--primary-color);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  width: 180px;
  min-width: 180px;
  position: relative;
  overflow: hidden;
}

.history-header:after {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  background-color: white;
  opacity: 0.1;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.history-card:hover .history-header:after {
  transform: scale(8);
}

.history-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-body {
  padding: 15px 20px;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
}

.history-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.history-meta span {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #666;
}

.history-meta i {
  color: var(--primary-color);
  margin-right: 8px;
  font-size: 14px;
}

.history-actions {
  display: flex;
  gap: 10px;
  margin-left: 15px;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
  border: none;
}

.btn-danger:hover {
  background-color: #bd2130;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  min-width: 80px;
}

/* Pagination controls - Optimize positioning */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  gap: 15px;
  background-color: white;
  padding: 10px 15px;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.page-indicator {
  font-size: 0.9rem;
  color: #666;
  padding: 0 10px;
}

.pagination-btn {
  min-width: 100px;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-column h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--accent-color);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #ddd;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #aaa;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .hero h1 {
    font-size: 2.8rem;
  }

  .section {
    padding: 50px 0;
  }

  .planner {
    margin-top: -60px;
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 80%;
    height: calc(100vh - 80px);
    background-color: white;
    flex-direction: column;
    padding: 20px;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
  }

  nav ul.active {
    left: 0;
  }

  nav ul li {
    margin: 15px 0;
  }

  .hero-content {
    margin-left: 0;
    text-align: center;
    padding: 0 20px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .planner {
    margin-top: -40px;
    padding: 20px;
  }

  .plan-meta {
    flex-direction: column;
    gap: 10px;
  }

  .timeline {
    padding-left: 30px;
  }

  .timeline::before {
    left: 10px;
  }

  .timeline-item::before {
    left: -30px;
    width: 15px;
    height: 15px;
  }

  .history-card {
    flex-direction: column;
  }

  .history-header {
    width: 100%;
    min-width: 100%;
    text-align: center;
  }

  .history-body {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .history-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .history-actions {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px;
  }

  .pagination-btn {
    min-width: 80px;
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-title h2 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .btn-lg {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .pricing-price {
    font-size: 2rem;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* User States */
.logged-out .logged-in-content {
  display: none;
}

.logged-in .logged-out-content {
  display: none;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #4caf50;
  color: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  max-width: 350px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.toast.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast i {
  margin-right: 12px;
  font-size: 20px;
}

.toast.success {
  background-color: #4caf50;
}

.toast.error {
  background-color: #f44336;
}

.toast.warning {
  background-color: #ff9800;
}

.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #4caf50;
  color: white;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  max-width: 350px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification i {
  margin-right: 12px;
  font-size: 20px;
}

.notification.success {
  background-color: #4caf50;
}

.notification.error {
  background-color: #f44336;
}

.notification.warning {
  background-color: #ff9800;
}

.notification-close {
  margin-left: 12px;
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.8;
}

.notification-close:hover {
  opacity: 1;
}

/* Loading Animation */
.loader {
  display: none;
  justify-content: center;
  align-items: center;
  height: 100px;
}

.loader.active {
  display: flex;
}

.loader-circle {
  width: 15px;
  height: 15px;
  background-color: var(--primary-color);
  border-radius: 50%;
  margin: 0 5px;
  animation: bounce 0.5s ease-in-out infinite alternate;
}

.loader-circle:nth-child(2) {
  animation-delay: 0.15s;
  background-color: var(--secondary-color);
}

.loader-circle:nth-child(3) {
  animation-delay: 0.3s;
  background-color: var(--accent-color);
}

/* Form Check Styles */
.form-check {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.form-check-input {
  margin-top: 6px;
  margin-right: 10px;
}

.form-check-label {
  font-size: 0.9rem;
}

.forgot-password-form {
  display: none;
}

.forgot-password-form.active {
  display: block;
}

/* Styles for input and button on same line */
.input-action-group {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-bottom: 5px;
}

.input-action-group .form-control {
  flex: 1;
}

.input-action-group .btn {
  white-space: nowrap;
  padding: 8px 16px;
  align-self: flex-start;
  height: 43px; /* Keep consistent with input height */
}

/* Forgot password form styling enhancement */
.forgot-password-form .form-group {
  margin-bottom: 20px;
}

.forgot-password-form .form-control {
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.forgot-password-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.forgot-password-form .form-buttons {
  margin-top: 25px;
}

.forgot-password-form .form-buttons .btn {
  width: 100%;
  padding: 12px;
}

.forgot-password-form .form-switch {
  text-align: center;
  margin-top: 15px;
}

/* Form validation styles */
.form-control:invalid {
  border-color: var(--primary-color);
}

.error-message {
  color: var(--primary-color);
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
}

.error-message.active {
  display: block;
}

/* User Info */
.user-info {
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-weight: bold;
}

.user-details {
  margin-right: 15px;
}

.credits-tag {
  background-color: var(--secondary-color);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

.credits-tag i {
  color: #ffd700;
  margin-right: 5px;
}

@media (max-width: 768px) {
  .user-details {
    display: none;
  }

  .credits-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
  }
}

/* Time input styles */
.time-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.time-icon {
  position: absolute;
  right: 15px;
  color: var(--primary-color);
  pointer-events: none;
}

/* Time picker styles - English UI and 24-hour format */
input[type="time"] {
  font-family: "Poppins", sans-serif;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
  width: 100%;
  padding-right: 40px; /* Space for icon */
  cursor: pointer;
}

/* Make the native time picker clickable but invisible */
input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  cursor: pointer;
}

/* Force 24-hour format */
input[type="time"]::-webkit-datetime-edit-ampm-field {
  display: none !important;
}

input[type="time"]::-moz-datetime-edit-ampm-field {
  display: none !important;
}

/* Ensure English UI */
input[lang="en"] {
  font-family: "Poppins", sans-serif !important;
}

/* Firefox-specific styles */
@-moz-document url-prefix() {
  input[type="time"] {
    text-align: right;
    padding-right: 40px;
  }
}

/* Custom time input styling */
.custom-time-input {
  position: relative;
  display: flex;
  align-items: center;
}

.custom-time-input .form-control {
  width: 100%;
  padding-right: 40px; /* Space for icon */
}

.custom-time-input .time-icon {
  position: absolute;
  right: 15px;
  color: var(--primary-color);
  pointer-events: none;
}

/* Custom destination input styling */
.custom-destination-input {
  position: relative;
  display: flex;
  align-items: center;
}

.custom-destination-input .form-control {
  width: 100%;
  padding-right: 40px; /* Space for icon */
}

.custom-destination-input .destination-icon {
  position: absolute;
  right: 15px;
  color: var(--primary-color);
  cursor: pointer;
}

/* Loading indicator styles */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 500;
  position: relative;
}

.loading-indicator::before {
  content: "";
  display: block;
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
  border: 5px solid rgba(var(--primary-color-rgb), 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Trip detail modal styles */
.detail-modal {
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
}

.trip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.trip-meta .meta-item {
  display: flex;
  align-items: center;
}

.trip-meta .meta-item i {
  color: var(--primary-color);
  margin-right: 10px;
  font-size: 18px;
}

.trip-timeline {
  position: relative;
  padding-left: 30px;
  margin-top: 30px;
}

.trip-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--primary-color);
  opacity: 0.6;
}

.timeline-entry {
  position: relative;
  margin-bottom: 25px;
  padding-bottom: 5px;
}

.timeline-entry:last-child {
  margin-bottom: 0;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 3px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.timeline-entry-time {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.timeline-entry-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--secondary-color);
}

.timeline-entry-info {
  color: #666;
  line-height: 1.5;
}

/* Ensure buy buttons stay at same level at card bottom */
.pricing-card .form-buttons {
  margin-top: auto;
}

/* Custom Time Select Styles */
.custom-time-select {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 12px 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.custom-time-select:hover {
  border-color: var(--primary-color-light);
}

.time-display {
  flex: 1;
  font-size: 1.1rem;
  color: #333;
}

.time-icon {
  position: absolute;
  right: 15px;
  font-size: 1.2rem;
  color: #777;
  pointer-events: none;
}

/* Time Picker Popup Styles */
.time-picker-popup {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  width: 240px;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.time-picker-popup.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.time-picker-columns {
  display: flex;
  height: 200px;
  border-bottom: 1px solid #eee;
}

.time-picker-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.time-picker-column:first-child {
  border-right: 1px solid #eee;
}

.time-picker-column-header {
  text-align: center;
  padding: 8px 0;
  font-weight: 500;
  color: var(--primary-color);
  background-color: #f9f9f9;
  border-bottom: 1px solid #eee;
}

.time-picker-column-options {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
  -webkit-overflow-scrolling: touch;
}

.time-picker-column-options::-webkit-scrollbar {
  width: 4px;
}

.time-picker-column-options::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
}

.time-option {
  padding: 10px 0;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.time-option:hover {
  background-color: #f0f0f0;
}

.time-option.selected {
  background-color: rgba(var(--primary-color-rgb), 0.1);
  color: var(--primary-color);
  font-weight: 500;
}

.time-picker-footer {
  padding: 10px;
  text-align: right;
  background-color: #f9f9f9;
  border-top: 1px solid #eee;
}

.time-picker-done {
  min-width: 80px;
  font-weight: 500;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Remove old unused styles */
.time-separator,
.period-select {
  display: none;
}

/* Custom date picker styles */
.custom-date-input {
  position: relative;
  width: 100%;
}

.custom-date-input .form-control {
  padding-right: 40px;
  cursor: pointer;
}

.custom-date-input .date-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 18px;
  cursor: pointer;
}

/* Flatpickr Style overrides */
.flatpickr-calendar {
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: none;
  background: #fff;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n + 1)),
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n + 1)),
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n + 1)) {
  box-shadow: -10px 0 0 var(--primary-color);
}

.flatpickr-day.week.selected {
  box-shadow: -5px 0 0 var(--primary-color), 5px 0 0 var(--primary-color);
}

.flatpickr-months .flatpickr-month {
  background: var(--primary-color);
  color: white;
  fill: white;
  height: 40px;
}

.flatpickr-weekdays {
  background: var(--primary-color);
}

span.flatpickr-weekday {
  background: var(--primary-color);
  color: white;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: var(--primary-color);
  color: white;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
  background: var(--primary-color);
}

.flatpickr-current-month
  .flatpickr-monthDropdown-months
  .flatpickr-monthDropdown-month {
  background-color: white;
  color: var(--dark-color);
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: white;
  fill: white;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  color: var(--light-color);
  fill: var(--light-color);
}

.history-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  background: #fff;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 8px rgba(79, 140, 255, 0.04);
  overflow: hidden;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.history-tab {
  border: none;
  background: none;
  color: var(--secondary-color, #5f27cd);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 12px 36px;
  border-radius: 12px 12px 0 0;
  transition: background 0.2s, color 0.2s;
  outline: none;
  box-shadow: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.history-tab.active {
  background: var(--primary-color, #ff6b81);
  color: #fff;
  z-index: 2;
}
.history-tab:not(.active):hover {
  background: #f8f8f8;
  color: var(--primary-color, #ff6b81);
}

/* Pricing cards loading state styles */
.pricing-cards .loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  width: 100%;
  text-align: center;
  color: var(--secondary-color);
  font-size: 18px;
  position: relative;
}

.pricing-cards .loading-indicator:before {
  content: "";
  display: block;
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
  border: 5px solid rgba(var(--primary-color-rgb), 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.pricing-cards .error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  width: 100%;
  text-align: center;
  color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.1);
  border-radius: 10px;
  margin: 20px 0;
}

.pricing-cards .error-message p {
  margin-bottom: 15px;
  font-size: 16px;
}
