@charset "UTF-8";

/*
 * Общие компоненты: кнопки, карточки, модальные окна, секции
 *
 * Файл выделен из общего style.css: правило для одной зоны ответственности.
 */

.anime-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #a5a5a5;
    margin-bottom: 20px;
}

.anime-meta .rating {
    background-color: #3b3b3b;
    color: #fff;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.anime-meta .age-limit {
    border: 1px solid #555;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 11px;
}

.btn {
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    height: 40px;
    text-decoration: none;
}

.btn-watch {
    background: #ffffff;
    color: #000000;
    padding: 0 24px;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-watch:hover {
    background: #e6e6e6;
    transform: scale(1.02);
}

.btn-watch .play-icon {
    color: #000000;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.btn-trailer {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0 24px;
}

.btn-trailer:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Трейлеры пока не реализованы — кнопка временно скрыта во всех блоках.
   Разметка осталась, чтобы потом просто убрать display: none. */
.btn-trailer {
    display: none;
}

.btn-icon {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    padding: 0;
}

.btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-bookmark {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-bookmark .bookmark-icon {
    color: #a5a5a5;
    transition: color 0.2s ease;
}

.btn-bookmark .bookmark-fill {
    opacity: 0;
    transform: scale(0.6);
    transform-origin: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-bookmark:hover .bookmark-icon {
    color: #ffffff;
}

.btn-bookmark.is-added .bookmark-icon {
    color: #ffffff;
}

.btn-bookmark.is-added .bookmark-fill {
    opacity: 1;
    transform: scale(1);
}

/* При наведении на уже добавленную закладку можно сделать её красной */
.btn-bookmark.is-added:hover .bookmark-icon {
    color: #e52e2e;
}

/*===================================================================================================================
    Рейтинги: внешние сервисы + оценка пользователей сайта
===================================================================================================================*/
.rating-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Пока оценки грузятся — держим высоту и показываем скелетон */
.modal-ratings:empty,
.modal-ratings.is-loading {
    min-height: 30px;
}

.modal-ratings.is-loading:empty::before {
    content: '';
    display: block;
    width: 180px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.12) 37%,
        rgba(255, 255, 255, 0.05) 63%);
    background-size: 400% 100%;
    animation: rating-skeleton 1.4s ease infinite;
}

@keyframes rating-skeleton {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .modal-ratings.is-loading:empty::before {
        animation: none;
    }
}

.rating-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    background-color: rgba(255, 255, 255, 0.05);
    font-size: 12px;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

a.rating-chip:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background-color: rgba(255, 255, 255, 0.12);
}

.rating-chip-name {
    color: #a5a5a5;
}

.rating-chip-score {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
}

/* Оценка сайта: та же плашка, но подпись фирменным цветом */
.rating-chip--site .rating-chip-name {
    font-weight: 700;
    color: #cc1d1d;
}

