:root {
  --bg-dark: #090d16;
  --bg-card: rgba(21, 28, 44, 0.75);
  --border-light: rgba(255, 255, 255, 0.08);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Glow Elements */
.glow-bg {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}
.glow-purple {
  top: -100px;
  left: -100px;
  background: radial-gradient(circle, var(--accent-purple), transparent);
}
.glow-cyan {
  top: 200px;
  right: -100px;
  background: radial-gradient(circle, var(--accent-cyan), transparent);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  background: rgba(13, 18, 30, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}
.logo-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.badge-mcp {
  font-size: 11px;
  background: var(--accent-purple);
  color: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
}
.brand-tag {
  font-size: 12px;
  color: var(--text-muted);
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}
.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-tab:hover {
  color: var(--text-main);
}
.nav-tab.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}
.badge-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-glow);
  margin-bottom: 24px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.icon-blue { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.icon-green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.icon-purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.icon-orange { background: rgba(245, 158, 11, 0.15); color: var(--accent-orange); }

.stat-info { display: flex; flex-direction: column; }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-value { font-size: 22px; font-weight: 800; margin-top: 2px; }

/* Forms & Inputs */
.search-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.form-group input, .form-group select, .form-inline input {
  background: rgba(10, 15, 26, 0.8);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}
.form-hint { font-size: 11px; color: #64748b; }

.btn-group {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #fff;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
  color: #fff;
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4); }

.btn-sm { padding: 8px 14px; font-size: 13px; }

/* Flight Cards */
.flights-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}
.flight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all 0.25 ease;
}
.flight-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
}
.airline-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}
.airline-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 14px;
}
.flight-times {
  display: flex;
  align-items: center;
  gap: 24px;
}
.time-col { text-align: center; }
.time-big { font-size: 20px; font-weight: 800; }
.airport-code { font-size: 12px; color: var(--text-muted); }

.flight-route-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 140px;
}
.route-duration { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.line-visual {
  width: 100%;
  height: 2px;
  background: var(--border-light);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.line-visual i { color: var(--accent-cyan); font-size: 12px; }

.price-box {
  text-align: right;
}
.price-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-green);
}
.deal-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  display: inline-block;
  margin-top: 4px;
}
.tag-promo { background: rgba(16, 185, 129, 0.2); color: var(--accent-green); }
.tag-regular { background: rgba(245, 158, 11, 0.2); color: var(--accent-orange); }

/* Heatmap Calendar */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.calendar-day-card {
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}
.calendar-day-card:hover { transform: scale(1.05); }
.cal-weekday { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.cal-date { font-size: 16px; font-weight: 700; margin: 4px 0; }
.cal-price { font-size: 13px; font-weight: 800; }

.level-VERY_CHEAP { border-color: var(--accent-green); background: rgba(16, 185, 129, 0.15); }
.level-CHEAP { border-color: #34d399; background: rgba(52, 211, 153, 0.08); }
.level-HIGH { border-color: var(--accent-orange); background: rgba(245, 158, 11, 0.1); }
.level-PEAK { border-color: var(--accent-red); background: rgba(239, 68, 68, 0.15); }

.top-days-banner {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* Alertas Grid */
.alerts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.alert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 20px;
  position: relative;
}
.alert-card.triggered {
  border-color: var(--accent-green);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}
.alert-badge-status {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.status-active { background: rgba(6, 182, 212, 0.2); color: var(--accent-cyan); }
.status-triggered { background: rgba(16, 185, 129, 0.2); color: var(--accent-green); }

.alert-route { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.alert-price-comparison {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  font-size: 14px;
}

.alert-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin: 10px 0;
}
.alert-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
}

/* Recommendation Box */
.recommendation-box {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
}
.rec-icon {
  font-size: 28px;
  color: var(--accent-green);
}

/* MCP Playground */
.mcp-config-box {
  background: rgba(10, 15, 26, 0.9);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px;
  margin: 16px 0;
}
.mcp-playground-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
.code-editor, .code-output, .code-block {
  background: #060911;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px;
  width: 100%;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal-card { width: 90%; max-width: 480px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-close { background: transparent; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; }

.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.chart-wrapper { height: 350px; margin-top: 20px; }

/* Season Analyzer Styles */
.season-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.season-highlight-card {
  background: rgba(10, 15, 26, 0.8);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 18px;
}
.season-highlight-card h4 {
  font-size: 14px;
  color: var(--accent-cyan);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.season-highlight-card p {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
}

.season-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.season-month-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: all 0.2s ease;
}
.season-month-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.4);
}
.season-month-card.recommended {
  border-color: var(--accent-green);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}
.month-badge-score {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
}
.season-month-card.recommended .month-badge-score {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
}
.month-name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}
.month-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-green);
  margin-bottom: 8px;
}
.month-detail {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0;
}

.advice-list {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 12px;
  padding: 18px;
  margin-top: 24px;
}
.advice-list h4 { color: var(--accent-purple); margin-bottom: 10px; font-size: 15px; }
.advice-list ul { list-style: none; padding: 0; }
.advice-list li { font-size: 13px; margin: 8px 0; color: var(--text-main); }

/* Modal Large & Detailed Flight View */
.modal-card.modal-large {
  max-width: 720px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-body-content {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-route-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px 20px;
}

.modal-airline-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-airline-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.modal-airline-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-price-highlight {
  text-align: right;
}

.modal-price-number {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-green);
  line-height: 1;
}

.modal-price-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.itinerary-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px;
}

.itinerary-box h4 {
  font-size: 14px;
  color: var(--accent-cyan);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.itinerary-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-left: 20px;
  border-left: 2px dashed rgba(6, 182, 212, 0.4);
  margin-left: 8px;
}

.timeline-point {
  position: relative;
}

.timeline-point::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.timeline-point.end::before {
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.timeline-time {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.timeline-location {
  font-size: 13px;
  color: var(--text-muted);
}

.layover-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  margin: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.miles-comparison-card {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.buy-actions-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.btn-buy-now {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-buy-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);

}

.btn-buy-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-buy-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Rich Modal Extras */
.date-badge-formatted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  margin-top: 4px;
}

.baggage-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-main);
}

.feature-item i {
  color: var(--accent-cyan);
  font-size: 14px;
  width: 18px;
  text-align: center;
}

.price-breakdown-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
}

.price-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.price-breakdown-row:last-child {
  border-bottom: none;
  font-weight: 800;
  font-size: 15px;
  color: var(--accent-green);
  padding-top: 10px;
}

.copy-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #fff;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeInOut 2.5s ease forwards;
}

@media (max-width: 768px) {
  .header-container { flex-direction: column; gap: 14px; }
  .mcp-playground-grid { grid-template-columns: 1fr; }
  .flight-card { flex-direction: column; text-align: center; }
  .price-box { text-align: center; }
  .calendar-grid { grid-template-columns: repeat(4, 1fr); }
  .modal-route-header { flex-direction: column; text-align: center; gap: 12px; }
  .modal-price-highlight { text-align: center; }
  .miles-comparison-card { flex-direction: column; gap: 12px; text-align: center; }
  .baggage-features-grid { grid-template-columns: 1fr; }
}



