/* ===================== */
/* 1. БАЗОВЫЕ СТИЛИ И ТЕМА */
/* ===================== */

/* Подключение шрифта Ubuntu */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap');

body {
    background-color: #f5f5f7;
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    padding: 20px;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.5;
    color: #1d1d1f;
    font-size: 16px; /* Базовый размер шрифта для всего приложения */
}

.dark-mode {
    background-color: #000000;
    color: #f5f5f7;
}

/* Унификация размеров шрифтов */
h1 {
    font-size: 28px;
    font-weight: 700;
}

h2 {
    font-size: 24px;
    font-weight: 700;
}

h3 {
    font-size: 20px;
    font-weight: 600;
}

h4 {
    font-size: 18px;
    font-weight: 600;
}

h5 {
    font-size: 16px;
    font-weight: 600;
}

p, li, a, button, input, select, textarea {
    font-size: 16px;
}

.small-text {
    font-size: 14px;
}

.extra-small-text {
    font-size: 12px;
}

/* Обновление размеров шрифтов в меню */
.login-button, .user-menu-button {
    display: flex;
    align-items: center;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px 18px 10px 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: #1e293b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
    will-change: transform, box-shadow;
}

.dropdown-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.dropdown-item {
    font-size: 16px;
}

.dropdown-user-name {
    font-size: 16px;
    font-weight: 600;
}

.dropdown-user-email, .dropdown-user-type {
    font-size: 14px;
}

/* Обновление размеров шрифтов в блоке с общим числом запчастей */
.small-text {
    font-size: 14px;
}

.extra-small-text {
    font-size: 12px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    h4 {
        font-size: 16px;
    }
    
    h5 {
        font-size: 15px;
    }
    
    p, li, a, button, input, select, textarea {
        font-size: 14px;
    }
    
    .small-text {
        font-size: 13px;
    }
    
    .extra-small-text {
        font-size: 11px;
    }
}

/* ===================== */
/* 2. КОНТЕЙНЕР (search-container) И ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ */
/* ===================== */

.search-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark-mode .search-container {
    background-color: #1c1c1e;
    border-color: #2c2c2e;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Кнопка переключения темы - всегда сверху для всех страниц */
.theme-switcher {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 1000 !important;
    pointer-events: auto !important; /* Убедимся, что события мыши работают */
}

.theme-switch-button {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    outline: none !important;
    width: 60px !important;
    height: 34px !important;
    position: relative !important;
}

.switch-track {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: #e5e5ea !important;
    border-radius: 34px !important;
    transition: background-color 0.3s ease !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.dark-mode .switch-track {
    background-color: #0071e3 !important;
}

.switch-handle {
    position: absolute !important;
    height: 28px !important;
    width: 28px !important;
    left: 3px !important;
    bottom: 3px !important;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.dark-mode .switch-handle {
    transform: translateX(26px) !important;
}

.light-icon, .dark-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.light-icon {
    color: #ff9500;
    opacity: 1;
}

.dark-icon {
    color: #0071e3;
    opacity: 0;
}

.dark-mode .light-icon {
    opacity: 0;
}

.dark-mode .dark-icon {
    opacity: 1;
}

/* Анимация при наведении */
.theme-switch-button:hover .switch-handle {
    transform: scale(1.05) translateX(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.dark-mode .theme-switch-button:hover .switch-handle {
    transform: scale(1.05) translateX(26px);
}

/* Анимация при нажатии */
.theme-switch-button:active .switch-handle {
    transform: scale(0.95) translateX(0);
}

.dark-mode .theme-switch-button:active .switch-handle {
    transform: scale(0.95) translateX(26px);
}

/* Стили для активного состояния переключателя темы */
.theme-switch-button.active .switch-handle {
    background-color: #2b2b2b;
    transform: translateX(24px);
}

.dark-mode .theme-switch-button.active .switch-handle {
    background-color: #fff;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .theme-switcher {
        bottom: 15px;
        right: 15px;
    }
    
    .theme-switch-button {
        width: 50px;
        height: 28px;
    }
    
    .switch-handle {
        height: 22px;
        width: 22px;
    }
    
    .dark-mode .switch-handle {
        transform: translateX(22px);
    }
    
    .dark-mode .theme-switch-button:hover .switch-handle {
        transform: scale(1.05) translateX(22px);
    }
    
    .dark-mode .theme-switch-button:active .switch-handle {
        transform: scale(0.95) translateX(22px);
    }
}

/* ===================== */
/* 3. ЛОГОТИП */
/* ===================== */

.logo {
    max-width: 130px;
    margin-bottom: 25px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 16px;
    will-change: transform, box-shadow;
    transform-origin: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
    border: 2px solid #e2e8f0;
    background-color: #f8fafc;
    padding: 10px;
    height: auto;
}

.logo:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    background-color: #f0f5ff;
}

.logo:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-color: #94a3b8;
    transition: all 0.1s ease;
}

.dark-mode .logo {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    background-color: #1e293b;
    border-color: #334155;
}

.dark-mode .logo:hover {
    box-shadow: 0 6px 12px rgba(96, 165, 250, 0.25);
    border-color: #60a5fa;
    background-color: #2d3748;
}

.dark-mode .logo:active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-color: #475569;
    background-color: #1e293b;
}

/* Стиль для ссылки логотипа */
.logo-link {
    display: block;
    text-align: center;
    text-decoration: none;
}

/* ===================== */
/* 4. ПОИСКОВАЯ СТРОКА */
/* ===================== */

/* Стили для поля поиска */
.search-input {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: block;
  padding: 16px 20px;
  border-radius: 16px;
  border: 2px solid #e2e8f0;
  background-color: #f8fafc;
  font-size: 18px;
  color: #1e293b;
  outline: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  position: relative;
  will-change: transform, box-shadow;
  text-align: center;
  height: 60px; /* Фиксированная высота */
  box-sizing: border-box;
  transform-origin: center;
}

.search-input::placeholder {
  color: #94a3b8;
  transition: color 0.2s ease;
}

.dark-mode .search-input {
  background-color: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.dark-mode .search-input::placeholder {
  color: #64748b;
}

.search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15), 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.dark-mode .search-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25), 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* Анимации поля поиска */
.search-input.animate-appear {
  animation: inputGlow 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.dark-mode .search-input.animate-appear {
  animation: inputGlowDark 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes inputGlow {
  0% {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  }
  30% {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25), 0 0 0 2px rgba(59, 130, 246, 0.1);
  }
  100% {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  }
}

@keyframes inputGlowDark {
  0% {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  }
  30% {
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3), 0 0 0 2px rgba(96, 165, 250, 0.2);
  }
  100% {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  }
}

