.collection-modal,
.collection-modal *,
.album-modal,
.album-modal *,
.album-card-detail,
.album-card-detail * {
    box-sizing: border-box;
}


.collection-navbar-button {
    position: relative;
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.collection-navbar-button.hidden,
.hidden {
    display: none !important;
}

.collection-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.collection-modal.is-open {
    display: block;
}

.collection-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
}

.collection-modal__panel {
    position: relative;
    width: min(920px, calc(100% - 28px));
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    margin: 14px auto;
    padding: 28px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(80, 160, 255, 0.18), transparent 34%),
        #11131a;
    color: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.collection-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    z-index: 999;
}

.collection-modal__header {
    text-align: center;
    margin-bottom: 20px;
}

.collection-modal__eyebrow {
    margin: 0 0 6px;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.7;
}

.collection-modal__header h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.collection-modal__subtitle {
    margin: 8px auto 0;
    max-width: 520px;
    opacity: 0.75;
}

.collection-modal__status {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 20px 0 24px;
    flex-wrap: wrap;
}

.collection-modal__status>div {
    min-width: 150px;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    text-align: center;
}

.collection-modal__label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.65;
    margin-bottom: 4px;
}

.collection-modal__status strong {
    font-size: 1.4rem;
}

.collection-pack-stage {
    display: grid;
    place-items: center;
    gap: 18px;
    padding: 22px 0 8px;
}

.collection-pack-box {
    width: 190px;
    aspect-ratio: 748 / 1254;
    position: relative;
    display: grid;
    place-items: center;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.collection-pack-box__top {
    position: absolute;
    top: 22px;
    width: 72%;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.collection-pack-box__body span {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    opacity: 0.8;
}

.collection-pack-box__body strong {
    display: block;
    font-size: 1.6rem;
    line-height: 1.05;
}

.collection-open-pack-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    cursor: pointer;
    background: #02a9ff;
    color: #fff;
    font-weight: 900;
    transition: transform 0.18s ease, opacity 0.18s ease;
    margin-top: 50px;
}

.collection-open-pack-btn:hover {
    transform: translateY(-2px);
}

.collection-open-pack-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.collection-modal__hint {
    margin: 0;
    opacity: 0.7;
}

.collection-results__summary {
    text-align: center;
    margin-bottom: 18px;
    font-weight: 800;
}

.collection-results__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 190px));
    justify-content: center;
    gap: 18px;
}

.collection-card {
    position: relative;
    aspect-ratio: 5 / 7;
    border-radius: 18px;
    overflow: hidden;
    background: #151515;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.collection-card__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.collection-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.52) 0%,
            transparent 28%,
            transparent 48%,
            rgba(0, 0, 0, 0.9) 100%);
    pointer-events: none;
}

.collection-card__top,
.collection-card__info,
.collection-card__duplicate {
    position: absolute;
    z-index: 2;
    left: 10px;
    right: 10px;
}

.collection-card__top {
    top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.collection-card__info {
    bottom: 12px;
}

.collection-card__info h3 {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.08;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.collection-card__info p {
    margin: 5px 0 0;
    font-size: 0.72rem;
    opacity: 0.78;
}

.collection-card__duplicate {
    top: 36px;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    font-size: 0.68rem;
    font-weight: 800;
}

.collection-card.common {
    border-color: rgba(220, 220, 220, 0.42);
}

.collection-card.uncommon {
    border-color: rgba(80, 220, 150, 0.8);
    box-shadow: 0 0 18px rgba(80, 220, 150, 0.25), 0 14px 34px rgba(0, 0, 0, 0.35);
}

.collection-card.rare {
    border-color: rgba(80, 180, 255, 0.92);
    box-shadow: 0 0 22px rgba(80, 180, 255, 0.38), 0 14px 34px rgba(0, 0, 0, 0.35);
}

.collection-card.epic {
    border-color: rgba(185, 105, 255, 0.95);
    box-shadow: 0 0 26px rgba(185, 105, 255, 0.48), 0 14px 34px rgba(0, 0, 0, 0.35);
}

.collection-card.legendary {
    border-color: rgba(255, 210, 92, 1);
    box-shadow: 0 0 32px rgba(255, 210, 92, 0.68), 0 14px 34px rgba(0, 0, 0, 0.45);
}

.collection-results__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.collection-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    height: 50px;
    margin-top: 50px;
}

.collection-modal__empty {
    text-align: center;
    padding: 28px 0 10px;
}

.collection-modal__empty h3 {
    margin: 0 0 8px;
}

.collection-modal__empty p {
    margin: 0 0 18px;
    opacity: 0.75;
}






.user-collection-section {
    margin-top: 22px;
}

.user-collection-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.user-collection-header h3 {
    margin-bottom: 4px;
}

.user-collection-subtitle {
    margin: 0;
    opacity: 0.72;
    font-size: 0.92rem;
}

.user-collection-open-pack {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    background: #02a9ff;
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
}

.user-collection-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.user-collection-stat {
    border-radius: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
}

.user-collection-stat span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.65;
    margin-bottom: 4px;
}

