:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --bg-color: #f3f4f6;
  --card-bg: rgba(255, 255, 255, 0.85);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --radius: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.4); }

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(-45deg, #a8edea, #fed6e3, #e0c3fc, #8ec5fc);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: var(--text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Glassmorphism utility */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
}

/* Header */
header {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Main Container */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* Landing Page Hero */
.hero {
  text-align: center;
  padding: 4rem 0;
  animation: fadeIn 1s ease-out;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: -webkit-linear-gradient(45deg, var(--primary-color), #ec4899, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

/* Search Form */
.search-form {
  display: flex;
  gap: 1rem;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.input-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.input-group input {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.8);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

.input-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

button {
  padding: 0.85rem 2.5rem;
  border: none;
  border-radius: 12px;
  background: var(--primary-color);
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  margin-top: 1.5rem; /* Align with inputs */
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* Dashboard Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-rows: auto auto;
  gap: 2rem;
  margin-top: 2rem;
}

.widget {
  padding: 1.5rem;
  animation: slideUp 0.6s ease-out backwards;
}

.widget h2 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Specific Widgets */
.weather-widget {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

.map-widget {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

#map {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 400px;
  border-radius: 8px;
  background: #eaeaea;
}

.flights-widget {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

.hotels-widget {
  grid-column: 1 / -1;
  grid-row: 3 / 4;
}

.places-widget {
  grid-column: 1 / -1;
}

/* Loading Spinner */
.loader-container {
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 2rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(79, 70, 229, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Cards (Flights/Hotels) */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.image-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  border-radius: 6px;
  margin-bottom: 0.8rem;
  scrollbar-width: none;
  gap: 5px;
}
.image-carousel::-webkit-scrollbar {
  height: 6px;
  display: block;
}
.image-carousel::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
}
.image-carousel::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 10px;
}
.image-carousel::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.8);
}
.image-carousel img {
  flex: 0 0 100%;
  width: 100%;
  height: 140px;
  object-fit: cover;
  scroll-snap-align: start;
  background: #eee;
  border-radius: 6px;
}

.info-card {
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}

.info-card:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.8);
}

.info-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.info-card p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.price {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .map-widget, .weather-widget, .flights-widget, .hotels-widget {
    grid-column: 1 / -1;
  }
  
  .search-form {
    flex-direction: column;
  }
  
  button {
    margin-top: 0;
    width: 100%;
  }
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.active {
  opacity: 1;
  pointer-events: all;
}
.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}
.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
}
.lightbox-btn:hover { background: rgba(255,255,255,0.4); }
.lightbox-prev { left: -70px; }
.lightbox-next { right: -70px; }
.lightbox-close {
  position: absolute;
  top: -40px;
  right: -40px;
  background: transparent;
  color: white;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}
.lightbox-counter {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1rem;
}

.carousel-container {
  position: relative;
}
.carousel-hint {
  position: absolute;
  bottom: 1.2rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  pointer-events: none;
}

@media (max-width: 768px) {
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close { right: 0; top: -40px; }
}
