/* Car Explorer - Stile uniforme alla home page */
:root {
    --primary-color: #00ff88;
    --secondary-color: #667eea;
    --accent-color: #f093fb;
    --text-color: #ffffff;
    --text-secondary: #b8b8b8;
    --background: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* Stile base uniforme alla home */
body {
    background: var(--background);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Hero Section Glass */
.hero-glass {
    background: linear-gradient(135deg, var(--glass-bg), var(--glass-border));
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.bokeh-lights {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(240, 147, 251, 0.1) 0%, transparent 50%);
    animation: bokeh-float 20s ease-in-out infinite;
}

.aurora-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(0, 255, 136, 0.05) 0%, 
        rgba(102, 126, 234, 0.05) 25%, 
        rgba(240, 147, 251, 0.05) 50%, 
        rgba(0, 255, 136, 0.05) 75%, 
        rgba(102, 126, 234, 0.05) 100%);
    animation: aurora-shift 15s ease-in-out infinite;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    color: var(--text-color);
}

.title-accent {
    display: block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filtri Glass */
.filters-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
}

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

.filters-header {
    text-align: center;
    margin-bottom: 2rem;
}

.filters-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filters-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.filter-select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.filter-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Griglia Auto Glass - Card più compatte e ordinate */
.cars-grid-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
}

.cars-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cars-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cars-count {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    font-size: 1rem;
    color: var(--text-color);
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Card Auto - Ridisegnate per essere più compatte e ordinate */
.car-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 420px;
    display: flex;
    flex-direction: column;
}

.car-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow), var(--glow);
    border-color: var(--primary-color);
}

.car-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

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

.car-card:hover .car-image img {
    transform: scale(1.1);
}

.car-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    font-size: 2.5rem;
    color: white;
}

.featured-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--primary-color);
    color: var(--background);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.car-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.car-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.car-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.3;
    flex: 1;
    margin-right: 0.5rem;
}

.car-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
}

.car-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex: 1;
}

.car-detail {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
}

.car-detail-icon {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.car-description {
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.car-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.car-action-btn {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
}

.car-action-btn.primary {
    background: var(--primary-color);
    color: var(--background);
}

.car-action-btn.primary:hover {
    background: #00cc6a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.car-action-btn.secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.car-action-btn.secondary:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.car-action-btn .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Messaggio Nessuna Auto */
.no-cars-found {
    text-align: center;
    padding: 3rem 2rem;
}

.no-cars-found h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.no-cars-found p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.admin-note {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-color);
}

/* Modal Dettagli Auto */
.car-details-modal {
    max-width: 900px;
    width: 90%;
}

.car-details-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.car-details-image {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
}

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

.car-title-large {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.car-price-large {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.car-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.spec-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.spec-value {
    color: var(--text-color);
    font-weight: 500;
}

.car-description-large h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.car-description-large p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.car-actions-large {
    text-align: center;
}

/* Stili per il modal overlay e content */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active,
.modal-overlay[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    width: 100%;
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #00ff88;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #00ff88;
}

/* Glass Button Styles */
.glass-button {
    padding: 15px 30px;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.glass-button.primary {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: black;
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.3);
}

.glass-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 255, 136, 0.4);
}

.glass-button.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.glass-button.shimmer:hover::before {
    left: 100%;
}

.glass-button.magnetic {
    transition: all 0.3s ease;
}

.glass-button.magnetic:hover {
    transform: translateY(-3px) scale(1.05);
}

/* Animazioni */
@keyframes bokeh-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes aurora-shift {
    0%, 100% { transform: translateX(0px) scale(1); }
    50% { transform: translateX(20px) scale(1.1); }
}

/* Responsive per card più piccole */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .cars-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .car-card {
        height: 380px;
    }
    
    .car-image {
        height: 160px;
    }
    
    .car-content {
        padding: 1rem;
    }
    
    .car-title {
        font-size: 1rem;
    }
    
    .car-price {
        font-size: 1.1rem;
    }
    
    .car-details {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
    
    .car-detail {
        font-size: 0.75rem;
    }
    
    .car-action-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .car-details-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .car-details-image {
        height: 250px;
    }
    
    .car-specs-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95vw;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px 20px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cars-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .car-card {
        height: 360px;
    }
    
    .car-image {
        height: 140px;
    }
    
    .car-details-image {
        height: 200px;
    }
    
    .car-title-large {
        font-size: 1.5rem;
    }
    
    .car-price-large {
        font-size: 2rem;
    }
    
    .modal-content {
        width: 98vw;
        margin: 5px;
    }
}