.user-collection-stat strong {
    font-size: 1.25rem;
}

.user-collection-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.user-collection-select {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    font-weight: 700;
    cursor: pointer;
}

.user-collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 16px;
}

.album-card {
    position: relative;
    aspect-ratio: 5 / 7;
    border-radius: 18px;
    overflow: hidden;
    background: #151515;
    border: 2px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.album-card:hover {
    transform: translateY(-4px);
}

.album-card__link {
    display: block;
    width: 100%;
    height: 100%;
    color: #fff;
    text-decoration: none;
}

.album-card__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.52) 0%,
            transparent 30%,
            transparent 50%,
            rgba(0, 0, 0, 0.92) 100%);
    pointer-events: none;
}

.album-card__top,
.album-card__badges,
.album-card__info {
    position: absolute;
    z-index: 2;
    left: 10px;
    right: 10px;
}

.album-card__top {
    top: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.album-card__badges {
    top: 34px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.album-card__badge {
    width: fit-content;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.62);
    font-size: 0.66rem;
    font-weight: 850;
}

.album-card__badge--legacy {
    background: rgba(190, 190, 190, 0.24);
}

.album-card__info {
    bottom: 10px;
}

.album-card__info h4 {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.08;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.album-card__info p {
    margin: 5px 0 0;
    font-size: 0.7rem;
    opacity: 0.78;
}

.album-card.common {
    border-color: rgba(220, 220, 220, 0.42);
}

.album-card.uncommon {
    border-color: rgba(80, 220, 150, 0.8);
    box-shadow: 0 0 16px rgba(80, 220, 150, 0.22), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.album-card.rare {
    border-color: rgba(80, 180, 255, 0.92);
    box-shadow: 0 0 18px rgba(80, 180, 255, 0.32), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.album-card.epic {
    border-color: rgba(185, 105, 255, 0.95);
    box-shadow: 0 0 22px rgba(185, 105, 255, 0.42), 0 12px 28px rgba(0, 0, 0, 0.32);
}

.album-card.legendary {
    border-color: rgba(255, 210, 92, 1);
    box-shadow: 0 0 26px rgba(255, 210, 92, 0.58), 0 12px 28px rgba(0, 0, 0, 0.36);
}

.user-collection-empty {
    text-align: center;
    padding: 26px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
}

.user-collection-empty h4 {
    margin: 0 0 6px;
}

.user-collection-empty p {
    margin: 0;
    opacity: 0.72;
}

.user-collection-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.user-collection-load-more {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.09);
    color: inherit;
    font-weight: 800;
}










/* ================================
   USERPAGE COLLECTION PREVIEW
================================ */

.user-collection-section {
    margin-top: 22px;
}

.user-collection-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(2, 169, 255, 0.18), transparent 32%),
        rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-collection-eyebrow {
    margin: 0 0 5px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.68;
    font-weight: 800;
}

.user-collection-preview h3 {
    margin: 0;
}

.user-collection-subtitle {
    margin: 6px 0 0;
    opacity: 0.72;
    font-size: 0.92rem;
}

.user-collection-open-album,
.user-collection-open-pack {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    cursor: pointer;
    background: #02a9ff;
    color: #fff;
    font-weight: 900;
    white-space: nowrap;
}

.user-collection-open-pack {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.09);
}

.user-collection-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.user-collection-stat {
    border-radius: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
}

.user-collection-stat span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.65;
    margin-bottom: 4px;
}