.rating-vote {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.rating-vote-label {
    font-size: 12.5px;
    color: #8d8d93;
}

.rating-stars {
    display: flex;
    gap: 2px;
    /* цвет подставляет js: от красного на единице до золота на десятке */
    --star-color: #f0b429;
}

.rating-star {
    padding: 0 1px;
    border: none;
    background: none;
    font-size: 21px;
    line-height: 1;
    color: #35353b;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
}

.rating-star:hover {
    transform: scale(1.18);
}

.rating-star.is-active,
.rating-star.is-hover {
    color: var(--star-color);
}

/* 10 из 10 — золото, по которому слева направо проходит светлая волна */
.rating-stars.is-legendary .rating-star.is-active,
.rating-stars.is-legendary .rating-star.is-hover {
    background-image: linear-gradient(
        110deg,
        #e0a90b 0%,
        #f5c518 32%,
        #ffe9a8 45%,
        #fffdf2 50%,
        #ffe9a8 55%,
        #f5c518 68%,
        #e0a90b 100%
    );
    background-size: 260% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* задержка по номеру звезды — блик идёт по ряду слева направо */
    animation: star-wave 2.4s ease-in-out infinite;
    animation-delay: calc(var(--star-index, 0) * 0.07s);
}

@keyframes star-wave {
    0% {
        background-position: 100% 50%;
    }

    /* блик пробегает по звезде и гаснет, пока волна идёт по соседним */
    35%,
    100% {
        background-position: 0% 50%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rating-stars.is-legendary .rating-star.is-active,
    .rating-stars.is-legendary .rating-star.is-hover {
        animation: none;
        color: #f5d64a;
        background-image: none;
        -webkit-text-fill-color: #f5d64a;
    }
}

.rating-star:focus-visible {
    outline: 2px solid #cc1d1d;
    outline-offset: 2px;
    border-radius: 3px;
}

.modal-ratings,
.watch-ratings {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between; 
    align-items: flex-end; 
    margin-bottom: 24px;
}
.section-title {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    position: relative; 
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px; 
    height: 3px;
    background-color: #cc1d1d; 
    border-radius: 2px;
}

.section-link {
    font-size: 16px;
    font-weight: 600; 
    color: #a5a5a5;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    padding-bottom: 8px;
}

.section-link span {
    font-size: 20px;
    transition: transform 0.2s ease;
}

.section-link:hover {
    color: #ffffff;
}

.section-link:hover span {
    transform: translateX(5px);
}

/*===================================================================================================================
    Секция карточек
===================================================================================================================*/
/*
 * Колонки — minmax(0, 1fr), а не 1fr: иначе картинка с шириной 600px
 * из <img width="600"> распирает свою колонку, и одна карточка в ряду
 * становится заметно крупнее остальных.
 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1200px) {
    .cards-grid {
            grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .cards-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
    }
}

/*
 * «Популярное сейчас» — одна строка с горизонтальной прокруткой:
 * колонок столько же, сколько было в сетке, но все карточки в один ряд.
 * Скроллбар скрыт, листается стрелками по бокам (как в баннере).
 */
.cards-row-wrap {
    position: relative;
}

.cards-row {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 7 * 16px) / 8);
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-padding-left: 2px;
    /* место под наведение (подъём карточки) */
    padding: 4px 2px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cards-row::-webkit-scrollbar {
    display: none;
}

.cards-row > * {
    scroll-snap-align: start;
}

/* Стрелки — как у баннера, но по краям ряда и по центру постера */
.cards-arrow {
    position: absolute;
    /* --arrow-center считает js: половина высоты постера, а не всего ряда */
    top: var(--arrow-center, 50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0 0 3px;
    border: none;
    border-radius: 50%;
    background-color: rgba(20, 20, 22, 0.82);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-family: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.cards-arrow--prev {
    left: -14px;
}

.cards-arrow--next {
    right: -14px;
}

.cards-arrow:hover:not(:disabled) {
    background-color: rgba(204, 29, 29, 0.9);
    transform: translateY(-50%) scale(1.05);
}

.cards-arrow:focus-visible {
    outline: 2px solid #cc1d1d;
    outline-offset: 2px;
}

.cards-arrow:disabled {
    opacity: 0.3;
    pointer-events: none;
}

@media (max-width: 1200px) {
    .cards-row {
            grid-auto-columns: calc((100% - 3 * 16px) / 4);
    }
}

@media (max-width: 640px) {
    .cards-row {
            grid-auto-columns: calc((100% - 12px) / 2);
            gap: 12px;
    }

    .cards-arrow {
            width: 32px;
            height: 32px;
            font-size: 18px;
    }

    .cards-arrow--prev {
            left: -6px;
    }

    .cards-arrow--next {
            right: -6px;
    }
}

/* Пустое состояние «Популярного» — обычный текст, а не колонка в ряду */
.cards-row.is-empty {
    display: block;
}

/*===================================================================================================================
    Карточка аниме
===================================================================================================================*/
.anime-card {
    transition: transform 0.25s ease;
}

.anime-card:hover {
    transform: translateY(-4px);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background-color: #1a1a1c;
    transition: box-shadow 0.25s ease;
}

.anime-card:hover .card-poster {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
}

.card-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.anime-card:hover .card-poster img {
    transform: scale(1.06);
}

/*
 * Заглушка вместо постера: у свежих онгоингов Shikimori отдаёт
 * missing_original.jpg, да и любой постер может не загрузиться.
 * Рисуем градиент с красным отблеском и первую букву названия.
 */
.poster-stub {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(120% 80% at 15% 100%, rgba(204, 29, 29, 0.24), transparent 62%),
        linear-gradient(160deg, #1e1e22 0%, #101012 55%, #17171b 100%);
}

.poster-stub::before {
    content: attr(data-initial);
    font-size: 68px;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.22);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

/* Плашка «Серия N» на постере — в цветах сайта, без кричащего розового */
.badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 7px;
    background: linear-gradient(135deg, #d8202a, #8f1010);
    box-shadow: 0 4px 14px rgba(180, 20, 25, 0.35);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.2px;
    z-index: 2;
}

/* Оценка — золотая звезда в тёмной капсуле */
.card-rating {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px 5px 8px;
    border: 1px solid rgba(245, 197, 24, 0.38);
    border-radius: 9px;
    background-color: rgba(10, 10, 12, 0.72);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.2px;
    z-index: 2;
}

.card-rating::before {
    content: '\2605';
    font-size: 11px;
    color: #f5c518;
}

/*
 * Плашка «Продолжить просмотр»: полоса внизу постера с серией и полоска прогресса.
 * Рейтинг в этих карточках убран, чтобы низ не превращался в свалку плашек.
 */
.card-continue {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 22px 10px 9px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.6) 55%, transparent);
}

.card-continue-episode {
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.card-continue-time {
    color: rgba(255, 255, 255, 0.72);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.card-continue-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.22);
    overflow: hidden;
}

.card-continue-track span {
    display: block;
    height: 100%;
    background-color: #cc1d1d;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    margin: 10px 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.anime-card:hover .card-title {
    color: #ff4d4d;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    color: #8a8a8f;
}

.card-meta-year {
    color: #9a9aa2;
}

/* Число серий — аккуратная плашка в палитре сайта */
.card-meta-episodes {
    padding: 2px 7px;
    border-radius: 6px;
    background-color: rgba(204, 29, 29, 0.14);
    color: #ff9b9b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    white-space: nowrap;
}

.cards-message {
    grid-column: 1 / -1;
    font-size: 14px;
    color: #8a8a8f;
    padding: 16px 0;}

/*===================================================================================================================
    Окно с информацией об аниме
===================================================================================================================*/
.anime-modal {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(900px, calc(100% - 32px));
    max-height: min(560px, calc(100% - 48px));
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background-color: #0d0d10;
    color: #ffffff;
    overflow: hidden;
}

.anime-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
}

.anime-modal[open] {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
}

.modal-poster {
    background-color: #1a1a1c;
}

.modal-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 28px;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/*===================================================================================================================
    Окно франшизы: все части сериала по порядку
===================================================================================================================*/
.franchise-modal {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(620px, calc(100% - 24px));
    max-height: min(76vh, calc(100% - 32px));
    padding: 26px 24px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background-color: #0d0d10;
    color: #ffffff;
    overflow-y: auto;
    /* Своя полоса прокрутки вместо белой системной */
}

.franchise-modal::-webkit-scrollbar {
    width: 8px;
}

.franchise-modal::-webkit-scrollbar-track {
    margin: 12px 0;
    background-color: transparent;
}

.franchise-modal::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.22);
}