/* Анимация для typing-эффекта */
.search-input.typing {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15), 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark-mode .search-input.typing {
  border-color: #60a5fa;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.25), 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.search-input.typing::placeholder {
  color: transparent;
}

/* ===================== */
/* 5. КОНТЕЙНЕР РЕЗУЛЬТАТОВ И ИНДИКАТОР ЗАГРУЗКИ */
/* ===================== */

#results {
    margin-top: 30px;
}

.loading-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
}

.loading-indicator .spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #0071e3;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

.dark-mode .loading-indicator .spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #0071e3;
}

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

.loading-indicator p {
    margin-top: 12px;
    color: #86868b;
    font-size: 15px;
}

/* ===================== */
/* 6. ПРОФЕССИОНАЛЬНЫЙ БЛОК ОБЩЕГО КОЛИЧЕСТВА ЗАПЧАСТЕЙ */
/* ===================== */

/* Блок статистики запчастей */
.stats-card {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 500px;
  margin: 30px auto;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.dark-mode .stats-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-color: #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

.dark-mode .stats-card:hover {
  box-shadow: 0 8px 25px rgba(96, 165, 250, 0.2);
  border-color: #60a5fa;
}

.stats-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-radius: 12px;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.stats-card:hover .stats-icon {
  transform: scale(1.1);
}

.stats-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stats-count {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.dark-mode .stats-count {
  color: #f1f5f9;
}

.stats-label {
  font-size: 16px;
  color: #64748b;
  font-weight: 500;
}

.dark-mode .stats-label {
  color: #94a3b8;
}

.stats-details {
  display: flex;
  gap: 16px;
}

.detail-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.detail-count {
  font-size: 14px;
  font-weight: 600;
  color: #3b82f6;
  font-variant-numeric: tabular-nums;
}

.dark-mode .detail-count {
  color: #60a5fa;
}

.detail-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
}

.dark-mode .detail-label {
  color: #94a3b8;
}



/* Адаптивные стили для блока статистики */
@media (max-width: 768px) {
  .stats-card {
    margin: 20px auto;
    padding: 20px;
    max-width: 95%;
    gap: 16px;
  }
  
  .stats-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .stats-count {
    font-size: 24px;
  }
  
  .stats-label {
    font-size: 14px;
  }
  
  .stats-details {
    gap: 12px;
  }
}

@media (max-width: 576px) {
  .stats-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 16px;
  }
  
  .stats-content {
    gap: 6px;
  }
  
  .stats-count {
    font-size: 20px;
  }
  
  .stats-label {
    font-size: 13px;
  }
  
  .detail-count {
    font-size: 13px;
  }
  
  .detail-label {
    font-size: 11px;
  }
}

/* ===================== */
/* 7. КАРТОЧКА РЕЗУЛЬТАТА */
/* ===================== */

/* Внешний контейнер результата */
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
    padding: 24px;
    border-radius: 16px;
    background-color: #ffffff;
    border: 1px solid #d2d2d7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    cursor: pointer;
}

.result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #0071e3;
}

/* Темная тема для карточки результата */
.dark-mode .result-item {
    background-color: #2c2c2e;
    border-color: #3a3a3c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark-mode .result-item:hover {
    border-color: #0a84ff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Левая часть карточки */
.result-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.brand-logo img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: contain;
    background-color: #f5f5f7;
    padding: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.dark-mode .brand-logo img {
    background-color: #3a3a3c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.part-info {
    flex: 1;
}

.part-info h5 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
}

.dark-mode .part-info h5 {
    color: #f5f5f7;
}

.part-info p {
    margin: 8px 0;
    font-size: 15px;
    color: #86868b;
    line-height: 1.4;
}

.part-info strong {
    color: #1d1d1f;
    font-weight: 500;
}

.dark-mode .part-info strong {
    color: #f5f5f7;
}

/* Правая часть – блок с диаграммами */
.diagrams-container {
    width: 200px;
}

/* Сетка диаграмм (2x2) */
.diagrams-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Общие стили для ячеек диаграмм */
.diagram-item {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Делает элемент квадратным */
    overflow: hidden;
    border-radius: 12px;
    background-color: #f5f5f7;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.dark-mode .diagram-item {
    background-color: #3a3a3c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.diagram-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Ячейка с индикатором дополнительных схем */
.diagram-item.additional-diagrams {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0071e3;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    padding: 10px;
    box-sizing: border-box;
}

.dark-mode .diagram-item.additional-diagrams {
    background-color: #0a84ff;
}

/* Адаптив для узких экранов */
@media (max-width: 768px) {
    .result-item {
        flex-direction: column;
    }
    .diagrams-container {
        width: 100%;
        margin-top: 20px;
    }
    .diagrams-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================== */
/* 8. ВЕРХНЯЯ ЧАСТЬ КАРТОЧКИ (result-header, brand-logo, part-info) */
/* ===================== */

.result-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    flex: 1;
}

.brand-logo img {
    width: 50px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.part-info {
    flex: 1;
}

.part-info h5 {
    color: #0071e3;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.dark-mode .part-info h5 {
    color: #0a84ff;
}

.part-info p {
    margin: 8px 0;
    color: #86868b;
    font-size: 15px;
    position: relative;
    line-height: 1.4;
}

.part-info p strong {
    color: #1d1d1f;
    font-weight: 500;
}

.dark-mode .part-info p strong {
    color: #f5f5f7;
}

/* ===================== */
/* 9. БЛОК С ДИАГРАММАМИ (diagrams-container, diagrams-grid, diagram-item) */
/* ===================== */

.diagrams-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    position: relative;
}

@media (max-width: 768px) {
    .diagrams-container {
        margin-top: 20px;
        align-items: flex-start;
    }
}

.diagrams-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1 / 1;
    position: relative;
}

