* {
    box-sizing: border-box;
}

body {
    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f4f6f8;
    color: #1f2937;
}


header {
    background: #111827;
    color: white;

    padding: 28px 6%;
}


.header-content {
    max-width: 1100px;
    margin: auto;

    display: flex;
    justify-content: space-between;
    align-items: center;
}


header h1 {
    margin: 0 0 6px;

    font-size: 28px;
}


header p {
    margin: 0;

    color: #cbd5e1;
}


.last-update {
    font-size: 14px;
    color: #cbd5e1;
}


main {
    max-width: 1100px;

    margin: 40px auto;

    padding: 0 20px;
}


h2 {
    margin-bottom: 4px;
}


.subtitle {
    color: #6b7280;

    margin-top: 0;
    margin-bottom: 25px;
}


.route-card {
    background: white;

    border-radius: 14px;

    margin-bottom: 22px;

    padding: 24px;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.07);
}


.route-top {
    display: flex;

    justify-content: space-between;

    align-items: center;
}


.route-title {
    font-size: 25px;
    font-weight: 700;
}


.route-dates {
    margin-top: 7px;

    color: #6b7280;
}


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


.price-block span {
    display: block;

    color: #6b7280;

    font-size: 13px;
}


.price-block strong {
    font-size: 30px;
}


.tags {
    display: flex;

    gap: 8px;

    margin-top: 18px;
}


.tags span {
    background: #eef2ff;

    color: #374151;

    padding: 6px 10px;

    border-radius: 20px;

    font-size: 13px;
}


.best-option {
    display: grid;

    grid-template-columns:
        1.5fr 1fr 1fr;

    gap: 20px;

    background: #f8fafc;

    margin-top: 20px;

    padding: 16px;

    border-radius: 10px;
}


.best-option span,
.best-option strong {
    display: block;
}


.best-option span {
    color: #6b7280;

    font-size: 14px;

    margin-top: 3px;
}


.best-option .label {
    margin-bottom: 5px;
}


.details-button {
    width: 100%;

    margin-top: 18px;

    padding: 12px;

    border: 0;

    border-radius: 8px;

    background: #111827;

    color: white;

    cursor: pointer;

    font-size: 14px;
}


.details-button:hover {
    background: #374151;
}


.details {
    display: none;

    margin-top: 20px;

    border-top:
        1px solid #e5e7eb;

    padding-top: 20px;
}


.details.visible {
    display: block;
}


.details-section {
    margin-bottom: 28px;
}


.details-section h3 {
    margin-bottom: 14px;
}


.flight-row {
    display: grid;

    grid-template-columns:
        1fr 1fr auto;

    gap: 20px;

    padding: 15px 0;

    border-bottom:
        1px solid #e5e7eb;
}


.flight-info strong,
.flight-info span {
    display: block;
}


.flight-info span {
    color: #6b7280;

    margin-top: 5px;

    font-size: 14px;
}


.flight-price {
    font-weight: bold;

    font-size: 18px;
}


.history-summary {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

    margin-bottom: 15px;
}


.history-summary div {
    background: #f8fafc;

    padding: 14px;

    border-radius: 8px;
}


.history-summary span,
.history-summary strong {
    display: block;
}


.history-summary span {
    color: #6b7280;

    font-size: 13px;

    margin-bottom: 5px;
}


.history-row {
    display: flex;

    justify-content: space-between;

    padding: 10px 0;

    border-bottom:
        1px solid #f0f0f0;

    font-size: 14px;
}


.history-row span {
    color: #6b7280;
}


footer {
    text-align: center;

    color: #9ca3af;

    padding: 30px;

    font-size: 13px;
}


.loading,
.error,
.empty {
    background: white;

    padding: 30px;

    border-radius: 10px;

    text-align: center;
}


@media (max-width: 700px) {

    .header-content {
        display: block;
    }

    .last-update {
        margin-top: 15px;
    }

    .route-top {
        align-items: flex-start;
    }

    .route-title {
        font-size: 21px;
    }

    .price-block strong {
        font-size: 24px;
    }

    .best-option {
        grid-template-columns: 1fr;
    }

    .flight-row {
        grid-template-columns: 1fr;
    }

    .history-summary {
        grid-template-columns: 1fr;
    }
}