.franchise-modal::-webkit-scrollbar-thumb:hover {
    background-color: rgba(204, 29, 29, 0.65);
}

.franchise-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
}

.franchise-modal[open] {
    display: block;
}

.franchise-title {
    margin: 0 44px 6px 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
}

.franchise-note {
    margin: 0 0 18px;
    font-size: 12.5px;
    color: #8b8b90;
}

.franchise-list {
    display: grid;
    gap: 8px;
}

.franchise-row {
    display: grid;
    grid-template-columns: 24px 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background-color: #101012;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.franchise-row:hover {
    border-color: rgba(204, 29, 29, 0.5);
    background-color: #141417;
}

/* Порядковый номер — главное в этом списке: в каком порядке смотреть */
.franchise-order {
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #ff6b6b;
    text-align: center;
}

.franchise-poster {
    width: 40px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    background-color: #1b1b1e;
}

.franchise-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.franchise-row-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #ffffff;
    /* В этом окне название важнее компактности — даём две строки */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.franchise-row-meta {
    font-size: 12px;
    color: #8b8b90;
}

.franchise-watch {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 999px;
    background-color: #ffffff;
    color: #000000;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .franchise-modal {
        padding: 22px 16px 16px;
    }

    .franchise-row {
        grid-template-columns: 20px 34px minmax(0, 1fr);
        gap: 10px;
    }

    .franchise-poster {
        width: 34px;
        height: 48px;
    }

    /* Кнопка переезжает под название — в строке уже тесно */
    .franchise-watch {
        grid-column: 3;
        justify-self: start;
        margin-top: 2px;
    }
}

