/* === TripGeniusAI — Amber Theme === */
:root {
  --primary: #F59E0B;
  --primary-dark: #D97706;
  --primary-light: #FCD34D;
  --primary-glow: rgba(245, 158, 11, 0.15);
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-input: #334155;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --danger: #EF4444;
  --success: #10B981;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-light); }

/* === Nav === */
.navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.1);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand span { color: var(--text); }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* === Container === */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

/* === Hero === */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  background: radial-gradient(ellipse at top, rgba(245, 158, 11, 0.08), transparent 60%);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero h1 .highlight { color: var(--primary); }

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

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #000;
}
.btn-primary:hover { background: var(--primary-dark); color: #000; }

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

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* === Cards === */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(245, 158, 11, 0.06);
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(245, 158, 11, 0.2); transform: translateY(-2px); }

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.card p { color: var(--text-muted); font-size: 0.95rem; }

/* === Feature Grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

/* === Forms === */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control { min-height: 100px; resize: vertical; }

select.form-control { appearance: none; cursor: pointer; }

/* === Auth Forms === */
.auth-container {
  max-width: 440px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.auth-container .card { padding: 2.5rem; }
.auth-container h2 { text-align: center; margin-bottom: 1.5rem; }

/* === Tool Page === */
.tool-page { max-width: 800px; margin: 0 auto; padding: 2rem 1.5rem; }

.tool-page h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.tool-page .subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* === Result Box === */
.result-box {
  background: var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 0.95rem;
}

.result-box h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

/* === Dashboard === */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.dash-header h1 { font-size: 1.75rem; }

.stats-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  flex: 1;
  min-width: 180px;
  border: 1px solid rgba(245, 158, 11, 0.06);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.trips-list { display: flex; flex-direction: column; gap: 1rem; }

.trip-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.06);
  transition: border-color 0.2s;
}
.trip-item:hover { border-color: rgba(245, 158, 11, 0.2); }

.trip-item .trip-info h3 { font-size: 1rem; color: var(--text); margin-bottom: 0.25rem; }
.trip-item .trip-info p { color: var(--text-muted); font-size: 0.85rem; }

.trip-actions { display: flex; gap: 0.5rem; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--primary-glow);
  color: var(--primary);
}

/* === Pricing === */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.price-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid rgba(245, 158, 11, 0.06);
  position: relative;
}

.price-card.featured {
  border: 2px solid var(--primary);
  transform: scale(1.03);
}

.price-card .popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #000;
  padding: 0.25rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.price-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }

.price-amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
}

.price-amount span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }

.price-features {
  list-style: none;
  margin: 1.5rem 0;
  text-align: left;
}

.price-features li {
  padding: 0.5rem 0;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.95rem;
}

.price-features li::before {
  content: "\2713";
  color: var(--primary);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* === Flash Messages === */
.flash {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.flash-success { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.flash-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.flash-warning { background: rgba(245, 158, 11, 0.15); color: var(--primary); border: 1px solid rgba(245, 158, 11, 0.3); }

/* === Footer === */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  margin-top: 4rem;
}

/* === Loader === */
.loading {
  display: none;
  text-align: center;
  padding: 2rem;
  color: var(--primary);
}

.loading.active { display: block; }

.spinner {
  width: 40px; height: 40px;
  border: 4px solid rgba(245, 158, 11, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

/* === Quick Tools Grid (Dashboard) === */
.quick-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.quick-tool {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid rgba(245, 158, 11, 0.06);
  transition: all 0.2s;
  color: var(--text);
}
.quick-tool:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.quick-tool .tool-icon { font-size: 1.75rem; display: block; margin-bottom: 0.5rem; }
.quick-tool .tool-label { font-size: 0.85rem; font-weight: 600; }

/* === Responsive === */
@media (max-width: 768px) {
  .navbar { padding: 1rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); padding: 1rem; border-bottom: 1px solid rgba(245, 158, 11, 0.1); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .container { padding: 1.5rem 1rem; }
  .stats-row { flex-direction: column; }
  .trip-item { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .price-card.featured { transform: none; }
  .dash-header { flex-direction: column; align-items: flex-start; }
}
