@import url("root.css");

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(-45deg, rgb(160, 5, 5), var(--black) 45%, var(--white) 150%);
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  color: var(--white);
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
}

.back-btn {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 9999;
  padding: 5px 14px;
  color: var(--white);
  text-decoration: none;
  border: none;
  transition: 0.2s;
}

.back-btn:hover {
  transform: translateY(-2px);
}

.title {
  text-align: center;
  margin-top: 20px;
  font-size: 32px;
}

/* главная сетка */

.page-layout {
  display: grid;
  grid-template-columns: 340px minmax(500px, 900px) 340px;
  justify-content: center;
  gap: 55px;
  align-items: flex-start;
  margin-top: 30px;
}

/* левая и правая панель */

.filters-left,
.filters-right {
  width: 340px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.45);
  border-radius: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.575);
}

/* аккордеон */

.filter-group {
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}

.filter-header {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  color: white;
  user-select: none;
  transition: 0.2s;
}

/* стилизация списка fans */
#fans {
  width: 100%;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  outline: none;
  transition: .15s ease;
}

/* Hover */
#fans:hover {
  background: #242424;
  border-color: #555;
}

/* Опции */
#fans option {
  background: #1f1f1f;
  color: #fff;
  padding: 10px;
}



/* фильтры процессоров */
.cpu-select {
  position: relative;
  width: 100%;
  z-index: 9999;
}

.cpu-selected {
  background: #1f1f1f;
  padding: 12px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.cpu-dropdown {
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height .25s ease, opacity .25s ease;
  margin-top: 10px;
}

.cpu-dropdown.open {
  max-height: 420px;
  opacity: 1;
  pointer-events: auto;
}

#cpuSearch {
  width: 100%;
  padding: 8px 10px;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  color: #fff;
  margin-bottom: 10px;
}

.cpu-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.cpu-filters button {
  padding: 6px 10px;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  color: #ddd;
  cursor: pointer;
  font-size: 13px;
  transition: .15s;
}

.cpu-filters button:hover {
  background: #333;
}

.cpu-filters button.active {
  background: #ff6600;
  border-color: #ff6600;
  color: #fff;
}

.cpu-list {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 10px;
}

/* красивый скролл */
.cpu-list::-webkit-scrollbar {
  width: 8px;
}

.cpu-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.cpu-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff3c00, #b30000);
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(255, 60, 0, 0.6);
}

.cpu-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff5500, #cc0000);
}

.cpu-item {
  padding: 8px;
  background: #1f1f1f;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: .15s;
}

.cpu-item:hover {
  background: #333;
}

/* Фильтры для видюх */
.gpu-select {
  position: relative;
  width: 100%;
  z-index: 9999;
}

.gpu-selected {
  background: #1f1f1f;
  padding: 12px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.gpu-dropdown {
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height .25s ease, opacity .25s ease;
}

.gpu-dropdown.open {
  max-height: 420px;
  opacity: 1;
  pointer-events: auto;
  margin-top: 10px;
}

#gpuSearch {
  width: 100%;
  padding: 8px 10px;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  color: #fff;
  margin-bottom: 10px;
}

.gpu-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.gpu-filters button {
  padding: 6px 10px;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  color: #ddd;
  cursor: pointer;
  font-size: 13px;
  transition: .15s;
}

.gpu-filters button:hover {
  background: #333;
}

.gpu-filters button.active {
  background: #ff6600;
  border-color: #ff6600;
  color: #fff;
}

.gpu-list {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 10px;
}

/* красивый скролл */
.gpu-list::-webkit-scrollbar {
  width: 8px;
}

.gpu-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.gpu-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff3c00, #b30000);
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(255, 60, 0, 0.6);
}

.gpu-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff5500, #cc0000);
}

.gpu-item {
  padding: 8px;
  background: #1f1f1f;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: .15s;
}

.gpu-item:hover {
  background: #333;
}

/* горизонтальный скролл для фильтров видюх*/

.gpu-filters-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

/* скрываем стандартный скролл */
.gpu-filters-scroll::-webkit-scrollbar {
  height: 6px;
}

.gpu-filters-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.gpu-filters-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #ff3c00, #b30000);
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(255, 60, 0, 0.6);
}

.gpu-filters-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #ff5500, #cc0000);
}

.gpu-filters {
  display: inline-flex;
  gap: 6px;
}

.gpu-filters button {
  padding: 6px 12px;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  color: #ddd;
  cursor: pointer;
  font-size: 13px;
  transition: .15s;
  white-space: nowrap;
}

.gpu-filters button.active {
  background: #ff6600;
  border-color: #ff6600;
  color: #fff;
}

/* Фильтры материнок */
.mb-select {
  position: relative;
  width: 100%;
  z-index: 9999; /* поверх всех блоков */
}

/* Кнопка */
.mb-selected {
  background: #1f1f1f;
  padding: 12px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

/* Выпадающий список */
.mb-dropdown {
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height .25s ease, opacity .25s ease;
}

/* Открытый */
.mb-dropdown.open {
  max-height: 620px;
  opacity: 1;
  pointer-events: auto;
  margin-top: 10px;
}

/* Поиск */
#mbSearch {
  width: 100%;
  padding: 8px 10px;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  color: #fff;
  margin-bottom: 10px;
}

