/**
 * AnimeGame - Main App CSS (v2)
 * Layout, Dashboard, Anime Cards, Event Log, and Modals.
 */

:root {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

@keyframes cardBurstIn {
    0% {
        transform: scale(0.25) translateY(30px);
        opacity: 0;
        filter: brightness(2.5);
    }
    65% {
        transform: scale(1.04) translateY(-4px);
        opacity: 1;
        filter: brightness(1.2);
    }
    100% {
        transform: scale(1.0) translateY(0);
        opacity: 1;
        filter: brightness(1.0);
    }
}
.card-burst-in {
    animation: cardBurstIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body {
    margin: 0;
    height: 100%;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 15% 0%, rgba(14, 165, 233, 0.11), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(99, 102, 241, 0.09), transparent 24%),
        linear-gradient(180deg, #070b12 0%, #0a0f18 45%, #080c13 100%);
    color: #f1f5f9;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 75%);
}

::selection {
    background: rgba(14, 165, 233, 0.35);
    color: white;
}

.glass-panel {
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.88),
        rgba(10, 15, 25, 0.9)
    );
    border: 1px solid rgba(148, 163, 184, 0.10);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header-panel {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-panel.is-sticky {
    position: sticky;
    top: 0;
    z-index: 40;
}

.header-panel::before {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    right: -150px;
    top: -220px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.20), transparent 68%);
    pointer-events: none;
}

.header-panel::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    left: -170px;
    bottom: -190px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 68%);
    pointer-events: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(59, 130, 246, 0.05)),
        rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.18);
    box-shadow:
        0 0 0 4px rgba(14, 165, 233, 0.04),
        0 10px 30px rgba(14, 165, 233, 0.10);
}

.stat-card {
    min-width: 105px;
    height: 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.10);
    background: rgba(2, 6, 23, 0.55);
    border-radius: 14px;
    padding: 8px 12px;
    transition:
        border-color 180ms ease,
        background 180ms ease,
        transform 180ms ease;
}

.player-badge-card {
    min-width: auto !important;
    height: 52px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
}

.stat-card:hover {
    transform: translateY(-1px);
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.16);
}


.stat-label {
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    margin-bottom: 3px;
}

.stat-value {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.toolbar {
    position: relative;
    overflow: hidden;
}

.toolbar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(14, 165, 233, 0.025), transparent 30%, transparent 70%, rgba(99, 102, 241, 0.025));
}

.field-label {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.custom-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    color: #cbd5e1;
    background:
        linear-gradient(45deg, transparent 50%, #64748b 50%) calc(100% - 16px) 50% / 6px 6px no-repeat,
        linear-gradient(135deg, #64748b 50%, transparent 50%) calc(100% - 12px) 50% / 6px 6px no-repeat,
        rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.11);
    border-radius: 12px;
    padding: 11px 38px 11px 13px;
    outline: none;
    font-size: 13px;
    font-weight: 600;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.custom-select:hover {
    border-color: rgba(148, 163, 184, 0.20);
}

.custom-select:focus {
    border-color: rgba(14, 165, 233, 0.55);
    box-shadow:
        0 0 0 3px rgba(14, 165, 233, 0.08),
        0 0 25px rgba(14, 165, 233, 0.06);
}

.sync-btn {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.30);
    background: linear-gradient(135deg, #0284c7, #2563eb);
    box-shadow:
        0 10px 28px rgba(14, 165, 233, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    transition:
        transform 180ms ease,
        filter 180ms ease,
        box-shadow 180ms ease;
}

.sync-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    transform: skewX(-20deg);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.14),
        transparent
    );
    transition: left 500ms ease;
}

.sync-btn:hover::before {
    left: 125%;
}

.sync-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
    box-shadow:
        0 14px 32px rgba(14, 165, 233, 0.19),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sync-btn:active {
    transform: translateY(0);
}

.sync-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    filter: saturate(0.7);
    transform: none;
}

.syncing-icon {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.section-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #64748b;
}

.results-count {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.anime-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(9, 14, 23, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.09);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.018);
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease,
        opacity 220ms ease;
}

.anime-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.28);
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(56, 189, 248, 0.025);
}

