/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Porsche-Inspired Modern Palette */
    --primary-color: #e8e8e8;
    --primary-dark: #b8b8b8;
    --secondary-color: #0d0d0d;
    --secondary-light: #1a1a1a;
    --accent-color: #ff6b35;
    --accent-dark: #cc5529;
    --accent-blue: #4a9eff;
    --text-dark: #0d0d0d;
    --text-light: #a0a0a0;
    --text-white: #ffffff;
    --background: #0d0d0d;
    --background-light: #1a1a1a;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(13, 13, 13, 0.7);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.7);
    --glow: 0 0 30px rgba(232, 232, 232, 0.3);
    --glow-accent: 0 0 30px rgba(255, 107, 53, 0.4);
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-white);
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #0d0d0d 100%);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Glassmorphism Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
}

/* Header */
header {
    background: linear-gradient(135deg, rgba(232, 232, 232, 0.03) 0%, rgba(255, 107, 53, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
    z-index: 10;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 15px rgba(232, 232, 232, 0.4));
    }
    to {
        filter: drop-shadow(0 0 35px rgba(255, 107, 53, 0.6));
    }
}

.tagline {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* Header Navigation */
.header-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(13, 13, 13, 0.5);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    border: 1px solid rgba(255, 107, 53, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    padding: 0.85rem 1.8rem;
    background: rgba(232, 232, 232, 0.03);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: rgba(255, 107, 53, 0.15);
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    color: var(--accent-color);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.25), rgba(255, 140, 90, 0.25));
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3), inset 0 0 20px rgba(255, 107, 53, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 2px;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: linear-gradient(135deg, var(--accent-color), #ff8c5a);
    color: #0d0d0d;
    font-size: 0.8rem;
    font-weight: 800;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 2px 12px rgba(255, 107, 53, 0.6);
    }
}

@media (max-width: 768px) {
    .header-nav {
        border-radius: 25px;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Bookmark Button */
.bookmark-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid rgba(255, 107, 53, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.bookmark-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--accent-color);
    transform: scale(1.1);
}

.bookmark-btn.bookmarked {
    background: rgba(255, 107, 53, 0.3);
    border-color: var(--accent-color);
}

.bookmark-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    line-height: 1;
}

.car-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.back-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-link:hover {
    background: rgba(255, 107, 53, 0.15);
    border-color: var(--accent-color);
    transform: translateX(-5px);
    box-shadow: var(--glow-accent);
}

/* Search and Filter Bar */
.search-filter-bar {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 2rem 0;
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-filter-bar .container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-section {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#searchInput {
    flex: 1;
    min-width: 280px;
    padding: 1.25rem 1.75rem;
    background: rgba(232, 232, 232, 0.03);
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 16px;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#searchInput::placeholder {
    color: var(--text-light);
}

#searchInput:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 107, 53, 0.05);
    box-shadow: 0 0 25px rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

.clear-filters-btn {
    padding: 1.25rem 2rem;
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    color: var(--accent-color);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-filters-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.3);
}

.clear-filters-btn span {
    font-size: 1.2rem;
    font-weight: 700;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

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

.filter-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(232, 232, 232, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    padding: 1rem 1.25rem;
    background: rgba(232, 232, 232, 0.03);
    border: 2px solid rgba(255, 107, 53, 0.2);
    border-radius: 12px;
    color: var(--text-white);
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff6b35' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.filter-group select:hover {
    background: rgba(232, 232, 232, 0.05);
    border-color: rgba(255, 107, 53, 0.4);
    transform: translateY(-2px);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

.filter-group select option {
    background: var(--secondary-color);
    color: var(--text-white);
    padding: 0.75rem;
}

@media (max-width: 768px) {
    .search-section {
        flex-direction: column;
    }

    .clear-filters-btn {
        width: 100%;
        justify-content: center;
    }

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

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    margin: 3rem 0;
    padding: 2.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat {
    text-align: center;
    color: white;
}

.stat-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 0.95rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 300;
}

/* Car Grid */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
    perspective: 2000px;
}

.car-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
}

.car-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--glow-accent);
    border-color: var(--accent-color);
}

.car-image-placeholder {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.car-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    backface-visibility: hidden;
}

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

.card-3d-canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    opacity: 0.6;
    z-index: 1;
}

.car-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 39, 0.8) 100%);
    z-index: 2;
    pointer-events: none;
}

.car-info {
    padding: 2rem;
    position: relative;
}

.car-brand {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.car-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.car-type {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

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

.spec-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.spec-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
}

/* Car Detail Page */
.car-detail {
    margin: 3rem 0;
    animation: fadeInUp 0.8s ease-out;
}

.detail-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    color: white;
    padding: 4rem 3rem;
    border-radius: 24px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
}

.detail-brand {
    font-size: 1rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
}

.detail-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    margin: 1rem 0;
    letter-spacing: -2px;
    color: var(--primary-color);
}

.detail-tagline {
    font-size: 1.3rem;
    opacity: 0.8;
    font-style: italic;
    font-weight: 300;
}

.detail-image {
    width: 100%;
    height: 500px;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10rem;
    color: white;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

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

.detail-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 39, 0.4) 100%);
    z-index: 1;
    pointer-events: none;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.spec-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spec-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.spec-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--card-border);
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-row-label {
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.95rem;
}

.spec-row-value {
    color: var(--text-white);
    font-weight: 600;
    text-align: right;
}

