@keyframes gradientMove {
  0% {
    background-position: 0% 1%;
  }
  100% {
    background-position: 100% 99%;
  }
}

.ps{
    width: 100%;
}

.select2-selection__placeholder {
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23343a40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='4' y='4' width='16' height='16' rx='2' ry='2'/%3e%3cpath d='M9 9h6v6H9zm0-8v3m6-3v3M9 20v3m6-3v3m5-14h3m-3 5h3M1 9h3m-3 5h3'/%3e%3c/svg%3e") no-repeat left 0.35rem center / 22px;
    padding: 0 36px 2px;
}

.select2-container--default .select2-selection--single {
    height: 40px;
    display: flex;
    align-items: center;
}

.select2-container .select2-dropdown {
    width: 100%;
    top: -37px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none;
}

.select2-container--default .select2-selection--single::after {
    content: "";
    position: absolute;
    right: 8px;
    display: block;
    padding: .375rem 2.25rem .375rem .75rem;
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background: var(--bs-form-select-bg-img) no-repeat right .75rem center / 20px 20px, var(--bs-form-select-bg-icon, none);
}

.select2-search input{
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23343a40' viewBox='0 0 16 16'%3e%3cpath fill-rule='evenodd' d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001a1.007 1.007 0 0 0 .11.112l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.112-.11zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3e%3c/svg%3e") no-repeat right 0.35rem center / 22px;
}

thead {
  position: sticky;
  box-shadow: 0 2px 2px -1px rgba(0,0,0,0.4);
}

.select2-img {
    width: 30px;
    height: 30px;
    margin-right: 8px;
    vertical-align: middle;
}

.select2-results__option {
    padding: 8px 12px;
}

.select2-container--default .select2-results__option--highlighted {
    color: #212529;
}

.select2-container--default .select2-results__option--selected {
    color: #212529;
}

.benchmark-card {
    transition: transform 0.2s;
}
.benchmark-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.progress {
    position: relative;
}
.progress-bar {
    position: relative;
    transition: width 0.6s ease;
}
.progress-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    line-height: 30px;
}
.cpu-name {
    font-weight: 500;
}
.score-value {
    color: #0d6efd;
}
.difference-info {
    font-weight: bold;
}

#navbarSearch {
    position: relative;
    min-width: 250px;
}

#searchResultsDropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    /*border: 1px solid rgba(0,0,0,.15);*/
    border-color: var(--bs-border-color);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
    display: none;
    width: max-content;
    min-width: 100% !important;
}

#navbarSearchInput {
    padding-right: 40px;
}

#navbarSearchButton {
    background: transparent;
    border: none;
    z-index: 5;
}

[id$="Search"] .btn {
    color: inherit;
}

.sticky-top {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1020;
  background: #343a40;
}

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

  .sticky-top {
  position: sticky;
  top: 0;
  z-index: 1020;
  background-color: #343a40 !important;
}
    #footerSearch {
    position: relative;
    min-width: 250px;
}

#footerSearchResultsDropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
    /*background: white;*/
    top: -410px;
}

#footerSearchInput {
    padding-right: 40px;
}

#footerSearchButton {
    background: transparent;
    border: none;
    z-index: 5;
}

.vs-circle {
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 30px;
    margin: 0 auto 1.5rem;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #0a58ca, #50ff00);
    background-size: 200% 200%;
    animation: gradientMove 15s ease-in-out infinite alternate;
    border: 1px solid rgba(33, 37, 41, 0.6);
    text-shadow:
        -1px -1px 0 #343a40,
         1px -1px 0 #343a40,
        -1px  1px 0 #343a40,
         1px  1px 0 #343a40;
}

/* Светлая тема по умолчанию */
:root {
  --bg-color: #ffffff;
  --text-color: #333333;
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --text-color: #f8f9fa;
  }
}

.select2-dropdown {
    background-color: var(--bs-body-bg);
}