.user-collection-stat strong {
    font-size: 1.25rem;
}

/* ================================
   ALBUM MODAL
================================ */

.album-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
}

.album-modal.is-open {
    display: block;
}

.album-modal__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(2, 169, 255, 0.12), transparent 38%),
        rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(7px);
}

.album-modal__panel {
    position: relative;
    width: min(1260px, calc(100% - 40px));
    height: min(870px, calc(100vh - 56px));
    margin: 28px auto;
    padding: 22px;
    border-radius: 28px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent),
        #101219;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.album-modal.is-open .album-modal__panel {
    animation: albumEnter 0.28s ease both;
}

@keyframes albumEnter {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.album-modal__header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
    flex-shrink: 0;
}

.album-modal__eyebrow {
    margin: 0 0 4px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.68;
    font-weight: 900;
}

.album-modal__header h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.6rem);
}

.album-modal__controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.album-modal__select {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.album-modal__select option {
    color: #111;
}

.album-modal__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 26px;
    line-height: 1;
}

.album-book {
    position: relative;
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    gap: 0;
    perspective: 1400px;
}

.album-book__spine {
    position: relative;
    background:
        linear-gradient(to right,
            rgba(0, 0, 0, 0.32),
            rgba(255, 255, 255, 0.08),
            rgba(0, 0, 0, 0.32));
    border-radius: 999px;
    box-shadow:
        inset 0 0 18px rgba(0, 0, 0, 0.75),
        0 0 18px rgba(0, 0, 0, 0.4);
}

.album-page {
    position: relative;
    min-height: 0;
    padding: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 32%),
        linear-gradient(180deg, #25202a, #151821);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        inset 0 0 28px rgba(255, 255, 255, 0.035),
        0 18px 45px rgba(0, 0, 0, 0.38);
}

.album-page--left {
    border-radius: 24px 10px 10px 24px;
    transform-origin: right center;
}

.album-page--right {
    border-radius: 10px 24px 24px 10px;
    transform-origin: left center;
}

.album-page__inner {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 11px;
}

.album-pocket {
    position: relative;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 18px;
    padding: 8px;
    cursor: pointer;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.035)),
        rgba(255, 255, 255, 0.055);
    box-shadow:
        inset 0 0 18px rgba(255, 255, 255, 0.055),
        inset 0 0 1px rgba(255, 255, 255, 0.35);
    overflow: hidden;
}

.album-pocket::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(128deg,
            rgba(255, 255, 255, 0.28) 0%,
            rgba(255, 255, 255, 0.06) 26%,
            transparent 42%,
            rgba(255, 255, 255, 0.08) 72%,
            rgba(255, 255, 255, 0.18) 100%);
    pointer-events: none;
    z-index: 5;
    mix-blend-mode: screen;
}

.album-pocket::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    pointer-events: none;
    z-index: 6;
}



.album-pocket--empty {
    cursor: default;
    opacity: 0.5;
}

.album-pocket--empty::after {
    opacity: 0.45;
}

.album-pocket__empty-mark {
    position: absolute;
    inset: 8px;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.13);
}

.album-pocket-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #151515;
    border: 2px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.36);
    transition: transform 0.18s ease;
}

.album-pocket-card__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-pocket-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.52) 0%,
            transparent 32%,
            transparent 50%,
            rgba(0, 0, 0, 0.92) 100%);
    pointer-events: none;
}

.album-pocket-card__top,
.album-pocket-card__badges,
.album-pocket-card__info {
    position: absolute;
    z-index: 2;
    left: 8px;
    right: 8px;
}