.anime-poster-wrap {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #0f172a;
}

.anime-poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.02) 30%,
            rgba(0, 0, 0, 0.10) 60%,
            rgba(0, 0, 0, 0.42) 100%
        );
    z-index: 1;
}

.anime-poster {
    display: block;
    width: 100%;
    height: 285px;
    object-fit: cover;
    transition:
        transform 500ms cubic-bezier(.2,.65,.2,1),
        filter 300ms ease;
}

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

.anime-card-dim {
    opacity: 0.58;
}

.anime-card-dim:hover {
    opacity: 0.82;
}

.reward-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.reward-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 8px;
    color: white;
    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.badge-current {
    background: rgba(37, 99, 235, 0.88);
}

.badge-backlog {
    background: rgba(180, 83, 9, 0.90);
}

.poster-top-info {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 9px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}

.status-ongoing {
    background: rgba(8, 47, 73, 0.78);
    color: #7dd3fc;
}

.status-completed {
    background: rgba(6, 78, 59, 0.80);
    color: #6ee7b7;
}

.episode-badge {
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.72);
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.07);
    font-size: 9px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.anime-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 14px;
}

.anime-title {
    margin: 0;
    color: #f8fafc;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.anime-title:hover {
    color: #7dd3fc;
}

.score-row {
    margin-top: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 22px;
}

.score-label {
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
}

.score-value {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f8fafc;
    font-size: 11px;
    font-weight: 900;
}

.score-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.45);
}

.reward-summary {
    margin-top: 13px;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    background: rgba(2, 6, 23, 0.30);
}

.reward-summary-title {
    margin-bottom: 4px;
    color: #475569;
    font-size: 8px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.13em;
}

.reward-summary-value {
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 700;
}

.reward-summary-value strong {
    color: #f8fafc;
}

.card-actions {
    margin-top: 13px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.claim-btn {
    width: 100%;
    min-height: 36px;
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid transparent;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
    transition:
        transform 170ms ease,
        filter 170ms ease,
        border-color 170ms ease,
        box-shadow 170ms ease;
}

.claim-btn:hover {
    transform: translateY(-1px);
}

.claim-btn:active {
    transform: translateY(0);
}

.claim-current {
    color: white;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: rgba(96, 165, 250, 0.18);
    box-shadow: 0 7px 18px rgba(37, 99, 235, 0.14);
}

.claim-current:hover {
    filter: brightness(1.08);
    box-shadow: 0 9px 22px rgba(37, 99, 235, 0.20);
}

.claim-backlog {
    color: #fff7ed;
    background: linear-gradient(135deg, #a16207, #b45309);
    border-color: rgba(251, 191, 36, 0.13);
    box-shadow: 0 7px 18px rgba(180, 83, 9, 0.12);
}

.claim-backlog:hover {
    filter: brightness(1.08);
    box-shadow: 0 9px 22px rgba(180, 83, 9, 0.18);
}

.empty-state {
    grid-column: 1 / -1;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.32);
}

.empty-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.10);
}

.empty-title {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 800;
}

.empty-text {
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.loading-card {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.07);
    background: rgba(15, 23, 42, 0.70);
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.55);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.04),
        transparent
    );
    animation: skeleton-shimmer 1.4s infinite;
}

@keyframes skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.fade-in {
    animation: fade-in 350ms ease both;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Event Log Drawer & Buttons */
.event-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.6);
    color: #64748b;
    cursor: pointer;
    transition: all 180ms ease;
    user-select: none;
}

.event-filter-btn:hover {
    border-color: rgba(148, 163, 184, 0.28);
    color: #94a3b8;
}

.event-filter-btn.active {
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(56, 189, 248, 0.45);
    color: #38bdf8;
}

.event-filter-btn .filter-indicator {
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background: #475569;
    transition: background 180ms ease, box-shadow 180ms ease;
}

.event-filter-btn.active .filter-indicator {
    background: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(51, 65, 85, 0.55);
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.75);
}

.anime-card-idle {
    opacity: 0.62;
    filter: grayscale(25%);
    transition: opacity 220ms ease, filter 220ms ease, transform 220ms ease, border-color 220ms ease;
}
.anime-card-idle:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.35);
}