.dropdown-item + .select2-container .select2-selection {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

.benchmark-description {
  font-size: 0.85rem;
  color: var(--benchmark-text-color);
  border-left: 3px solid var(--benchmark-border-color);
  padding-left: 0.625rem;
  margin-bottom: 0.9375rem;
}

.select2-theme + .select2-container .select2-selection {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

.select2-theme + .select2-container .select2-dropdown {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

.select2-theme + .select2-container .select2-results__option {
  color: var(--bs-body-color);
}

.select2-theme + .select2-container .select2-results__option--highlighted {
  background-color: var(--bs-primary);
  color: white;
}

.select2-container--default .select2-selection--single .select2-selection__rendered span {
  color: var(--bs-body-color);
}

.select2-results__option.select2-results__option--highlighted[aria-selected] {
  color: var(--bs-dropdown-link-hover-color);
  background-color: var(--bs-dropdown-link-hover-bg);
  background-color: rgb(43, 48, 53);
}

.root__copyright a {
    color: red;
}

/* По умолчанию плавный переход */
.theme-toggle {
  transition: filter 0.3s ease, background-color 0.3s ease;
}

/* Инвертируем фон при наведении (весь элемент) */
.theme-toggle:hover {
  filter: invert(1);
}

/* Исключаем мобильную кнопку из инвертирования */
.d-lg-none.theme-toggle:hover {
  filter: none;
}

:root {
    --bg-color: #f5f5f5;
    --container-bg: white;
    --text-color: #212529;
    --table-text: #212529;
    --border-color: #e9ecef;
    --header-border: #dee2e6;
    --processor-color: #0066cc;
    --col-border: #dee2e6;
    --gradient-start: rgba(96, 255, 96, 0.3);
    --grad-s2: rgb(248, 249, 250);
}

[data-theme="dark"] {
    --bg-color: #212529;
    --container-bg: #2c3034;
    --text-color: #e9ecef;
    --table-text: #e9ecef;
    --border-color: #495057;
    --header-border: #6c757d;
    --processor-color: #4dabf7;
    --col-border: #6c757d;
    --gradient-start: rgba(100, 200, 100, 0.3);
    --grad-s2: rgb(43, 48, 53);
}

body {
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
}

.ch1 {
    background-color: var(--container-bg);
    border-radius: 10px;
    padding: 20px;
    margin: 0 auto;
    transition: background-color 0.3s;
}

.table-responsive {
    margin: 1rem;
}

.table {
    color: var(--table-text);
    width: 100%;
    border-collapse: collapse;
    transition: color 0.3s;
}

.table thead th {
    font-weight: 600;
    padding: 12px 15px;
    color: var(--table-text);
    width: 33%;
}

.table thead td::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.table td, .table th {
    padding: 12px 15px;
    background-color: transparent !important;
    color: var(--table-text);
    font-weight: inherit;
}

.table thead span {
    padding-left: 10px;
}

.table .table-success {
    border-bottom: none;
    position: relative;
}

.processor-name {
    font-weight: bold;
    color: var(--processor-color);
    transition: color 0.3s;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
    transition: color 0.3s;
}

.theme-toggle-btn {
    background-color: var(--container-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
}

/* Стили для столбцов */
.first-col {
    text-align: left;
    font-weight: normal;
}

.second-col {
    text-align: right;
    border-right: 1px solid var(--col-border);
}

.table thead th:nth-child(2) {
    text-align: right;
    border-right: 1px solid var(--border-color);
}

td[colspan="2"].text-center {
    border-right: none !important;
}

.benchmarks-table th {
    padding: 0.75rem 1rem;
}
.benchmarks-table .group-header th {
    font-size: 1.05em;
    padding-top: 1.2rem;
    padding-bottom: 0.5rem;
    background-color: #f8f9fa;
}
.benchmark-label {
    font-weight: 500;
    padding-left: 2.5rem !important;
    background-image: url('img/other_b.svg');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: auto 1.8rem;

}
th.gb, th.gb-ai {
    background-image: url('img/gb.svg');
}
th.tdm {
    background-image: url('img/tdm.svg');
}
th.pm {
    background-image: url('img/pm.svg');
}

th.cpu {
    background-image: url('img/cpu.svg');
}
th.cb {
    background-image: url('img/cb.svg');
}

th.gpu {
    background-image: url('img/gpu.svg');
}

th.yc {
    background-image: url('img/yc.svg');
}

th.sz {
    background-image: url('img/sz.svg');
}

th.cr {
    background-image: url('img/cr.svg');
}

.benchmarks-table td {
    padding: 0.6rem 1rem;
    vertical-align: middle;
    position: relative;
    overflow: hidden;
}
.table-success {
    background-color: rgba(40, 167, 69, 0.08) !important;
}
.benchmark-cell.table-success::after {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: 100%;
    z-index: 0;
    transition: width 1s ease-out;
}

.table td:nth-child(2).table-success::after {
    background: linear-gradient(to left, var(--gradient-start), transparent) !important;
    right: 0;
}

.table td:nth-child(3).table-success::after {
    background: linear-gradient(to right, var(--gradient-start), transparent) !important;
    left: 0;
}

.benchmark-cell.table-success.animated::after {
    width: 100%;
}
.benchmarks-table .d-flex {
    min-width: 100%;
    position: relative;
    z-index: 1;
}
.invisible {
    visibility: hidden;
}

.percent-value {
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.5s ease-out 1s, transform 0.5s ease-out 1s; /* Задержка = длительность анимации градиента */
}

.percent-visible .percent-value {
    opacity: 1;
    transform: translateX(0);
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}

.star-rating {
    display: inline-flex;
    font-size: 1.1rem;
    line-height: 1;
}

.star-rating .star {
    margin-right: 2px;
    color: #ddd;
}


.star-rating .star.filled {
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    background-image: linear-gradient(90deg, #ffc107 0%, #ffc107 0%);
    background-size: 0% 100%;
    background-repeat: no-repeat;
}

.star-rating .star.animate-fill {
    animation: starFill 0.5s ease-out forwards;
}

@keyframes starFill {
    0% {
        background-size: 0% 100%;
    }
    100% {
        background-size: 100% 100%;
        color: #ffc107;
        background-image: none;
    }
}

.star-rating .star:not(.filled) {
    opacity: 0;
}

.star-rating .star.animate-empty {
    animation: starEmpty 0.3s ease-out forwards;
}

@keyframes starEmpty {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.cell-33 {
    width: 33%;
}

.max-selection-alert {
    max-width: 400px;
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
}

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

.compare-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.compare-button.btn-secondary:not(:hover) {
    opacity: 0.7;
    cursor: not-allowed;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: inherit;
}

.select2-results__option.select2-results__option--highlighted[aria-selected] {
    background-color: var(--grad-s2);
}

table.duo tr {
    border-bottom-width: var(--bs-border-width);
}

table.specs-table.duo tbody th {
  width: 34%;
}

  @media (max-width: 768px) {
    /* Общий контейнер для таблицы */
    .mobile-table-container {
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    
    /* Сброс стандартных стилей Bootstrap */
    table.duo {
      min-width: 100%;
      border-collapse: collapse;
    }
    
    /* Заголовок таблицы */
    table.duo thead {
      display: block;
      position: sticky;
      top: 58px;
      z-index: 10;
      background: white;
    }

    table.duo thead tr {
      display: flex;
    }

    table.duo thead th:first-child {
      display: none;
    }

    table.duo thead th {
      flex: 1;
      min-width: 50%;
      padding: 12px 8px;
      font-weight: bold;
      border-bottom: 2px solid #dee2e6;
      text-align: left;
      background-color: var(--container-bg) !important;

    }
    
    /* Тело таблицы */
    table.duo tbody {
      display: block;
    }
    
    /* Строки таблицы */
    table.duo tbody tr {
      display: flex;
      flex-wrap: wrap;
      border-bottom: 1px solid #dee2e6;
    }
    
    /* Заголовок строки (первая колонка) */
    table.duo tbody th.benchmark-label {
      flex: 0 0 100%;
      padding: 12px 8px;
      background-color: #f8f9fa;
      font-weight: bold;
    }
    
    /* Ячейки с данными */
    table.duo tbody td {
      flex: 1;
      min-width: 50%;
      padding: 12px 8px;
    }
    
    /* Внутренние div-контейнеры */
    table.duo tbody td .d-flex {
      display: flex !important;
      justify-content: space-between !important;
      align-items: center !important;
      width: 100%;
    }
    
    /* Проценты */
    table.duo tbody td .percent-value {
      white-space: nowrap;
    }

    .benchmark-label {
        padding-left: 3rem !important;
        background-size: auto 2.3rem;
    }
  }

  @media (max-width: 768px) {
    /* Общие стили для всех таблиц duo */
    .mobile-table-container {
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      margin-bottom: 1rem;
    }
    
    /* Стили ТОЛЬКО для таблицы benchmarks-table (бенчмарки) */
    table.benchmarks-table.duo {
      min-width: 100%;
      border-collapse: collapse;
    }
    
    table.benchmarks-table.duo thead {
      display: block;
      position: sticky;
      top: 0;
      z-index: 10;
      background: white;
    }
    
    table.benchmarks-table.duo thead tr {
      display: flex;
    }
    
    /* Остальные стили для benchmarks-table... */
    
    /* Стили ТОЛЬКО для таблицы specs-table (спецификации) */
    table.specs-table.duo {
      width: 100%;
      border-collapse: collapse;
    }
    
    table.specs-table.duo tbody {
      display: block;
    }
    
    table.specs-table.duo tbody tr {
      display: flex;
      flex-wrap: wrap;
      border-bottom: 1px solid #dee2e6;
    }
    
    table.duo tbody th {
      flex: 0 0 100%;
      padding: 8px;
      background-color: #f8f9fa;
      font-weight: bold;
      text-align: center;
    }
    
    table.specs-table.duo tbody td {
      flex: 1;
      min-width: 50%;
      padding: 8px;
      text-align: center;
    }

    table.specs-table.duo tbody td[colspan="2"] {
      flex: 0 0 100%;
      text-align: center;
    }

    table.specs-table.duo tbody td.second-col {
      text-align: right;
    }

    table.specs-table.duo tbody td:first-child {
      text-align: right;
    }

    table.specs-table.duo tbody td:last-child {
      text-align: left;
    }

    .table thead th:nth-child(2) {
        border-right: 1px solid var(--border-color);
    }

    .table .duo th {
        width: 100% !important;
    }
  }

    table .duo tbody td.benchmark-cell {
      width: 33%;
    }

.alert-warning td {
    vertical-align: top;
}

.alert-warning tr:nth-child(2) {
    text-align: right;
}

@keyframes bounceFade {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  30% {
    transform: translateY(-20px);
    opacity: 1;
  }
  50% {
    transform: translateY(0);
    opacity: 0.7;
  }
  70% {
    transform: translateY(-10px);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.max-selection-alert.bounce {
  animation: bounceFade 500ms ease forwards;
}

table.solo th {
    width: 50%;
}

/*.col-sm-6.col-md-4.col-lg-3 > div {
    background: url('/img/games/games_default.webp') no-repeat center center / 100%;
}*/

body:not(.loaded) {
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
}

/* Добавим немного CSS для уведомлений */
.custom-alert {
    animation: fadeIn 0.3s;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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



/* Кнопка "Наверх" */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 64px;
    height: 64px;
    border-radius: 20%;
    display: none;
    z-index: 1000;
    border: none;
    background: var(--processor-color);
    transition: transform 0.2s ease;
    background: var(--container-bg);
    border: 3px solid var(--bg-color);
}

.btn-back-to-top:hover {
    transform: translateY(-2px);
    background: var(--processor-color);
}

.btn-back-to-top i {
    font-size: 25px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .btn-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Хлебные крошки */
.breadcrumb-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb-separator {
    color: #6c757d;
    font-weight: bold;
    margin: 0 5px;
}

.breadcrumb-actions {
    display: flex;
    gap: 8px;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

.btn-action {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
    color: #adb5bd;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    background: var(--text-color);
}

.quick-nav-items {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-decoration: none;
    color: #adb5bd;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.quick-nav-item:hover {
    background: rgba(110, 168, 254, 0.1);
    color: #6ea8fe;
    border-color: rgba(110, 168, 254, 0.3);
    transform: translateY(-1px);
}

.quick-nav-item i {
    font-size: 16px;
}

.quick-nav-item span {
    font-size: 13px;
    font-weight: 500;
}

/* Адаптивность */
@media (max-width: 768px) {
    .breadcrumb-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .breadcrumb-actions {
        align-self: stretch;
        justify-content: center;
    }
    
    .action-buttons {
        flex: 1;
        justify-content: space-around;
    }
    
    .quick-nav-items {
        justify-content: center;
    }
    
    .quick-nav-item {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        text-align: center;
    }

    table.solo th {
        width: 60%;
    }
}

@media (max-width: 480px) {
    .breadcrumb-container {
        padding: 12px 15px;
        border-radius: 8px;
    }
    
    .breadcrumb {
        gap: 4px;
    }
    
    .breadcrumb-separator {
        margin: 0 3px;
    }
    
    .quick-nav-items {
        flex-direction: column;
        gap: 8px;
    }
    
    .quick-nav-item {
        min-width: auto;
    }
}

.btn-action:active,
.quick-nav-item:active {
    transform: translateY(0);
}

/* Темная тема улучшения */
/*[data-theme="dark"] .breadcrumb-container {
    border-color: #343a40;
}*/
.tooltip-icon {
  cursor: pointer;
  transition: color 0.2s ease;
}
.tooltip-icon:hover {
  color: var(--bs-primary);
}