:root {
    --bg-main: #050711;
    --bg-panel: rgba(10, 12, 28, 0.9);
    --accent: #f4c552;
    --accent-soft: rgba(244, 197, 82, 0.25);
    --accent-strong: #ffdf7f;
    --text-main: #f5f5f5;
    --text-muted: #a5a7c4;
    --card-bg: #111324;
    --card-border: #f4c552;
    --card-shadow: 0 0 40px rgba(244, 197, 82, 0.35);
    --filter-bg: #050816;
    --filter-border: rgba(255, 255, 255, 0.18);
    --filter-text: #e5e9ff;
    --filter-placeholder: #6f7695;
    --ruby-main: #ff3860;
    --ruby-light: #ff6b8a;
    --ruby-dark: #b31237;
    --ruby-glow: rgba(255, 56, 96, 0.55);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at top, #181c3a 0, #050711 45%, #000 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}
.page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}


/* HEADER */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: conic-gradient(
            from 210deg,
            #f4c552,
            #ff7b3a,
            #ff3a6b,
            #7e5dff,
            #f4c552
    );
    box-shadow: 0 0 20px rgba(244, 197, 82, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #050711;
}
.logo__text-main {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.logo__text-sub {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 2px;
}
.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.nav__btn {
    border: none;
    background: rgba(18, 21, 49, 0.85);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all 0.16s ease-out;
}
.nav__btn--primary {
    background: linear-gradient(135deg, #f4c552, #ff9f40);
    color: #050711;
    font-weight: 700;
    box-shadow: 0 0 24px rgba(244, 197, 82, 0.5);
}
.nav__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(14, 20, 50, 0.9);
}
.nav__btn--primary:hover {
    box-shadow: 0 0 30px rgba(244, 197, 82, 0.8);
}

.nav__btn--primary--muted {
    background: transparent;
    box-shadow: none;
    color: var(--text-main);
    font-weight: 500;
    padding: 0;
    cursor: default;
    pointer-events: none;
}

.nav__btn--primary--muted:hover {
    transform: none;
    box-shadow: none;
}
/* FILTERS */

.filters {
    margin-top: 10px;
    background: var(--bg-panel);
    border-radius: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(150, 155, 210, 0.22);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}
.filters__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.buttons__filters__top{
    display: flex;
    flex-direction:row ;
    gap: 12px;
}
.filters__toggle {
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid rgba(89, 96, 150, 0.9);
    background: rgba(10, 12, 28, 0.95);
    color: var(--text-main);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    outline: none;
    transition: background 0.16s ease-out, border-color 0.16s ease-out, transform 0.12s ease-out;
}
.filters__toggle:hover {
    border-color: var(--accent);
}

.filters__body {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition:
        height 0.25s ease,
        opacity 0.18s ease-out,
        transform 0.18s ease-out;
    pointer-events: none;
}
.filters__body--open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    margin-top: 8px;
}
.filters:not(.filters--collapsed) .filters__body {
    max-height: max-content;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    margin-top: 8px;
}
.filters:not(.filters--collapsed) .filters__toggle::after {
    transform: rotate(-135deg);
}
.filters__title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}
.filters__title span {
    color: var(--accent-strong);
}
.filters__row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding-top: 16px;
}
@media (max-width: 900px) {
    .filters__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    .filters__row {
        grid-template-columns: 1fr;
    }
}

.filters__item-title {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--filter-placeholder);
}
.checkbox {
    width: 100%;
    box-sizing: border-box;

    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;

    font-size: 13px;
    color: var(--filter-text);

    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(89, 96, 150, 0.7);
    background: rgba(10, 12, 28, 0.95);

    transition:
        background 0.16s ease-out,
        border-color 0.16s ease-out,
        box-shadow 0.16s ease-out;
}
.check_button.checkbox{
    max-width: 120px;
}
.checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.checkbox__box {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--filter-border);
    background-color: #06091b;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
    position: relative;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}