.diagram-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    background-color: #f5f5f7;
    transition: all 0.3s ease;
    overflow: hidden;
}

.diagram-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #0071e3;
}

.dark-mode .diagram-item {
    background-color: #3a3a3c;
    border-color: #4a4a4c;
}

.dark-mode .diagram-item:hover {
    border-color: #0a84ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.diagram-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.diagram-item.bottom-left {
    grid-column: 1;
    grid-row: 2;
}

.diagram-item.additional-diagrams {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f7;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    color: #86868b;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.diagram-item.additional-diagrams:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #0071e3;
}

.dark-mode .diagram-item.additional-diagrams {
    background-color: #3a3a3c;
    border-color: #4a4a4c;
    color: #86868b;
}

.dark-mode .diagram-item.additional-diagrams:hover {
    border-color: #0a84ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===================== */
/* 10. ФУТЕР */
/* ===================== */

.footer {
  margin-top: 30px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  background-color: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  will-change: transform, box-shadow;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-mode .footer-content {
  background-color: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.footer-content:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

.dark-mode .footer-content:hover {
  box-shadow: 0 6px 12px rgba(96, 165, 250, 0.2);
  border-color: #60a5fa;
}

.footer-legal {
  color: #64748b;
  font-size: 13px;
  line-height: 1.3;
  max-width: 600px;
  transition: color 0.3s ease;
}

.dark-mode .footer-legal {
  color: #94a3b8;
}

.footer-legal p {
  margin: 3px 0;
  font-size: 13px;
}

.footer-bottom {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.footer-bottom a {
  color: #3b82f6;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 10px;
  background-color: rgba(59, 130, 246, 0.05);
  font-size: 13px;
}

.dark-mode .footer-bottom a {
  color: #60a5fa;
  background-color: rgba(96, 165, 250, 0.05);
}

.footer-bottom a:hover {
  text-decoration: none;
  background-color: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(59, 130, 246, 0.1);
}

.dark-mode .footer-bottom a:hover {
  background-color: rgba(96, 165, 250, 0.1);
  box-shadow: 0 3px 6px rgba(96, 165, 250, 0.15);
}

.footer-bottom a:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.footer-warning {
  margin-top: 10px;
  padding: 8px 14px;
  background-color: rgba(59, 130, 246, 0.05);
  border-radius: 10px;
  font-size: 12px;
  color: #64748b;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
}

.dark-mode .footer-warning {
  background-color: rgba(96, 165, 250, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(96, 165, 250, 0.1);
}

.footer-warning:before {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 70%);
  top: -50px;
  right: -50px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dark-mode .footer-warning:before {
  background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, rgba(96, 165, 250, 0) 70%);
}

.footer-content:hover .footer-warning:before {
  opacity: 1;
}

@media (max-width: 768px) {
  .footer-content {
    padding: 14px 12px;
  }
  
  .footer-bottom {
    gap: 8px;
  }
  
  .footer-bottom a {
    padding: 4px 10px;
    font-size: 12px;
  }
  
  .footer-warning {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* ============================= */
/* СТИЛИ ДЛЯ КАРТОЧКИ ЗАПЧАСТИ  */
/* ============================= */

.part-card {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.part-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

.dark-mode .part-card {
    background-color: #1c1c1e;
    color: #f5f5f7;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.part-content {
    display: flex;
    gap: 30px;
}

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

.part-header h1 {
    color: #0071e3;
    margin-bottom: 16px;
    font-size: 28px;
    font-weight: 600;
}

.dark-mode .part-header h1 {
    color: #0a84ff;
}

.part-number,
.brand {
    color: #86868b;
    font-size: 17px;
}

.part-info .description {
    font-size: 17px;
    color: #1d1d1f;
    margin-top: 16px;
    line-height: 1.5;
}

.dark-mode .part-info .description {
    color: #f5f5f7;
}

.specs p {
    margin: 8px 0;
    color: #86868b;
}

.rating {
    margin-top: 16px;
}

.rating .stars {
    color: #ff9500;
    font-size: 18px;
}

.rating .reviews {
    color: #86868b;
    font-size: 15px;
}

.part-diagrams {
    position: relative;
    flex: 1;
    max-width: 50%;
}

@media (max-width: 768px) {
    .part-diagrams {
        position: relative;
        max-width: 100%;
    }
}

.diagrams-container {
    margin-top: 20px;
}

.main-diagram {
    position: relative;
    margin-bottom: 24px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
}

.main-diagram img {
    max-width: 100%;
    border-radius: 16px;
    z-index: 0;
}

.dark-mode .main-diagram img {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.main-diagram p {
    margin-top: 12px;
    font-size: 15px;
    color: #86868b;
}

.diagrams-preview {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-top: 24px;
    justify-content: center;
    width: 100%;
}

.preview-item {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.preview-item img {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
}

.preview-item:hover {
    border-color: #0071e3;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.preview-item.active {
    border-color: #0071e3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dark-mode .preview-item {
    background-color: #3a3a3c;
    border-color: #4a4a4c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.dark-mode .preview-item:hover,
.dark-mode .preview-item.active {
    border-color: #0a84ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-to-search {
    margin-top: 30px;
    text-align: left;
    padding: 24px;
    border-top: 1px solid #d2d2d7;
}

.dark-mode .back-to-search {
    border-top: 1px solid #3a3a3c;
}

.back-to-search .btn {
    background-color: #0071e3;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 17px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-to-search .btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.dark-mode .back-to-search .btn {
    background-color: #0a84ff;
}

.dark-mode .back-to-search .btn:hover {
    background-color: #0077e6;
}

.back-to-search i {
    font-size: 14px;
}

.dark-mode .back-to-search i {
    color: #ffffff;
}

/* ========================= */
/* СТИЛИ ДЛЯ ВОДЯНОГО ЗНАКА */
/* ========================= */

.watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.1;
}

.watermark-logo {
    width: 120px;
    height: 120px;
    position: absolute;
    transform: rotate(45deg);
}

.watermark-logo:nth-child(1) {
    top: 10%;
    left: 10%;
}

.watermark-logo:nth-child(2) {
    top: 10%;
    right: 10%;
}

.watermark-logo:nth-child(3) {
    bottom: 10%;
    left: 10%;
}

.watermark-logo:nth-child(4) {
    bottom: 10%;
    right: 10%;
}

.watermark-logo:nth-child(5) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* ============================ */
/* СТИЛИ ДЛЯ ДОП. ИНФОРМАЦИИ   */
/* ============================ */

.diagram-description-block {
    margin-top: 24px;
    padding: 20px;
    background-color: #f5f5f7;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    text-align: center;
    transition: all 0.3s ease;
}

.diagram-description-block p {
    margin: 0;
    font-size: 17px;
    color: #1d1d1f;
    line-height: 1.5;
}

.diagram-description-block p strong {
    color: #0071e3;
    font-weight: 500;
}

.dark-mode .diagram-description-block {
    background-color: #2c2c2e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark-mode .diagram-description-block p {
    color: #f5f5f7;
}

.dark-mode .diagram-description-block p strong {
    color: #0a84ff;
}

.diagram-info-block {
    margin-top: 24px;
    padding: 20px;
    background-color: #f5f5f7;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    text-align: left;
    transition: all 0.3s ease;
}

.dark-mode .diagram-info-block {
    background-color: #2c2c2e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.diagram-info-block p {
    margin: 0;
    font-size: 17px;
    color: #1d1d1f;
    line-height: 1.5;
}

.dark-mode .diagram-info-block p {
    color: #f5f5f7;
}

.diagram-info-block p strong {
    color: #0071e3;
    font-weight: 500;
}

.dark-mode .diagram-info-block p strong {
    color: #0a84ff;
}

.diagram-info-block .additional-info {
    margin-top: 16px;
    display: flex;
    gap: 24px;
}

.diagram-info-block .additional-info p {
    margin: 0;
    font-size: 15px;
    color: #86868b;
}

/* ================================ */
/* СООБЩЕНИЕ ДЛЯ НЕХВАТКИ СИМВОЛОВ */
/* ================================ */

.search-message {
    text-align: center;
    color: #86868b;
    font-size: 17px;
    margin-top: 24px;
}

/* =============================================== */
/* description-block, advantages-block, application-block */
/* =============================================== */

.description-block,
.advantages-block,
.application-block {
    margin-top: 24px;
    padding: 20px;
    background-color: #f5f5f7;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.dark-mode .description-block,
.dark-mode .advantages-block,
.dark-mode .application-block {
    background-color: #2c2c2e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.description-block h2,
.advantages-block h2,
.application-block h2 {
    color: #0071e3;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
}

.dark-mode .description-block h2,
.dark-mode .advantages-block h2,
.dark-mode .application-block h2 {
    color: #0a84ff;
}

.advantages-block ul {
    list-style-type: disc;
    padding-left: 24px;
}

.advantages-block ul li {
    margin-bottom: 12px;
    color: #1d1d1f;
    line-height: 1.5;
}

.dark-mode .advantages-block ul li {
    color: #f5f5f7;
}

/* ======================== */
/* СТИЛИ ЗАГОЛОВКА ЧАСТИ   */
/* ======================== */

.part-header {
    width: 100%;
    margin-bottom: 24px;
}

.part-title {
    width: 100%;
    font-size: 28px;
    color: #0071e3;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.part-title .fas {
    color: #ff9500;
    font-size: 20px;
}

.dark-mode .part-title {
    color: #0a84ff;
}

.part-header p {
    margin: 8px 0;
    font-size: 17px;
    color: #86868b;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .part-title {
        font-size: 24px;
        flex-direction: column;
        align-items: flex-start;
    }
    .part-header p {
        font-size: 15px;
    }
}

/* ======================== */
/* СТИЛИ ДЛЯ МОДЕЛЕЙ       */
/* ======================== */

.models-block {
    margin-top: 24px;
    padding: 20px;
    background-color: #f5f5f7;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.dark-mode .models-block {
    background-color: #2c2c2e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.models-block h2 {
    color: #0071e3;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .models-block h2 {
    color: #0a84ff;
}

.models-block h2 i {
    color: #ff9500;
}

.category-item {
    margin-bottom: 20px;
}

.category-item h3 {
    color: #1d1d1f;
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 500;
}

.dark-mode .category-item h3 {
    color: #f5f5f7;
}

.models-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.model-category {
    font-size: 13px;
    line-height: 1.4;
}

.category-name {
    font-weight: 500;
    color: #0071e3;
}

.dark-mode .category-name {
    color: #0a84ff;
}

.no-data {
    color: #86868b;
    font-style: italic;
    font-size: 13px;
}

.model-item {
    padding: 12px;
    background-color: #ffffff;
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    color: #1d1d1f;
    transition: all 0.3s ease;
    overflow: visible;
    margin: 5px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #d2d2d7;
}

.dark-mode .model-item {
    background-color: #3a3a3c;
    color: #f5f5f7;
    border-color: #4a4a4c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.model-item:hover {
    background-color: #f5f5f7;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #0071e3;
}

.dark-mode .model-item:hover {
    background-color: #4a4a4c;
    border-color: #0a84ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.models-container {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.models-container.expanded {
    max-height: none;
}

.toggle-models-btn {
    margin-top: 16px;
    padding: 12px 24px;
    background-color: #0071e3;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 17px;
    font-weight: 500;
}

.toggle-models-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.dark-mode .toggle-models-btn {
    background-color: #0a84ff;
}

.dark-mode .toggle-models-btn:hover {
    background-color: #0077e6;
}

/* ========================= */
/* СТИЛИ ДЛЯ УЗЛОВ/АГРЕГАТОВ */
/* ========================= */

.units-block {
    margin-top: 24px;
    padding: 20px;
    background-color: #f5f5f7;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.dark-mode .units-block {
    background-color: #2c2c2e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.units-block h2 {
    color: #0071e3;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .units-block h2 {
    color: #0a84ff;
}

.units-block h2 i {
    color: #ff9500;
}

.units-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    overflow: visible;
    padding: 10px;
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.units-container.expanded {
    max-height: none;
}

.unit-item {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    border: 1px solid #d2d2d7;
}

.dark-mode .unit-item {
    background-color: #3a3a3c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border-color: #4a4a4c;
}

.unit-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #0071e3;
}

.dark-mode .unit-item:hover {
    background-color: #4a4a4c;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: #0a84ff;
}

.unit-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.unit-name {
    padding: 12px;
    text-align: center;
    font-size: 15px;
    color: #1d1d1f;
}

.dark-mode .unit-name {
    color: #f5f5f7;
}

.toggle-units-btn {
    margin-top: 16px;
    padding: 12px 24px;
    background-color: #0071e3;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 17px;
    font-weight: 500;
}

.toggle-units-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.dark-mode .toggle-units-btn {
    background-color: #0a84ff;
}

.dark-mode .toggle-units-btn:hover {
    background-color: #0077e6;
}

/* ========================= */
/* СТИЛЬ ДЛЯ ВЫДЕЛЕНИЯ ПОИСКА */
/* ========================= */

.highlight {
    background-color: rgba(255, 204, 0, 0.3);
    color: inherit;
    font-weight: 500;
    padding: 2px 4px;
    border-radius: 4px;
}

.dark-mode .highlight {
    background-color: rgba(255, 204, 0, 0.2);
}

/* ========================= */
/* СТИЛИ ДЛЯ ЧЕКБОКСА ФИЛЬТРА */
/* ========================= */

.search-options {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    transition: all 0.3s ease;
    will-change: opacity, transform;
}

/* Стили для контейнера чекбокса */
.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 34px;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
  color: #4b5563;
  font-weight: 500;
  padding-top: 2px;
}

.dark-mode .checkbox-container {
  color: #d1d5db;
}

/* Скрыть стандартный чекбокс */
.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Создать кастомный чекбокс */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  will-change: transform;
}

.dark-mode .checkmark {
  background-color: #1f2937;
  border-color: #4b5563;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* При наведении добавляем серый фон */
.checkbox-container:hover input ~ .checkmark {
  background-color: #f3f4f6;
  transform: scale(1.05);
}

.dark-mode .checkbox-container:hover input ~ .checkmark {
  background-color: #374151;
  transform: scale(1.05);
}

/* Когда чекбокс отмечен, добавляем синий фон */
.checkbox-container input:checked ~ .checkmark {
  background-color: #3b82f6;
  border-color: #3b82f6;
  transform: scale(1.05);
}

.dark-mode .checkbox-container input:checked ~ .checkmark {
  background-color: #3b82f6;
  border-color: #60a5fa;
}

/* Создаем индикатор галочки */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Показываем индикатор, когда чекбокс отмечен */
.checkbox-container input:checked ~ .checkmark:after {
  display: block;
  opacity: 1;
  animation: checkmarkAppear 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes checkmarkAppear {
  0% {
    opacity: 0;
    transform: rotate(45deg) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}

/* Анимация для чекбокса при появлении формы поиска */
#search-form-container.showing .checkbox-container {
  animation: checkboxAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
  opacity: 0;
  transform: translateY(8px);
}

@keyframes checkboxAppear {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================= */
/* СТИЛЬ ДЛЯ КНОПКИ TELEGRAM */
/* ========================= */

.btn-telegram {
    background-color: #0088cc;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 17px;
    font-weight: 500;
}

.btn-telegram:hover {
    background-color: #0077b3;
    transform: translateY(-2px);
}

.btn-telegram i {
    font-size: 18px;
}

/* ========================= */
/* СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА */
/* ========================= */

#underDevelopmentModal .modal-content {
    border-radius: 20px;
    background: #ffffff;
    border: none;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-in-out;
}

.dark-mode #underDevelopmentModal .modal-content {
    background: #1c1c1e;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

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

/* Продолжение будет добавлено в следующей редакции */

/* =============================================== */
/* СТИЛИ ПЕРЕКЛЮЧАТЕЛЯ РЕЖИМОВ ПОИСКА */
/* =============================================== */

.search-mode-toggle-container {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
  margin-top: 10px;
  width: 100%;
}

.apple-segmented-control {
  display: flex;
  background-color: #f8fafc;
  border-radius: 16px;
  padding: 4px;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  width: auto;
  min-width: 300px;
  max-width: 600px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.dark-mode .apple-segmented-control {
  background-color: #1e293b;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  border-color: #334155;
}

.apple-segmented-control:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.dark-mode .apple-segmented-control:hover {
  background-color: #2d3748;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Активный индикатор (фон для активной кнопки) */
.apple-segmented-control::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 8px);
  background-color: #ffffff;
  border-radius: 12px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
  z-index: 0;
}

.dark-mode .apple-segmented-control::before {
  background-color: #2d3748;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Перемещение индикатора при активации второй кнопки */
.apple-segmented-control.catalog-active::before {
  left: auto;
  right: 4px;
  transform: translateX(0);
}

.segment-button {
  position: relative;
  z-index: 1;
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  justify-content: center;
  flex: 1 1 auto;
  -webkit-tap-highlight-color: transparent;
}

.segment-button:hover {
  color: #3b82f6;
}

.segment-button.active {
  color: #1e40af;
  font-weight: 600;
}

.dark-mode .segment-button {
  color: #94a3b8;
}

.dark-mode .segment-button:hover {
  color: #60a5fa;
}

.dark-mode .segment-button.active {
  color: #93c5fd;
}

.segment-button:focus {
  outline: none;
}

.segment-button:active {
  transform: scale(0.98);
}

.segment-icon {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0.8;
}

.segment-button:hover .segment-icon {
  transform: scale(1.1);
  opacity: 1;
}

.segment-button.active .segment-icon {
  transform: scale(1.2);
  opacity: 1;
  color: #3b82f6;
}

.dark-mode .segment-button.active .segment-icon {
  color: #60a5fa;
}

.segment-text {
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

/* Подчеркивание для активной кнопки */
.segment-text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #3b82f6;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
  opacity: 0;
}

.dark-mode .segment-text::after {
  background: #60a5fa;
}

.segment-button.active .segment-text::after {
  transform: scaleX(1);
  opacity: 0.7;
}

/* Анимация контейнеров при переключении */
#search-form-container, #brands-grid {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#search-form-container.hiding, #brands-grid.hiding {
  opacity: 0;
  transform: translateY(10px);
}

#search-form-container.showing, #brands-grid.showing {
  animation: containerAppear 0.5s cubic-bezier(0.26, 0.86, 0.44, 0.985) forwards;
}

/* Специальные анимации для формы поиска */
#search-form-container.showing .search-input {
  animation: searchInputAppear 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
  transform: scale(0.95);
  opacity: 0;
}

#search-form-container.showing .search-options {
  animation: fadeSlideUp 0.6s ease 0.3s forwards;
  opacity: 0;
  transform: translateY(10px);
}

@keyframes searchInputAppear {
  0% {
    transform: scale(0.95);
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(66, 133, 244, 0);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(66, 133, 244, 0);
  }
}

@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes containerAppear {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 576px) {
  .apple-segmented-control {
    width: 95%;
    min-width: 280px;
    max-width: 95%;
  }
  
  .segment-button {
    padding: 8px 12px;
    min-width: 120px;
    font-size: 14px;
  }
  
  .segment-text {
    font-size: 13px;
    white-space: nowrap;
  }
  
  .segment-icon {
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .apple-segmented-control {
    min-width: 250px;
  }
  
  .segment-button {
    padding: 8px 10px;
    min-width: 105px;
  }
  
  .segment-text {
    font-size: 12px;
  }
}

/* Стили для сетки брендов */
.brands-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 15px;
  gap: 15px;
  max-width: 1200px;
  margin: 0 auto;
  transition: all 0.3s ease-in-out;
}

/* Стили для скроллбара в .brands-grid */
.brands-grid::-webkit-scrollbar {
  height: 6px;
}

.brands-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.brands-grid::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.brands-grid::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.dark-mode .brands-grid::-webkit-scrollbar-track {
  background: #2c2c2e;
}

.dark-mode .brands-grid::-webkit-scrollbar-thumb {
  background: #444;
}

.dark-mode .brands-grid::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.brand-item {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 20px;
  width: 160px;
  max-width: 160px;
  height: 60px;
  text-align: center;
  color: #1e293b;
  background-color: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  margin: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: brandItemAppear 0.5s ease-out forwards;
  animation-delay: calc(var(--brand-index, 0) * 0.05s);
  touch-action: manipulation;
  user-select: none;
  position: relative;
  overflow: hidden;
  transform-origin: center;
  will-change: transform, box-shadow, background-color, border-color;
  text-decoration: none; /* Убираем подчеркивание ссылок */
}

.brand-item:hover {
  background-color: #f0f5ff;
  border-color: #3b82f6;
  color: #1e40af;
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.brand-item:active {
  transform: scale(0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border-color: #94a3b8;
  transition: all 0.1s ease;
}

[data-theme='dark'] .brand-item:active {
  border-color: #334155;
  background-color: #1e293b;
}

.brand-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  transition: all 0.3s ease;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
  transform: scale(0.6);
}

.brand-item:hover::before {
  opacity: 0.6;
  transform: scale(2);
}

/* Dark Mode Styles */
.dark .brand-item {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dark .brand-item:hover {
  background-color: #2d3748;
  border-color: #60a5fa;
  color: #bfdbfe;
  box-shadow: 0 6px 12px rgba(96, 165, 250, 0.2);
}

.dark .brand-item:active {
  background-color: #1e293b;
  box-shadow: 0 3px 4px rgba(96, 165, 250, 0.15);
}

/* Убираем подчеркивание у ссылок брендов */
#brands-grid a,
#brands-grid a:hover,
#brands-grid a:active,
#brands-grid a:visited {
  text-decoration: none;
}

.brands-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 15px;
  gap: 15px;
  max-width: 1200px;
  margin: 0 auto;
  transition: all 0.3s ease-in-out;
}

.brand-item span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal; /* Позволяет тексту переноситься */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Ограничиваем количество строк до 2 */
  -webkit-box-orient: vertical;
  transition: all 0.3s ease;
  text-decoration: none;
}

.brand-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0; /* Изменено с 3px на 0, чтобы убрать подчеркивание */
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
}

.brand-item:hover {
  background-color: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15), 0 0 0 3px rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #1e40af;
}

.brand-item:hover::before {
  transform: scaleX(0); /* Изменено с scaleX(1) на scaleX(0), чтобы убрать появление линии при наведении */
  opacity: 0;
}

.brand-item:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.dark-mode .brand-item {
  background-color: #1e293b;
  color: #f1f5f9;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  border-color: #334155;
}

.dark-mode .brand-item:hover {
  background-color: #2d3748;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.25), 0 0 0 3px rgba(96, 165, 250, 0.2);
  border-color: #60a5fa;
  color: #93c5fd;
}

/* Скрытие/отображение элементов */
#brands-grid {
  display: none;
}

#search-form-container {
  display: block;
}

/* Стиль для корректного отображения сетки брендов при появлении */
#brands-grid[style*="display: flex"],
#brands-grid[style*="display:flex"] {
  display: flex !important;
  flex-wrap: wrap !important;
}