.modal-title {
    margin: 0 40px 14px 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #a5a5a5;
}

.modal-meta .rating {
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #3b3b3b;
    color: #ffffff;
    font-weight: 700;
}

/* Длинные описания Shikimori не должны выталкивать кнопки за пределы окна */
.modal-description {
    max-height: 210px;
    overflow-y: auto;
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.65;
    color: #d5d5d7;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.btn-fav {
    gap: 8px;
    padding: 0 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-fav:hover {
    background-color: rgba(255, 255, 255, 0.18);
}

.btn-fav.is-active {
    background-color: rgba(204, 29, 29, 0.18);
    color: #ff6b6b;
}

/* Иконка закладки внутри кнопки закладки */
.btn-fav .bookmark-icon {
    flex-shrink: 0;
}

.btn-fav .bookmark-fill {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-fav.is-active .bookmark-fill {
    opacity: 1;
}

@media (max-width: 700px) {
    .anime-modal[open] {
            display: block;
            overflow-y: auto;
    }

    .modal-poster {
            height: 200px;
    }

    .modal-body {
            padding: 20px;
    }

    .modal-title {
            margin-right: 34px;
            font-size: 20px;
    }
}

/*===================================================================================================================
    Всплывающие уведомления
===================================================================================================================*/
.toast-stack {
    position: fixed;
    top: 92px;
    right: auto;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(420px, calc(100vw - 24px));
    /* Сброс оформления popover: стопка не должна рисовать рамки и фон */
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    overflow: visible;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background-color: #15151a;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    color: #e8e8ea;
    font-size: 14px;
    line-height: 1.4;
    pointer-events: auto;
    animation: toast-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}

.toast.is-leaving {
    animation: toast-out 0.28s ease forwards;
}

.toast--error {
    border-color: rgba(204, 29, 29, 0.55);
    background-color: #1a1012;
}

.toast--success {
    border-color: rgba(46, 160, 67, 0.5);
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.toast--error .toast-icon {
    background-color: rgba(204, 29, 29, 0.22);
    color: #ff8080;
}

.toast--success .toast-icon {
    background-color: rgba(46, 160, 67, 0.2);
    color: #56d364;
}

.toast-text {
    flex: 1;
    min-width: 0;
}

.toast-close {
    padding: 0 2px;
    border: none;
    background: none;
    color: #8a8a8f;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #ffffff;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-14px);
    }
}

@media (max-width: 640px) {
    .toast-stack {
        top: 84px;
    }
}
