/* Подключаем шрифты, необходимые для страницы */
@font-face {
    font-family: 'SourceSans3'; /* Название семейства шрифтов */
    src: url('../assets/fonts/SourceSans3-Semibold.woff2') format('woff2'), /* Путь к файлу шрифта формата woff2 */
         url('../assets/fonts/SourceSans3-Semibold.woff') format('woff'); /* Путь к файлу шрифта формата woff */
    font-weight: 600; /* Устанавливаем насыщенность шрифта (Semibold) */
    font-style: normal; /* Устанавливаем обычный стиль (не курсив) */
    font-display: swap; /* Стратегия отображения шрифта (улучшает скорость загрузки) */
}

@font-face {
    font-family: 'SourceSans3'; /* Название семейства шрифтов */
    src: url('../assets/fonts/SourceSans3-Bold.woff2') format('woff2'), /* Путь к файлу шрифта формата woff2 */
         url('../assets/fonts/SourceSans3-Bold.woff') format('woff'); /* Путь к файлу шрифта формата woff */
    font-weight: 700; /* Устанавливаем насыщенность шрифта (Bold) */
    font-style: normal; /* Устанавливаем обычный стиль (не курсив) */
    font-display: swap; /* Стратегия отображения шрифта */
}

/* НОВЫЙ КОММЕНТАРИЙ: Это ПРАВИЛЬНОЕ и ВОССТАНОВЛЕННОЕ правило.
   Оно создает контейнер, который заканчивается ровно над нижним меню,
   и именно этот контейнер получает скроллбар, если контент не помещается. */
#stars-page {                
    height: calc(100% - var(--menu-height)); /* КЛЮЧЕВОЕ ИЗМЕНЕНИЕ: Высота = 100% родителя минус высота меню */
    overflow-y: auto;                        /* сохраняем прокрутку внутри этого блока */
}

/* Общие стили страницы, аналогичные tasks.html */
.stars-page {
    font-family: 'SourceSans3', sans-serif; /* Устанавливаем основной шрифт для страницы */
    font-weight: 600; /* Устанавливаем базовую насыщенность шрифта */
    background-color: #241c3a; /* Задаем темный фон страницы */
    margin: 0; /* Убираем внешние отступы у body */
    padding: 0; /* Убираем внутренние отступы у body */
    display: flex; /* Включаем flex-контейнер для центрирования контента */
    flex-direction: column; /* Элементы внутри будут располагаться в колонку */
    align-items: center; /* Центрируем контент по горизонтали */
    justify-content: flex-start; /* Выравниваем контент сверху для мобильных устройств */
    width: 100%; /* Ширина страницы на весь экран */
    min-height: 100vh; /* Минимальная высота страницы на весь экран */
    box-sizing: border-box; /* Включаем padding и border в общую ширину и высоту */
}

/* Медиа-запрос для центрирования контента на десктопе */
@media (min-width: 601px) {
    .stars-page {
        justify-content: center; /* На экранах шире 600px центрируем контент по вертикали */
    }
}

/* Основной контейнер-обертка, задает отступы */
.stars-wrapper {
    display: flex; /* Включаем flex-контейнер */
    flex-direction: column; /* Элементы внутри будут располагаться в колонку */
    align-items: center; /* Центрируем дочерние элементы по горизонтали */
    width: 100%; /* Ширина на всю доступную область */
    height: 100%; /* КЛЮЧЕВОЕ ИЗМЕНЕНИЕ: Заставляем обертку занять 100% высоты родителя (#stars-page) */
    max-width: 600px; /* Ограничиваем максимальную ширину для больших экранов */
    box-sizing: border-box; /* Включаем padding в общую ширину */
    padding: 20px 15px; /* Отступы: сверху и по бокам. Нижний убран. */
    margin-left: auto; /* Надежно центрирует блок на десктопе */
    margin-right: auto; /* Надежно центрирует блок на десктопе */
}