/* Анимация появления сетки брендов */
.brands-grid.showing {
  animation: gridAppear 0.5s ease-out;
}

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

/* Анимация для отдельных элементов бренда */
@keyframes brandItemAppear {
  0% {
    opacity: 0;
    transform: translateY(10px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  50% {
    opacity: 0.9;
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.15);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  }
}

@keyframes brandItemPopIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  }
}

@keyframes brandItemSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-10px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  60% {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  }
}

/* Медиа-запросы для адаптивности сетки брендов */
@media (max-width: 1200px) {
  .brands-grid {
    gap: 12px;
    padding: 10px;
  }
  
  .brand-item {
    width: 150px;
    max-width: 150px;
    height: 55px;
    padding: 12px 16px;
    font-size: 15px;
  }
}

@media (max-width: 992px) {
  .brands-grid {
    gap: 10px;
  }
  
  .brand-item {
    width: 140px;
    max-width: 140px;
    height: 50px;
    padding: 10px 14px;
    font-size: 14px;
    margin: 5px;
  }
}

@media (max-width: 768px) {
  .brands-grid {
    gap: 8px;
    padding: 8px;
  }
  
  .brand-item {
    width: 130px;
    max-width: 130px;
    height: 45px;
    padding: 8px 12px;
    font-size: 13px;
    margin: 4px;
    border-width: 1.5px;
  }
}

