/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
}

/* Header Section */
.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #007BFF 0%);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header h1 i {
    margin-right: 15px;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.filters-section h2 {
    color: #007BFF;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.filters-section h2 i {
    margin-right: 10px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.95rem;
}

.filter-group label i {
    margin-right: 8px;
    color: #667eea;
}

.filter-group input[type="text"],
.filter-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.filter-group input[type="text"]:focus,
.filter-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

.filter-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.filter-checkbox label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.filter-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.filter-checkbox span {
    font-weight: 600;
    color: #555;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.results-count {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 600;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 8px;
    text-align: center;
}

/* Sort Section */
.sort-section {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-section label {
    font-weight: 600;
    color: #555;
    font-size: 1.1rem;
}

.sort-section label i {
    margin-right: 8px;
    color: #667eea;
}

.sort-section select {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    max-width: 300px;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.view-toggle button {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-toggle button:hover {
    border-color: #007BFF;
    background: #f8f9ff;
}

.view-toggle button.active {
    background: linear-gradient(135deg, #667eea 0%);
    color: white;
    border-color: #007BFF;
}

/* Restaurant List */
.restaurant-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
}

.restaurant-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.restaurant-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    position: relative;
}

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4757;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(255, 71, 87, 0.4);
}

.open-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #2ed573;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.closed-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff4757;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.restaurant-info {
    padding: 20px;
}

.restaurant-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.restaurant-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.restaurant-type {
    color: #888;
    font-size: 0.9rem;
}

.rating-badge {
    background: #2ed573;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.restaurant-cuisine {
    color: #667eea;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.restaurant-details {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.detail-row i {
    width: 20px;
    color: #667eea;
}

.crowd-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 12px;
    background: #f8f9ff;
    border-radius: 8px;
}

.crowd-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.crowd-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ed573 0%, #ffa502 50%, #ff4757 100%);
    transition: width 0.5s ease;
}

.crowd-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.crowd-low {
    color: #2ed573;
}

.crowd-moderate {
    color: #ffa502;
}

.crowd-high {
    color: #ff4757;
}

.specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.specialty-tag {
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #555;
}

.restaurant-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.action-btn {
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-directions {
    background: #667eea;
    color: white;
}

.btn-directions:hover {
    background: #5568d3;
}

.btn-menu {
    background: #ff6348;
    color: white;
}

.btn-menu:hover {
    background: #e5533d;
}

.btn-booking {
    background: #2ed573;
    color: white;
}

.btn-booking:hover {
    background: #26be5f;
}

.btn-call {
    background: #ffa502;
    color: white;
}

.btn-call:hover {
    background: #e69500;
}

/* Map Container */
.map-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

#map {
    height: 600px;
    width: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 35px;
    font-weight: bold;
    padding: 20px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

#modalBody {
    padding: 30px;
}

.modal-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.modal-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.modal-ratings {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.rating-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.rating-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2ed573;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.rating-label {
    font-size: 0.85rem;
    color: #888;
}

.modal-section {
    margin: 25px 0;
}

.modal-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.facility-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9ff;
    border-radius: 8px;
}

.facility-item i {
    color: #667eea;
}

.facility-available {
    color: #2ed573;
}

.facility-unavailable {
    color: #ff4757;
    opacity: 0.5;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.5rem;
    color: #667eea;
}

.loading i {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .restaurant-list {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .sort-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-section select {
        max-width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}