/* Cards Minigame Navigation & Layout */
.cards-nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.cards-nav-btn:hover {
    background: rgba(30, 41, 59, 0.35);
    color: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.15);
}
.cards-nav-btn.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(99, 102, 241, 0.28));
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(14, 165, 233, 0.22);
}

/* Chunked Series Pagination Bar (Backlog & Other sections) */
.series-pagination-bar {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    margin-top: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(9, 14, 23, 0.85));
    border: 1px solid rgba(148, 163, 184, 0.09);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.series-pagination-info {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.2);
    cursor: pointer;
    transition: all 180ms ease;
}

.btn-load-more:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

.btn-load-more:active {
    transform: translateY(0);
}

.btn-load-all {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 150ms ease;
}

.btn-load-all:hover {
    color: #38bdf8;
}

/* Hero Stage (Card Inspect Modal) */
.hero-stage {
    perspective: 1400px;
    --hero-stage-w: min(44vh, 380px);
    width: var(--hero-stage-w);
    height: calc(var(--hero-stage-w) * 1.4);
    margin: 0 auto;
    position: relative;
}
.hero-stage .tcg-card {
    touch-action: none;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 600px !important;
    height: 840px !important;
    margin-left: -300px;
    margin-top: -420px;
    transform: scale(var(--hero-scale, 0.6333));
    transform-origin: center center;
    z-index: 20;
}
.hero-stage .card-shadow {
    inset: 6% 0% -4%;
    filter: blur(16px);
    opacity: .55;
}

/* Booster 3D Pack Reveal */
.booster-card-top {
    position: relative;
    z-index: 25;
    cursor: pointer;
}
.booster-card-top.is-cooldown {
    cursor: wait !important;
}

.booster-card-under {
    z-index: 15;
    transform: scale(calc(var(--hero-scale, 0.6333) * 0.92)) !important;
    filter: brightness(0.85);
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.28s ease;
}

.booster-card-under.is-revealing {
    transform: scale(var(--hero-scale, 0.6333)) !important;
    filter: brightness(1) !important;
}

.card-fly-away {
    pointer-events: none !important;
    animation: card-fly-up 0.28s cubic-bezier(0.25, 0.1, 0.25, 1) forwards !important;
}

@keyframes card-fly-up {
    0% {
        transform: translateY(0) scale(var(--hero-scale, 0.6333));
        opacity: 1;
    }
    75% {
        opacity: 1;
    }
    100% {
        transform: translateY(-130vh) scale(var(--hero-scale, 0.6333));
        opacity: 0;
    }
}

/* Booster NEW Card Indicator - Delicate & Minimalist */
.booster-new-card-badge {
    position: absolute;
    top: -54px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fde68a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), 0 0 10px rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    pointer-events: none;
    animation: booster-new-subtle-float 2.4s ease-in-out infinite;
    white-space: nowrap;
}

.booster-new-card-badge::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 6px #f59e0b;
}

@keyframes booster-new-subtle-float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-3px);
    }
}

/* --- LEGENDARY RADIAL RAINBOW AURA (TEXTURE ASSET) --- */
.booster-aura-backdrop {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1200px;
    height: 1200px;
    max-width: 250vw;
    max-height: 250vw;
    transform: translate3d(-50%, -50%, -100px);
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.booster-aura-backdrop.is-active {
    opacity: 1;
    transform: translate3d(-50%, -50%, -100px) scale(1);
}

.booster-aura-backdrop.is-hidden {
    opacity: 0;
    transform: translate3d(-50%, -50%, -100px) scale(0.75);
}

.booster-aura-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 0 12px rgba(255, 160, 0, 0.45)) drop-shadow(0 0 26px rgba(168, 85, 247, 0.35));
    will-change: transform;
}

/* --- SERIES PAGINATION BAR & LOAD BUTTONS --- */
.series-pagination-bar {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    margin-top: 6px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.75), rgba(10, 15, 25, 0.85));
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pagination-info {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.12);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-load-more:hover {
    background: rgba(14, 165, 233, 0.25);
    border-color: rgba(56, 189, 248, 0.6);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.22);
}

.btn-load-more:active {
    transform: translateY(0);
}