@media (max-width: 576px) {
  .brands-grid {
    gap: 6px;
    padding: 5px;
  }
  
  .brand-item {
    width: 110px;
    max-width: 110px;
    height: 40px;
    padding: 6px 10px;
    font-size: 12px;
    margin: 3px;
    border-width: 1px;
    border-radius: 12px;
  }
}

@media (max-width: 400px) {
  .brand-item {
    width: 100px;
    max-width: 100px;
    height: 36px;
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* ================================ */
/* СТИЛИ КНОПОК ВОЙТИ/ПОЛЬЗОВАТЕЛЯ */
/* ================================ */

.login-button, .user-menu-button {
  display: flex;
  align-items: center;
  background-color: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 18px 10px 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  color: #1e293b;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  will-change: transform, box-shadow;
}

.dark-mode .login-button, .dark-mode .user-menu-button {
  background-color: #1e293b;
  color: #f1f5f9;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  border-color: #334155;
}

.login-button:hover, .user-menu-button:hover {
  background-color: #f0f5ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #1e40af;
}

.dark-mode .login-button:hover, .dark-mode .user-menu-button:hover {
  background-color: #2d3748;
  box-shadow: 0 6px 12px rgba(96, 165, 250, 0.25);
  border-color: #60a5fa;
  color: #93c5fd;
}

.login-button:active, .user-menu-button:active {
  transform: scale(0.95);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border-color: #94a3b8;
  transition: all 0.1s ease;
  background-color: #e2e8f0;
}

.dark-mode .login-button:active, .dark-mode .user-menu-button:active {
  transform: scale(0.95);
  background-color: #1a202c;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  border-color: #4a5568;
  transition: all 0.1s ease;
}

.login-button i, .user-menu-button i {
  font-size: 16px;
  margin-right: 10px;
  color: #4b5563;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark-mode .login-button i, .dark-mode .user-menu-button i {
  color: #94a3b8;
}

.login-button:hover i, .user-menu-button:hover i {
  transform: scale(1.1);
  color: #3b82f6;
}

.dark-mode .login-button:hover i, .dark-mode .user-menu-button:hover i {
  color: #60a5fa;
}

/* При открытом меню меняем стиль кнопки */
.login-button.active, .user-menu-button.active {
  background-color: #f0f5ff;
  border-color: #3b82f6;
  color: #1e40af;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.15);
}

.dark-mode .login-button.active, .dark-mode .user-menu-button.active {
  background-color: #2d3748;
  border-color: #60a5fa;
  color: #93c5fd;
  box-shadow: 0 2px 4px rgba(96, 165, 250, 0.25);
}

/* Специфичные стили для кнопки пользователя */
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 10px;
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #f8fafc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark-mode .user-avatar {
  background-color: #334155;
  border-color: #1e293b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar i {
  font-size: 16px;
  color: #64748b;
}

.dark-mode .user-avatar i {
  color: #94a3b8;
}

.user-name {
  font-size: 14px;
  white-space: nowrap;
  font-weight: 500;
}

.user-menu-button:hover .user-avatar {
  transform: scale(1.1);
  border-color: #3b82f6;
  box-shadow: 0 3px 6px rgba(59, 130, 246, 0.2);
}

.dark-mode .user-menu-button:hover .user-avatar {
  border-color: #60a5fa;
  box-shadow: 0 3px 6px rgba(96, 165, 250, 0.3);
}

/* ================================ */
/* СТИЛИ ВЫПАДАЮЩЕГО МЕНЮ */
/* ================================ */

.account-container {
  position: relative;
}

.user-menu {
  position: relative;
  display: inline-block;
}

/* Выпадающее меню */
#loginDropdown, #userDropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0; /* Меню выравнивается по правой стороне кнопки */
  width: 280px;
  background-color: #f8fafc;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  overflow: hidden;
  display: none;
  border: 2px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  will-change: transform, opacity;
}