.album-pocket-card__top {
    top: 8px;
    font-size: 0.62rem;
    font-weight: 950;
    text-transform: uppercase;
    color: #fff;
    text-align: left;
}

.album-pocket-card__badges {
    top: 28px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.album-pocket-card__badge {
    width: fit-content;
    border-radius: 999px;
    padding: 3px 7px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 850;
}

.album-pocket-card__badge--legacy {
    background: rgba(220, 220, 220, 0.24);
}

.album-pocket-card__info {
    bottom: 8px;
    text-align: left;
    color: #fff;
}

.album-pocket-card__info h4 {
    margin: 0;
    font-size: clamp(0.7rem, 1vw, 0.9rem);
    line-height: 1.08;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.album-pocket-card__info p {
    margin: 4px 0 0;
    font-size: 0.64rem;
    opacity: 0.8;
}

.album-pocket-card.common {
    border-color: rgba(220, 220, 220, 0.42);
}

.album-pocket-card.uncommon {
    border-color: rgba(80, 220, 150, 0.8);
    box-shadow: 0 0 16px rgba(80, 220, 150, 0.22), 0 10px 22px rgba(0, 0, 0, 0.36);
}

.album-pocket-card.rare {
    border-color: rgba(80, 180, 255, 0.92);
    box-shadow: 0 0 18px rgba(80, 180, 255, 0.32), 0 10px 22px rgba(0, 0, 0, 0.36);
}

.album-pocket-card.epic {
    border-color: rgba(185, 105, 255, 0.95);
    box-shadow: 0 0 22px rgba(185, 105, 255, 0.42), 0 10px 22px rgba(0, 0, 0, 0.38);
}

.album-pocket-card.legendary {
    border-color: rgba(255, 210, 92, 1);
    box-shadow: 0 0 26px rgba(255, 210, 92, 0.58), 0 10px 22px rgba(0, 0, 0, 0.42);
}

.album-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
    flex-shrink: 0;
}

.album-page-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 17px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 900;
}

.album-page-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.album-pagination span {
    font-weight: 850;
    opacity: 0.78;
}

.album-empty {
    margin: auto;
    text-align: center;
    max-width: 380px;
    padding: 34px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
}

.album-empty h3 {
    margin: 0 0 8px;
}

.album-empty p {
    margin: 0;
    opacity: 0.72;
}

/* ================================
   CARD DETAIL
================================ */

.album-card-detail {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
}

.album-card-detail.is-open {
    display: block;
}

.album-card-detail__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(5px);
}

.album-card-detail__panel {
    position: relative;
    width: min(820px, calc(100% - 28px));
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    margin: 14px auto;
    padding: 26px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(2, 169, 255, 0.16), transparent 34%),
        #11131a;
    color: #fff;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65);
}

.album-card-detail.is-open .album-card-detail__panel {
    animation: cardDetailEnter 0.22s ease both;
}

@keyframes cardDetailEnter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.album-card-detail__close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    z-index: 2;
}

.album-card-detail__content {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 26px;
    align-items: center;
}

.album-detail-card {
    position: relative;
    aspect-ratio: 5 / 7;
    border-radius: 24px;
    overflow: hidden;
    background: #151515;
    border: 2px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.45);
}

.album-detail-card__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.album-detail-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            transparent 35%,
            transparent 48%,
            rgba(0, 0, 0, 0.92) 100%);
    pointer-events: none;
}

.album-detail-card__rarity {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;
    right: 14px;
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
}

.album-detail-card__info {
    position: absolute;
    z-index: 2;
    left: 14px;
    right: 14px;
    bottom: 14px;
}

.album-detail-card__info h3 {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.05;
}

.album-detail-card__info p {
    margin: 6px 0 0;
    opacity: 0.8;
}

.album-detail-card.common {
    border-color: rgba(220, 220, 220, 0.42);
}

.album-detail-card.uncommon {
    border-color: rgba(80, 220, 150, 0.8);
    box-shadow: 0 0 22px rgba(80, 220, 150, 0.28), 0 22px 58px rgba(0, 0, 0, 0.45);
}

