:root {
    --accent-color: #FEBF4F;
    --accent-hover: #e5a73e;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-light);
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: background-image 1s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    position: relative;
}

/* Background states */
body.bg-day {
    background-image: url('assets/bg-day.png');
}

body.bg-evening {
    background-image: url('assets/bg-evening.png');
}

body.bg-night {
    background-image: url('assets/bg-night.png');
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    z-index: 1;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

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

.logo {
    width: 120px;
    height: auto;
    border-radius: 50%;
    /* Add a subtle glow behind logo so it stands out */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
}

.company-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.tagline {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: var(--accent-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Form */
#search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    justify-content: space-between;
}

.form-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

input,
select {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-dark);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

input:focus,
select:focus {
    background: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 0 8px rgba(254, 191, 79, 0.5);
}

.icon-spacer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0.8rem;
}

.arrow-icon {
    font-size: 2rem;
    color: var(--accent-color);
}

.submit-group {
    flex: 0 1 auto;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-dark);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(254, 191, 79, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 191, 79, 0.6);
}

/* Modal */
.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    text-align: center;
    max-width: 500px;
    width: 90%;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.animation-container {
    position: relative;
    width: 200px;
    height: 100px;
    overflow: hidden;
    border-bottom: 2px dashed var(--accent-color);
}

.plane-icon {
    font-size: 3rem;
    color: var(--accent-color);
    position: absolute;
    bottom: 0;
}

.taking-off {
    animation: takeoff 2s infinite ease-in;
}

.landing {
    animation: land 2s infinite ease-out;
    animation-delay: 1s;
    opacity: 0;
}

@keyframes takeoff {
    0% {
        transform: translate(-50px, 0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(150px, -80px) rotate(45deg);
        opacity: 0;
    }
}

@keyframes land {
    0% {
        transform: translate(-50px, -80px) rotate(45deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translate(150px, 0) rotate(0deg);
        opacity: 0;
    }
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results Table */
.results-section h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 2rem;
    color: var(--accent-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

tbody tr {
    transition: background-color 0.2s, transform 0.2s;
    cursor: pointer;
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.01);
}

.price {
    font-weight: 700;
    color: #4ade80;
    /* A soft bright green for price */
}

/* Flight Details Modal */
.flight-details-content {
    max-width: 600px;
    align-items: stretch;
    text-align: left;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--accent-color);
}

.flight-summary {
    display: flex;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
}

.flight-summary p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

#class-selection-container h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.class-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.btn-class {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.btn-class:hover {
    background: rgba(254, 191, 79, 0.2);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-class .class-price {
    font-weight: 700;
    color: #4ade80;
}

/* Payment Frame */
.payment-frame {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selected-class-row {
    display: flex;
    justify-content: space-between;
    background: rgba(254, 191, 79, 0.15);
    border: 1px solid var(--accent-color);
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.payment-details p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.final-price-row {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

.mt-1 {
    margin-top: 1rem;
    width: 100%;
}

/* Button override */
.btn-disabled {
    background-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
    .arrow-icon {
        display: none;
    }

    .form-group {
        width: 100%;
        min-width: 100%;
    }

    .submit-group {
        width: 100%;
        display: flex;
        justify-content: center;
    }
}