:root {
    --bg-color: #0a1020;
    --surface-color: #16213a;
    --surface-elevated: #1e2944;
    --border-color: #22305a;
    --primary-color: #38bdf8;
    --primary-muted: #227da9;
    --primary-hover: #0ea5e9;
    --surface-highlight: #24304d;
    --text-primary: #f1f5fa;
    --text-secondary: #d8d8d8;
    --text-muted: #6b7fa7;
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    --radius: 0.8rem;
    --icon-bg: rgba(255, 255, 255, 0.1);
}

#themes-modal-overlay .modal-visual-area {
    width: 100%;
    /* Соотношение сторон, чтобы вместить анимацию */
    aspect-ratio: 1 / 0.8;
    background: transparent;
    border-bottom-left-radius: 2.5rem;
    border-bottom-right-radius: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Добавляем паддинг сверху, чтобы центр анимации был чуть ниже заголовка */
    padding-top: 2rem;
    padding-bottom: 1rem;

    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: 0;
}

#themes-modal-overlay .themes-modal-content.details-mode {
    padding: 0 !important;
    display: block;
    width: 100%;
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

#themes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 16, 32, 0.85);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
    box-sizing: border-box;
}

#themes-modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: all;
}

.themes-modal {
    background-color: var(--surface-elevated);
    border-radius: 32px;
    width: 350px !important;
    height: 680px !important;
    max-height: 90vh !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    margin: auto;
}

#themes-modal-overlay:not(.hidden) .themes-modal {
    transform: scale(1);
}

.themes-modal-header {
    position: relative;
    padding: 1rem 1.2rem;
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 10;
    flex-shrink: 0;
}

.themes-modal-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to bottom, var(--surface-elevated) 0%, rgba(30, 41, 68, 0) 100%);
    pointer-events: none;
}

.themes-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

.themes-modal-top-row {
    display: none;
}

.card-click-loader {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 16px;
    backdrop-filter: blur(2px);
}

/* (дубль удалён — смотри объединённый блок ниже) */

.themes-modal-back-btn,
.themes-modal-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
}

.themes-modal-back-btn:hover,
.themes-modal-close-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

.themes-modal-back-btn svg,
.themes-modal-close-btn svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.5;
}

.info-value.dash {
    color: var(--text-muted);
    font-weight: 400;
}

.themes-modal-content {
    padding: 1rem;
    overflow-y: auto;
    flex-grow: 1;
    position: relative;
    -ms-overflow-style: none;
    scrollbar-width: none;
    min-height: 0;
}

.themes-modal-content::-webkit-scrollbar {
    display: none;
}

.themes-modal-content.loading {
    display: flex;
    justify-content: center;
    align-items: center;
}

.themes-modal-spinner {
    border: 3px solid var(--primary-muted);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.themes-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;        /* было 0.8rem — мало места для выступающего тега */
    padding: 16px 0;  /* было 0.5rem — нет места для тега сверху первой карточки */
}

.theme-card-modern {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 68, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0 0.8rem 0 1.2rem;
    height: 80px;
    gap: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.theme-card-modern:hover {
    transform: translateY(-2px);
    background: rgba(40, 55, 90, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.tc-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    z-index: 2;
}

.tc-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.tc-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0;
}

.tc-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    height: 100%;
}

.tc-glow {
    position: absolute;
    top: -90px;
    right: 20px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--glow-color, rgba(56, 189, 248, 0.5)) 0%, transparent 90%);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    filter: blur(12px);
}