.album-detail-card.rare {
    border-color: rgba(80, 180, 255, 0.92);
    box-shadow: 0 0 28px rgba(80, 180, 255, 0.38), 0 22px 58px rgba(0, 0, 0, 0.45);
}

.album-detail-card.epic {
    border-color: rgba(185, 105, 255, 0.95);
    box-shadow: 0 0 34px rgba(185, 105, 255, 0.48), 0 22px 58px rgba(0, 0, 0, 0.45);
}

.album-detail-card.legendary {
    border-color: rgba(255, 210, 92, 1);
    box-shadow: 0 0 42px rgba(255, 210, 92, 0.68), 0 22px 58px rgba(0, 0, 0, 0.5);
}

.album-detail-info__header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.album-detail-badge {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.album-detail-badge--legacy {
    background: rgba(220, 220, 220, 0.18);
}

.album-detail-info h3 {
    margin: 0 0 18px;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    line-height: 1.05;
}

.album-detail-info dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.album-detail-info dl div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.album-detail-info dt {
    opacity: 0.65;
    font-weight: 750;
}

.album-detail-info dd {
    margin: 0;
    font-weight: 900;
    text-align: right;
}

.album-detail-link {
    display: inline-flex;
    margin-top: 20px;
    border-radius: 999px;
    padding: 11px 17px;
    background: #02a9ff;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
}



.collection-pack-box--image {
    background: transparent;
    box-shadow:
        0 0 34px rgba(73, 139, 255, 0.45),
        0 20px 55px rgba(0, 0, 0, 0.45);
    overflow: visible;
}

.collection-pack-box__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
    pointer-events: none;
    filter:
        drop-shadow(0 0 22px rgba(73, 139, 255, 0.45)) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

.collection-pack-box::before {
    content: "";
    position: absolute;
    inset: 12% 18%;
    border-radius: 999px;
    background: radial-gradient(circle,
            rgba(73, 139, 255, 0.45),
            rgba(139, 92, 246, 0.22) 45%,
            transparent 72%);
    filter: blur(18px);
    z-index: -1;
}




/* ================================
   RESPONSIVE
================================ */

@media (max-width: 900px) {
    .album-modal {
        overflow-x: hidden;
    }

    .album-modal__panel {
        width: 100%;
        max-width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        padding: 14px;
        overflow-x: hidden;
    }

    .album-modal__header,
    .album-modal__controls,
    .album-book,
    .album-page,
    .album-page__inner,
    .album-pagination {
        min-width: 0;
        max-width: 100%;
    }

    .album-modal__header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }

    .album-modal__controls {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    }

    .album-modal__select {
        min-width: 0;
        max-width: 100%;
    }

    .album-modal__close {
        width: 38px;
        height: 38px;
    }

    .album-book {
        grid-template-columns: minmax(0, 1fr);
        flex: 1;
        min-height: 0;
    }

    .album-book__spine,
    .album-page--right {
        display: none;
    }

    .album-page--left {
        border-radius: 22px;
    }

    .album-page {
        width: 100%;
        overflow: hidden;
    }

    .album-page__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .album-card-detail__content {
        grid-template-columns: 1fr;
    }

    .album-detail-card {
        max-width: 280px;
        width: 100%;
        margin: 0 auto;
    }

    .user-collection-preview {
        flex-direction: column;
        align-items: stretch;
    }

    .user-collection-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .album-pocket {
        min-width: 0;
    }
}