.checkbox__box::after {
    content: "";
    position: absolute;
    inset: 3px 4px 3px 4px;
    border-right: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: rotate(45deg);
    transform-origin: center;
    transition: border-color 0.18s ease;
}
.checkbox__label {
    user-select: none;
}
.checkbox:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(244, 197, 82, 0.28);
}
.checkbox:hover .checkbox__box {
    border-color: rgba(255, 255, 255, 0.4);
}
.checkbox input:checked + .checkbox__box {
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 0 10px rgba(255, 183, 73, 0.5);
}
.checkbox input:checked + .checkbox__box::after {
    border-right-color: #11141f;
    border-bottom-color: #11141f;
}
.checkbox input:focus-visible + .checkbox__box {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.field label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}
.field select,
.field input {
    background: rgba(10, 12, 28, 0.95);
    border-radius: 14px;
    border: 1px solid rgba(89, 96, 150, 0.7);
    color: var(--text-main);
    padding: 11px 12px;
    font-size: 13px;
    outline: none;
    transition: all 0.16s ease-out;
}
.field select:focus,
.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(244, 197, 82, 0.7);
}
.field--search input {
    padding-left: 32px;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a5a7c4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.65' y1='16.65' x2='21' y2='21'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
}
input.rating{
    width: calc(100%);
}


.content {
    margin-top: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

@media (max-width: 900px) {
    .content {
        grid-template-columns: 1fr;
    }
}
.sidebar {
    background: rgba(10, 12, 28, 0.9);
    border-radius: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(150, 155, 210, 0.2);
    height: fit-content;
}
.sidebar__title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.sidebar__block {
    margin-bottom: 12px;
}
.sidebar__block:last-child {
    margin-bottom: 0;
}
.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 5px;
    color: var(--text-muted);
}
.stat-row span:first-child {
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.stat-row span:last-child {
    color: var(--accent-strong);
    font-weight: 600;
}
.range-bar {
    position: relative;
    height: 5px;
    border-radius: 999px;
    background: rgba(49, 54, 98, 0.9);
    overflow: hidden;
    margin-top: 4px;
    margin-bottom: 10px;
}
.range-bar__fill {
    position: absolute;
    inset: 0;
    width: 70%;
    background: linear-gradient(90deg, #10b981, #f4c552);
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 8px 16px;
    border-radius: 14px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;

    border: 1px solid rgba(89, 96, 150, 0.8);
    background: rgba(18, 21, 49, 0.9);
    color: var(--text-main);

    cursor: pointer;
    outline: none;
    transition:
        background 0.16s ease-out,
        border-color 0.16s ease-out,
        box-shadow 0.16s ease-out,
        transform 0.12s ease-out;
}
.btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(14, 20, 50, 0.9);
}
.btn--primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), #ff9f40);
    color: #050711;
    box-shadow: 0 0 24px rgba(244, 197, 82, 0.6);
}
.btn--primary:hover {
    box-shadow: 0 0 32px rgba(244, 197, 82, 0.85);
}
.btn:disabled,
.btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
    transform: none;
}
        /* CARDS GRID */
.cards-section {
    position: relative;
    z-index: 0;
}
.cards-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background-color: transparent;

    background-image:
        linear-gradient(45deg,  rgba(90, 200, 255, 0.28) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(90, 200, 255, 0.22) 1px, transparent 1px);
    background-size: 46px 46px;

    opacity: 0.55;
    transform: translateY(40px) scale(1.1, 1);
}
.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;

    position: relative;
    border-radius: 24px;
    overflow: hidden;
}
.cards__item {
    flex: 0 1 calc((100% - 16px) / 3);
    max-width: 110px;

    display: flex;
    justify-content: center;
}
.cards__item .card {
    width: 100%;
}