.btn-load-all {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.2);
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-load-all:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(203, 213, 225, 0.4);
    color: #ffffff;
}

.btn-load-all:active {
    transform: scale(0.98);
}

/* 3D Baked Booster Pack Tile Styles */
.booster-pack-tile {
    perspective: 800px;
}

.booster-pack-art-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease;
}

.booster-pack-tile:hover .booster-pack-art-container {
    transform: translateY(-6px) scale(1.04) rotateX(4deg);
    filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.65));
}

.booster-pack-img {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
    transition: filter 0.35s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.booster-pack-tile:hover .booster-pack-img {
    filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.6));
}

/* ========================================================================= */
/* LEVEL 1: APP MODULE DOCK (Desktop Vertical & Mobile Bottom Bar)           */
/* ========================================================================= */
.dock-btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-btn .dock-indicator {
    transition: all 0.2s ease-out;
}

/* Hover States per Module */
.dock-btn[data-dock="cards"]:hover:not(.active) {
    background: rgba(245, 158, 11, 0.08);
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.25);
}
.dock-btn[data-dock="rewards"]:hover:not(.active) {
    background: rgba(244, 63, 94, 0.08);
    color: #fecdd3;
    border-color: rgba(244, 63, 94, 0.25);
}
.dock-btn[data-dock="anime"]:hover:not(.active) {
    background: rgba(14, 165, 233, 0.08);
    color: #bae6fd;
    border-color: rgba(14, 165, 233, 0.25);
}
.dock-btn[data-dock="social"]:hover:not(.active) {
    background: rgba(99, 102, 241, 0.08);
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.25);
}

/* Active State per Module (Color-coded indicators, glows & borders) */
.dock-btn[data-dock="cards"].active {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
    color: #fcd34d !important;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.25) !important;
}
.dock-btn[data-dock="cards"].active .dock-indicator {
    display: block !important;
    background: #fbbf24 !important;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.8) !important;
}

.dock-btn[data-dock="rewards"].active {
    background: rgba(244, 63, 94, 0.15) !important;
    border-color: rgba(244, 63, 94, 0.45) !important;
    color: #fda4af !important;
    box-shadow: 0 10px 25px -5px rgba(244, 63, 94, 0.25) !important;
}
.dock-btn[data-dock="rewards"].active .dock-indicator {
    display: block !important;
    background: #fb7185 !important;
    box-shadow: 0 0 12px rgba(251, 113, 133, 0.8) !important;
}

.dock-btn[data-dock="anime"].active {
    background: rgba(14, 165, 233, 0.15) !important;
    border-color: rgba(14, 165, 233, 0.45) !important;
    color: #7dd3fc !important;
    box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.25) !important;
}
.dock-btn[data-dock="anime"].active .dock-indicator {
    display: block !important;
    background: #38bdf8 !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.8) !important;
}

.dock-btn[data-dock="social"].active {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.45) !important;
    color: #a5b4fc !important;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.25) !important;
}
.dock-btn[data-dock="social"].active .dock-indicator {
    display: block !important;
    background: #818cf8 !important;
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.8) !important;
}

/* ========================================================================= */
/* CARDS COLLECTION: ACTIVE FILTER CHIPS & POPOVER STYLES                    */
/* ========================================================================= */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #bae6fd;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    transition: all 0.15s ease;
    user-select: none;
}

.filter-chip:hover {
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(15, 23, 42, 0.98);
    transform: translateY(-1px);
}

.filter-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-left: 2px;
}

.filter-chip-remove:hover {
    background: rgba(239, 68, 68, 0.85);
    color: #ffffff;
    transform: scale(1.15);
}

.filter-chip-reset {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #fda4af;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.filter-chip-reset:hover {
    background: rgba(244, 63, 94, 0.28);
    border-color: rgba(244, 63, 94, 0.7);
    color: #ffe4e6;
    transform: translateY(-1px);
}

/* Collection Layout & Scroll Stability */
#cardsTabCollection {
    min-height: max(600px, 85vh);
}

#collectionCardsGrid,
#campaignDeckCardsGrid,
#battlesDeckCardsGrid {
    min-height: max(500px, 65vh);
    align-content: start;
}