@media (max-width: 520px) {

    .album-modal__panel,
    .collection-modal__panel {
        width: 100vw;
        max-width: 100vw;
        padding-left: 10px;
        padding-right: 10px;
        overflow-x: hidden;
    }

    .album-modal__controls {
        grid-template-columns: 1fr;
        padding-right: 44px;
    }

    .album-modal__close {
        position: absolute;
        top: 12px;
        right: 10px;
    }

    .album-page {
        padding: 8px;
    }

    .album-page__inner {
        gap: 7px;
    }

    .album-pocket {
        padding: 5px;
    }

    .album-pagination {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 6px;
    }

    .album-page-btn {
        min-width: 0;
        padding: 9px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .album-pagination span {
        white-space: nowrap;
        font-size: 0.76rem;
    }

    .collection-results__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 520px) {
    .album-page {
        padding: 10px;
    }

    .album-page__inner {
        gap: 9px;
    }

    .album-pocket {
        padding: 6px;
        border-radius: 14px;
    }

    .album-pocket-card {
        border-radius: 11px;
    }

    .album-pocket-card__info h4 {
        font-size: 0.68rem;
    }

    .album-pocket-card__info p,
    .album-pocket-card__top,
    .album-pocket-card__badge {
        font-size: 0.56rem;
    }

    .album-pagination {
        gap: 8px;
    }

    .album-page-btn {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
}









@media (max-width: 700px) {
    .user-collection-header {
        flex-direction: column;
    }

    .user-collection-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-collection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}








@media (max-width: 700px) {
    .collection-modal {
        overflow-x: hidden;
    }

    .collection-modal__panel {
        width: 100%;
        max-width: 100vw;
        min-height: 100vh;
        max-height: none;
        margin: 0;
        border-radius: 0;
        padding: 22px 14px;
        overflow-x: hidden;
    }

    .collection-modal__status {
        width: 100%;
        gap: 10px;
    }

    .collection-modal__status>div {
        min-width: 0;
        flex: 1 1 130px;
    }

    .collection-results__grid {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .collection-card {
        min-width: 0;
    }

    .collection-results__actions {
        width: 100%;
    }

    .collection-open-pack-btn,
    .collection-secondary-link {
        max-width: 100%;
    }

    .collection-pack-box {
        width: 160px;
    }
}










/*======================animazioni======================*/

.collection-pack-scene {
    position: relative;
    display: grid;
    place-items: center;
    width: min(280px, 80vw);
    height: 360px;
}

@media (max-width: 700px) {
    .collection-pack-scene {
        width: min(240px, 80vw);
        height: 300px;
    }
}

.collection-pack-burst {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
}

.collection-pack-burst span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 16px rgba(2, 169, 255, 0.85);
    transform: translate(-50%, -50%);
}

.collection-pack-burst span:nth-child(1) {
    --x: -90px;
    --y: -90px;
}

.collection-pack-burst span:nth-child(2) {
    --x: 0px;
    --y: -120px;
}

.collection-pack-burst span:nth-child(3) {
    --x: 90px;
    --y: -90px;
}

.collection-pack-burst span:nth-child(4) {
    --x: 120px;
    --y: 0px;
}

.collection-pack-burst span:nth-child(5) {
    --x: 90px;
    --y: 90px;
}

.collection-pack-burst span:nth-child(6) {
    --x: 0px;
    --y: 120px;
}

.collection-pack-burst span:nth-child(7) {
    --x: -90px;
    --y: 90px;
}

.collection-pack-burst span:nth-child(8) {
    --x: -120px;
    --y: 0px;
}

.collection-pack-box.is-opening {
    pointer-events: none;
}

.collection-results__grid.is-revealing .collection-card {
    opacity: 0;
    transform: translateY(18px) scale(0.92) rotateX(10deg);
}

.collection-card.collection-card--revealed {
    opacity: 1;
}

.collection-card.collection-card--covered::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 10;
    background-image: url("/img/collection/cards/card-back.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: inherit;
    transform: none;
    animation: none;
    mix-blend-mode: normal;
}

.collection-card.collection-card--covered::after {
    z-index: 11;
}

.collection-card__back-label {
    position: absolute;
    z-index: 12;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    pointer-events: none;
}

.collection-card.legendary.collection-card--revealed {
    animation: legendaryPulse 1.4s ease-in-out infinite alternate;
}

@keyframes legendaryPulse {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(1.15);
    }
}






.album-book {
    will-change: transform, opacity;
}

.album-page {
    will-change: transform;
}

.album-pocket {
    will-change: transform, opacity;
    -webkit-tap-highlight-color: transparent;
}

.album-pocket-card {
    will-change: transform;
    transform-style: preserve-3d;
}

.album-pocket:active .album-pocket-card {
    transform: scale(0.98);
}


@media (hover: hover) {
    .album-pocket:hover .album-pocket-card {
        transform: translateY(-4px) scale(1.03);
    }
}

.album-modal.is-preparing .album-book {
    opacity: 0;
}

.album-modal.is-preparing .album-pocket {
    opacity: 0;
}










/* ================================
   RARITY EFFECTS - PACK CARDS
================================ */

.collection-card {
    isolation: isolate;
}

.collection-card.rare::before,
.collection-card.epic::before,
.collection-card.legendary::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(115deg,
            transparent 0%,
            rgba(255, 255, 255, 0.04) 32%,
            rgba(255, 255, 255, 0.32) 48%,
            rgba(255, 255, 255, 0.05) 62%,
            transparent 100%);
    transform: translateX(-130%);
    mix-blend-mode: screen;
}

