:root {
    /* Trustworthy "Millions of Users" Color Palette (Booking/Google Flights inspired) */
    --bg-main: #f8f9fa;
    --bg-surface: #ffffff;
    --bg-hover: #f1f3f4;
    --border-color: #dadce0;
    --text-main: #202124;
    --text-muted: #5f6368;
    --primary: #1a73e8; /* Trust Blue */
    --primary-hover: #174ea6;
    --secondary: #1e3a8a; /* Deep Navy */
    --accent: #e8f0fe; /* Light Blue background for active states */
    --success: #1e8e3e;
    
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    
    --transition: 0.2s ease-in-out;
    --border-radius-lg: 16px;
    --border-radius-md: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.text-gradient {
    color: var(--primary);
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border-radius: var(--border-radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
}
.btn-block { width: 100%; }
.btn-sm { padding: 6px 16px; font-size: 0.875rem; }

/* Navbar */
.navbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    font-size: 1.5rem;
    color: var(--secondary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 800;
}
.nav-links {
    display: flex;
    gap: 24px;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* Hero */
.hero-section {
    padding: 60px 0 40px;
    text-align: center;
}
.hero-title {
    font-size: 3rem;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* Search Widget (Similar to Google Flights / Expedia) */
.search-widget {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}
.search-tabs {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    transition: var(--transition);
}
.tab-btn:hover {
    background: var(--bg-hover);
}
.tab-btn.active {
    color: var(--primary);
    background: var(--accent);
}

.pax-selector {
    margin-left: auto;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.pax-selector:hover {
    background: var(--bg-hover);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}

.form-group {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 8px 16px;
    position: relative;
    transition: var(--transition);
}
.form-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}
.form-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.form-group input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
}
.swap-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    margin: 0 -18px;
}
.swap-btn:hover { background: var(--bg-hover); }

.search-btn {
    height: 100%;
    padding: 0 32px;
}

/* Route Chips / Suggested */
.route-suggestions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.fchip {
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    cursor: pointer;
}
.fchip:hover {
    background: var(--bg-hover);
}

/* Autocomplete List */
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    z-index: 200;
    list-style: none;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
}
.autocomplete-list.hidden { display: none; }
.autocomplete-list li {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}
.autocomplete-list li:last-child { border-bottom: none; }
.autocomplete-list li:hover { background: var(--bg-hover); }

/* Hot Deals */
.hot-deals {
    margin-top: 60px;
    margin-bottom: 60px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.sort-options {
    display: flex;
    gap: 8px;
}
.deals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.deal-card {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}
.deal-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.deal-image {
    height: 200px;
    background-color: var(--border-color);
    background-size: cover;
    background-position: center;
    position: relative;
}
.deal-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.9);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.deal-content { padding: 20px; }
.deal-route {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.deal-airline {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 16px;
}
.deal-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}
.deal-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Plane Overlay */
.flying-plane-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.95);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: 0.3s;
}
.flying-plane-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.plane-animation-container {
    position: relative;
    width: 200px; height: 50px; margin-bottom: 16px;
}
.flying-plane {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    animation: planeFly 2s infinite ease-in-out;
}
.loading-text { font-family: var(--font-heading); font-size: 1.25rem; color: var(--primary); }

@keyframes planeFly {
    0% { left: 0; opacity: 0; }
    20% { opacity: 1; }
    50% { transform: translateY(-70%) rotate(-10deg); }
    80% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* Flight Results Styling */
.results-section {
    animation: fadeIn 0.5s ease-out forwards;
}
.fchip {
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.fchip:hover {
    background: #f8f9fa;
    border-color: #dadce0;
}
.fchip.active {
    background: #e8f0fe;
    color: var(--primary);
    border-color: var(--primary);
}
.fchip span {
    margin-left: 4px;
    background: #e0e0e0;
    color: #333;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}
.fchip.active span {
    background: var(--primary);
    color: white;
}
.flight-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.flight-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #bdc1c6;
}
.fc-left {
    display: flex;
    align-items: center;
    gap: 32px;
}
.fc-airline-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    flex-shrink: 0;
}
.fc-airline-info {
    width: 140px;
}
.fc-aname {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
}
.fc-anum {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.fc-route {
    display: flex;
    align-items: center;
    gap: 24px;
}
.fc-time {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}
.fc-code {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}
.fc-journey {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 120px;
}
.fc-dur {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.fc-line {
    width: 100%;
    height: 1px;
    background: var(--border-color);
    position: relative;
}
.fc-line::after {
    content: "✈";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-surface);
    padding: 0 4px;
    font-size: 14px;
    color: var(--border-color);
}
.fc-stops {
    font-size: 0.75rem;
    font-weight: 500;
}
.fc-stops.nonstop {
    color: #0d652d;
}
.fc-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    width: 160px;
}
.dtag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}
.dtag-cheap { background: #e6f4ea; color: #137333; }
.dtag-fast { background: #fef7e0; color: #b06000; }
.dtag-bags { background: #f1f3f4; color: #5f6368; }
.dtag-best { background: #e8f0fe; color: #1967d2; }

.fc-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
.fc-price-val {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
}
.fc-price-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.trust-badge svg {
    color: #34a853;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .search-form { grid-template-columns: 1fr 1fr; }
    .swap-btn { display: none; }
    .search-btn { grid-column: span 2; }
    .fc-left { gap: 16px; flex-wrap: wrap; }
    .fc-tags { width: 100%; margin-top: 12px; }
}
@media (max-width: 768px) {
    .deals-grid { grid-template-columns: 1fr; }
    .search-form { grid-template-columns: 1fr; gap: 8px; }
    .search-btn { grid-column: 1; }
    .hero-title { font-size: 2.25rem; }
    .flight-card { flex-direction: column; align-items: stretch; gap: 16px; }
    .fc-right { align-items: stretch; }
    .fc-route { justify-content: space-between; }
    .trust-badges { gap: 16px; justify-content: flex-start; }
}

#planeOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Semi-transparent backdrop */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px); /* Optional: slight blur for focus */
}

/* The actual modal box */
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 320px;
    width: 90%;
}

.hidden {
    display: none !important;
}