/* ============================================
   HOT PC - Main Stylesheet (LIGHT THEME)
   ============================================ */

/* ========== CSS Variables ========== */
:root {
    /* Перевернутая палитра для светлой темы */
    --color-black: #f4f6f8;       /* Светло-серый фон страницы */
    --color-red: #ff4757;         /* Яркий акцентный красный */
    --color-white: #2d3436;       /* Темный основной текст */
    
    --color-gray-dark: #ffffff;   /* Белый фон для карточек */
    --color-gray: #f1f2f6;        /* Фон второстепенных элементов */
    --color-gray-light: #dfe6e9;  /* Цвет границ */
    --color-gray-lighter: #b2bec3;
    
    --color-text-inverse: #ffffff; /* Белый текст для кнопок */
    
    --font-primary: 'Orbitron', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Тени стали мягче и темнее (не красные), чтобы не резало глаза */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-red: 0 4px 15px rgba(255, 71, 87, 0.3);
}

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-black);
    color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background-color: var(--color-red);
    color: var(--color-text-inverse);
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-white);
}

/* ========== Container ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Header ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95); /* Белый полупрозрачный */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-gray-light);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    font-family: var(--font-primary);
    font-size: 28px;
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    display: block;
}

.logo-hot {
    color: var(--color-red);
}

.logo-pc {
    color: var(--color-white);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--color-white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-red);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Стили профиля */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    background: var(--color-gray);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-gray-light);
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-white);
}

.btn-icon {
    background: var(--color-gray-dark);
    border: 1px solid var(--color-gray-light);
    color: var(--color-white);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    position: relative;
}

.btn-icon:hover {
    background: var(--color-white);
    border-color: var(--color-red);
    color: var(--color-red);
    box-shadow: var(--shadow-sm);
}

.btn-icon svg {
    stroke: currentColor;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-red);
    color: var(--color-text-inverse);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    display: none;
}

.badge.active {
    display: block;
}

.mobile-menu-toggle {
    display: none;
}

/* ========== Hero Section ========== */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 84px;
    overflow: hidden;
    background: var(--color-gray); /* Светлый фон для героя */
}

/* Фон стал геометрическим и светлым */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(#dfe6e9 1px, transparent 1px),
        radial-gradient(#dfe6e9 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-title-main {
    font-size: 80px;
    font-weight: 900;
    color: var(--color-white);
    line-height: 1;
    margin-bottom: 10px;
}

.hero-title-main span {
    color: var(--color-red);
}

.hero-title-sub {
    font-size: 28px;
    font-weight: 500;
    color: #636e72;
    display: block;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 18px;
    color: #636e72;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ========== Buttons ========== */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-secondary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-red);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-red);
}

.btn-primary:hover {
    background: #e61a1a;
    transform: translateY(-2px);
    color: var(--color-text-inverse);
}

.btn-secondary {
    background: var(--color-gray-dark);
    color: var(--color-white);
    border: 1px solid var(--color-gray-light);
}

.btn-secondary:hover {
    background: var(--color-gray);
    border-color: var(--color-red);
    color: var(--color-red);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* ========== Section ========== */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 42px;
    margin-bottom: 10px;
    color: var(--color-white);
}

.section-subtitle {
    font-size: 18px;
    color: #636e72;
}

/* ========== Build & Filters ========== */
.filters-panel {
    background: var(--color-gray-dark);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-white);
}

.filter-select {
    width: 100%;
    padding: 10px;
    background: var(--color-gray);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--border-radius-sm);
    color: var(--color-white);
    cursor: pointer;
}

/* Инпуты для фильтров и форм */
.form-input, .form-textarea {
    width: 100%;
    padding: 12px;
    background: var(--color-gray-dark);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--border-radius-sm);
    color: var(--color-white);
    font-size: 14px;
}

.form-input:focus, .form-textarea:focus, .filter-select:focus {
    outline: none;
    border-color: var(--color-red);
}

/* Сетка сборки */
.build-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

.component-category {
    background: var(--color-gray-dark);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.component-category-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-gray);
    cursor: pointer;
    border-bottom: 1px solid transparent;
}

.component-category.expanded .component-category-header {
    border-bottom-color: var(--color-gray-light);
}

.component-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.component-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--color-gray-light);
    color: var(--color-white);
}

.component-status[data-status="selected"] {
    background: var(--color-red);
    color: #fff;
}

.component-list {
    display: none;
    flex-direction: column;
    padding: 10px;
}

.component-category.expanded .component-list {
    display: flex;
}

.component-item {
    padding: 15px;
    margin-bottom: 5px;
    background: var(--color-gray-dark);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.component-item:hover {
    border-color: var(--color-red);
    background: var(--color-gray);
}

.component-item.selected {
    border-color: var(--color-red);
    background: rgba(255, 71, 87, 0.05);
}

.component-name {
    font-weight: 600;
    font-size: 14px;
}

.component-specs {
    font-size: 12px;
    color: #636e72;
}

.component-price {
    font-weight: 700;
    color: var(--color-red);
}

/* Сводка (Sticky справа) */
.build-summary {
    background: var(--color-gray-dark);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--border-radius);
    padding: 25px;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-lg);
}

.build-summary-title {
    font-size: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-gray-light);
    margin-bottom: 20px;
}

.selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--color-gray);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    font-size: 14px;
}

.selected-item-remove {
    background: none;
    border: none;
    color: #636e72;
    cursor: pointer;
}

.selected-item-remove:hover {
    color: var(--color-red);
}

.build-total {
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid var(--color-gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 18px;
}

.build-total-price {
    font-size: 24px;
    color: var(--color-red);
}

/* ========== Ready Builds ========== */
.builds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.build-card {
    background: var(--color-gray-dark);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition-normal);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.build-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-red);
}

.build-card-image {
    height: 200px;
    background: var(--color-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    position: relative;
}

.build-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--color-red);
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
}

.build-card-content {
    padding: 25px;
}

.build-card-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.build-card-description {
    font-size: 14px;
    color: #636e72;
    margin-bottom: 20px;
}

.build-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--color-gray-light);
}

/* ========== Contacts ========== */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-form-wrapper {
    background: var(--color-gray-dark);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-gray-light);
    box-shadow: var(--shadow-sm);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--color-white);
}

.contact-item svg {
    color: var(--color-red);
}

/* ========== Modal ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 52, 54, 0.5); /* Затемнение фона */
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    z-index: 1;
    background: var(--color-gray-dark);
    padding: 30px;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-white);
}

/* Стили для вкладок авторизации */
.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-gray-light);
}

.auth-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: #636e72;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
}

.auth-tab.active {
    color: var(--color-red);
    border-bottom-color: var(--color-red);
}

.hidden {
    display: none !important;
}

/* ========== Footer ========== */
.footer {
    background: var(--color-white);
    color: #fff;
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
}

.footer-logo {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 10px;
}

.footer-text {
    opacity: 0.7;
    font-size: 14px;
}

/* ========== Responsive ========== */
@media (max-width: 968px) {
    .build-grid {
        grid-template-columns: 1fr;
    }
    
    .build-summary {
        position: static;
        margin-bottom: 30px;
    }
    
    .hero-title-main {
        font-size: 48px;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}