.cards__item .card-img {
    width: 100%;
    height: auto;
    max-width: 100%;
}
@media (min-width: 480px) {
    .cards {
        gap: 10px;
    }

    .cards__item {
        flex: 0 1 calc((100% - 20px) / 3);
        max-width: 150px;
    }
}
@media (min-width: 768px) {
    .cards {
        gap: 14px;
    }

    .cards__item {
        flex: 0 1 calc((100% - 28px) / 3);
        max-width: 200px;
    }
}
@media (min-width: 1024px) {
    .cards {
        gap: 20px;
    }

    .cards__item {
        flex: 0 1 calc((100% - 60px) / 4);
        max-width: 240px;
    }
}
@media (min-width: 1440px) {
    .cards {
        gap: 22px;
    }

    .cards__item {
        flex: 0 1 calc((100% - 66px) / 4);
        max-width: 260px;
    }
}
.cards__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.cards__title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-muted);
}
.cards__count {
    font-size: 12px;
    color: var(--text-muted);
}
.card-img {
    display: block;
    width: 100%;
    max-width: 220px;

    border-radius: 14px;
    border: 2px solid rgba(207, 173, 102, 0.9);

     box-shadow:
        0 0 6px rgba(207, 173, 102, 0.8);

    transition: border-color 0.18s ease-out,
    box-shadow 0.18s ease-out,
    transform 0.18s ease-out,
    filter 0.18s ease-out;
    will-change: transform, box-shadow, border-color;
}
.card-img:hover {
    transform: translateY(-4px) scale(1.02);
    filter: brightness(1.03);
    border: 2px solid rgba(120, 132, 164, 0.85)!important;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.85);
}
.card-img.Epic {
    border: 2px solid rgba(235, 60, 60, 0.70);
    box-shadow:
        0 0 6px rgba(235, 60, 60, 0.85),
        0 0 18px rgba(0, 0, 0, 0.9);
}
.card-img.Rare {
    border: 2px solid rgba(255, 235, 120, 0.9);
    box-shadow:
        0 0 6px rgba(255, 235, 120, 0.9),
        0 0 18px rgba(0, 0, 0, 0.9);
}
.card-img.Common {
    border: 2px solid rgba(155, 162, 175, 0.9);
    box-shadow:
        0 0 4px rgba(155, 162, 175, 0.8),
        0 0 14px rgba(0, 0, 0, 0.9);
}
.card-img.Legendary {
    border: 2px solid rgba(230, 235, 245, 0.95);
    box-shadow:
        0 0 6px rgba(255, 255, 255, 0.9),
        0 0 20px rgba(0, 0, 0, 0.95);
}

.footer {
    margin-top: 26px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.75;
}

/* плагинация */
#paginationContainer {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}
#paginationContainer .paginationjs {
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: transparent;
}
#paginationContainer .paginationjs-pages {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;

    border: none;
    background: rgba(10, 12, 28, 0.95);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}
#paginationContainer .paginationjs-pages li {
    list-style: none;
    border: none;
    width: 43px;
}
#paginationContainer .paginationjs-pages li > a,
#paginationContainer .paginationjs-pages li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 38px;
    height: 38px;
    padding: 0;

    border-radius: 999px;
    border: none;

    background: rgba(18, 21, 49, 0.95);
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;

    cursor: pointer;
    transition:
        background 0.16s ease-out,
        box-shadow 0.16s ease-out,
        transform 0.12s ease-out,
        color 0.16s ease-out;
}
#paginationContainer .paginationjs-pages li > a:hover {
    box-shadow: 0 0 18px rgba(14, 20, 50, 0.9);
    color: var(--text-main);
}
#paginationContainer .paginationjs-pages li.active > a,
#paginationContainer .paginationjs-pages li.active > span {
    background: linear-gradient(135deg, var(--accent), #ff9f40);
    color: #050711;
    font-weight: 700;
    box-shadow: 0 0 24px rgba(244, 197, 82, 0.65);
}
#paginationContainer .paginationjs-pages li.paginationjs-ellipsis > span {
    border: none;
    background: transparent;
    box-shadow: none;
    min-width: 18px;
    height: auto;
    padding: 0;
    color: var(--text-muted);
    cursor: default;
}
#paginationContainer .paginationjs-pages li.paginationjs-prev > a,
#paginationContainer .paginationjs-pages li.paginationjs-next > a {
    min-width: auto;
    padding: 0 6px;

    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#paginationContainer .paginationjs-pages li.paginationjs-prev > a svg path,