/* Стрелка-указатель */
#loginDropdown::before, #userDropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 15px; /* Перемещаем указатель вправо */
  width: 16px;
  height: 16px;
  background-color: #f8fafc;
  transform: rotate(45deg);
  border-top: 2px solid #e2e8f0;
  border-left: 2px solid #e2e8f0;
  z-index: -1;
}

/* Прозрачная область для улучшения UX */
#loginDropdown::after, #userDropdown::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background-color: transparent;
}

/* Анимация активации меню */
#loginDropdown.show, #userDropdown.show {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Настройка для мобильных устройств */
@media (max-width: 768px) {
  #loginDropdown, #userDropdown {
    width: 100%;
    max-width: 300px;
    right: -10px; /* Для лучшего отображения на мобильных */
  }
  
  #loginDropdown::before, #userDropdown::before {
    right: 18px;
  }
}

/* Темная тема для меню */
.dark-mode #loginDropdown::before, .dark-mode #userDropdown::before {
  background-color: #1e293b;
  border-color: #334155;
}

.dark-mode #loginDropdown, .dark-mode #userDropdown {
  background-color: #1e293b;
  border: 2px solid #334155;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* ================================ */
/* СТИЛИ ЭЛЕМЕНТОВ МЕНЮ */
/* ================================ */