.tc-icons-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    z-index: 1;
    margin-right: 10px;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.tc-icon-box {
    border-radius: 8px;
    background: var(--icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 34px;
    height: 34px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.tc-icon-box:nth-child(1) {
    transform: translateY(5px) rotate(-10deg);
}

.tc-icon-box:nth-child(2) {
    width: 44px;
    height: 44px;
    transform: translateY(-5px) rotate(2deg);
    z-index: 2;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.45);
}

.tc-icon-box:nth-child(3) {
    transform: translateY(5px) rotate(10deg);
}

.tc-icon-img {
    width: 75%;
    height: 75%;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.tc-arrow {
    color: var(--text-muted);
    opacity: 0.5;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.theme-card-modern:hover .tc-arrow {
    opacity: 1;
    transform: translateX(3px);
    color: #fff;
}

.tc-arrow svg {
    width: 24px;
    height: 24px;
}

.tm-sort-controls {
    display: flex;
    position: sticky;
    top: -1rem;
    z-index: 50;
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-right: -1rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
    background-color: var(--surface-elevated);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 0 24px 24px;
}

.tm-buttons-wrapper {
    display: flex;
    width: 100%;
    background-color: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    height: auto;
    gap: 10px;
    padding: 0;
}

.tm-sort-button {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    background-color: rgba(22, 33, 58, 0.5);
    border: 1px solid #364057;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 10px 0;
}

.tm-sort-button:first-child {
    border-bottom-left-radius: 24px;
    border-right: 1px solid #364057;
}

.tm-sort-button:last-child {
    border-bottom-right-radius: 24px;
}

.tm-sort-button:last-child.active {
    border-bottom-right-radius: 24px;
}

.tm-sort-button.active {
    background-color: #2680a9;
    color: #fff;
    border-color: #2680a9;
    box-shadow: 0 4px 12px rgba(38, 128, 169, 0.3);
}

.tm-sort-button:hover:not(.active) {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.tm-sort-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tm-sort-label {
    display: none;
}

.models-in-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px; /* Выровнено с wrap-grid-v2 */
    width: 100%;
    position: relative;
    z-index: 1;
}

.theme-group-cluster {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 2rem;
    padding: 1.5rem 0.5rem 1.2rem 0.5rem;
}

.theme-group-cluster::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 2px solid #6b7fa7;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, black 0px, black 6px, transparent 20px, transparent calc(100% - 20px), black calc(100% - 6px), black 100%);
    mask-image: linear-gradient(to bottom, black 0px, black 6px, transparent 20px, transparent calc(100% - 20px), black calc(100% - 6px), black 100%);
    opacity: 0.7;
    z-index: 0;
}

.group-header-left,
.group-header-right {
    background-color: var(--surface-elevated);
    z-index: 2;
    padding: 0 8px;
}

.group-header-label {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--surface-elevated);
    padding: 0 12px;
    z-index: 2;
    white-space: nowrap;
}

.group-text {
    font-size: 0.9rem;
    color: #6b7fa7;
    font-weight: 600;
}

.group-percent-text {
    font-size: 0.9rem;
    font-weight: 800;
    color: #6b7fa7;
}

.group-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.group-divider {
    display: none;
}

.model-card-color-mode,
.model-card-count-mode {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #24304d;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    cursor: auto;
    transition: transform 0.2s;
    height: 100%;
}

.model-card-color-mode:hover,
.model-card-count-mode:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}

.mcs-image-box {
    width: 100%;
    aspect-ratio: 1 / 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    z-index: 1;
}

.mcs-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.model-card-color-mode {
    padding-bottom: 5px;
}

.model-card-color-mode::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, var(--card-gradient-color) 0%, transparent 100%);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.mcs-info {
    width: 100%;
    text-align: center;
    padding: 0 4px;
    z-index: 1;
    margin-top: auto;
}

.mcs-model-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.mcs-gift-name {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.7;
}

.model-card-count-mode {
    padding-bottom: 10px;
}

.count-mode-img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

.count-mode-info {
    width: 100%;
    text-align: center;
}

.count-mode-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.count-mode-badge {
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    font-weight: 500;
}

.model-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    min-height: 16px;
}

.model-stat-price,
.model-stat-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
}

.model-stat-price .price-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    vertical-align: -2px;
}

.model-stat-count svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.themes-modal-footer {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    text-align: left;
    background-color: var(--surface-elevated);
    border-top: 1px solid var(--border-color);
    z-index: 5;
}

.themes-modal-footer span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.themes-modal-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.themes-modal-footer a:hover {
    color: var(--primary-color);
}

#tm-similar-gifts-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.theme-divider-line {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 0;
    width: 100%;
}

.tm-content-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 0.25rem 0;
}

body.modal-open {
    overflow: hidden !important;
}