#paginationContainer .paginationjs-pages li.paginationjs-next > a svg path {
    fill: var(--accent);
}
#paginationContainer .paginationjs-pages li.paginationjs-prev > a:hover,
#paginationContainer .paginationjs-pages li.paginationjs-next > a:hover {
    transform: translateY(-1px);
    background: transparent;
    box-shadow: none;
}
#paginationContainer .paginationjs-pages li.paginationjs-prev > a:hover svg path,
#paginationContainer .paginationjs-pages li.paginationjs-next > a:hover svg path {
    fill: #ffb85c;
}
#paginationContainer .paginationjs-pages li.disabled > a,
#paginationContainer .paginationjs-pages li.disabled > span {
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
    transform: none;
}
#paginationContainer .paginationjs-nav {
    display: none;
}

/* loader */
.gc-loader {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 180px;
}
.gc-loader__text {
    position: relative;
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 800;
    font-size: 26px;
    letter-spacing: 0.35em;
    text-transform: uppercase;

    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;

    background-image: linear-gradient(
        120deg,
        rgba(120, 132, 255, 0.15),
        #f4c552,
        rgba(120, 132, 255, 0.15)
    );
    background-size: 220% 100%;

    animation:
        gc-loader-shine 1.8s linear infinite,
        gc-loader-pulse 1.2s ease-in-out infinite;
}
.gc-loader__shadow {
    position: absolute;
    width: 180px;
    height: 12px;
    border-radius: 999px;
    background: radial-gradient(ellipse at center,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0) 70%);
    bottom: 55px;
    opacity: 0.4;
    filter: blur(4px);
    animation: gc-loader-shadow 1.2s ease-in-out infinite;
}
@keyframes gc-loader-shine {
    0% {
        background-position: 0 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}
@keyframes gc-loader-pulse {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-2px) scale(1.04);
        opacity: 1;
    }
}
@keyframes gc-loader-shadow {
    0%, 100% {
        transform: scaleX(1);
        opacity: 0.35;
    }
    50% {
        transform: scaleX(1.12);
        opacity: 0.5;
    }
}
@media (max-width: 480px) {
    .gc-loader__text {
        font-size: 20px;
        letter-spacing: 0.25em;
    }
}

/* MODALS */
.card-modal__card-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.card-modal__duplicates {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.card-modal__duplicate-img {
    width: 60px;
    border-radius: 8px;
    border: 1px solid rgba(244,197,82,0.35);
    cursor: pointer;
    object-fit: cover;


    filter: blur(1px) brightness(0.9);

    transition:
        transform .12s ease-out,
        box-shadow .12s ease-out,
        border-color .12s ease-out,
        filter .12s ease-out;
}
.card-modal__duplicate-img:hover {
    filter: blur(0) brightness(1);
    box-shadow: 0 8px 18px rgba(0,0,0,0.7);
    border-color: #f4c552;
}
@media (max-width: 768px) {
    .card-modal__card-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-modal__duplicates {
        flex-direction: row;
        margin-top: 8px;

        max-width: 100%;
        max-height: 80px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
    }

    .card-modal__duplicate-img {
        width: 56px;
        flex: 0 0 auto;
    }


    .card-modal__duplicates::-webkit-scrollbar {
        height: 4px;
    }
    .card-modal__duplicates::-webkit-scrollbar-track {
        background: transparent;
    }
    .card-modal__duplicates::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.2);
        border-radius: 999px;
    }
}

.card-modal__info {
    display: flex;
    flex-direction: column;
    gap: 10px;              /* расстояние между строками */
    padding-top: 4px;
}
.card-modal__meta {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-main);
    opacity: .95;
}
.card-modal__meta span + span::before {
    content: "•";
    margin: 0 6px;
    opacity: .6;
}
.card-modal__row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.card-modal__row + .card-modal__row {
    margin-top: 4px;
}
.card-modal__row .label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--text-muted);
}
.card-modal__row .value {
    font-size: 13px;
    line-height: 1.4;
}
.card-modal__row--nation .value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.card-modal__flag .fi {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}