/* Фильтры */
.mb-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.mb-filters button {
  padding: 6px 10px;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  color: #ddd;
  cursor: pointer;
  font-size: 13px;
  transition: .15s;
}

.mb-filters button:hover {
  background: #333;
}

.mb-filters button.active {
  background: #ff6600; /* DNS оранжевый */
  border-color: #ff6600;
  color: #fff;
}

/* Список */
.mb-list {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 10px;
}

.mb-item {
  padding: 8px;
  background: #1f1f1f;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: .15s;
}

.mb-item:hover {
  background: #333;
}

/* Стилизация скролла для фильтра материнок */
.mb-list::-webkit-scrollbar {
  width: 8px;
}

.mb-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.mb-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff3c00, #b30000);
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(255, 60, 0, 0.6);
  transition: background 0.2s ease;
}

.mb-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff5500, #cc0000);
}

.filter-header:hover {
  background: rgba(255,255,255,0.08);
}

.arrow {
  transition: transform 0.25s;
}

.filter-group.open .arrow {
  transform: rotate(180deg);
}

.filter-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 12px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.filter-body extra-list scrollable {
  margin-top: 10px;
}

.filter-group:not(.open) .filter-body {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.filter-group.open .filter-body {
  max-height: max-content;
  overflow: visible;
  padding: 10px 12px 12px;
}

.filter-body input,
.filter-body select {
  width: 100%;
  padding: 7px 8px;
  border-radius: 6px;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 14px;
  margin-top: 4px;
}

/* скролл */

.scrollable {
  max-height: 180px;
  overflow-y: auto;
  padding-right: 6px;
}

.scrollable::-webkit-scrollbar {
  width: 6px;
}

.scrollable::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
}

/* кнопки */
.filter-btn {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 15px;
}

.filter-btn.secondary {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
}

.filter-btn.secondary:hover {
  background: rgba(255,255,255,0.18);
}
.center-buttons {
  justify-content: center; /* центрируем содержимое */
}

#clearBtn {
  flex: 0 0 auto;
  width: 60%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--darkred);
  background: #ff000013;
}

/* центральный блок */

.result-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background: rgba(0,0,0,0.45);
  border-radius: 10px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,0.15);
}

.result {
  width: 90%;
  min-height: 350px;
  background: rgba(255,255,255,0.06);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.center-buttons {
  margin-top: 20px;
  width: 100%;
  display: flex;
  gap: 10px;
}

.center-buttons button {
  flex: 1;
}

#resultValue {
  font-size: 28px;
  margin-top: 10px;
  font-weight: bold;
}

.hint {
  margin-top: 8px;
  font-size: 14px;
  color: #ccc;
}

/* селект темный */

select {
  background: rgba(0, 0, 0, 0.35);
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 8px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

select option {
  background: #262626;
  color: white;
}

select option:hover {
  background: rgb(180, 0, 0);
  color: white;
}

select option:checked {
  background: rgb(120, 0, 0);
  color: white;
}

/* без стрелок */

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

/* красные чекбоксы */

.extra-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  cursor: pointer;
  user-select: none;
}

.extra-list input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgb(255, 40, 40);
  border-radius: 4px;
  background: rgba(0,0,0,0.4);
  cursor: pointer;
  position: relative;
  transition: 0.15s;
}

.extra-list input[type="checkbox"]:hover {
  border-color: rgb(255, 80, 80);
}

.extra-list input[type="checkbox"]:checked {
  background: rgb(255, 40, 40);
  border-color: rgb(255, 40, 40);
}

.extra-list input[type="checkbox"]:checked::after {
  content: "✔";
  position: absolute;
  top: -3px;
  left: 2px;
  font-size: 16px;
  color: white;
}
.filters-left {
  transform: translateX(-120%);
  opacity: 0;
}

.filters-right {
  transform: translateX(120%);
  opacity: 0;
}

.result-panel {
  transform: translateY(-80px);
  opacity: 0;
  border-color: white;
}
.filters-left,
.filters-right,
.result-panel {
  transition: transform 1.5s ease, opacity 1.5s ease;
}
.page-layout.loaded .filters-left {
  transform: translateX(0);
  opacity: 1;
}

.page-layout.loaded .filters-right {
  transform: translateX(0);
  opacity: 1;
}

.page-layout.loaded .result-panel {
  transform: translateY(0);
  opacity: 1;
}
.page-layout.loaded .filters-left {
  transition-delay: 0.2s;
}

.page-layout.loaded .result-panel {
  transition-delay: 0.4s;
}

.page-layout.loaded .filters-right {
  transition-delay: 0.2s;
}

/* адаптив */

@media (max-width: 1100px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .filters-left,
  .filters-right {
    width: 100%;
  }

  .result {
    width: 100%;
  }

  .center-buttons {
    width: 100%;
  }
}

::selection {
    background: #47474793;
    color: white;      
}