/* Блок с элементами меню */
.dropdown-body {
  padding: 8px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #1e293b;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 12px;
  margin-bottom: 4px;
  font-weight: 500;
  gap: 10px;
}

.dark-mode .dropdown-item {
  color: #f1f5f9;
}

.dropdown-item:hover {
  background-color: #f0f5ff;
  color: #1e40af;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(59, 130, 246, 0.1);
}

.dark-mode .dropdown-item:hover {
  background-color: #2d3748;
  color: #93c5fd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.dropdown-item:active {
  transform: scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.1s ease;
}

.dropdown-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: #4b5563;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark-mode .dropdown-item i {
  color: #94a3b8;
}

.dropdown-item:hover i {
  color: #3b82f6;
  transform: scale(1.1);
}

.dark-mode .dropdown-item:hover i {
  color: #60a5fa;
}

.dropdown-footer {
  padding: 8px;
  border-top: 1px solid #e2e8f0;
}

.dark-mode .dropdown-footer {
  border-top: 1px solid #334155;
}

.dropdown-item-register {
  background-color: #f0f5ff;
  color: #1e40af;
  font-weight: 500;
}

.dark-mode .dropdown-item-register {
  background-color: #2d3748;
  color: #93c5fd;
}

.dropdown-item-register:hover {
  background-color: #e6efff;
  color: #1e3a8a;
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.15);
}