/* Главный заголовок страницы "Choose and Buy Your Star!" */
.stars-main-title {
    font-weight: 700; /* Насыщенность шрифта (жирный) */
    font-size: 28px; /* Размер шрифта */
    background: linear-gradient(to right, #ffc74e 0%, #fff 100%); /* Градиентный фон для текста */
    -webkit-background-clip: text; /* Обрезаем фон по форме текста (для Chrome/Safari) */
    background-clip: text; /* Обрезаем фон по форме текста (стандартное свойство) */
    -webkit-text-fill-color: transparent; /* Делаем сам текст прозрачным, чтобы был виден фон */
    filter: drop-shadow(1px 1px 3px rgba(0, 20, 0, 0.5)); /* Добавляем тень к тексту */
    text-align: center; /* Выравниваем текст по центру */
    margin: 0 0 15px 0; /* Отступы: 0 сверху, 0 по бокам, 15px снизу */
    line-height: 1.2; /* Межстрочный интервал */
    flex-shrink: 0;
}

/* Контейнер для блока "Your Stars" */
.your-stars-container {
    width: 100%; /* Ширина на всю доступную область */
    background-color: rgba(60, 60, 75, 0.4); /* Полупрозрачный фон */
    border-radius: 20px; /* Скругляем углы */
    padding: 0 20px; /* НОВЫЙ БЛОК: Увеличен горизонтальный отступ по требованию */
    box-sizing: border-box; /* Включаем padding в общую ширину */
    margin-bottom: 20px; /* Внешний отступ снизу */
    flex-shrink: 0;
}

/* Заголовок блока "Your Stars" */
.your-stars-header {
    display: flex; /* Включаем flex-контейнер */
    justify-content: flex-start; /* Изменено для управления позицией разделителя */
    align-items: center; /* Выравниваем элементы по вертикальному центру */
    gap: 15px; /* Добавлено расстояние между элементами */
    min-height: 45px; /* НОВЫЙ БЛОК: Регулируйте это значение для изменения высоты блока */
    width: 100%;
    padding: 0;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.your-stars-header:focus-visible {
    outline: 2px solid rgba(255, 202, 49, 0.85);
    outline-offset: 4px;
    border-radius: 12px;
}

/* Стили для текста "Your Stars" с новым градиентом и размером */
.your-stars-text {
    display: flex; /* Включаем flex-контейнер */
    align-items: center; /* Выравниваем элементы по вертикальному центру */
    gap: 12px; /* НОВЫЙ БЛОК: Увеличено расстояние между треугольником и текстом */
    font-size: 24px; /* Размер шрифта как у заголовка по требованию */
    font-weight: 700; /* Увеличена насыщенность шрифта */
    background: linear-gradient(to bottom, #e9ddc5, #f3be4a); /* Новый градиент по требованию */
    -webkit-background-clip: text; /* Обрезаем фон по форме текста */
    background-clip: text; /* Стандартное свойство */
    -webkit-text-fill-color: transparent; /* Делаем текст прозрачным */
    flex-grow: 1; /* Заставляет этот блок занять всё свободное место, прижимая остальное вправо */
}

/* Стили для треугольника-стрелки созданного через CSS для точного контроля размера */
.dropdown-arrow {
    width: 0; /* Убираем ширину элемента */
    height: 0; /* Убираем высоту элемента */
    border-left: 6px solid transparent; /* Левая сторона треугольника (прозрачная) */
    border-right: 6px solid transparent; /* Правая сторона треугольника (прозрачная) */
    border-top: 9px solid #e1af46; /* Верхняя сторона, которая и формирует видимый треугольник */
    font-size: 0; /* Убираем текстовый символ ▼, если он был в HTML */
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.4)); /* Тень под стрелкой */
    transition: transform 0.35s cubic-bezier(.2, .75, .2, 1);
    transform-origin: 50% 35%;
}

.your-stars-header[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Стили для вертикального разделителя */
.vertical-divider {
    width: 2px; /* Ширина линии 2px по требованию */
    align-self: stretch; /* Растягиваем разделитель на всю высоту родителя (.your-stars-header) */
    background-color: #11141b; /* Цвет линии по требованию */
    border-radius: 2px; /* Слегка скругляем линию */
}

/* Контейнер для счетчика звезд */
.your-stars-count {
    display: flex; /* Включаем flex-контейнер */
    align-items: center; /* Выравниваем элементы по вертикальному центру */
    gap: 6px; /* Расстояние между счетчиком и иконкой */
}

/* Стили для цифры счетчика с новым градиентом и размером */
.your-stars-count span {
    font-size: 24px; /* Увеличенный размер шрифта по требованию */
    font-weight: 700; /* Насыщенность (жирный) */
    background: linear-gradient(to bottom, #e9ddc5, #f3be4a); /* Новый градиент по требованию */
    -webkit-background-clip: text; /* Обрезка по тексту */
    background-clip: text; /* Стандартное свойство */
    -webkit-text-fill-color: transparent; /* Прозрачный текст для видимости градиента */
}

/* Иконка звезды в счетчике */
.your-stars-count img {
    width: 20px; /* Ширина иконки звезды */
    height: 20px; /* Высота иконки звезды */
}

/* НОВЫЙ БЛОК: Главный разделитель между секциями */
.star-main-separator {
    height: 2px; /* Высота линии */
    width: 100%; /* Ширина на всю доступную область */
    background: linear-gradient( to right, rgba(107, 107, 107, 0) 0%, #424242 20%, #7a7a7a 50%, #5f5f5f 80%, rgba(44, 94, 70, 0) 100% ); /* Градиент линии, как в Tasks */
    margin: 0 auto 20px auto; /* Центрируем и добавляем отступ снизу */
    flex-shrink: 0;
}

/* Контейнер для покупки звезд с подложкой. */
.buy-stars-container {
    position: relative; /* Устанавливаем относительное позиционирование для дочерних абсолютных элементов */
    width: 100%; /* Ширина на всю доступную область */
    box-sizing: border-box; /* Включаем padding в общую ширину */
    display: flex; /* Включаем flex-контейнер */
    flex-direction: column; /* Элементы внутри будут располагаться в колонку */
}

/* Подложка, стили скопированы из .tasks-background */
.stars-background {
    position: absolute; /* Абсолютное позиционирование относительно .buy-stars-container */
    top: 0; /* Прижимаем к верхнему краю родителя */
    left: 0; /* Прижимаем к левому краю родителя */
    width: 100%; /* Ширина на всю область родителя */
    height: 100%; /* Высота на всю область родителя */
    z-index: 1; /* Располагаем под контентом */
    border-radius: 20px; /* Скругляем углы */
    background: linear-gradient(to bottom, rgba(100, 100, 100, 0.2) 0%, rgba(102, 102, 102, 0) 100%); /* Градиент теперь исчезает в полную прозрачность */
    filter: drop-shadow(10px 1px 20px rgba(0, 0, 0, 0.3)); /* Добавляем "умную" тень, которая учитывает прозрачность */
}

/* Заголовок "Buy Stars:" */
.buy-stars-title {
    position: relative; /* Устанавливаем относительное позиционирование */
    z-index: 2; /* Располагаем над подложкой */
    color: rgb(252, 211, 101); /* Цвет текста (желтоватый) */
    font-size: 18px; /* Размер шрифта */
    font-weight: 600; /* Насыщенность шрифта */
    text-align: left; /* Выравнивание текста по левому краю */
    padding: 20px 15px 0 15px; /* Добавлены внутренние отступы */
    margin: 0 0 20px 0; /* Отступы */
    flex-shrink: 0; /* Запрещаем блоку сжиматься */
}

/* Список звезд для покупки */
.stars-list {
    position: relative; /* Устанавливаем относительное позиционирование */
    z-index: 2; /* Располагаем над подложкой */
    display: flex; /* Включаем flex-контейнер */
    flex-direction: column; /* Элементы располагаются в колонку */
    padding: 0 15px 20px 15px; /* Добавлены отступы */
}

/* Стили для одного ряда со звездой */
.star-row {
    display: flex; /* Включаем flex-контейнер для строки */
    align-items: center; /* Выравниваем все элементы в строке по вертикальному центру */
    justify-content: flex-start; /* Элементы начинаются с левого края */
}

/* Разделитель между строками, аналог .decorative-line в tasks */
.star-separator {
    height: 1px; /* Высота линии */
    width: 100%; /* Ширина на всю доступную область */
    background: linear-gradient( to right, rgba(85, 85, 85, 0) 0%, rgba(85, 85, 85, 0.5) 50%, rgba(85, 85, 85, 0) 100% ); /* Градиент линии */
    margin: 10px auto; /* Уменьшен вертикальный отступ для компактности */
}

/* Обертка для иконки звезды */
.star-icon-wrapper {
    width: 50px; /* Фиксированная ширина для обертки иконки, чтобы текст был выровнен */
    margin-right: 15px; /* Отступ справа от иконки */
    display: flex; /* Включаем flex для центрирования иконки внутри обертки */
    justify-content: center; /* Центрируем иконку по горизонтали */
    align-items: center; /* Центрируем иконку по вертикали */
}

/* Общие стили для иконки */
.star-icon {
    object-fit: contain; /* Масштабируем изображение, сохраняя пропорции */
}

/* Размеры для каждого типа иконки */
.star-icon-legendary { width: 50px; height: 50px; } /* Размер для самой большой звезды */
.star-icon-epic      { width: 40px; height: 40px; } /* Размер для второй по величине звезды */
.star-icon-rare      { width: 32px; height: 32px; } /* Размер для средней звезды */
.star-icon-uncommon  { width: 24px; height: 24px; } /* Размер для маленькой звезды */
.star-icon-common    { width: 18px; height: 18px; } /* Размер для самой маленькой звезды */

/* Контейнер с информацией о звезде */
.star-info {
    margin-right: auto; /* Занимает все доступное пространство, прижимая кнопку к правому краю */
}

/* Название звезды */
.star-name {
    font-size: 18px; /* Размер шрифта для названия звезды */
    font-weight: 700; /* Насыщенность шрифта (жирный) */
    color: #ffffff; /* Цвет текста (белый) */
}

/* Текст с количеством оставшихся звезд */
.star-amount-left {
    font-size: 13px; /* Размер шрифта для текста "stars left" */
    color: #9e9e9e; /* Цвет текста (серый) */
    margin-top: 4px; /* Отступ сверху */
}

/* Секция с кнопкой и ценой */
.star-buy-section {
    display: flex; /* Включаем flex-контейнер */
    flex-direction: column; /* Кнопка и цена располагаются в колонку */
    align-items: center; /* Центрируем их по горизонтали */
    gap: 4px; /* Расстояние между кнопкой и ценой */
}

/* Стили кнопки BUY по эскизу */
.star-buy-button {
    background: linear-gradient(to bottom, #ffe308, #f4a919); /* Новый градиент фона кнопки по требованию */
    color: #9f3901; /* Цвет текста на кнопке по требованию */
    font-weight: 700; /* Насыщенность шрифта (жирный) */
    font-size: 15px; /* Размер шрифта */
    border: 2px solid #de8d01; /* Рамка (контур) кнопки 2px по требованию */
    border-radius: 16px; /* Скругление углов 14px по требованию */
    padding: 5px 12px; /* НОВЫЙ БЛОК: Регулируйте первое значение (5px) для изменения высоты кнопки */
    cursor: pointer; /* Курсор в виде руки при наведении */
    transition: transform 0.2s ease; /* Плавный переход для анимации нажатия */
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2); /* Тень под кнопкой */
}

/* Анимация нажатия кнопки */
.star-buy-button:active {
    transform: scale(0.95); /* Уменьшаем кнопку при нажатии */
}

.star-buy-button:disabled {
    cursor: default;
    color: #77736a;
    border-color: #555149;
    background: linear-gradient(to bottom, #353535, #232323);
    box-shadow: none;
    opacity: 0.7;
}

.star-buy-button[data-purchase-pending="true"] {
    min-width: 58px;
    cursor: wait;
}

.star-buy-button[data-purchase-pending='true'] {
    min-width: 68px;
    padding-inline: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #754101;
    border-color: #d99509;
    background: linear-gradient(to bottom, #ffe87a, #efa51b);
    box-shadow: 0 0 12px rgba(255, 183, 25, 0.22);
    opacity: 1;
}

.star-buy-button[data-purchase-pending='true']::before {
    content: '';
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border: 2px solid rgba(117, 65, 1, 0.3);
    border-top-color: #754101;
    border-radius: 50%;
    animation: star-purchase-spin 700ms linear infinite;
}

@keyframes star-purchase-spin {
    to { transform: rotate(360deg); }
}

.star-buy-button:disabled:active {
    transform: none;
}

/* Стиль для цены под кнопкой */
.star-price {
    font-size: 13px; /* Размер шрифта для цены */
    color: #b27a02; /* Цвет текста цены по требованию */
    font-weight: 600; /* Увеличена насыщенность */
}

.star-collection-layer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 0.46s;
}

.star-collection-layer.is-open {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.star-collection-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    opacity: 0;
    background: rgba(2, 5, 10, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: opacity 0.38s ease;
}

.star-collection-layer.is-open .star-collection-backdrop {
    opacity: 1;
}

.star-collection-sheet {
    position: absolute;
    left: 50%;
    top: 0;
    width: min(100%, 600px);
    max-height: min(72vh, 620px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: calc(12px + env(safe-area-inset-top)) 20px 22px;
    border: 1px solid rgba(255, 203, 57, 0.2);
    border-top: 0;
    border-radius: 0 0 26px 26px;
    color: #f5f5f5;
    background:
        radial-gradient(circle at 82% 8%, rgba(255, 187, 27, 0.14), transparent 32%),
        linear-gradient(155deg, #252b34 0%, #151a22 56%, #0d1118 100%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.48), inset 0 -1px rgba(255, 255, 255, 0.06);
    transform: translate(-50%, calc(-100% - 28px)) scale(0.985);
    opacity: 0;
    transition:
        transform 0.46s cubic-bezier(.2, .8, .2, 1),
        opacity 0.28s ease;
}

.star-collection-layer.is-open .star-collection-sheet {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
}

.star-collection-handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 15px;
    border-radius: 99px;
    background: linear-gradient(90deg, #7b5b17, #ffd64a, #7b5b17);
    box-shadow: 0 0 14px rgba(255, 196, 31, 0.35);
}

.star-collection-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.star-collection-kicker {
    margin: 0 0 3px;
    color: #e9aa19;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.star-collection-header h2 {
    margin: 0;
    color: #fff;
    font-size: 25px;
    line-height: 1.05;
}

.star-collection-subtitle {
    margin: 5px 0 0;
    color: #9298a1;
    font-size: 14px;
}

.star-collection-list {
    display: grid;
    gap: 8px;
    margin-top: 15px;
}

.star-collection-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    min-height: 50px;
    padding: 5px 14px 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 15px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
}

.star-collection-item[hidden] {
    display: none;
}

.star-collection-layer.is-open .star-collection-item {
    animation: starCollectionItemIn 0.48s cubic-bezier(.2, .75, .2, 1) both;
}

.star-collection-layer.is-open .star-collection-item:nth-child(2) { animation-delay: 45ms; }
.star-collection-layer.is-open .star-collection-item:nth-child(3) { animation-delay: 90ms; }
.star-collection-layer.is-open .star-collection-item:nth-child(4) { animation-delay: 135ms; }
.star-collection-layer.is-open .star-collection-item:nth-child(5) { animation-delay: 180ms; }

.star-collection-icon {
    --owned-star-size: 24px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 38px;
}

.star-collection-icon-common { --owned-star-size: 18px; }
.star-collection-icon-uncommon { --owned-star-size: 21px; }
.star-collection-icon-rare { --owned-star-size: 24px; }
.star-collection-icon-epic { --owned-star-size: 27px; }
.star-collection-icon-legendary { --owned-star-size: 30px; }

.star-collection-icon img {
    width: var(--owned-star-size);
    height: var(--owned-star-size);
    max-width: 30px;
    max-height: 30px;
    object-fit: contain;
    image-rendering: auto;
    filter:
        drop-shadow(0 1px 1px rgba(40, 22, 0, 0.9))
        drop-shadow(0 0 2px rgba(255, 187, 19, 0.42));
}

.star-collection-details {
    display: block;
    min-width: 0;
}

.star-collection-name {
    display: block;
    overflow: hidden;
    color: #f1f1f1;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.08;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.star-collection-details small {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: #969ca6;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.star-collection-item [data-owned-count] {
    min-width: 34px;
    padding: 4px 9px;
    border: 1px solid rgba(255, 195, 37, 0.22);
    border-radius: 12px;
    color: #ffd454;
    background: rgba(255, 184, 20, 0.08);
    font-size: 17px;
    text-align: center;
}

.star-nft-action-slot {
    display: flex;
    align-items: center;
    min-width: 0;
}

.star-nft-convert-button {
    --nft-accent: #ffd85a;
    --nft-accent-deep: #e8930c;
    position: relative;
    isolation: isolate;
    display: inline-grid;
    align-items: center;
    justify-content: center;
    width: 72px;
    min-height: 36px;
    padding: 4px 6px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--nft-accent) 52%, transparent);
    border-radius: 12px;
    color: #fff1be;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.12), transparent 38%),
        linear-gradient(135deg, rgba(123, 82, 16, 0.76), rgba(35, 29, 22, 0.96));
    box-shadow:
        0 5px 16px rgba(0, 0, 0, 0.24),
        inset 0 1px rgba(255, 255, 255, 0.13),
        0 0 0 rgba(255, 196, 41, 0);
    font: 700 10px/1 'SourceSans3', sans-serif;
    letter-spacing: 0.025em;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        transform 180ms cubic-bezier(.2, .8, .2, 1),
        border-color 220ms ease,
        box-shadow 220ms ease,
        color 220ms ease;
}

.star-nft-convert-button[data-nft-convert='legendary'] { --nft-accent: #fff09a; --nft-accent-deep: #ef9c0d; }
.star-nft-convert-button[data-nft-convert='epic'] { --nft-accent: #ffd86a; --nft-accent-deep: #de7f10; }
.star-nft-convert-button[data-nft-convert='rare'] { --nft-accent: #ffc542; --nft-accent-deep: #cf7010; }
.star-nft-convert-button[data-nft-convert='uncommon'] { --nft-accent: #eabf56; --nft-accent-deep: #a96713; }
.star-nft-convert-button[data-nft-convert='common'] { --nft-accent: #d5b56e; --nft-accent-deep: #875a1c; }

.star-nft-convert-button::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -70% -30%;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.32) 48%, transparent 61%);
    transform: translate3d(-58%, 0, 0) rotate(4deg);
    transition: transform 680ms cubic-bezier(.2, .75, .2, 1);
}

.star-nft-convert-button:hover,
.star-nft-convert-button:focus-visible {
    color: #fff8dc;
    border-color: var(--nft-accent);
    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.28),
        inset 0 1px rgba(255, 255, 255, 0.2),
        0 0 16px color-mix(in srgb, var(--nft-accent) 30%, transparent);
    transform: translateY(-2px);
    outline: none;
}

.star-nft-convert-button:hover::before,
.star-nft-convert-button:focus-visible::before {
    transform: translate3d(58%, 0, 0) rotate(4deg);
}

.star-nft-convert-button:active {
    transform: translateY(0) scale(0.965);
    transition-duration: 80ms;
}

.star-nft-convert-label {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    place-self: center;
    min-width: 0;
    line-height: 1;
}

.star-nft-convert-label strong {
    min-width: 0;
    padding: 0;
    border: 0;
    color: #ffe794;
    background: none;
    font-size: 13px;
    line-height: 0.92;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72), 0 0 8px rgba(255, 190, 29, 0.25);
}

.star-nft-convert-label small {
    margin-top: 3px;
    color: #d59d2b;
    font-size: 6px;
    line-height: 1;
    letter-spacing: 0.17em;
}

.star-nft-convert-copies {
    position: absolute;
    z-index: 2;
    top: 3px;
    right: 3px;
    display: grid;
    place-items: center;
    min-width: 14px;
    height: 13px;
    box-sizing: border-box;
    padding-inline: 2px;
    border: 1px solid rgba(255, 226, 140, 0.2);
    border-radius: 7px;
    color: #ffd96a;
    background: rgba(7, 9, 13, 0.35);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.34);
    font-size: 7.5px;
    line-height: 1;
}

.star-nft-convert-button[data-number-pending='true'] {
    cursor: wait;
    opacity: 0.72;
    filter: saturate(0.65);
}

.star-nft-convert-button[data-number-pending='true']:hover {
    transform: none;
}

.star-nft-convert-copies[hidden] {
    display: none;
}

.nft-development-tooltip {
    position: fixed;
    z-index: 1450;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    width: min(264px, calc(100vw - 24px));
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid rgba(255, 204, 64, 0.36);
    border-radius: 14px;
    color: #d4d5d8;
    background:
        radial-gradient(circle at 13% 10%, rgba(255, 193, 38, 0.17), transparent 36%),
        rgba(16, 20, 27, 0.97);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.07);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(7px) scale(0.97);
    transform-origin: 50% 100%;
    transition:
        opacity 170ms ease,
        transform 220ms cubic-bezier(.2, .8, .2, 1),
        visibility 0s linear 220ms;
}

.nft-development-tooltip::after {
    content: '';
    position: absolute;
    left: calc(50% - 6px);
    bottom: -6px;
    width: 11px;
    height: 11px;
    border-right: 1px solid rgba(255, 204, 64, 0.28);
    border-bottom: 1px solid rgba(255, 204, 64, 0.28);
    background: #11151c;
    transform: rotate(45deg);
}

.nft-development-tooltip.is-below {
    transform-origin: 50% 0;
}

.nft-development-tooltip.is-below::after {
    top: -6px;
    bottom: auto;
    border: 0;
    border-top: 1px solid rgba(255, 204, 64, 0.28);
    border-left: 1px solid rgba(255, 204, 64, 0.28);
}

.nft-development-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

.nft-development-tooltip-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #ffda55;
    background: linear-gradient(145deg, rgba(255, 213, 80, 0.22), rgba(224, 130, 6, 0.08));
    box-shadow: 0 0 14px rgba(255, 188, 26, 0.17);
    font-size: 15px;
}

.nft-development-tooltip span:last-child {
    font-size: 11px;
    line-height: 1.28;
}

.nft-development-tooltip strong {
    display: block;
    margin-bottom: 2px;
    color: #ffc83d;
    font-size: 9px;
    letter-spacing: 0.16em;
}

.nft-stub-layer {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 18px;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 420ms;
}

.nft-stub-layer.is-open {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.nft-stub-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(2, 5, 10, 0.76);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 300ms ease;
}

.nft-stub-layer.is-open .nft-stub-backdrop {
    opacity: 1;
}

.nft-stub-dialog {
    position: relative;
    width: min(100%, 390px);
    max-height: min(78vh, 580px);
    overflow: hidden auto;
    box-sizing: border-box;
    padding: 27px 22px 22px;
    border: 1px solid rgba(255, 198, 45, 0.3);
    border-radius: 24px;
    color: #f5f5f5;
    background:
        radial-gradient(circle at 50% -12%, rgba(255, 197, 44, 0.22), transparent 42%),
        linear-gradient(155deg, #252b34 0%, #151a21 57%, #0b1017 100%);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.58),
        inset 0 1px rgba(255, 255, 255, 0.08),
        inset 0 -1px rgba(255, 188, 30, 0.06);
    opacity: 0;
    transform: translateY(24px) scale(0.965);
    transition:
        opacity 260ms ease,
        transform 420ms cubic-bezier(.16, .82, .24, 1);
}

.nft-stub-layer.is-open .nft-stub-dialog {
    opacity: 1;
    transform: none;
}

.nft-stub-dialog-glow {
    position: absolute;
    top: -78px;
    left: calc(50% - 88px);
    width: 176px;
    height: 132px;
    border-radius: 50%;
    background: rgba(255, 193, 32, 0.13);
    filter: blur(28px);
    pointer-events: none;
}

.nft-stub-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0 0 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #bec2c8;
    background: rgba(255, 255, 255, 0.055);
    font: 600 22px/1 Arial, sans-serif;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nft-stub-close:hover,
.nft-stub-close:focus-visible {
    color: #fff2c5;
    background: rgba(255, 203, 57, 0.13);
    outline: none;
    transform: rotate(5deg) scale(1.05);
}

.nft-stub-emblem {
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 15px;
    border: 1px solid rgba(255, 215, 94, 0.38);
    border-radius: 50%;
    color: #ffe178;
    background: radial-gradient(circle at 35% 28%, #5a461b, #211b13 57%, #10131a 100%);
    box-shadow: 0 0 26px rgba(255, 186, 25, 0.2), inset 0 0 14px rgba(255, 214, 76, 0.09);
}

.nft-stub-emblem::before,
.nft-stub-emblem::after {
    content: '';
    position: absolute;
    inset: -7px;
    border: 1px dashed rgba(255, 205, 57, 0.2);
    border-radius: 50%;
    animation: nftStubOrbit 9s linear infinite;
}

.nft-stub-emblem::after {
    inset: -13px;
    border-style: solid;
    border-color: rgba(255, 205, 57, 0.12) transparent rgba(255, 205, 57, 0.12) transparent;
    animation-duration: 13s;
    animation-direction: reverse;
}

.nft-stub-emblem span {
    font-size: 28px;
    text-shadow: 0 0 14px rgba(255, 216, 85, 0.62);
    animation: nftStubStarPulse 2.8s ease-in-out infinite;
}

.nft-stub-kicker {
    margin: 0 0 4px;
    color: #f0ad1b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-align: center;
}

.nft-stub-dialog h2 {
    margin: 0;
    background: linear-gradient(180deg, #fff7dd 4%, #ffd152 64%, #e79210 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 7px rgba(255, 167, 0, 0.17));
    font-size: 25px;
    line-height: 1.1;
    text-align: center;
}

.nft-stub-description {
    max-width: 320px;
    margin: 9px auto 0;
    color: #aeb3bc;
    font-size: 14px;
    line-height: 1.42;
    text-align: center;
}

.nft-stub-choice-list {
    display: grid;
    gap: 8px;
    max-height: min(300px, 42vh);
    margin-top: 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 193, 37, 0.45) transparent;
}

.nft-stub-choice-list[hidden] {
    display: none;
}

.nft-stub-choice {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    color: #f1f1f1;
    text-align: left;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
    cursor: pointer;
    opacity: 1;
    transform: none;
    animation: nftStubChoiceIn 320ms cubic-bezier(.2, .75, .2, 1) backwards;
    transition: border-color 170ms ease, background 170ms ease, transform 170ms ease;
}

.nft-stub-choice:nth-child(2) { animation-delay: 40ms; }
.nft-stub-choice:nth-child(3) { animation-delay: 80ms; }
.nft-stub-choice:nth-child(4) { animation-delay: 120ms; }
.nft-stub-choice:nth-child(n+5) { animation-delay: 150ms; }

.nft-stub-choice:hover,
.nft-stub-choice:focus-visible {
    border-color: rgba(255, 201, 54, 0.42);
    background: linear-gradient(100deg, rgba(255, 201, 54, 0.13), rgba(255, 255, 255, 0.035));
    outline: none;
    transform: translateX(2px);
}

.nft-stub-choice-star {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 184, 20, 0.09);
}

.nft-stub-choice-star-image {
    width: var(--owned-star-size, 24px);
    height: var(--owned-star-size, 24px);
    max-width: 30px;
    max-height: 30px;
    object-fit: contain;
    image-rendering: auto;
    filter:
        drop-shadow(0 1px 1px rgba(32, 17, 0, 0.92))
        drop-shadow(0 0 2px rgba(255, 188, 22, 0.44));
}

.nft-stub-choice strong,
.nft-stub-choice small {
    display: block;
}

.nft-stub-choice strong {
    color: #f2f2f2;
    font-size: 14px;
}

.nft-stub-choice small {
    margin-top: 2px;
    color: #9299a4;
    font-size: 11px;
}

.nft-stub-choice-arrow {
    color: #d9a52d;
    font: 300 25px/1 Arial, sans-serif;
    text-align: center;
}

.nft-stub-selected-star {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    column-gap: 11px;
    width: min(100%, 285px);
    box-sizing: border-box;
    margin: 18px auto 0;
    padding: 10px 13px;
    border: 1px solid rgba(255, 202, 53, 0.2);
    border-radius: 15px;
    background: linear-gradient(100deg, rgba(255, 197, 37, 0.1), rgba(255, 255, 255, 0.025));
}

.nft-stub-selected-star[hidden] {
    display: none;
}

.nft-stub-selected-icon {
    grid-row: 1 / 3;
    justify-self: center;
    width: var(--owned-star-size, 24px);
    height: var(--owned-star-size, 24px);
    max-width: 30px;
    max-height: 30px;
    object-fit: contain;
    image-rendering: auto;
    filter:
        drop-shadow(0 1px 1px rgba(32, 17, 0, 0.92))
        drop-shadow(0 0 2px rgba(255, 188, 22, 0.42));
}

.nft-stub-choice-star-image[data-rarity='common'],
.nft-stub-selected-icon[data-rarity='common'] { --owned-star-size: 18px; }

.nft-stub-choice-star-image[data-rarity='uncommon'],
.nft-stub-selected-icon[data-rarity='uncommon'] { --owned-star-size: 21px; }

.nft-stub-choice-star-image[data-rarity='rare'],
.nft-stub-selected-icon[data-rarity='rare'] { --owned-star-size: 24px; }

.nft-stub-choice-star-image[data-rarity='epic'],
.nft-stub-selected-icon[data-rarity='epic'] { --owned-star-size: 27px; }

.nft-stub-choice-star-image[data-rarity='legendary'],
.nft-stub-selected-icon[data-rarity='legendary'] { --owned-star-size: 30px; }

.nft-stub-selected-star strong {
    align-self: end;
    color: #f7f1df;
    font-size: 15px;
}

.nft-stub-selected-star small {
    align-self: start;
    margin-top: 1px;
    color: #9299a4;
    font-size: 11px;
}

.nft-stub-confirm {
    display: block;
    min-width: 124px;
    margin: 17px auto 0;
    padding: 9px 22px;
    border: 1px solid #e49a13;
    border-radius: 14px;
    color: #633708;
    background: linear-gradient(180deg, #ffe277, #f4aa25);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.28), 0 0 15px rgba(255, 183, 24, 0.12);
    font: 700 14px/1 'SourceSans3', sans-serif;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease;
}

.nft-stub-confirm[hidden] {
    display: none;
}

.nft-stub-confirm:hover,
.nft-stub-confirm:focus-visible {
    filter: brightness(1.07);
    outline: none;
    transform: translateY(-1px);
}

.nft-stub-confirm:active {
    transform: scale(0.97);
}

.nft-stub-dialog.is-content-entering > :not(.nft-stub-dialog-glow):not(.nft-stub-close) {
    animation: nftStubContentIn 260ms cubic-bezier(.2, .75, .2, 1) backwards;
}

.star-collection-empty {
    margin: 22px 0 8px;
    color: #9ca1aa;
    font-size: 15px;
    text-align: center;
}

.star-collection-empty[hidden] {
    display: none;
}

@keyframes starCollectionItemIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes nftStubOrbit {
    to { transform: rotate(360deg); }
}

@keyframes nftStubStarPulse {
    0%, 100% { opacity: 0.82; transform: scale(0.94); }
    50% { opacity: 1; transform: scale(1.08); }
}

@keyframes nftStubChoiceIn {
    from { opacity: 0; transform: translateY(10px); }
}

@keyframes nftStubContentIn {
    from { opacity: 0; transform: translateY(7px); }
}

@media (max-width: 370px) {
    .star-collection-item {
        grid-template-columns: 28px minmax(0, 1fr) auto auto;
        gap: 6px;
        padding-inline: 7px;
    }

    .star-nft-convert-button {
        width: 68px;
    }

    .star-collection-name {
        font-size: 13.5px;
    }

    .star-collection-item [data-owned-count] {
        min-width: 28px;
        padding-inline: 6px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .star-nft-convert-button,
    .star-nft-convert-button::before,
    .nft-development-tooltip,
    .nft-stub-backdrop,
    .nft-stub-dialog,
    .nft-stub-choice,
    .nft-stub-confirm {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
    }

    .nft-stub-emblem::before,
    .nft-stub-emblem::after,
    .nft-stub-emblem span {
        animation: none !important;
    }
}