.description-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    padding: 3rem;
    border-radius: 24px;
    margin: 3rem 0;
    box-shadow: var(--shadow);
}

.description-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent-blue);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.description-section p {
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 300;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-light);
}

.no-results h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-white);
}

/* Footer */
footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--card-border);
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-top: 5rem;
}

footer p {
    font-size: 0.95rem;
    opacity: 0.7;
    font-weight: 300;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

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

    .tagline {
        font-size: 0.85rem;
    }

    .header-nav {
        flex-wrap: wrap;
        max-width: 100%;
        padding: 0.75rem;
        gap: 0.4rem;
    }

    .nav-link {
        padding: 0.5rem 0.85rem;
        font-size: 0.75rem;
        gap: 0.4rem;
    }

    .badge {
        padding: 0.15rem 0.35rem;
        font-size: 0.65rem;
    }

    .search-filter-bar {
        position: relative;
        padding: 1rem 0;
    }

    .search-filter-bar .container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .search-section {
        flex-direction: column;
        width: 100%;
    }

    #searchInput {
        width: 100%;
        font-size: 0.85rem;
        padding: 0.8rem 1rem;
    }

    .clear-filters-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.85rem;
        padding: 1rem 1.5rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .filter-label {
        font-size: 0.75rem;
    }

    .filter-group select {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }

    .filters {
        width: 100%;
    }

    .filters select {
        flex: 1;
    }

    .car-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .car-card {
        max-width: 100%;
    }

    .car-brand {
        font-size: 0.75rem;
    }

    .car-name {
        font-size: 1.4rem;
    }

    .car-type {
        font-size: 0.75rem;
        padding: 0.4rem 0.85rem;
    }

    .car-specs {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    .spec-item {
        padding: 0.75rem;
    }

    .spec-label {
        font-size: 0.7rem;
    }

    .spec-value {
        font-size: 0.95rem;
    }

    .car-card {
        max-width: 100%;
    }

    .car-specs {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .spec-item {
        padding: 0.85rem;
    }

    .stats-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }

    .stat-item {
        width: 100%;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .detail-name {
        font-size: 2rem;
    }

    .detail-image {
        height: 220px;
        font-size: 4rem;
    }

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

    .spec-section {
        padding: 1.25rem;
    }

    .spec-section h2 {
        font-size: 1.3rem;
    }

    .spec-row-label {
        font-size: 0.85rem;
    }

    .spec-row-value {
        font-size: 0.9rem;
    }

    .container {
        padding: 0 1rem;
    }

    .back-link {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    footer {
        padding: 1.75rem 0;
        font-size: 0.8rem;
    }

    footer p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.75rem;
    }

    .header-nav {
        padding: 0.6rem;
    }

    .nav-link {
        padding: 0.45rem 0.7rem;
        font-size: 0.7rem;
    }

    .car-brand {
        font-size: 0.7rem;
    }

    .car-name {
        font-size: 1.2rem;
    }

    .car-type {
        font-size: 0.65rem;
        padding: 0.35rem 0.7rem;
    }

    .spec-label {
        font-size: 0.65rem;
    }

    .spec-value {
        font-size: 0.85rem;
    }

    .detail-name {
        font-size: 1.6rem;
    }

    .spec-section {
        padding: 1rem;
    }

    .spec-section h2 {
        font-size: 1.2rem;
    }

    .spec-row-label {
        font-size: 0.8rem;
    }

    .spec-row-value {
        font-size: 0.85rem;
    }

    .description-section {
        padding: 1.25rem;
    }

    .description-section p {
        font-size: 0.95rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .container {
        padding: 0 0.75rem;
    }

    #searchInput {
        font-size: 0.8rem;
        padding: 0.75rem;
    }

    .filter-label {
        font-size: 0.7rem;
    }

    .filter-group select {
        font-size: 0.8rem;
        padding: 0.75rem 1rem;
    }

    .clear-filters-btn {
        font-size: 0.8rem;
        padding: 0.85rem 1.25rem;
    }

    .mobile-filter-btn {
        font-size: 0.85rem;
        padding: 0.85rem 1.25rem;
    }

    .filter-modal-header h2 {
        font-size: 1.1rem;
    }

    .close-modal-btn {
        width: 36px;
        height: 36px;
        font-size: 1.6rem;
    }
}

/* Animation delays for staggered effects */
@media (prefers-reduced-motion: no-preference) {
    .car-card,
    .spec-section,
    .stats-bar {
        animation-play-state: running;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile Filter Button and Modal */
.mobile-filter-btn {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 150;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), #ff8c5a);
    color: #0d0d0d;
    border: none;
    border-radius: 30px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6);
    transition: all 0.3s ease;
}

.mobile-filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.8);
}

.filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 200;
    overflow-y: auto;
}

.filter-modal.show {
    display: block;
}

.filter-modal-content {
    background: var(--background);
    min-height: 100vh;
    width: 100%;
}

.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.filter-modal-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    color: var(--accent-color);
    margin: 0;
}

.close-modal-btn {
    background: rgba(255, 107, 53, 0.2);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-modal-btn:hover {
    background: var(--accent-color);
    color: #0d0d0d;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .mobile-filter-btn {
        display: block;
    }

    .search-filter-bar {
        position: static !important;
        padding: 1.5rem 1rem;
    }

    .filter-modal .search-filter-bar {
        border-bottom: none;
    }
}