.dark-mode .dropdown-item-register:hover {
  background-color: #364155;
  color: #bfdbfe;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.dropdown-item-danger {
  color: #ef4444;
}

.dropdown-item-danger i {
  color: #ef4444;
}

.dropdown-item-danger:hover {
  background-color: #fee2e2;
  color: #b91c1c;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.1);
}

.dark-mode .dropdown-item-danger:hover {
  background-color: #3d1f1f;
  color: #f87171;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.dropdown-menu {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dropdown-body {
  padding: 10px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #1e293b;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 12px;
  margin-bottom: 6px;
  font-weight: 500;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.dropdown-item:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dark-mode .dropdown-item:before {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(96, 165, 250, 0.05));
}

.dropdown-item:hover:before {
  opacity: 1;
}

.dropdown-item span {
  position: relative;
  z-index: 1;
}

.dropdown-item i {
  font-size: 16px;
  width: 22px;
  text-align: center;
  color: #4b5563;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}

.dropdown-footer {
  padding: 10px;
  border-top: 1px solid #e2e8f0;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.dropdown-item-register {
  background-color: #f0f5ff;
  color: #1e40af;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.dropdown-item-register:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
  opacity: 1;
  transition: opacity 0.3s ease;
}

.dark-mode .dropdown-menu {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dark-mode .dropdown-footer {
  padding: 10px;
  border-top: 1px solid #334155;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.dark-mode .dropdown-item-register {
  background-color: #2d3748;
  color: #93c5fd;
}

.dark-mode .dropdown-item-register:before {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.15), rgba(96, 165, 250, 0.05));
}

/* ================================ */
/* СТИЛИ ШАПКИ МЕНЮ ПОЛЬЗОВАТЕЛЯ */
/* ================================ */

.dropdown-header {
  padding: 0;
  border-bottom: 1px solid #e2e8f0;
  overflow: hidden;
}

.dark-mode .dropdown-header {
  border-bottom: 1px solid #334155;
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, #f0f5ff, #e6efff);
  position: relative;
  overflow: hidden;
}

.dark-mode .dropdown-user-info {
  background: linear-gradient(135deg, #2d3748, #1e293b);
}

.dropdown-user-info:before {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 70%);
  top: -75px;
  right: -75px;
}

.dark-mode .dropdown-user-info:before {
  background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, rgba(96, 165, 250, 0) 70%);
}

.dropdown-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 12px;
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #f8fafc;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.dark-mode .dropdown-avatar {
  background-color: #334155;
  border-color: #1e293b;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.dropdown-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-avatar i {
  font-size: 22px;
  color: #64748b;
}

.dark-mode .dropdown-avatar i {
  color: #94a3b8;
}

.dropdown-user-details {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.dropdown-user-name {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dark-mode .dropdown-user-name {
  color: #f1f5f9;
}

.dropdown-user-email {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dark-mode .dropdown-user-email {
  color: #94a3b8;
}

/* Медиа-запрос для поля поиска */
@media (max-width: 768px) {
  .search-input {
    height: 54px;
    padding: 14px 16px;
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .search-input {
    height: 50px;
    font-size: 15px;
  }
}

.search-input:active {
  transform: scale(0.99);
  transition: all 0.1s ease;
}

.dark-mode .search-input:active {
  background-color: #18212f;
}

