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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #94a3b8;
    margin-top: 0.5rem;
}

.search-form {
    background: #1e293b;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #334155;
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 120px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.4rem;
}

.form-group input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #475569;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 1rem;
    text-transform: uppercase;
}

.form-group input[type="date"] {
    text-transform: none;
}

.swap-btn {
    background: #334155;
    border: 1px solid #475569;
    color: #94a3b8;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.swap-btn:hover {
    background: #475569;
    color: #e2e8f0;
}

.options-row {
    margin-top: 1rem;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #818cf8;
}

.search-btn {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.search-btn:hover {
    opacity: 0.9;
}

.search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #334155;
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.hidden {
    display: none !important;
}

.error {
    background: #450a0a;
    border: 1px solid #7f1d1d;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    color: #fca5a5;
}

.results {
    margin-top: 2rem;
}

.summary {
    background: #1e293b;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    border: 1px solid #334155;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.summary-item {
    text-align: center;
}

.summary-item .label {
    font-size: 0.8rem;
    color: #94a3b8;
}

.summary-item .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #38bdf8;
}

.summary-item .value.winner {
    color: #4ade80;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

.platform-section h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #cbd5e1;
}

.cheapest {
    background: linear-gradient(135deg, #064e3b, #065f46);
    border: 1px solid #10b981;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.cheapest.empty {
    background: #1e293b;
    border-color: #475569;
}

.cheapest .tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #34d399;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.flight-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}

.flight-card:hover {
    border-color: #6366f1;
}

.flight-card .airline {
    font-weight: 600;
    color: #e2e8f0;
}

.flight-card .flight-num {
    font-size: 0.8rem;
    color: #64748b;
}

.flight-card .times {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.flight-card .time {
    font-size: 1.1rem;
    font-weight: 600;
}

.flight-card .duration-stops {
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

.flight-card .duration-stops .line {
    width: 80px;
    height: 1px;
    background: #475569;
    margin: 2px auto;
    position: relative;
}

.flight-card .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #38bdf8;
}

.flight-card .effective-price {
    font-size: 1rem;
    color: #4ade80;
    font-weight: 600;
}

.flight-card .discount-tag {
    font-size: 0.7rem;
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    padding: 1px 6px;
    border-radius: 4px;
    text-align: right;
    margin-top: 0.5rem;
}

.no-results {
    color: #64748b;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.offers-section {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.offers-section h2 {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.offers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.offers-table th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-bottom: 2px solid #475569;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.offers-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #334155;
    color: #e2e8f0;
}

.offers-table tr:hover td {
    background: rgba(99, 102, 241, 0.08);
}

.offers-table code {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}
