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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.controls-section {
    padding: 30px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

#radiusInput {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

#radiusInput:focus {
    outline: none;
    border-color: #667eea;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.category-btn {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.category-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.sort-section,
.price-filter-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.sort-section:last-child,
.price-filter-section:last-child {
    margin-bottom: 0;
}

.sort-section label,
.price-filter-section label {
    font-weight: 600;
    color: #333;
}

#sortSelect,
#priceFilter {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    background: white;
    color: #333;
    transition: border-color 0.3s ease;
}

#sortSelect:focus,
#priceFilter:focus {
    outline: none;
    border-color: #667eea;
}

.location-display {
    padding: 15px 20px;
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    color: #1565c0;
    margin: 20px;
    border-radius: 8px;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

.error-message {
    padding: 15px 20px;
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
    margin: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.results-container {
    padding: 20px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.1em;
}

.results-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.result-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
}

.result-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.result-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    flex-shrink: 0;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.result-header {
    margin-bottom: 10px;
}

.result-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.result-description {
    font-size: 0.9em;
    color: #777;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 0.9em;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stars {
    color: #ffc107;
    letter-spacing: 2px;
}

.rating-value {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    color: #666;
    font-weight: bold;
}

.distance {
    color: #2196F3;
    font-weight: 500;
}

.price-level {
    background: #fff3cd;
    color: #856404;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.status-open {
    color: #28a745;
    font-weight: bold;
}

.status-closed {
    color: #dc3545;
    font-weight: bold;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .categories {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

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

    .result-card {
        flex-direction: column;
    }

    .result-image {
        width: 100%;
        height: 200px;
    }

    .controls-section {
        padding: 20px 15px;
    }

    .controls {
        flex-direction: column;
    }

    .controls > * {
        width: 100%;
    }

    .sort-section,
    .price-filter-section {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-section > select,
    .price-filter-section > select {
        width: 100%;
    }
}