.collection-card.rare.collection-card--revealed::before {
    animation: cardShine 4.2s ease-in-out infinite;
}

.collection-card.epic.collection-card--revealed::before {
    background:
        linear-gradient(115deg,
            transparent 0%,
            rgba(255, 255, 255, 0.06) 30%,
            rgba(214, 160, 255, 0.34) 48%,
            rgba(120, 210, 255, 0.18) 58%,
            transparent 100%);
    animation: cardShine 3.2s ease-in-out infinite;
}

.collection-card.legendary.collection-card--revealed::before {
    background:
        linear-gradient(115deg,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 28%,
            rgba(255, 225, 120, 0.52) 46%,
            rgba(255, 255, 255, 0.24) 56%,
            transparent 100%);
    animation: cardShine 2.7s ease-in-out infinite;
}

@keyframes cardShine {

    0%,
    45% {
        transform: translateX(-130%);
    }

    100% {
        transform: translateX(130%);
    }
}

.collection-card.epic.collection-card--revealed {
    animation: epicFloat 2.4s ease-in-out infinite alternate;
}

.collection-card.legendary.collection-card--revealed {
    animation:
        legendaryPulse 1.4s ease-in-out infinite alternate,
        legendaryFloat 2.2s ease-in-out infinite alternate;
}

@keyframes epicFloat {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(1.08);
    }
}

@keyframes legendaryFloat {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-3px);
    }
}









/* ================================
   RARITY EFFECTS - ALBUM CARDS
================================ */

.album-pocket-card {
    isolation: isolate;
}

.album-pocket-card.rare::before,
.album-pocket-card.epic::before,
.album-pocket-card.legendary::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(115deg,
            transparent 0%,
            rgba(255, 255, 255, 0.04) 34%,
            rgba(255, 255, 255, 0.24) 50%,
            rgba(255, 255, 255, 0.04) 64%,
            transparent 100%);
    transform: translateX(-130%);
    mix-blend-mode: screen;
}

.album-pocket-card.rare::before {
    animation: albumCardShine 5.5s ease-in-out infinite;
}

.album-pocket-card.epic::before {
    background:
        linear-gradient(115deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 32%,
            rgba(200, 130, 255, 0.36) 48%,
            rgba(80, 200, 255, 0.16) 58%,
            transparent 100%);
    animation: albumCardShine 4.2s ease-in-out infinite;
}

.album-pocket-card.legendary::before {
    background:
        linear-gradient(115deg,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 30%,
            rgba(255, 220, 105, 0.48) 47%,
            rgba(255, 255, 255, 0.18) 58%,
            transparent 100%);
    animation: albumCardShine 3.5s ease-in-out infinite;
}

@keyframes albumCardShine {

    0%,
    55% {
        transform: translateX(-130%);
    }

    100% {
        transform: translateX(130%);
    }
}

.album-pocket-card.epic {
    animation: albumEpicGlow 2.6s ease-in-out infinite alternate;
}

