:root {
    --primary: #58a6ff;
    --background: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.7);
    --border-color: rgba(48, 54, 61, 0.8);
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    --success: #2ea44f;
    --error: #f85149;
    --font-header: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --glass-blur: 16px;
}

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

body {
    background-color: var(--background);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Glassmorphism Backgrounds */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(20, 24, 33, 0.95) 0%, rgba(13, 17, 23, 0.98) 100%);
    z-index: -2;
}

.circle {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: -1;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: #003da5;
    top: -100px;
    left: -100px;
}

.circle-2 {
    width: 500px;
    height: 500px;
    background: #ff6600;
    bottom: -150px;
    right: -150px;
}

/* Container */
.container {
    width: 100%;
    max-width: 1100px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2.2rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.logo-text {
    font-family: var(--font-header);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    margin-top: 0.5rem;
}

/* Main Layout Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr;
    gap: 1.5rem;
}

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

/* Base Card Style */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(88, 166, 255, 0.4);
}

.card h2 {
    font-family: var(--font-header);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Form Styles */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label, .input-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Airline buttons */
.airline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.airline-btn {
    border: 1px solid var(--border-color);
    background: rgba(33, 38, 45, 0.5);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.airline-btn input {
    display: none;
}

.airline-btn:hover {
    background: rgba(56, 139, 253, 0.1);
    border-color: rgba(88, 166, 255, 0.3);
    color: #ffffff;
}

.airline-btn.active {
    border-color: var(--brand-color, var(--primary));
    background: rgba(from var(--brand-color) r g b / 0.15);
    color: #ffffff;
    box-shadow: 0 0 12px 0 rgba(from var(--brand-color) r g b / 0.2);
}

/* Inputs grid */
.inputs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-field input {
    background: rgba(13, 17, 23, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.input-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.hidden {
    display: none !important;
}

/* Button */
.submit-btn {
    background: linear-gradient(135deg, #58a6ff 0%, #2f81f7 100%);
    border: none;
    border-radius: 8px;
    padding: 0.9rem;
    color: #ffffff;
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(47, 129, 247, 0.3);
    transition: all 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 129, 247, 0.4);
}

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

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

/* Results panel container styles */
.results-card {
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

/* States */
.empty-state, .loading-state, .error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-align: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3, .loading-state h3, .error-state h3 {
    font-family: var(--font-header);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.empty-state p, .loading-state p, .error-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.4;
}

/* Loading animations */
.plane-animation {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: movePlane 2s ease-in-out infinite;
}

.loading-progress-bar {
    width: 240px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 1.5rem;
    overflow: hidden;
}

.progress-fill {
    width: 40%;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    animation: progressLoad 1.5s ease-in-out infinite;
}

/* Error state styles */
.error-icon {
    font-size: 3rem;
    color: var(--error);
    margin-bottom: 1rem;
}

.error-details {
    margin-top: 1.5rem;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.2);
    border-radius: 8px;
    padding: 1rem;
    width: 100%;
    text-align: left;
    font-size: 0.8rem;
}

.error-details strong {
    color: #ff7b72;
    display: block;
    margin-bottom: 0.5rem;
}

.error-details pre {
    white-space: pre-wrap;
    word-break: break-all;
    font-family: monospace;
    color: var(--text-main);
    max-height: 120px;
    overflow-y: auto;
}

/* Content State */
.content-state {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.4s ease;
}

.ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
}

.ticket-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.airline-badge {
    background: rgba(88, 166, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.85rem;
}

.pnr-badge {
    font-family: var(--font-header);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #ffffff;
}

.status-badge {
    background: rgba(46, 164, 79, 0.15);
    color: #56d364;
    border: 1px solid rgba(46, 164, 79, 0.3);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Result Section */
.result-section h4 {
    font-family: var(--font-header);
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.section-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Passenger List */
.passengers-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.passenger-row {
    background: rgba(33, 38, 45, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pax-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
}

.pax-doc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Flight timeline */
.flights-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.flight-segment {
    background: rgba(33, 38, 45, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.segment-header {
    background: rgba(33, 38, 45, 0.8);
    padding: 0.6rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.segment-header span {
    color: var(--primary);
}

.segment-body {
    padding: 1.25rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}

.airport-info {
    display: flex;
    flex-direction: column;
}

.time {
    font-size: 1.4rem;
    font-family: var(--font-header);
    font-weight: 700;
    color: #ffffff;
}

.iata {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.1rem;
}

.city {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.airport-info.right {
    text-align: right;
}

.trip-duration {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100px;
}

.duration-line {
    width: 100%;
    height: 2px;
    background: var(--border-color);
    position: relative;
    margin: 0.5rem 0;
}

.duration-line::before, .duration-line::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    top: -2px;
}

.duration-line::before { left: 0; }
.duration-line::after { right: 0; }

.duration-plane {
    position: absolute;
    top: -7px;
    left: calc(50% - 7px);
    font-size: 0.8rem;
}

.duration-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Connection banner */
.connection-banner {
    background: rgba(88, 166, 255, 0.08);
    border: 1px dashed rgba(88, 166, 255, 0.25);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    margin: 0.5rem 0;
}

/* Links styles */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.deep-link {
    background: rgba(33, 38, 45, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.deep-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.25);
    transform: translateY(-1px);
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 1rem;
}

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

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes movePlane {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(6px, -4px) rotate(-5deg); }
    66% { transform: translate(-4px, 4px) rotate(5deg); }
}

@keyframes progressLoad {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}
