:root {
    --bg: #0a1020;
    --bg-soft: rgba(255,255,255,0.06);
    --card: rgba(8, 15, 35, 0.78);
    --stroke: rgba(255,255,255,0.1);
    --text: #edf2ff;
    --muted: #9fb2d9;
    --primary: #67e8f9;
    --primary-2: #7c3aed;
    --good: #34d399;
    --warn: #fbbf24;
    --danger: #f87171;
    --shadow: 0 20px 60px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 20%, rgba(124, 58, 237, 0.22), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(103, 232, 249, 0.18), transparent 22%),
        radial-gradient(circle at 70% 80%, rgba(16, 185, 129, 0.10), transparent 18%),
        linear-gradient(180deg, #07101f 0%, #0d1530 100%);
    min-height: 100vh;
}

.page-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 24px auto 56px;
}

.hero-card,
.panel,
.airline-card,
.promo-card,
.normal-card {
    backdrop-filter: blur(18px);
    background: var(--card);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    border-radius: 24px;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 20px;
    padding: 28px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: linear-gradient(120deg, rgba(124, 58, 237, 0.35), rgba(103, 232, 249, 0.18), rgba(52, 211, 153, 0.12));
    opacity: 0.45;
    z-index: 0;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
}

.hero-card > * { position: relative; z-index: 1; }
.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    color: var(--primary);
    margin-bottom: 8px;
}
.hero-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.03;
}
.hero-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
    max-width: 72ch;
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.hero-badges span,
.pill,
.badge,
.price-pill,
.source-link,
.tag {
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 8px 12px;
    font-size: 12px;
}
.hero-badges span { background: rgba(255,255,255,0.06); }
.hero-side {
    display: grid;
    gap: 12px;
}
.mini-stat {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}
.mini-stat strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}
.mini-stat span {
    display: block;
    color: var(--muted);
    line-height: 1.5;
}
.mini-stat.warning {
    background: rgba(248, 113, 113, 0.09);
    border-color: rgba(248, 113, 113, 0.18);
}

.panel {
    padding: 18px;
    margin-bottom: 16px;
}
.search-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    align-items: end;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.small { grid-column: span 1; }
.field:not(.small):not(.checkbox-wrap) { grid-column: span 2; }
.field label {
    font-size: 13px;
    color: #d9e7ff;
    font-weight: 600;
}
.field input,
.field select {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    padding: 0 14px;
    outline: none;
}
.field input::placeholder { color: #8da3ca; }
.checkbox-wrap {
    align-self: center;
    justify-self: start;
    margin-top: 26px;
}
.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #dce8ff;
}
.checkbox input { width: 18px; height: 18px; }
.actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}
button {
    cursor: pointer;
    border: 0;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 800;
    font-size: 14px;
    transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}
button:hover { transform: translateY(-1px); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
button.primary {
    background: linear-gradient(135deg, var(--primary), #60a5fa 55%, var(--primary-2));
    color: #061222;
    box-shadow: 0 18px 30px rgba(96, 165, 250, 0.25);
}
button.secondary {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.1);
}

.status-panel {
    display: flex;
    gap: 12px;
    align-items: center;
}
.status-panel p {
    margin: 4px 0 0;
    color: var(--muted);
}
.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 0 10px rgba(52, 211, 153, 0.10);
    flex: 0 0 auto;
}
.dot.loading { background: var(--warn); box-shadow: 0 0 0 10px rgba(251, 191, 36, 0.10); }
.dot.error { background: var(--danger); box-shadow: 0 0 0 10px rgba(248, 113, 113, 0.10); }

.results-shell {
    display: grid;
    gap: 16px;
}
.summary-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 16px;
}
.promo-card,
.normal-card,
.airline-card { padding: 18px; }
.section-title {
    margin: 0 0 12px;
    font-size: 1.06rem;
}
.promo-list, .airline-sections, .normal-groups { display: grid; gap: 12px; }
.result-item {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}
.result-top,
.item-meta,
.item-bottom,
.group-row,
.airline-head {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}
.result-top strong,
.airline-head h3 { font-size: 1rem; margin: 0; }
.item-meta { justify-content: flex-start; margin: 8px 0 10px; }
.price-pill {
    background: rgba(52, 211, 153, 0.12);
    color: #c3ffe7;
    border-color: rgba(52, 211, 153, 0.22);
    font-weight: 800;
}
.badge.promo {
    background: rgba(250, 204, 21, 0.12);
    color: #fde68a;
    border-color: rgba(250, 204, 21, 0.18);
}
.badge.high { background: rgba(248, 113, 113, 0.14); color: #fecaca; border-color: rgba(248, 113, 113, 0.18); }
.badge.normal { background: rgba(255,255,255,0.06); color: #dbeafe; }
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
}
.source-link {
    color: var(--text);
    text-decoration: none;
    background: rgba(124, 58, 237, 0.14);
    border-color: rgba(124, 58, 237, 0.22);
}
.source-link:hover { border-color: rgba(103,232,249,.45); }
.list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.muted { color: var(--muted); }
.airline-card.error-soft {
    border-color: rgba(248, 113, 113, 0.2);
}
.airline-head .mode {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.airline-note,
.error-note {
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.55;
}
.airline-note { background: rgba(255,255,255,0.05); color: var(--muted); }
.error-note { background: rgba(248, 113, 113, 0.10); color: #ffd5d5; }
.hidden { display: none; }
.empty-state {
    text-align: center;
    padding: 28px;
    color: var(--muted);
}

@media (max-width: 1024px) {
    .hero-card,
    .summary-grid,
    .search-grid { grid-template-columns: 1fr; }
    .field:not(.small):not(.checkbox-wrap),
    .field.small { grid-column: auto; }
    .checkbox-wrap { margin-top: 0; }
}

@media (max-width: 640px) {
    .page-shell { width: min(100% - 18px, 1280px); }
    .hero-card, .panel, .promo-card, .normal-card, .airline-card { border-radius: 20px; }
    .hero-copy h1 { font-size: 2rem; }
    .actions button { width: 100%; }
}