.album-pocket-card.legendary {
    animation: albumLegendaryGlow 1.8s ease-in-out infinite alternate;
}

@keyframes albumEpicGlow {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(1.08) saturate(1.12);
    }
}

@keyframes albumLegendaryGlow {
    from {
        filter: brightness(1) saturate(1);
    }

    to {
        filter: brightness(1.14) saturate(1.2);
    }
}






.album-pocket-card__sparkles {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0.75;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(255, 230, 150, 0.85) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(170, 220, 255, 0.8) 0 1px, transparent 2px);
    background-size:
        46px 46px,
        62px 62px,
        88px 88px;
    background-position:
        8px 12px,
        22px 34px,
        44px 18px;
    animation: sparkleDrift 4.8s linear infinite;
    mix-blend-mode: screen;
}

.album-pocket-card.epic .album-pocket-card__sparkles {
    opacity: 0.45;
}

.album-pocket-card.legendary .album-pocket-card__sparkles {
    opacity: 0.85;
    animation-duration: 3.8s;
}

@keyframes sparkleDrift {
    from {
        background-position:
            8px 12px,
            22px 34px,
            44px 18px;
    }

    to {
        background-position:
            54px 58px,
            84px 96px,
            132px 106px;
    }
}



.collection-card__sparkles {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0.75;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(255, 230, 150, 0.85) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(170, 220, 255, 0.8) 0 1px, transparent 2px);
    background-size:
        46px 46px,
        62px 62px,
        88px 88px;
    background-position:
        8px 12px,
        22px 34px,
        44px 18px;
    animation: sparkleDrift 4.8s linear infinite;
    mix-blend-mode: screen;
}

.collection-card.collection-card--covered .collection-card__sparkles {
    display: none;
}

.collection-card.legendary .collection-card__sparkles {
    opacity: 0.9;
    animation-duration: 3.6s;
}

.album-detail-card {
    transform-style: preserve-3d;
    transition: transform 0.18s ease;
    will-change: transform;
}

.album-detail-card.rare::before,
.album-detail-card.epic::before,
.album-detail-card.legendary::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(115deg,
            transparent 0%,
            rgba(255, 255, 255, 0.06) 32%,
            rgba(255, 255, 255, 0.32) 48%,
            rgba(255, 255, 255, 0.06) 64%,
            transparent 100%);
    transform: translateX(-130%);
    mix-blend-mode: screen;
    animation: detailCardShine 3.4s ease-in-out infinite;
}

.album-detail-card.epic::before {
    background:
        linear-gradient(115deg,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 30%,
            rgba(210, 140, 255, 0.42) 48%,
            rgba(100, 220, 255, 0.18) 60%,
            transparent 100%);
}

.album-detail-card.legendary::before {
    background:
        linear-gradient(115deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 30%,
            rgba(255, 220, 105, 0.58) 48%,
            rgba(255, 255, 255, 0.24) 60%,
            transparent 100%);
    animation-duration: 2.6s;
}

@keyframes detailCardShine {

    0%,
    45% {
        transform: translateX(-130%);
    }

    100% {
        transform: translateX(130%);
    }
}


.album-pocket-card__top,
.album-pocket-card__badges,
.album-pocket-card__info {
    z-index: 6;
}

.collection-card__top,
.collection-card__info,
.collection-card__duplicate {
    z-index: 6;
}

.album-detail-card__rarity,
.album-detail-card__info {
    z-index: 6;
}



@media (max-width: 700px) {

    .album-pocket-card.rare::before,
    .album-pocket-card.epic::before,
    .album-pocket-card.legendary::before,
    .collection-card.rare::before,
    .collection-card.epic::before,
    .collection-card.legendary::before {
        animation-duration: 6s;
    }

    .album-pocket-card__sparkles,
    .collection-card__sparkles {
        opacity: 0.45;
    }
}



.album-pagination span.is-loading::after {
    content: " · Loading...";
    opacity: 0.7;
    font-weight: 700;
}

.album-page-btn.is-loading {
    opacity: 0.7;
}