/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
    min-width: 150px;
}

/* Main CTA Button - Larger and more prominent */
#findRestaurants, #searchLocation {
    padding: 18px 40px;
    font-size: 1.3rem;
    font-weight: 700;
    min-width: 280px;
    gap: 12px;
    border-radius: 60px;
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
    position: relative;
    overflow: hidden;
}

#findRestaurants:hover, #searchLocation:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 107, 107, 0.5);
}

#findRestaurants i, #searchLocation i {
    font-size: 1.4rem;
}

/* Pulse animation for main buttons */
#findRestaurants::before, #searchLocation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#findRestaurants:hover::before, #searchLocation:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(253, 121, 168, 0.4);
}

/* Ad Styles */
.ad-banner {
    width: 100%;
    text-align: center;
    margin: 20px 0;
    min-height: 90px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-header {
    margin-top: 0;
    background: rgba(0, 0, 0, 0.1);
}

.ad-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    min-height: 600px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-footer {
    margin-bottom: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0 0 30px 30px;
    margin-bottom: 40px;
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.logo i {
    margin-right: 15px;
    color: #ff6b6b;
}

.tagline {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Main Content */
.main {
    flex: 1;
    padding: 0 0 40px 0;
}

/* Hero Section */
.hero {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: #666;
    font-weight: 300;
}

/* Location Options */
.location-options {
    max-width: 600px;
    margin: 0 auto;
}

.location-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    padding: 4px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 50px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tab-btn:hover:not(.active) {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.location-panel {
    display: none;
}

.location-panel.active {
    display: block;
}

/* Manual Location Panel */
.search-location {
    margin-bottom: 25px;
}

.location-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1.1rem;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
    background: white;
}

.location-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.location-input::placeholder {
    color: #999;
}

/* Popular Locations */
.popular-locations {
    text-align: center;
}

.popular-title {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.location-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 5px;
}

.location-chip {
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    flex-shrink: 0;
    white-space: nowrap;
}

.location-chip:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.location-chip:active {
    transform: translateY(0);
}

/* Advanced Filters */
.advanced-filters {
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.filter-toggle {
    width: 100%;
    padding: 15px 20px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    font-family: inherit;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
}

.filter-toggle:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

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

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

.filters-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    margin-top: 15px;
}

.filters-panel.active {
    max-height: none;
    padding: 25px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.filter-group {
    margin-bottom: 35px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

/* Main CTA Button */
.main-cta {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    padding: 0 1rem;
}

.main-cta .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    min-width: 250px;
}

@media (max-width: 768px) {
    .main-cta {
        margin: 1.5rem 0;
        padding: 0 0.5rem;
    }
    
    .main-cta .btn {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        min-width: 200px;
    }
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-size: 1rem;
}

.filter-hint {
    font-size: 0.8em;
    color: #718096;
    font-weight: normal;
    margin-left: auto;
}

.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Cuisine Filters */
.cuisine-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.cuisine-btn {
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #666;
}

.cuisine-btn i {
    font-size: 1.2rem;
}

.cuisine-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.cuisine-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Price Filters */
.price-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.price-btn {
    background: white;
    border: 2px solid #e5e7eb;
    color: #374151;
    padding: 1rem 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    min-height: 90px;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.price-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: #6b7280;
}

.price-btn .price-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.125rem;
    color: #111827;
}

.price-btn .price-range {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.price-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #d1d5db;
}

.price-btn.active {
    background: #10b981;
    border-color: #10b981;
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.price-btn.active i {
    color: white;
}

.price-btn.active .price-label {
    color: white;
}

.price-btn.active .price-range {
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

/* Rating Filter */
.rating-slider-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.rating-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    margin: 1rem 0;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* Webkit browsers (Chrome, Safari, Edge) */
.rating-slider::-webkit-slider-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(90deg, #e5e7eb 0%, #fbbf24 20%, #f59e0b 60%, #d97706 100%);
    border-radius: 4px;
}

.rating-slider::-webkit-slider-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    cursor: pointer;
    -webkit-appearance: none;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.rating-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

/* Firefox */
.rating-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(90deg, #e5e7eb 0%, #fbbf24 20%, #f59e0b 60%, #d97706 100%);
    border-radius: 4px;
    border: none;
}

.rating-slider::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.rating-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding: 0;
    position: relative;
}

.rating-labels::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 1px;
    background: transparent;
    pointer-events: none;
}

.rating-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
    position: relative;
    flex: 0 0 auto;
}

.rating-label:first-child {
    text-align: left;
}

.rating-label:last-child {
    text-align: right;
}

.rating-label::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: #d1d5db;
    border-radius: 1px;
}

.rating-label:first-child::before {
    left: 0;
    transform: none;
}

.rating-label:last-child::before {
    left: auto;
    right: 0;
    transform: none;
}

/* Loading Animation */
.loading {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading p {
    font-size: 1.2rem;
    color: #666;
}

/* Error Styles */
.error {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #ff6b6b;
}

.error i {
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.error p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

/* API Notice Styles */
.api-notice {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #667eea;
    margin-bottom: 30px;
}

.notice-content {
    padding: 30px;
    text-align: left;
}

.notice-content i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.notice-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.notice-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.notice-content ol {
    color: #666;
    margin: 15px 0 15px 20px;
    line-height: 1.8;
}

.notice-content ol li {
    margin-bottom: 8px;
}

.notice-content a {
    color: #667eea;
    text-decoration: none;
}

.notice-content a:hover {
    text-decoration: underline;
}

/* Result Styles */
.result {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.result-card {
    padding: 40px;
}

.restaurant-info {
    text-align: center;
    margin-bottom: 30px;
}

.restaurant-info h3 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.restaurant-details p {
    margin-bottom: 10px;
    color: #666;
    font-size: 1.1rem;
}

.rating-price {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
}

.rating {
    color: #ff6b6b;
    font-weight: 600;
}

.rating::before {
    content: "⭐ ";
}

.price {
    color: #28a745;
    font-weight: 600;
}

.cuisine-type {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    padding: 40px 0 20px;
    color: white;
    text-align: center;
}

.footer-content {
    margin-top: 20px;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 2.2rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero, .result-card, .loading, .error {
        padding: 30px 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Main CTA buttons mobile adjustments */
    #findRestaurants, #searchLocation {
        padding: 16px 32px;
        font-size: 1.2rem;
        min-width: 260px;
        max-width: 100%;
    }
    
    #findRestaurants i, #searchLocation i {
        font-size: 1.3rem;
    }
    
    .ad-sidebar {
        display: none;
    }
    
    .restaurant-info h3 {
        font-size: 1.8rem;
    }
    
    .rating-price {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Location Options Mobile */
    .location-tabs {
        flex-direction: column;
        gap: 4px;
    }
    
    .tab-btn {
        flex: none;
    }
    
    .location-chips {
        gap: 8px;
    }
    
    .location-chip {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .location-input {
        font-size: 1rem;
        padding: 12px 16px;
    }
    
    /* Advanced Filters Mobile */
    .cuisine-filters {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .cuisine-btn {
        padding: 10px 6px;
        font-size: 0.8rem;
    }
    
    .cuisine-btn i {
        font-size: 1rem;
    }
    
    .price-filters {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
    }
    
    .price-btn {
        padding: 10px 6px;
        font-size: 0.75rem;
        min-height: 75px;
    }
    
    .price-btn i {
        font-size: 1.1rem;
    }
    
    .price-btn .price-label {
        font-size: 0.75rem;
    }
    
    .price-btn .price-range {
        font-size: 0.65rem;
    }
    
    .rating-slider-container {
        padding: 1rem;
    }
    
    .rating-slider::-webkit-slider-thumb {
        height: 20px;
        width: 20px;
    }
    
    .rating-slider::-moz-range-thumb {
        height: 20px;
        width: 20px;
    }
    
    .rating-labels {
        padding: 0 10px;
    }
    
    .rating-label {
        font-size: 0.65rem;
    }
    
    .filters-panel.active {
        padding: 20px 15px;
    }
    
    .filter-group {
        margin-bottom: 20px;
    }
    
    .secondary-cta .btn {
        min-width: 200px;
        font-size: 1rem;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.8rem;
    }
    
    .hero h2 {
        font-size: 1.6rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .restaurant-info h3 {
        font-size: 1.5rem;
    }
}

/* Animation for result appearance */
.result {
    animation: slideUp 0.5s ease-out;
}

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

/* Hover effects for restaurant card */
.result-card:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}