.contract-years {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}
.contract-years__year {
    width: 18px;
    height: 6px;
    border-radius: 999px;
    border: 1px solid rgba(244,197,82,0.25); /* как твой accent */
    background: rgba(244,197,82,0.06);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.6);
}
.contract-years__year--active {
    background: linear-gradient(90deg, #10b981, #22c55e); /* зелёный как success */
    border-color: #22c55e;
    box-shadow:
        0 0 6px rgba(34,197,94,0.6),
        0 0 0 1px rgba(0,0,0,0.8);
}

.age-gauge {
    position: relative;
    width: 80px;
    height: 44px;
}
.age-gauge__svg {
    width: 100%;
    height: 100%;
}
.age-gauge__track {
    fill: none;
    stroke: rgba(244,197,82,0.16);
    stroke-width: 10;
    stroke-linecap: round;
}
.age-gauge__progress {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 0 1;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset .3s ease-out,
                stroke .2s ease-out;
}
.age-gauge__value {
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: .06em;
}

.rating-gauge {
    position: relative;
    width: 80px;
    height: 44px;
}
.rating-gauge__svg {
    width: 100%;
    height: 100%;
}
.rating-gauge__track {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    stroke: rgba(255,255,255,0.12); /* базовый светлый фон */
}
.rating-gauge__progress {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 0 1;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset .3s ease-out,
                stroke .2s ease-out;
}
.rating-gauge__value {
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: .06em;
}

.card-modal__row--gauges {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-end;   /* чтобы полукруги «стояли» по нижнему краю */
}
.card-modal__gauge {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.card-modal__gauge .label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--text-muted);
}


.modal__overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(35, 40, 80, .92), rgba(2, 4, 20, .98));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}
.modal__container {
    background: radial-gradient(circle at top, #181c3a, #050711);
    border-radius: 24px;
    border: 1px solid rgba(244, 197, 82, .35);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .9);
    width: 100%;
    padding: 24px 28px;
    color: #f5f5f5;
    font-family: 'Montserrat', system-ui, sans-serif;
    max-width: 960px;
    max-height: calc(100vh - 80px);
    overflow: hidden;
}
.card-modal__preview {
    width: auto;
    height: min(55vh, 480px);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    border-radius: 24px;
}
.card-modal__image {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
}
.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.modal__title {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: .18em;
}
.modal__close {
    background: transparent;
    border: none;
    font-size: 22px;
    color: #a5a7c4;
    cursor: pointer;
}
.card-modal__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 24px;
}
.card-modal__statuses {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.modal[aria-hidden="true"] {
    display: none;
}
.badge {
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    text-transform: uppercase;
    line-height: 16px;
    border: 1px solid transparent;
}
.badge--success {
    border-color: #10b981;
    background-color: rgba(16,185,129,0.16);
    color: #d1fae5;
}
.badge--warning {
    border-color: #f97316;
    background-color: rgba(249,115,22,0.16);
    color: #ffedd5;
}
.badge--info {
    border-color: #3b82f6;
    background-color: rgba(59,130,246,0.16);
    color: #dbeafe;
}
.badge--accent {
    border-color: #f4c552;
    background-color: rgba(244,197,82,0.16);
    color: #fef3c7;
}
.modal__footer {
    margin-top: 20px;
    display: none;
    flex-direction: row;
    gap: 12px;
}
.modal__footer.mobile{
    justify-content: center;
}

.modal__footer .btn {
    padding: 10px 24px;
    border-radius: 14px;
    border-width: 1px;
    font-size: 10px;
    letter-spacing: 0.14em;

    background: rgba(12, 14, 32, 0.95);
    border-color: rgba(148, 27, 65, 0.6);
    color: #e5e7eb;

    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.75);
}
.modal__footer .btn--primary {
    border-color: transparent;
    background: linear-gradient(135deg, #ff4b8b, #c81e4a);
    color: #050711;
    box-shadow:
        0 0 10px rgba(255, 75, 139, 0.8),
        0 16px 32px rgba(0, 0, 0, 0.9);
}
.modal__footer .btn--primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 16px rgba(255, 75, 139, 1),
        0 20px 40px rgba(0, 0, 0, 0.95);
}
.modal__footer .btn:not(.btn--primary) {
    background: rgba(8, 10, 28, 0.95);
    border-color: rgba(248, 113, 113, 0.7);
    color: #f9fafb;
}
.modal__footer .btn:not(.btn--primary):hover {
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(248, 113, 113, 0.55);
}

