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

html {
    overflow-x: hidden;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --background: #f8fafc;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', 'Helvetica Neue', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-icon {
    font-size: 2rem;
}

.auth-trigger-btn {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.auth-trigger-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Main Layout */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Sidebar */
.sidebar {
    width: 380px;
    background: var(--sidebar-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    transition: all 0.3s ease;
}


.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

input, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: white;
    color: var(--text-primary);
}

input[type="date"] {
    padding: 0.75rem 0.625rem;
    font-size: 0.8125rem;
}

input:hover, select:hover {
    border-color: #cbd5e1;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.autocomplete-container {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-xl);
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-item {
    padding: 0.875rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

.autocomplete-item:hover {
    background-color: #f8fafc;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.autocomplete-item-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.autocomplete-item-country {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    overflow: visible;
}

/* Filters */
.filters-toggle {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filters-toggle:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.filters-toggle.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: var(--primary-color);
}

.filters-toggle-icon {
    transition: transform 0.3s;
}

.filters-toggle.active .filters-toggle-icon {
    transform: rotate(180deg);
}

.filters-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.filters-panel.show {
    max-height: 3000px;
}

.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.price-input {
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.checkbox-label:hover {
    background-color: #f8fafc;
}

.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
    width: auto;
    margin-right: 0.625rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.star-rating-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.star-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.star-btn:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.star-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: var(--primary-color);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #475569 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

/* Content Area */
.content {
    flex: 1;
    min-width: 0;
}

/* Hotel Cards */
.results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.hotel-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.hotel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.hotel-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
}

.hotel-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hotel-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.hotel-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.hotel-address {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.hotel-distance {
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.hotel-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
}

.badge-stars {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.badge-rating {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.hotel-features {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.hotel-meal {
    font-size: 0.8125rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.hotel-conditions {
    font-size: 0.8125rem;
    color: #10b981;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.hotel-price-section {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.hotel-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.hotel-price-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.pagination-btn {
    padding: 0.625rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-primary);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: var(--primary-color);
}

.pagination-info {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Loading & Messages */
.loading {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.spinner {
    border: 4px solid #f1f5f9;
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 48px;
    height: 48px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    font-weight: 500;
}

.no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

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

.no-results-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.no-results-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        padding: 1rem;
    }

    .sidebar {
        width: 100%;
        position: static;
        max-height: none;
        margin-bottom: 1.5rem;
    }

    .results {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }

    .header-content {
        padding: 0 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .results {
        grid-template-columns: 1fr;
    }

    .hotel-card {
        border-radius: 12px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .pagination-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Hide elements initially */
.hidden {
    display: none !important;
}

/* Welcome Screen */
.welcome-screen {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.welcome-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
