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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --error: #ef4444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #1a1f2e 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

/* Search Bar Section */
.search-bar-section {
    margin-bottom: 30px;
    width: 100%;
}

.search-bar-container {
    position: relative;
    width: 100%;
}

.search-bar-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1em;
    background: linear-gradient(135deg, var(--surface), rgba(30, 41, 59, 0.8));
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-bar-input::placeholder {
    color: var(--text-muted);
}

.search-bar-input:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.search-bar-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), 0 8px 25px rgba(99, 102, 241, 0.15);
    background: linear-gradient(135deg, var(--surface), rgba(30, 41, 59, 0.9));
}

/* Search Section */
.search-section {
    margin-bottom: 40px;
}

.search-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    background: var(--surface);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.search-group label {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-group select {
    padding: 10px 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-group select:hover,
.search-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-group input[type="number"] {
    padding: 10px 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1em;
    transition: all 0.3s ease;
}

.search-group input[type="number"]:hover,
.search-group input[type="number"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-group input[type="number"]::placeholder {
    color: var(--text-muted);
}

/* Checkbox Group */
.checkbox-group {
    justify-content: center;
    flex: 0 1 auto;
    min-width: auto;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--background);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text);
    margin-top: 0;
}

.checkbox-group label:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.checkbox-group input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-group input[type="checkbox"]:checked {
    accent-color: var(--success);
}

/* Category Buttons */
.category-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
}

/* Special Filter Buttons */
.special-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.special-filter-btn {
    padding: 8px 16px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.special-filter-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.special-filter-btn.active {
    background: linear-gradient(135deg, var(--secondary-color), #ec4899);
    color: white;
    border-color: var(--secondary-color);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    align-self: flex-end;
    min-width: 150px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--background);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    width: 100%;
    margin-top: 15px;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Results Grid */
.results-section {
    margin-top: 40px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.2);
}

.card-image {
    width: 100%;
    height: 220px;
    background: var(--background);
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .card-image img {
    transform: scale(1.08);
}

/* Artist info overlay sulla immagine */
.artist-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .artist-overlay {
    opacity: 1;
}

.artist-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.artist-info {
    flex: 1;
}

.artist-info .name {
    color: white;
    font-weight: 600;
    font-size: 0.95em;
    margin: 0;
}

.artist-info .status {
    color: rgba(255,255,255,0.7);
    font-size: 0.8em;
    margin: 0;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    margin-bottom: 15px;
}

.card-content h3 {
    font-size: 1.25em;
    margin-bottom: 8px;
    color: var(--text);
    line-height: 1.3;
    word-break: break-word;
}

.card-artist-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.card-artist-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary-color);
}

.card-artist-name {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--primary-color);
}

.description {
    color: var(--text-muted);
    font-size: 0.85em;
    margin-bottom: 15px;
    line-height: 1.4;
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.artist,
.turnaround {
    font-size: 0.85em;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.price {
    font-weight: 700;
    color: var(--success);
    font-size: 1.3em;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Error State */
.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: #fca5a5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results p {
    font-size: 1.1em;
}

/* Load More */
.load-more-container {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

/* Scroll Sentinel */
.scroll-sentinel {
    height: 20px;
    margin-top: 40px;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .search-controls {
        flex-direction: column;
    }

    .btn-primary {
        align-self: stretch;
    }

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

    .search-group select {
        width: 100%;
    }

    .card-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .btn-secondary {
        flex: 1;
        min-width: 100px;
    }
}
