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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: 700;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* Search Box */
.search-box {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.form-row:last-child {
    margin-bottom: 12px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.swap-icon {
    font-size: 20px;
    color: #667eea;
    cursor: pointer;
    transition: transform 0.3s;
    margin-top: 16px;
}

.swap-icon:hover {
    transform: rotate(180deg);
}

/* Search Button */
.search-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

/* Loading */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Sort Options */
.sort-options {
    background: white;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sort-options label {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.sort-btn {
    padding: 6px 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 13px;
}

.sort-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.sort-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Flight List */
.flight-list {
    display: grid;
    gap: 16px;
}

/* Flight Card */
.flight-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 12px;
}

.flight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.flight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.expand-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.3s;
}

.expand-btn:hover {
    background: #e8e8e8;
    color: #667eea;
}

.expand-btn .arrow-icon {
    transition: transform 0.3s;
}

/* Cabins Container */
.cabins-container {
    margin-top: 12px;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.cabins-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cabin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    transition: all 0.3s;
    cursor: pointer;
}

.cabin-item:hover {
    background: #f0f0f0;
    transform: translateX(4px);
}

.cabin-main {
    flex: 1;
    min-width: 0;
}

.cabin-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cabin-seats {
    font-size: 11px;
    color: #667eea;
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.cabin-baggage {
    font-size: 11px;
    color: #999;
    line-height: 1.4;
}

.cabin-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 16px;
    flex-shrink: 0;
}

.cabin-discount {
    font-size: 12px;
    color: #667eea;
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 4px;
}

.cabin-price-value {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
}

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

.airline-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.airline-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.flight-number {
    color: #999;
    font-size: 12px;
}

.cabin-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.cabin-badge.Y {
    background: #e3f2fd;
    color: #1976d2;
}

.cabin-badge.F {
    background: #fff3e0;
    color: #e65100;
}

/* Flight Details */
.flight-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flight-route {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 30px;
}

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

.time {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.airport {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.route-arrow {
    font-size: 18px;
    color: #667eea;
    flex: 1;
    text-align: center;
}

.flight-info {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

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

.info-label {
    font-size: 10px;
    color: #999;
    margin-bottom: 3px;
}

.info-value {
    font-size: 12px;
    color: #333;
    font-weight: 600;
}

.flight-price {
    text-align: right;
}

.price-label {
    font-size: 10px;
    color: #999;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.price-value span {
    font-size: 16px;
}

/* No Results */
.no-results {
    background: white;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.no-results p {
    color: #666;
    margin: 8px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 24px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .swap-icon {
        transform: rotate(90deg);
        margin-top: 0;
    }

    .flight-details {
        flex-direction: column;
        gap: 15px;
    }

    .flight-route {
        width: 100%;
        gap: 10px;
    }

    .flight-info {
        width: 100%;
        gap: 15px;
    }

    .flight-price {
        width: 100%;
        text-align: left;
    }

    .sort-options {
        flex-wrap: wrap;
    }

    .cabin-item {
        padding: 10px;
    }

    .cabin-name {
        font-size: 13px;
    }

    .cabin-seats {
        font-size: 10px;
    }

    .cabin-baggage {
        font-size: 10px;
    }

    .cabin-price {
        margin-left: 8px;
    }

    .cabin-price-value {
        font-size: 15px;
    }
}