:root {
    --bg: #e0f2fe; /* Light sky blue background */
    --card-bg: #ffffff;
    --border: rgba(0, 0, 0, 0.05); /* very light border */
    --accent: #38bdf8; /* sky blue accent */
    --accent-light: #7dd3fc;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-dim: #cbd5e1;
    --font: 'Red Hat Display', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.back-btn {
    width: 44px;
    height: 44px;
    background: var(--card-bg);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}

.back-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.icon-btn {
    width: 44px;
    height: 44px;
    background: var(--card-bg);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Main */
.main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Trip Toggle */
.trip-toggle {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
}

.radio-label input {
    display: none;
}

.radio-label span {
    position: relative;
    padding-left: 2rem;
    font-size: 1rem;
}

.radio-label span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-dim);
    border-radius: 50%;
    transition: all 0.3s;
}

.radio-label span::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    transition: transform 0.3s;
}

.radio-label.active {
    color: var(--text);
}

.radio-label.active span::before {
    border-color: var(--accent);
}

.radio-label.active span::after {
    transform: translateY(-50%) scale(1);
}

/* Search Box */
.search-box {
    background: var(--card-bg);
    border: none;
    border-radius: 32px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.03);
    padding: 1.5rem;
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.field-group {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.field-group:hover {
    border-color: var(--accent);
}

.field-group.full-width {
    grid-column: 1 / -1;
}

.field-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.field-value {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-value .code {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 0.5rem;
}

.return-text {
    color: var(--accent);
    font-weight: 500;
}

.field-group.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.field-group.disabled:hover {
    border-color: var(--border);
}

/* Swap Button */
.swap-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.swap-btn:hover {
    background: var(--accent);
    color: #000;
    transform: translate(-50%, -50%) rotate(180deg);
}

/* Search Button */
.search-btn {
    width: 100%;
    padding: 1.25rem;
    background: #111827; /* Dark black button instead of gradient */
    border: none;
    border-radius: 100px;
    color: #ffffff;
    font-family: var(--font);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    width: 100%;
    max-height: 80vh;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.modal:not(.hidden) .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

/* City Picker */
.search-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.search-input input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
}

.city-list {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.city-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.city-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.city-item i {
    width: 40px;
    height: 40px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.city-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.city-name {
    font-weight: 600;
    font-size: 1rem;
}

.city-airport {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.city-code {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Calendar */
.date-modal {
    max-height: 90vh;
}

.calendar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem;
    overflow-y: auto;
}

.month h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.weekdays span {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.5rem;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0.25rem;
}

.day:hover:not(.empty) {
    background: rgba(255, 255, 255, 0.05);
}

.day.today {
    border: 1px solid var(--accent);
}

.day.selected {
    background: var(--accent);
    color: #000;
}

.day.selected .day-price {
    color: rgba(0, 0, 0, 0.7);
}

.day-num {
    font-weight: 600;
    font-size: 0.9rem;
}

.day-price {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.day.empty {
    cursor: default;
}

/* Passenger Modal */
.passenger-modal {
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.passenger-section,
.class-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.passenger-section h4,
.class-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.counter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.counter-label {
    display: block;
    font-weight: 600;
    font-size: 1rem;
}

.counter-sub {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.counter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.counter button {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.counter button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.counter span {
    font-weight: 600;
    font-size: 1.25rem;
    min-width: 2rem;
    text-align: center;
}

.class-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.class-option:last-child {
    border-bottom: none;
}

.class-option input {
    display: none;
}

.class-option span {
    position: relative;
    padding-left: 2.5rem;
    font-size: 1rem;
}

.class-option span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-dim);
    border-radius: 50%;
}

.class-option span::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    transition: transform 0.3s;
}

.class-option input:checked + span::before {
    border-color: var(--accent);
}

.class-option input:checked + span::after {
    transform: translateY(-50%) scale(1);
}

.done-btn {
    margin: 1.5rem;
    padding: 1rem;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    color: #000;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.done-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .main {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    
    .search-box {
        grid-template-columns: 1fr;
    }
    
    .swap-btn {
        position: static;
        transform: none;
        margin: 0 auto;
        grid-column: 1 / -1;
    }
    
    .swap-btn:hover {
        transform: rotate(180deg);
    }
    
    .calendar {
        grid-template-columns: 1fr;
    }
    
    .date-field.return-field {
        display: none;
    }
    
    .trip-toggle:has(input[value="roundtrip"]:checked) ~ .search-box .date-field.return-field {
        display: block;
    }
}

/* Search Status */
.search-status {
    padding: 8px 24px;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Selected Return Date Style */
.day.selected-return {
    background: var(--accent-light);
    color: #000;
}

.day.selected-return .day-price {
    color: rgba(0, 0, 0, 0.7);
}

.day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Responsive for Mobile - Same layout as Image 3 */
@media (max-width: 768px) {
    .main {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    
    /* Keep grid layout on mobile - 3 columns */
    .search-box {
        grid-template-columns: 1fr auto 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .field-group {
        padding: 0.75rem;
        min-width: 0;
    }
    
    .field-value {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .field-value .code {
        font-size: 0.875rem;
    }
    
    /* Swap button in middle */
    .swap-btn {
        position: static;
        transform: none;
        width: 36px;
        height: 36px;
        align-self: center;
    }
    
    .swap-btn:hover {
        transform: rotate(180deg);
    }
    
    /* Date fields in grid */
    .date-field {
        grid-column: span 1;
    }
    
    /* Full width for passengers */
    .field-group.full-width {
        grid-column: 1 / -1;
    }
    
    /* Trip toggle horizontal */
    .trip-toggle {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .radio-label span {
        font-size: 0.875rem;
    }
    
    /* Calendar single column on mobile */
    .calendar {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1.5rem;
    }
    
    /* Modal adjustments */
    .modal-content {
        max-height: 85vh;
    }
    
    .city-item {
        padding: 0.75rem 1rem;
    }
    
    .city-item i {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .city-name {
        font-size: 0.9375rem;
    }
    
    .city-airport {
        font-size: 0.75rem;
    }
    
    .city-code {
        font-size: 0.875rem;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .field-value {
        font-size: 0.875rem;
    }
    
    .field-label {
        font-size: 0.75rem;
    }
    
    .swap-btn {
        width: 32px;
        height: 32px;
    }
}