@media (max-width: 768px) {
    .modal__container {
        max-width: 99%;
        max-height: 100vh;
        padding: 16px 16px 20px;
    }

    .card-modal__layout {

        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        gap: 16px;
    }

    .card-modal__preview {
        height: min(40vh, 320px);  /* было 55vh, делаем пониже */
    }
}
@media (max-width: 480px) {
    .card-modal__preview {
        height: min(36vh, 300px);
    }
}
.logo-icon {
    width: 45px;
    height: 45px;
}

@media (max-width: 480px) {
    .contract-years {
        gap: 2px;
    }

    .contract-years__year {
        width: 12px;
        height: 4px;
        border-radius: 999px;
    }


    .card-modal__row--gauges {
        gap: 12px;
    }

    .rating-gauge,
    .age-gauge {
        width: 64px;
        height: 38px;
    }

    .modal__footer .btn {
        padding: 8px 16px;
        border-radius: 14px;
    }
    #searchButtonMobile{
        display: flex!important;
        box-shadow: none;
    }
}

/* snackbar */
#snackbar-root {
    position: fixed;
    left: 50%;
    top: 16px;
    transform: translateX(-50%);
    z-index: 9999;
}
.snackbar {
    min-width: 260px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
    background-color: var(--card-bg);
    color:var(--text-main);
    border-radius: 14px;
    border: 2px solid var(--ruby-light);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    font-family: system-ui, sans-serif;
    font-size: 13px;
}
.snackbar__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.snackbar__message {
    flex: 1 1 auto;
}
.snackbar__timer {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}
.snackbar__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.snackbar__btn {
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}
.snackbar__btn--yes {
    background-color: #ff2f7b;
    color: #ffffff;
    font-weight: 600;
}
.snackbar__btn--cancel {
    background-color: transparent;
    color: var(--text-main);
    text-decoration: underline;
    padding: 0;
}


/* snackbar */
.snackbar__base{
    visibility: hidden; /* Hidden by default. Visible on click */
    min-width: 250px; /* Set a default minimum width */
    transform: translateX(-50%); /* Divide value of min-width by 2 */
    background: #EC6A71;
    color: #FFF;
    text-align: center; /* Centered text */
    border-radius: 8px; /* Rounded borders */
    padding: 12px 16px; /* Padding */
    position: fixed; /* Sit on top of the screen */
    z-index: 1500; /* Add a z-index if needed */
    left: 50%; /* Center the snackbar */
    top: 30px; /* 30px from the bottom */
    box-shadow: 0 8px 24px 0 rgba(27, 49, 77, 0.35);
}
.snackbar__base.snackbar-warning {
    background: #ffb703;
    color: #000;
}
.snackbar__base.snackbar-success {
    background: #4caf50;
    color: #fff;
}
.snackbar__base.show{
    visibility: visible; /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
    However, delay the fade out process for 2.5 seconds */
    -webkit-animation: fadein 0.5s, fadeout 0.5s 15s;
    animation: fadein 0.5s, fadeout 0.5s 15s;
}


/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
    from {top: 0; opacity: 0;}
    to {top: 30px; opacity: 1;}
}
@keyframes fadein {
    from {top: 0; opacity: 0;}
    to {top: 30px; opacity: 1;}
}
@-webkit-keyframes fadeout {
    from {top: 30px; opacity: 1;}
    to {top: 0; opacity: 0;}
}
@keyframes fadeout {
    from {top: 30px; opacity: 1;}
    to {top: 0; opacity: 0;}
}