.themes-modal .modal-visual-area lottie-player {
    width: 90% !important;
    height: 90% !important;
    object-fit: contain;
    margin: 0;
    padding: 0;
    transform: none;
    /* Убрали сдвиг вверх */
}

.tm-info-table {
    display: flex;
    flex-direction: column;
    gap: 0 !important;
    width: auto;
    margin: 0.5rem 1.5rem 1.5rem 1.5rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
}

.tm-info-row {
    display: grid;
    grid-template-columns: 135px 1fr;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    margin: 0;
    width: 100%;
    align-items: stretch;
}

.tm-info-row:last-child {
    border-bottom: none;
}

.tm-info-label {
    background-color: rgba(22, 33, 58, 0.5);
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    border-right: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.tm-info-value {
    padding: 0.7rem 1rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: auto;
    text-align: left;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    background: transparent;
}

.tm-info-value.count {
    color: #fff;
}

.tm-info-value.link-style {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.tm-info-value.link-style:hover {
    color: #fff;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.5));
}

.themes-modal .gold-button-container {
    padding: 0 1.5rem;
    margin-top: 0;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.themes-modal a.similar-color-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80%;
    height: 36px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, filter 0.2s;
    cursor: pointer;
    gap: 8px;
    color: #fff !important;
}

.themes-modal a.similar-color-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.themes-modal .similar-btn-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin: 0;
}

.details-modal-header {
    position: absolute;
    /* Было sticky, стало absolute */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    box-sizing: border-box !important;
    /* Градиент, чтобы текст читался на фоне картинки */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.details-modal-header>* {
    pointer-events: auto;
}

.modal-title {
    text-align: center;
    flex-grow: 1;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    margin: 0;
}

#themes-modal-overlay .tm-sort-controls {
    display: flex;
    position: sticky;
    top: -1rem;
    z-index: 50;
    margin-left: -1rem;
    margin-right: -1rem;
    width: auto;
    margin-top: -1rem;
    background-color: var(--surface-elevated);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 0 24px 24px;
}

.selected-bg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    padding: 0 1rem 1rem 1rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
    border-radius: 24px;
    border-bottom: 2px solid rgba(107, 127, 167, 0.5);
}

.sbh-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sbh-label {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    margin-right: 6px;
}

.sbh-name {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.group-header-left {
    position: absolute;
    top: 0;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--surface-elevated);
    padding: 0 8px;
    z-index: 2;
    white-space: nowrap;
}

.group-header-right {
    position: absolute;
    top: 0;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    background-color: var(--surface-elevated);
    padding: 0 8px;
    z-index: 2;
}

