:root {
    --primary-color: #292935;
    --secondary-color: #FFC536;
    --text-color: #292935;
    --background-color: #f8f9fa;
    --card-background: #FFFFFF;
    --shadow: 0 2px 8px rgba(41, 41, 53, 0.15);
    --light-gray: #666666;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    overflow-x: hidden;
}

h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    color: #acacac;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-group {
    position: relative;
}

.custom-select {
    position: relative;
    width: 100%;
    height: 40px;
}

.select-trigger {
    width: 100%;
    height: 100%;
    padding: 0 2rem 0 1rem;
    font-size: 1rem;
    border: 1px solid #d4d4d4;
    border-radius: 10px;
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-color);
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--primary-color);
    pointer-events: none;
    transition: transform 0.2s ease;
}

.custom-select.active .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.select-dropdown,
.checkbox-dropdown {
    display: none;
    position: fixed;
    background: white;
    border: none;
    border-radius: 10px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: var(--dropdown-width);
}

.custom-select.active .select-dropdown,
.custom-select.active .checkbox-dropdown {
    display: block;
}

.select-option {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.select-option:hover {
    background-color: #f5f5f5;
}

.select-option.selected {
    background-color: #f0f0f0;
    font-weight: 500;
}

.checkbox-group {
    padding: 1rem;
}

.checkbox-item {
    padding: 0.5rem;
    transition: background-color 0.2s ease;
}

.checkbox-item:hover {
    background-color: #f5f5f5;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
}

.checkbox-item:hover {
    background-color: #f5f5f5;
}

.checkbox-item input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-item input[type="checkbox"]:checked {
    background-color: var(--primary-color);
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: '\2714';
    font-size: 14px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-item label {
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
}

select {
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

select:focus {
    border-color: var(--secondary-color);
}

.search-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 2rem;
    padding: 1rem;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.search-btn:hover {
    background-color: #ffd166;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 197, 54, 0.25);
}

.animation-container {
    position: relative;
    height: 400px;
    margin-bottom: 2rem;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.animation-container.fade-out {
    opacity: 0;
}

.carousel-container {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    position: absolute;
    height: 100%;
    align-items: center;
    will-change: transform;
    transform: translateX(0);
    gap: 2rem;
}

.carousel-item {
    position: relative;
    flex: 0 0 auto;
    transition: all 0.5s ease-out;
    opacity: 0.5;
    transform: scale(0.8);
    width: 300px;
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1);
}

.carousel-fade-left,
.carousel-fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.carousel-fade-left {
    left: 0;
    background: linear-gradient(to right, var(--background-color) 0%, transparent 100%);
}

.carousel-fade-right {
    right: 0;
    background: linear-gradient(to left, var(--background-color) 0%, transparent 100%);
}

.restaurant-card {
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    width: auto;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.restaurant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(26, 31, 113, 0.25);
}

.restaurant-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.carousel-item .restaurant-image {
    width: 400px;
    height: 150px;
}

#result .restaurant-image {
    width: 100%;
    height: min(250px, 40vh);
    margin: 0;
}

.restaurant-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.rating-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    color: var(--light-gray);
}

#restaurantRating {
    font-weight: 600;
    color: var(--secondary-color);
}

.reviews-count {
    font-size: 0.9rem;
    color: var(--light-gray);
}

.restaurant-info h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
    overflow: visible;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.restaurant-info p {
    font-size: 0.9rem;
    color: var(--light-gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon {
    margin-right: 0.5rem;
}

.maps-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--card-background);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1rem;
    border: 1px solid var(--primary-color);
}

.maps-btn:hover {
    background-color: #f7f7f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(170, 170, 170, 0.25);
}

.error-container {
    margin: 2rem auto;
    text-align: center;
}

.error-card {
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
    animation: slideIn 0.5s ease-out forwards;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.footer {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #eee;
}

.footer-logo {
    height: 40px;
    width: auto;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.error-card h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.reset-btn {
    display: block;
    width: auto;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.reset-btn:hover {
    transform: translateY(-2px);
}

.result-container {
    margin: 2rem auto;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-container .restaurant-card {
    width: auto;
    min-width: min(500px, 90vw);
    margin: 0 1rem;
}

.result-container.fade-in {
    opacity: 1;
    transform: scale(1);
}

.hidden {
    display: none !important;
}

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out forwards;
}

@media (max-width: 600px) {
    .container {
        margin: 1rem auto;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .restaurant-card {
        margin: 0 1rem;
    }
}
