/* ===================================
   THALES AP FLIGHTS - FUTURISTIC DESIGN
   =================================== */

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

:root {
    /* Futuristic Color Palette */
    --primary-color: #00d4ff;
    --secondary-color: #7b2ff7;
    --accent-color: #ff0080;
    --dark-bg: #0a0e27;
    --darker-bg: #050816;
    --card-bg: rgba(15, 23, 42, 0.7);
    --card-border: rgba(0, 212, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --success: #00ff88;
    --warning: #ffd700;
    --error: #ff4444;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 100%);
    --gradient-accent: linear-gradient(135deg, #ff0080 0%, #ff8c00 100%);
    --gradient-card: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(10, 14, 39, 0.9) 100%);
    
    /* Shadows */
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 15px 50px rgba(0, 212, 255, 0.4);
    
    /* Fonts */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Orbitron', monospace;
}

body {
    font-family: var(--font-main);
    background: var(--darker-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================================
   BACKGROUND ANIMATION
   =================================== */

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(ellipse at top, rgba(123, 47, 247, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at bottom, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
                var(--darker-bg);
}

.plane-trail {
    position: absolute;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
    opacity: 0.3;
    animation: flyAcross 15s linear infinite;
}

.plane-1 {
    top: 20%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.plane-2 {
    top: 50%;
    animation-delay: 7s;
    animation-duration: 25s;
}

.plane-3 {
    top: 80%;
    animation-delay: 14s;
    animation-duration: 18s;
}

@keyframes flyAcross {
    0% {
        left: -200px;
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* ===================================
   HEADER
   =================================== */

.header {
    padding: 24px 0;
    backdrop-filter: blur(20px);
    background: rgba(10, 14, 39, 0.8);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
}

.logo i {
    font-size: 32px;
    color: var(--primary-color);
    animation: planeBounce 2s ease-in-out infinite;
}

@keyframes planeBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(-5deg);
    }
}

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

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(20deg);
    }
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ===================================
   SEARCH SECTION
   =================================== */

.search-section {
    padding: 40px 0 80px;
}

.search-card {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
}

.search-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.tab-btn {
    flex: 1;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-glow);
}

.search-form {
    position: relative;
    z-index: 1;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    align-items: end;
}

.form-row:has(.swap-btn) {
    grid-template-columns: 1fr auto 1fr;
}

.form-group {
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: var(--font-main);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

.swap-btn {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.swap-btn:hover {
    transform: rotate(180deg) scale(1.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--card-border);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
}

.search-btn {
    width: 100%;
    padding: 18px 32px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-top: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
}

.search-btn:active {
    transform: translateY(0);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: buttonGlow 3s infinite;
}

@keyframes buttonGlow {
    0%, 100% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
}

/* ===================================
   LOADING SECTION
   =================================== */

.loading-section {
    padding: 80px 0;
}

.loading-card {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.loading-spinner {
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: var(--shadow-glow);
}

.loading-spinner i {
    font-size: 48px;
    color: white;
    animation: fly 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes fly {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    50% {
        transform: translateX(10px) rotate(-10deg);
    }
}

.loading-card h3 {
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 16px;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 32px;
}

.progress-bar {
    width: 100%;
    max-width: 500px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    animation: progress 2s ease-in-out infinite;
    box-shadow: 0 0 20px var(--primary-color);
}

@keyframes progress {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

/* ===================================
   RESULTS SECTION
   =================================== */

.results-section {
    padding: 60px 0 100px;
}

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

.results-header h2 {
    font-family: var(--font-display);
    font-size: 36px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.results-meta {
    color: var(--text-secondary);
    font-size: 16px;
}

.results-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-glow);
}

.flights-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 60px;
}

.flight-card {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.flight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

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

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

.airline-logo {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--dark-bg);
}

.airline-name {
    font-size: 18px;
    font-weight: 600;
}

.airline-code {
    color: var(--text-secondary);
    font-size: 14px;
}

.payment-badges {
    display: flex;
    gap: 8px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-money {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-miles {
    background: rgba(255, 208, 0, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.flight-details {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
    margin-bottom: 20px;
}

.flight-point {
    text-align: center;
}

.time {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--primary-color);
}

.airport {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.flight-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.duration {
    font-size: 14px;
}

.path-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    position: relative;
}

.path-line::after {
    content: '✈';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: var(--primary-color);
}

.stops {
    font-size: 12px;
}

.flight-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
}

.price-info {
    display: flex;
    gap: 32px;
}

.price-option {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-display);
}

.price-money {
    color: var(--success);
}

.price-miles {
    color: var(--warning);
}

.select-btn {
    padding: 12px 32px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

/* ===================================
   TIMELINE SECTION
   =================================== */

.timeline-section {
    margin-top: 60px;
}

.timeline-header {
    text-align: center;
    margin-bottom: 48px;
}

.timeline-header h3 {
    font-family: var(--font-display);
    font-size: 32px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.timeline-header h3 i {
    color: var(--primary-color);
}

.timeline-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.timeline-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.timeline-card {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.timeline-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.timeline-card:hover::before {
    transform: scaleX(1);
}

.timeline-rank {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: var(--shadow-glow);
}

.timeline-date {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.timeline-month {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.timeline-price {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--success);
    margin-bottom: 12px;
}

.timeline-savings {
    font-size: 12px;
    color: var(--warning);
    background: rgba(255, 208, 0, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--card-border);
    padding: 60px 0 24px;
    margin-top: 100px;
}

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

.footer-section h4 {
    font-family: var(--font-display);
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .search-card {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-row:has(.swap-btn) {
        grid-template-columns: 1fr;
    }
    
    .swap-btn {
        transform: rotate(90deg);
        margin: 0 auto;
    }
    
    .nav {
        gap: 16px;
    }
    
    .nav-link {
        font-size: 14px;
    }
    
    .flight-details {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .flight-footer {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .timeline-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 18px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .search-tabs {
        flex-direction: column;
    }
    
    .price-info {
        flex-direction: column;
        gap: 16px;
    }
}