.sbh-square {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sbh-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.sbh-name {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.group-percent-badge {
    background-color: var(--primary-color);
    color: #16213a;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 800;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}

.nfts-section-container {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.nfts-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
    cursor: pointer;
    padding: 10px 0;
    color: var(--text-muted);
    transition: color 0.2s;
    user-select: none;
}

.nfts-header:hover {
    color: #fff;
}

.nfts-header-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.nfts-header-line {
    flex-grow: 1;
    height: 1px;
    background-color: var(--border-color);
    opacity: 0.6;
}

.nfts-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.nfts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease-in-out;
}

.nfts-grid.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nft-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--surface-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
}

.nft-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

.nft-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nft-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.nft-number {
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-family: monospace;
}

.nfts-loading {
    margin-top: 1rem;
    text-align: center;
    width: 100%;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-table {
    display: flex;
    flex-direction: column;
    gap: 0 !important;
    width: auto;
    margin: 1rem 1.5rem 1.5rem 1.5rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
}

.info-row {
    display: grid;
    grid-template-columns: 135px 1fr;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    margin: 0;
    width: 100%;
    align-items: stretch;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    background-color: rgba(22, 33, 58, 0.5);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-right: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.info-value {
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    text-align: left;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    gap: 8px;
    background: transparent;
}

.info-value.count {
    color: #fff;
    font-weight: 600;
}

.info-value.compat {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.info-value.link-style {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: none;
    border: none;
    display: inline-flex;
}

.info-value.link-style:hover {
    color: #fff;
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.5));
}

/* ==========================================================================
   V2 ТЕМАТИКИ — СТИЛИ МОДАЛКИ (перенесено из test.css)
   ========================================================================== */

/* .no-padding для content без отступов (используется в V2-mode) */
.themes-modal-content.no-padding { padding: 0 !important; }

/* --- V2 Теги --- */
.v2-type-tag {
    display: inline-flex; align-items: center; padding: 2px 8px;
    border-radius: 6px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
}
.v2-group-tag { background: rgba(99, 102, 241, 0.2); color: #c7d2fe; border: 1px solid rgba(99, 102, 241, 0.3); }
.v2-theme-tag { background: rgba(56, 189, 248, 0.2); color: #bae6fd; border: 1px solid rgba(56, 189, 248, 0.3); }

/* --- Premium V2 card (горизонтальные карточки списка) --- */
.v2-premium-card {
    position: relative;
    margin-top: 10px;
    height: 110px;
    display: flex; align-items: center;
    padding: 0 12px 0 20px;
    cursor: pointer; transition: transform 0.2s;
}
.v2-premium-card:hover { transform: translateY(-3px); }

.v2-card-bg-container {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(36, 48, 77, 0.6) 0%, rgba(22, 33, 58, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px; overflow: hidden; z-index: 0;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.v2-premium-card:hover .v2-card-bg-container {
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.v2-card-glow {
    position: absolute; right: 40px; width: 120px; height: 120px;
    background: radial-gradient(circle, var(--theme-color) 0%, transparent 60%);
    opacity: 0.15; filter: blur(15px);
}
.v2-tag-glow {
    position: absolute; left: -20px; top: -20px; width: 100px; height: 100px;
    background: radial-gradient(circle, var(--tag-color, #38bdf8) 0%, transparent 65%);
    opacity: 0.12; filter: blur(18px); pointer-events: none;
}
.v2-premium-card .premium-tag {
    position: absolute; top: 0; left: 20px;
    transform: translateY(-50%); z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.v2-card-content {
    display: flex; width: 100%; height: 100%; align-items: center; justify-content: space-between; z-index: 1;
}
.v2-card-info { flex: 1; min-width: 0; align-self: center; }
.v2-card-title {
    font-size: 1.15rem; font-weight: 800; color: #fff; margin: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v2-premium-card .tpc-visuals {
    position: relative; width: 140px; height: 100%;
    flex-shrink: 0; margin-right: -10px;
}

.tpc-icon-box {
    position: absolute;
    width: var(--s, 34px); 
    height: var(--s, 34px);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    overflow: hidden;
    right: var(--x, 0px);
    top: var(--y, 50%);
    transform: translateY(-50%) rotate(var(--r, 0deg));
    z-index: var(--z, 1);
    transition: all 0.2s ease-out; 
}

.tpc-img {
    width: 80%; height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.tpc-visuals.items-1 .tpc-icon-box.pos-0 { --s: 60px; --x: 40px; --y: 50%; --r: -5deg; }
.tpc-visuals.items-2 .tpc-icon-box.pos-0 { --s: 50px; --x: 75px; --y: 50%; --r: -8deg; --z: 1; }
.tpc-visuals.items-2 .tpc-icon-box.pos-1 { --s: 45px; --x: 22px; --y: 46%; --r: 8deg;  --z: 2; }
.tpc-visuals.items-3 .tpc-icon-box.pos-0 { --s: 34px; --x: 100px; --y: 57%; --r: -5deg; --z: 1; }
.tpc-visuals.items-3 .tpc-icon-box.pos-1 { --s: 35px; --x: 18px; --y: 55%; --r: -5deg;  --z: 2; }
.tpc-visuals.items-3 .tpc-icon-box.pos-2 { --s: 40px; --x: 56px; --y: 45%; --r: 7deg;   --z: 3; }
.tpc-visuals.items-4 .tpc-icon-box.pos-0 { --s: 37px; --x: 72px; --y: 30%; --r: 5deg;   --z: 1; }
.tpc-visuals.items-4 .tpc-icon-box.pos-1 { --s: 37px; --x: 75px; --y: 75%; --r: -6deg; --z: 2; }
.tpc-visuals.items-4 .tpc-icon-box.pos-2 { --s: 35px; --x: 25px; --y: 30%; --r: 10deg;  --z: 2; }
.tpc-visuals.items-4 .tpc-icon-box.pos-3 { --s: 37px; --x: 30px; --y: 75%; --r: 5deg;   --z: 3; }
.tpc-visuals.items-5 .tpc-icon-box.pos-0 { --s: 32px; --x: 85px; --y: 30%; --r: -12deg; --z: 1; }
.tpc-visuals.items-5 .tpc-icon-box.pos-1 { --s: 32px; --x: 35px; --y: 30%; --r: 12deg;  --z: 1; }
.tpc-visuals.items-5 .tpc-icon-box.pos-2 { --s: 32px; --x: 100px; --y: 70%; --r: -15deg; --z: 2; }
.tpc-visuals.items-5 .tpc-icon-box.pos-3 { --s: 32px; --x: 60px; --y: 65%; --r: 0deg;   --z: 3; }
.tpc-visuals.items-5 .tpc-icon-box.pos-4 { --s: 32px; --x: 20px; --y: 70%; --r: 15deg;  --z: 2; }
.v2-card-arrow { color: var(--text-muted); margin-left: 8px; opacity: 0.5; transition: 0.2s; }
.v2-premium-card:hover .v2-card-arrow { opacity: 1; color: #fff; transform: translateX(3px); }
.v2-card-arrow svg { width: 20px; height: 20px; }

/* --- V2 Сетка и карточки моделей (3 в ряд) --- */
.wrap-grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px; width: 100%; box-sizing: border-box;
    padding: 0; position: relative; z-index: 1;
}
.v2-model-card {
    display: flex; flex-direction: column;
    border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--surface-color); overflow: hidden; position: relative; cursor: pointer;
    transition: transform 0.25s ease, border-color 0.2s; height: 100%;
}
.v2-model-card:hover {
    transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}
.v2-mc-gradient {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, var(--card-gradient-color, rgba(56,189,248,0.4)) 0%, transparent 80%);
    opacity: 0.3; z-index: 0; pointer-events: none;
}
.v2-mc-image {
    position: relative; z-index: 1; width: 100%;
    aspect-ratio: 1/0.85;
    display: flex; align-items: center; justify-content: center;
    padding: 4px; box-sizing: border-box;
}
.v2-mc-image img {
    width: 85%; height: 85%; object-fit: contain;
    filter: drop-shadow(0 8px 10px rgba(0,0,0,0.5));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.v2-model-card:hover .v2-mc-image img { transform: scale(1.1) rotate(3deg); }
.v2-mc-info {
    position: relative; z-index: 1; padding: 0 4px 8px;
    text-align: center; display: flex; flex-direction: column; gap: 2px;
    flex-grow: 1; justify-content: flex-end;
}
.v2-mc-title { font-size: 0.75rem; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-mc-subtitle { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-mc-stats { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.v2-mc-stat-badge {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: rgba(0, 0, 0, 0.4); border-radius: 6px;
    padding: 4px; font-size: 0.7rem; font-weight: 800; color: #fff;
    border: 1px solid rgba(255,255,255,0.05);
    width: 100%; box-sizing: border-box;
}
.v2-mc-stat-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-mc-stat-badge svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--card-gradient-color, #38bdf8); }
.v2-mc-source-badge {
    position: absolute; top: 6px; left: 6px; z-index: 3;
    background: rgba(0,0,0,0.55); color: var(--text-muted);
    font-size: 0.55rem; font-weight: 700; padding: 2px 6px;
    border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: calc(100% - 12px); backdrop-filter: blur(4px);
}

/* --- V2 Секции с рамкой --- */
.v2-layout-section { margin-bottom: 44px; }
.v2-section-wrapper {
    position: relative;
    padding: 2.2rem 0.6rem 1.5rem 0.6rem;
    margin-top: 1rem; width: 100%; box-sizing: border-box;
}
.v2-section-wrapper::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 32px; border: 2px solid #5c74a1; pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, black 0px, black 30px, transparent 70px, transparent calc(100% - 70px), black calc(100% - 30px), black 100%);
    mask-image: linear-gradient(to bottom, black 0px, black 30px, transparent 70px, transparent calc(100% - 70px), black calc(100% - 30px), black 100%);
    opacity: 0.7; z-index: 10;
}
.v2-section-title-box {
    position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
    background-color: var(--surface-elevated);
    padding: 0 16px; font-size: 0.95rem; font-weight: 800;
    color: #5c74a1; text-transform: uppercase; letter-spacing: 1px;
    z-index: 15; white-space: nowrap; display: flex; align-items: center; gap: 8px;
}
.v2-section-controls { display: flex; gap: 8px; position: relative; }
.v2-filter-btn {
    background: transparent; border: none;
    color: #5c74a1; cursor: pointer; border-radius: 8px;
    padding: 2px; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.v2-filter-btn:hover { filter: brightness(1.3); transform: translateY(-1px); }
.v2-filter-btn svg { width: 22px; height: 22px; transition: transform 0.3s; }
.v2-sort-dropdown {
    position: absolute; right: 0; top: 100%; margin-top: 8px;
    background: var(--surface-color); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    min-width: 160px; display: flex; flex-direction: column; gap: 4px;
    z-index: 100; text-transform: none; letter-spacing: normal;
}
.v2-sort-option {
    padding: 10px 12px; font-size: 0.85rem; font-weight: 600;
    color: var(--text-primary); border-radius: 8px; cursor: pointer; transition: 0.2s;
}
.v2-sort-option:hover { background: rgba(255,255,255,0.05); }
.v2-sort-option.active { color: #fff; background: rgba(56,189,248,0.2); border: 1px solid rgba(56,189,248,0.1); }
.v2-sort-dir-toggle {
    padding: 10px 12px; font-size: 0.85rem; font-weight: 600;
    color: var(--text-primary); border-radius: 8px; cursor: pointer; transition: 0.2s;
    display: flex; align-items: center; justify-content: space-between;
}
.v2-sort-dir-toggle:hover { background: rgba(255,255,255,0.05); color: #fff; }

/* --- Сворачиваемый контент --- */
.v2-section-collapsible { overflow: hidden; transition: max-height 0.4s ease; max-height: 5000px; }
.v2-section-wrapper.is-collapsed .v2-section-collapsible { max-height: 130px; }
.v2-section-fade {
    display: none; position: absolute; bottom: 0; left: 0; width: 100%; height: 90px;
    background: linear-gradient(to bottom, transparent, var(--surface-elevated) 95%);
    z-index: 5; pointer-events: none; border-radius: 0 0 32px 32px;
}
.v2-section-wrapper.is-collapsed .v2-section-fade { display: block; }
.v2-section-toggle-btn {
    position: absolute; bottom: 0; left: 50%; transform: translate(-50%, 50%);
    background-color: var(--surface-elevated); padding: 0 16px;
    color: #5c74a1; font-size: 0.85rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1px; z-index: 15;
    display: flex; align-items: center; gap: 4px;
    cursor: pointer; border: none; transition: filter 0.2s;
    outline: none; -webkit-tap-highlight-color: transparent; user-select: none;
}
.v2-section-toggle-btn:focus, .v2-section-toggle-btn:active { outline: none; background-color: var(--surface-elevated); }
.v2-section-toggle-btn:hover { filter: brightness(1.3); }
.v2-section-toggle-btn svg { width: 18px; height: 18px; transition: transform 0.3s; }

/* --- Paths-mode wrapper --- */
.v2-section-wrapper.paths-mode { border-radius: 16px; padding: 1.8rem 0.8rem 0.8rem 0.8rem; }
.v2-section-wrapper.paths-mode::before {
    border-radius: 16px;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 20px, transparent 40px, transparent calc(100% - 40px), black calc(100% - 20px), black 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 20px, transparent 40px, transparent calc(100% - 40px), black calc(100% - 20px), black 100%);
}

/* --- Хлебные крошки --- */
.v2-breadcrumb-container { padding: 0 16px; position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; }
.v2-breadcrumb-path {
    display: flex; align-items: center; flex-wrap: wrap;
    margin: 0; padding: 4px 6px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 12px;
}
.v2-crumb-item {
    display: flex; align-items: center; padding: 6px 10px; border-radius: 8px;
    font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
    cursor: pointer; transition: all 0.2s ease;
}
.v2-crumb-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.v2-crumb-item.current {
    background: var(--surface-elevated); color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); cursor: default;
}
.v2-crumb-sep { display: flex; align-items: center; color: rgba(255, 255, 255, 0.15); margin: 0 2px; }
.v2-crumb-sep svg { width: 14px; height: 14px; }

/* --- Collection banner --- */
.v2-collection-banner {
    position: relative; width: 100%; height: 50px;
    border-radius: 12px; overflow: hidden;
    margin-bottom: 12px; display: flex; align-items: center;
    padding: 0 16px; border: 1px solid rgba(255,255,255,0.1);
}
.v2-cb-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-size: cover; background-position: center; filter: blur(8px) brightness(0.4); z-index: 0; transform: scale(1.2); }
.v2-cb-content { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; width: 100%; }
.v2-cb-tag { background: rgba(217, 70, 239, 0.3); color: #f0abfc; border: 1px solid rgba(217, 70, 239, 0.5); padding: 2px 6px; border-radius: 6px; font-size: 0.6rem; font-weight: 800; text-transform: uppercase; }
.v2-cb-title { color: #fff; font-size: 0.9rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Sub-theme row --- */
.v2-sub-theme-row { margin-top: 12px; padding-top: 4px; position: relative; width: 100%; }
.v2-sub-theme-label { font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-align: center; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; width: 100%; }

/* --- Group tree card --- */
.v2-group-tree-card {
    position: relative; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(135deg, rgba(30, 41, 68, 0.85) 0%, rgba(20, 28, 50, 0.95) 100%);
    overflow: hidden; padding: 14px 14px 10px; margin-top: 6px;
}
.v2-gtc-glow {
    position: absolute; top: -30px; right: -20px; width: 100px; height: 100px;
    background: radial-gradient(circle, var(--theme-color, #38bdf8) 0%, transparent 70%);
    opacity: 0.12; filter: blur(20px); pointer-events: none;
}
.v2-gtc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.v2-gtc-tag {
    display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 7px;
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    background: rgba(99, 102, 241, 0.2); color: #c7d2fe; border: 1px solid rgba(99, 102, 241, 0.3);
}
.v2-gtc-count { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
.v2-gtc-title { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s; cursor: pointer; }
.v2-gtc-title:hover { color: #bae6fd; }
.v2-gtc-children { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.v2-gtc-children::-webkit-scrollbar { display: none; }
.v2-gtc-child {
    position: relative; flex: 0 0 100px; border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.07); background: rgba(0,0,0,0.25);
    padding: 8px; cursor: pointer; transition: transform 0.2s, border-color 0.2s, background 0.2s;
    overflow: hidden; min-width: 100px;
}
.v2-gtc-child:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); }
.v2-gtc-child-glow { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 14px; background: radial-gradient(ellipse at 50% 0%, var(--child-color, #38bdf8) 0%, transparent 60%); opacity: 0.1; pointer-events: none; }
.v2-gtc-child-previews { display: flex; gap: 2px; justify-content: center; margin-bottom: 6px; }
.v2-gtc-child-img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; background: rgba(0,0,0,0.3); filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.v2-gtc-child-name { font-size: 0.7rem; font-weight: 700; color: #e2e8f0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.v2-gtc-child-count { font-size: 0.6rem; font-weight: 700; color: var(--text-muted); text-align: center; margin-top: 3px; }

/* --- Аккордеон фонов и палитра --- */
.bg-accordion-content {
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
    padding: 0; overflow-x: hidden; overflow-y: visible;
}
.bg-accordion-content.hidden { display: none; }
.palette-scroll-area {
    display: flex; gap: 12px; overflow-x: auto;
    padding: 10px 16px; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; overflow-y: visible;
}
.palette-scroll-area::-webkit-scrollbar { display: none; }
.bg-palette-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; cursor: pointer; opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s; flex-shrink: 0; width: 54px;
}
.bg-palette-item:hover { opacity: 0.9; }
.bg-palette-item.active { opacity: 1; transform: scale(1.08); }
.bg-palette-color {
    width: 44px; height: 44px; border-radius: 12px;
    border: 2px solid transparent; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.bg-palette-item.active .bg-palette-color { border-color: var(--primary-color); box-shadow: 0 0 15px rgba(56, 189, 248, 0.6); }
.bg-palette-percent { font-size: 0.7rem; font-weight: 800; color: var(--text-muted); background: rgba(255, 255, 255, 0.05); padding: 2px 6px; border-radius: 6px; }
.bg-palette-item.active .bg-palette-percent { color: #0a1020; background: var(--primary-color); }

/* --- Дерево маркета --- */
.market-tree-v2 { margin-top: 24px; padding: 16px 16px 0 16px; border-top: 1px solid var(--border-color); }
.market-tree-v2.standalone-search-zone { margin-bottom: 24px; padding-bottom: 16px; }
.mt-root { font-size: 0.9rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.mt-branches { margin-left: 8px; border-left: 2px solid rgba(255,255,255,0.05); padding-left: 16px; display: flex; flex-direction: column; gap: 16px; }
.mt-item-container { position: relative; }
.mt-item { display: flex; justify-content: space-between; align-items: center; position: relative; }
.mt-item::before { content: ''; position: absolute; left: -16px; top: 50%; width: 12px; height: 2px; background: rgba(255,255,255,0.05); }
.mt-label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.mt-btn { background: rgba(56, 189, 248, 0.1); color: var(--primary-color); border: 1px solid rgba(56,189,248,0.2); border-radius: 8px; padding: 6px 14px; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: 0.2s; }
.mt-btn:hover { background: rgba(56,189,248,0.2); }
.mt-btn.active { background: var(--primary-color); color: #0a1020; }
.mt-content.hidden { display: none; }
.mt-horizontal-scroll { display: flex; overflow-x: auto; gap: 10px; padding: 12px 0 4px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mt-horizontal-scroll::-webkit-scrollbar { display: none; }
.hc-card { flex: 0 0 100px; display: flex; flex-direction: column; background: rgba(0,0,0,0.2); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); text-decoration: none; transition: transform 0.2s; }
.hc-card:hover { transform: translateY(-3px); border-color: rgba(56,189,248,0.3); }
.hc-img-wrap { width: 100px; height: 100px; position: relative; }
.hc-img-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px 12px 0 0; }
.hc-score { position: absolute; top: -4px; right: -4px; background: var(--primary-color); color: #0a1020; font-size: 0.65rem; font-weight: 800; padding: 2px 5px; border-radius: 6px; z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.hc-bg-name { position: absolute; bottom: 4px; left: 4px; right: 4px; background: rgba(0,0,0,0.65); backdrop-filter: blur(2px); font-size: 0.6rem; color: #fff; text-align: center; border-radius: 4px; padding: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-details { padding: 6px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.hc-price { display: flex; align-items: center; gap: 4px; color: #7dd3fc; font-weight: 800; font-size: 0.85rem; }
.hc-market { font-size: 0.55rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.nfts-grid.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* --- Inline theme (маленькие тематики <=3 моделей) --- */
.v2-inline-theme { cursor: default; }
.v2-inline-theme .v2-card-bg-container { border-radius: 20px; }

img.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
img.lazy-image.loaded {
    opacity: 1;
}

/* Всплывающее уведомление о подписке */
.premium-toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #1e2944 0%, #16213a 100%);
    border: 1px solid rgba(255, 215, 0, 0.4); /* Легкий золотой бордер */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.15);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    opacity: 0;
    animation: toastSlideUp 0.4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 90%;
    max-width: 320px;
}

.premium-toast-notification.hiding {
    animation: toastSlideDown 0.3s forwards ease-in;
}

.pt-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4));
}

.pt-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}

.pt-text strong {
    color: #ffd700;
    font-size: 0.9rem;
    font-weight: 800;
}

.pt-text span {
    color: #d8d8d8;
    font-size: 0.8rem;
    line-height: 1.2;
}

.pt-close-btn {
    background: transparent;
    border: none;
    color: #6b7fa7;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    transition: color 0.2s;
}

.pt-close-btn:hover {
    color: #fff;
}

@keyframes toastSlideUp {
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
@keyframes toastSlideDown {
    to { transform: translateX(-50%) translateY(100px); opacity: 0; }
}