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

body {
    background-color: #0c0c0c;
    font-family: 'Segoe UI', 'Poppins', 'Inter', system-ui, sans-serif;
    color: #e0e0e0;
    line-height: 1.5;
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #c9a03d;
    border-radius: 8px;
}

/* SIDEBAR СТИЛИ */
.sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
    border-right: 2px solid #c9a03d;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 5px 0 25px rgba(0,0,0,0.5);
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid #c9a03d;
    background: rgba(0,0,0,0.3);
}

.sidebar-header h3 {
    font-size: 1.5rem;
    color: #c9a03d;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 0.8rem;
    color: #888;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-item {
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: rgba(201, 160, 61, 0.1);
    border-left-color: #c9a03d;
    padding-left: 30px;
}

.sidebar-item.active {
    background: rgba(201, 160, 61, 0.15);
    border-left-color: #c9a03d;
    color: #c9a03d;
}

.sidebar-icon {
    font-size: 1.5rem;
}

/* Аксессуары */
.accessories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.accessory-card {
    background: #121212;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #2a2a2a;
    transition: all 0.3s;
    cursor: pointer;
}

.accessory-card:hover {
    transform: translateY(-5px);
    border-color: #c9a03d;
    box-shadow: 0 5px 20px rgba(201, 160, 61, 0.2);
}

.accessory-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.accessory-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #c9a03d;
}

.accessory-desc {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 10px;
}

.accessory-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #c9a03d;
    margin-top: 10px;
}

.accessory-stock {
    font-size: 0.75rem;
    color: #4caf50;
    margin-top: 5px;
}

/* Кнопка открытия sidebar */
.sidebar-toggle {
    position: fixed;
    left: 20px;
    top: 20px;
    background: #c9a03d;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    color: #0c0c0c;
}

.sidebar-toggle:hover {
    transform: scale(1.05);
    background: #dbb45c;
}

