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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.header-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    opacity: 0.9;
    font-weight: 300;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#searchInput {
    flex: 1;
    min-width: 250px;
    padding: 12px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: #2c3e50;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

button:hover {
    background: #34495e;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
}

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

.pizza-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

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

.rank-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff6b6b;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    z-index: 2;
}

.pizza-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.pizza-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.location {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}


.map-link {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s;
    font-weight: bold;
}

.map-link:hover {
    background: #2980b9;
}

.no-results {
    text-align: center;
    font-size: 1.2rem;
    color: #7f8c8d;
    margin: 3rem 0;
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    #searchInput {
        min-width: auto;
    }
    
    .pizza-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
        align-items: center;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    z-index: 1001;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-info {
    padding: 2rem;
    flex: 1;
}

.modal-info h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.modal-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

#modalLocation {
    color: #7f8c8d;
    font-weight: bold;
}

#modalDescription {
    color: #333;
    margin-bottom: 2rem;
}

.pizza-image {
    cursor: pointer;
    transition: transform 0.3s;
}

.pizza-image:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
        max-height: 80vh;
    }
    
    .modal-info {
        padding: 1.5rem;
    }
    
    .modal-info h2 {
        font-size: 1.5rem;
    }
    
    .modal-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 5% auto;
        height: 90vh;
    }
    
    .modal-info {
        padding: 1rem;
    }
}