/* Оверлей для sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 998;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    background: #0a0a0a;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(4px);
    background-color: rgba(10, 10, 10, 0.9);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #dddddd, #c9a03d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-left: 60px;
}

.logo span {
    color: #c9a03d;
    background: none;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    color: #cbcbcb;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
    cursor: pointer;
}

.nav-links a:hover {
    color: #dbb45c;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: #2a2a2a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

section {
    padding: 60px 0;
    border-bottom: 1px solid #1e1e1e;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #c9a03d;
    border-radius: 4px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.home-welcome {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 220px);
    padding: 48px 20px;
    overflow: hidden;
}

.home-welcome-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 50% 45%, rgba(201, 160, 61, 0.07) 0%, transparent 65%),
        radial-gradient(circle at 15% 85%, rgba(201, 160, 61, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(201, 160, 61, 0.03) 0%, transparent 35%);
    pointer-events: none;
}

.home-welcome-bg::before,
.home-welcome-bg::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(201, 160, 61, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.home-welcome-bg::before {
    top: 12%;
    left: 8%;
}

.home-welcome-bg::after {
    bottom: 10%;
    right: 6%;
}

.home-welcome-card {
    position: relative;
    z-index: 1;
    max-width: 720px;
    width: 100%;
    padding: clamp(36px, 6vw, 56px) clamp(28px, 5vw, 48px);
    text-align: center;
    background: linear-gradient(145deg, rgba(18, 18, 18, 0.85) 0%, rgba(10, 10, 10, 0.92) 100%);
    border: 1px solid rgba(201, 160, 61, 0.18);
    border-radius: 24px;
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(201, 160, 61, 0.05) inset,
        0 1px 0 rgba(201, 160, 61, 0.12) inset;
    backdrop-filter: blur(8px);
}

.home-welcome-card::before,
.home-welcome-card::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: rgba(201, 160, 61, 0.22);
    border-style: solid;
    pointer-events: none;
}

.home-welcome-card::before {
    top: 14px;
    left: 14px;
    border-width: 1px 0 0 1px;
    border-radius: 6px 0 0 0;
}

.home-welcome-card::after {
    bottom: 14px;
    right: 14px;
    border-width: 0 1px 1px 0;
    border-radius: 0 0 6px 0;
}

.home-welcome-line {
    width: 48px;
    height: 2px;
    margin: 0 auto 28px;
    background: linear-gradient(90deg, transparent, rgba(201, 160, 61, 0.55), transparent);
    border-radius: 2px;
}

.home-welcome-text {
    font-size: clamp(1.35rem, 3.5vw, 2rem);
    font-weight: 400;
    color: rgba(224, 224, 224, 0.92);
    line-height: 1.55;
    letter-spacing: 0.02em;
}

.home-welcome-brand {
    display: inline-block;
    margin-top: 0.15em;
    font-weight: 600;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, #d4b04a 0%, #c9a03d 45%, #a8842f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

@media (max-width: 480px) {
    .home-welcome-brand {
        display: block;
    }
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}

.team-card {
    background: #121212;
    border-radius: 28px;
    padding: 28px 24px;
    flex: 1;
    min-width: 260px;
    max-width: 360px;
    border: 1px solid #2c2c2c;
    transition: transform 0.2s ease, box-shadow 0.2s;
    cursor: pointer;
}

.team-card:hover {
    transform: translateY(-6px);
    border-color: #c9a03d;
}

.avatar {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 3rem;
    background: #1e1e1e;
    border: 2px solid #c9a03d;
    border-radius: 50%;
}

.team-card h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: #f0f0f0;
}

.role {
    color: #c9a03d;
    font-weight: 500;
    margin-bottom: 16px;
    display: inline-block;
    border-left: 3px solid #c9a03d;
    padding-left: 10px;
}

.bio {
    color: #b0b0b0;
    font-size: 0.95rem;
}

.click-hint {
    margin-top: 16px;
    font-size: 0.75rem;
    color: #c9a03d;
    opacity: 0.6;
    text-align: center;
}

.filters-bar {
    background: #111111;
    border-radius: 20px;
    padding: 20px 25px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.filter-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 8px 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
}

.filter-btn.active {
    background: #c9a03d;
    color: #0c0c0c;
    border-color: #c9a03d;
}

.filter-btn:hover {
    background: #c9a03d;
    color: #0c0c0c;
}

.stats-badge {
    background: #c9a03d;
    color: #0c0c0c;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.compare-panel {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 15px 25px;
    margin-bottom: 30px;
    border: 1px solid #c9a03d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.compare-selected {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.compare-item {
    background: #0c0c0c;
    padding: 8px 15px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #c9a03d;
}

.compare-item img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.remove-compare {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 1.2rem;
}

.compare-actions {
    display: flex;
    gap: 15px;
}

.btn-compare {
    background: #c9a03d;
    color: #0c0c0c;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
}

.btn-clear {
    background: #333;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
}

.countries-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.country-item {
    background: #111111;
    border-radius: 20px;
    border: 1px solid #262626;
    transition: all 0.2s;
    overflow: hidden;
}

.country-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 24px;
    transition: background 0.2s;
    cursor: pointer;
}

.country-header:hover {
    background: #1a1a1a;
}

.flag-icon {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #3a3a3a;
}

.country-name {
    font-size: 1.5rem;
    font-weight: 500;
    flex: 1;
    color: #e0e0e0;
}

.arrow {
    font-size: 1.6rem;
    color: #777;
}

.cars-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s;
    background: #0b0b0b;
    border-top: 1px solid transparent;
}

.cars-list.open {
    max-height: 2000px;
    border-top-color: #2a2a2a;
}

.car-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    border-bottom: 1px solid #202020;
    transition: background 0.2s;
}

.car-card:hover {
    background: #1a1a1a;
}

.car-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #0a0a0a;
    border-radius: 12px;
    padding: 6px;
}

.car-name {
    font-size: 1.2rem;
    font-weight: 500;
    color: #e6e6e6;
    flex: 1;
}

.car-price {
    color: #c9a03d;
    font-weight: 600;
    margin-right: 15px;
}

.car-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.compare-add {
    background: #2a2a2a;
    border: none;
    color: #c9a03d;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
}

.compare-add:hover {
    background: #c9a03d;
    color: #0c0c0c;
}

.car-more {
    color: #c9a03d;
    font-size: 0.85rem;
    cursor: pointer;
}

.search-container input {
    width: 100%;
    padding: 14px 20px;
    background: #1a1a1a;
    border: 1px solid #c9a03d;
    border-radius: 50px;
    color: white;
    font-size: 1rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #121212;
    border-radius: 32px;
    max-width: 800px;
    width: 90%;
    border: 1px solid #c9a03d;
    overflow: hidden;
}

.modal-header {
    background: #1a1a1a;
    padding: 24px 28px;
    border-bottom: 1px solid #2c2c2c;
    display: flex;
    align-items: center;
    gap: 18px;
}

.modal-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 16px;
    padding: 8px;
}

.modal-header h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #f0f0f0;
}

.modal-body {
    padding: 28px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
}

.compare-table th, .compare-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
}

.compare-table th {
    color: #c9a03d;
    width: 30%;
}

.info-row {
    margin-bottom: 20px;
    border-bottom: 1px solid #252525;
    padding-bottom: 14px;
}

.info-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #c9a03d;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-value {
    font-size: 1.1rem;
    color: #ddd;
}

.close-modal {
    background: #c9a03d;
    border: none;
    color: #0c0c0c;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 1rem;
    margin: 12px 28px 28px;
    width: calc(100% - 56px);
}

footer {
    background: #070707;
    padding: 28px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #6a6a6a;
}

/* Медиа запросы */
@media (max-width: 760px) {
    .container {
        padding: 0 20px;
    }
    .country-name {
        font-size: 1.2rem;
    }
    .filters-bar {
        flex-direction: column;
    }
    .car-card {
        flex-wrap: wrap;
    }
    .sidebar {
        width: 280px;
    }
    .logo {
        margin-left: 60px;
        font-size: 1.4rem;
    }
}

/* СВЕТЛАЯ ТЕМА */
body.light-theme {
    background-color: #f5f5f5;
    color: #1a1a1a;
}

body.light-theme header {
    background-color: rgba(245, 245, 245, 0.95);
    border-bottom-color: #d0d0d0;
}

body.light-theme .logo {
    background: linear-gradient(135deg, #1a1a1a, #444444);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.light-theme .nav-links a {
    color: #1a1a1a;
}

body.light-theme .nav-links a:hover {
    color: #c9a03d;
}

body.light-theme .theme-toggle {
    background: #e0e0e0;
    color: #1a1a1a;
}

body.light-theme .team-card {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

body.light-theme .team-card h3 {
    color: #1a1a1a;
}

body.light-theme .bio {
    color: #555;
}

body.light-theme .country-item {
    background: #ffffff;
    border-color: #e0e0e0;
}

body.light-theme .country-header {
    background: #ffffff;
}

body.light-theme .country-header:hover {
    background: #e8e8e8;
}

body.light-theme .country-name {
    color: #1a1a1a;
}

body.light-theme .arrow {
    color: #888;
}

body.light-theme .cars-list {
    background: #fafafa;
}

body.light-theme .car-card {
    border-bottom-color: #e0e0e0;
}

body.light-theme .car-card:hover {
    background: #f0f0f0;
}

body.light-theme .car-name {
    color: #1a1a1a;
}

body.light-theme .car-price {
    color: #c9a03d;
}

body.light-theme .car-more {
    color: #c9a03d;
}

body.light-theme .compare-add {
    background: #e0e0e0;
    color: #c9a03d;
}

body.light-theme .search-container input {
    background: #ffffff;
    color: #1a1a1a;
    border-color: #c9a03d;
}

body.light-theme .filters-bar {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

body.light-theme .filter-btn {
    background: #e0e0e0;
    color: #1a1a1a;
    border-color: #ccc;
}

body.light-theme .filter-btn.active,
body.light-theme .filter-btn:hover {
    background: #c9a03d;
    color: #0c0c0c;
}

body.light-theme .stats-badge {
    background: #c9a03d;
    color: #0c0c0c;
}

body.light-theme .compare-panel {
    background: #ffffff;
    border-color: #c9a03d;
}

body.light-theme .compare-item {
    background: #f0f0f0;
    color: #1a1a1a;
}

body.light-theme .btn-clear {
    background: #e0e0e0;
    color: #1a1a1a;
}

body.light-theme .modal-content {
    background: #ffffff;
    border-color: #c9a03d;
}

body.light-theme .modal-header {
    background: #f8f8f8;
    border-bottom-color: #e0e0e0;
}

body.light-theme .modal-header h3 {
    color: #1a1a1a;
}

body.light-theme .info-row {
    border-bottom-color: #eeeeee;
}

body.light-theme .info-label {
    color: #c9a03d;
}

body.light-theme .info-value {
    color: #555;
}

body.light-theme .close-modal {
    background: #c9a03d;
    color: #0c0c0c;
}

body.light-theme .compare-table th {
    color: #c9a03d;
}

body.light-theme .compare-table td {
    color: #555;
    border-bottom-color: #e0e0e0;
}

body.light-theme footer {
    background: #f0f0f0;
    border-top-color: #e0e0e0;
    color: #666;
}

body.light-theme .sidebar {
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    border-right-color: #c9a03d;
}

body.light-theme .sidebar-item:hover {
    background: rgba(201, 160, 61, 0.1);
}

body.light-theme .accessory-card {
    background: #ffffff;
    border-color: #e0e0e0;
}

body.light-theme .accessory-title {
    color: #c9a03d;
}

body.light-theme .accessory-desc {
    color: #666;
}

body.light-theme .home-welcome-bg {
    background:
        radial-gradient(ellipse 70% 55% at 50% 45%, rgba(201, 160, 61, 0.1) 0%, transparent 65%),
        radial-gradient(circle at 15% 85%, rgba(201, 160, 61, 0.06) 0%, transparent 40%);
}

body.light-theme .home-welcome-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 248, 0.98) 100%);
    border-color: rgba(201, 160, 61, 0.25);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(201, 160, 61, 0.08) inset;
}

body.light-theme .home-welcome-text {
    color: #333;
}

body.light-theme .home-welcome-brand {
    background: linear-gradient(135deg, #b8922e 0%, #c9a03d 50%, #8a6d24 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#goTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #c9a03d;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.8rem;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    color: #0c0c0c;
    font-weight: bold;
}

#goTop:hover {
    transform: scale(1.1);
    background: #dbb45c;
}