/* 個人展示櫃 · 華麗展台 */

.view-panel[data-view="showcase"] {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

.view-panel[data-view="showcase"] > h2 {
    font-family: 'Orbitron', 'Noto Sans TC', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    margin-bottom: 4px;
    background: linear-gradient(105deg, #fff 0%, #ffd56a 35%, #c084fc 70%, #5eead4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 40px rgba(192, 132, 252, 0.35);
    text-align: center;
}

.showcase-intro {
    color: rgba(200, 210, 255, 0.85) !important;
    font-size: 15px !important;
    margin: 0 auto 20px !important;
    letter-spacing: 0.04em;
    text-align: center;
    max-width: 42em;
}

.showcase-arena {
    position: relative;
    padding: 28px 20px 36px;
    border-radius: 24px;
    border: 1px solid rgba(168, 120, 255, 0.35);
    background:
        radial-gradient(ellipse 120% 80% at 50% 0%, rgba(120, 60, 220, 0.28) 0%, transparent 55%),
        radial-gradient(ellipse 90% 60% at 10% 100%, rgba(255, 120, 60, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 95% 80%, rgba(56, 189, 248, 0.15) 0%, transparent 45%),
        linear-gradient(165deg, rgba(12, 6, 28, 0.95) 0%, rgba(4, 2, 14, 0.98) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 215, 0, 0.08) inset,
        0 0 60px rgba(127, 0, 255, 0.25),
        0 24px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.showcase-arena::before,
.showcase-arena::after {
    content: '';
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.55;
    animation: showcase-orb-drift 12s ease-in-out infinite alternate;
}

.showcase-arena::before {
    width: 280px;
    height: 280px;
    top: -80px;
    left: 8%;
    background: rgba(168, 85, 247, 0.45);
}

.showcase-arena::after {
    width: 220px;
    height: 220px;
    bottom: -60px;
    right: 5%;
    background: rgba(251, 191, 36, 0.35);
    animation-delay: -4s;
}

@keyframes showcase-orb-drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(24px, 16px) scale(1.08); }
}

.showcase-arena-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 85% 70% at 50% 45%, black 20%, transparent 75%);
    pointer-events: none;
}

#showcase-slots {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.showcase-slot {
    position: relative;
    min-height: 0;
    border: none;
    background: transparent;
    padding: 0;
    cursor: default;
    transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

.showcase-slot.empty {
    cursor: pointer;
}

.showcase-slot.empty:hover,
.showcase-slot.filled:has(.showcase-card-art:hover) {
    transform: translateY(-6px);
}

.showcase-pedestal {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 14px 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(30, 15, 55, 0.75) 0%, rgba(8, 4, 18, 0.9) 100%);
    border: 1px solid rgba(180, 140, 255, 0.35);
    box-shadow:
        0 0 24px rgba(127, 0, 255, 0.2),
        0 12px 32px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.showcase-slot-glow {
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    opacity: 0.65;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.5), rgba(56, 189, 248, 0.35), rgba(251, 191, 36, 0.4));
    filter: blur(12px);
    animation: showcase-slot-pulse 3.5s ease-in-out infinite;
}

@keyframes showcase-slot-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.85; }
}

.showcase-slot--rarity-UR .showcase-slot-glow,
.showcase-slot--rarity-LR .showcase-slot-glow,
.showcase-slot--rarity-MR .showcase-slot-glow,
.showcase-slot--rarity-SEC .showcase-slot-glow {
    background: linear-gradient(135deg, #fbbf24, #f472b6, #a78bfa, #38bdf8);
}

.showcase-slot--rainbow-holo .showcase-slot-glow {
    background: linear-gradient(
        135deg,
        #fde68a 0%,
        #f472b6 25%,
        #22d3ee 50%,
        #a78bfa 75%,
        #fde68a 100%
    );
    background-size: 220% 220%;
    animation: showcase-rainbow-pedestal 4.2s linear infinite;
    opacity: 0.9;
}

@keyframes showcase-rainbow-pedestal {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.showcase-slot--rarity-SSR .showcase-slot-glow {
    background: linear-gradient(135deg, #c084fc, #818cf8, #f472b6);
}

.showcase-slot--rarity-SR .showcase-slot-glow {
    background: linear-gradient(135deg, #38bdf8, #22d3ee, #a78bfa);
}

.showcase-slot.filled .showcase-card-art {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    aspect-ratio: 2 / 3;
    cursor: pointer;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.55));
    transition: filter 0.25s ease, transform 0.2s ease;
    border: none;
    padding: 0;
    background: transparent;
    outline: none;
}

.showcase-slot.filled .showcase-card-art:hover,
.showcase-slot.filled .showcase-card-art:focus-visible {
    filter: drop-shadow(0 20px 36px rgba(168, 85, 247, 0.45));
    transform: scale(1.02);
}

.showcase-slot.filled .showcase-card-art:focus-visible {
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.8);
    border-radius: 12px;
}

.showcase-card-art--bound .bag-bound-badge,
.showcase-pick-art .bag-bound-badge {
    top: 8px;
    left: 8px;
    z-index: 24;
}

.showcase-slot--bound .showcase-card-name {
    color: #ffd9a8;
}

.showcase-slot-foot {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-top: 12px;
    text-align: center;
}

.showcase-rarity-chip {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 6px;
    color: #1a0a28;
    background: linear-gradient(90deg, #fde68a, #fbbf24);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.45);
}

.showcase-slot--rarity-SSR .showcase-rarity-chip {
    background: linear-gradient(90deg, #e9d5ff, #c084fc);
    box-shadow: 0 0 16px rgba(192, 132, 252, 0.5);
}

.showcase-slot--rarity-SR .showcase-rarity-chip {
    background: linear-gradient(90deg, #a5f3fc, #38bdf8);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.showcase-card-name {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 800;
    line-height: 1.4;
    color: #f0e8ff !important;
    text-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

.showcase-change-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.08em;
    color: #b8e4ff;
    background: rgba(0, 80, 160, 0.25);
    border: 1px solid rgba(100, 180, 255, 0.45);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.showcase-change-btn:hover {
    color: #fff;
    background: rgba(0, 120, 220, 0.4);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.showcase-change-btn:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.8);
    outline-offset: 2px;
}

/* ── 選卡彈窗（覆寫 .modal-inner 預設 360px 寬度） ── */
.showcase-pick-modal {
    z-index: 250;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
}

.modal-inner.showcase-pick-inner {
    width: min(1120px, 98vw);
    max-width: min(1120px, 98vw);
    max-height: min(92vh, 900px);
    min-height: min(72vh, 680px);
    display: flex;
    flex-direction: column;
    padding: 20px 24px 18px;
    border-radius: 22px;
    border: 1px solid rgba(192, 132, 252, 0.5);
    background: linear-gradient(165deg, rgba(18, 10, 36, 0.98), rgba(4, 4, 14, 0.99));
    box-shadow:
        0 0 0 1px rgba(255, 215, 0, 0.08) inset,
        0 0 56px rgba(127, 0, 255, 0.4);
    text-align: left;
}

.showcase-pick-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.showcase-pick-head h3 {
    margin: 0;
    font-family: 'Orbitron', 'Noto Sans TC', sans-serif;
    font-size: clamp(1.25rem, 2.5vw, 1.55rem);
    letter-spacing: 0.08em;
    background: linear-gradient(90deg, #fff, #c084fc, #5eead4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.showcase-pick-sub {
    margin: 6px 0 0;
    font-size: 13px;
    color: rgba(200, 210, 255, 0.75);
}

.showcase-pick-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.showcase-pick-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.showcase-pick-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(200, 210, 255, 0.8);
}

.showcase-pick-filter select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(168, 140, 255, 0.4);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 13px;
    color-scheme: dark;
}

.showcase-pick-filter select option {
    background: #140a28;
    color: #f2eeff;
}

.showcase-pick-grid {
    flex: 1 1 auto;
    min-height: 280px;
    max-height: min(68vh, 620px);
    overflow-x: hidden;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
    gap: 16px;
    padding: 6px 4px 14px;
}

@media (min-width: 720px) {
    .showcase-pick-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 960px) {
    .showcase-pick-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1100px) {
    .showcase-pick-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.showcase-pick-empty {
    text-align: center;
    padding: 32px 16px;
    color: rgba(200, 200, 230, 0.7);
    font-size: 14px;
}

.showcase-pick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 10px 14px;
    border-radius: 16px;
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(168, 140, 255, 0.35);
    background: linear-gradient(180deg, rgba(32, 16, 56, 0.85), rgba(8, 4, 18, 0.95));
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    text-align: center;
}

.showcase-pick-item:hover:not(.is-disabled) {
    transform: translateY(-3px);
    border-color: rgba(192, 132, 252, 0.7);
    box-shadow: 0 8px 24px rgba(127, 0, 255, 0.35);
}

.showcase-pick-item.is-current {
    border-color: rgba(94, 234, 212, 0.75);
    box-shadow: 0 0 20px rgba(94, 234, 212, 0.25);
}

.showcase-pick-item.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.showcase-pick-art {
    position: relative;
    width: 100%;
    max-width: min(200px, 100%);
    aspect-ratio: 2 / 3;
}

.showcase-pick-count {
    display: block;
    width: 100%;
    margin: -2px 0 0;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #ffe9a8;
    text-align: center;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(80, 40, 120, 0.55), rgba(40, 80, 140, 0.55));
    border: 1px solid rgba(212, 175, 55, 0.45);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.15);
}

.showcase-pick-rarity {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
}

.showcase-pick-name {
    font-size: 13px;
    font-weight: 800;
    width: 100%;
    line-height: 1.35;
    color: #f0e8ff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.showcase-pick-meta {
    font-size: 11px;
    color: rgba(180, 190, 230, 0.75);
}

.showcase-pick-flag {
    font-size: 11px;
    font-weight: 700;
    color: rgba(251, 191, 36, 0.95);
}

@media (max-width: 520px) {
    .modal-inner.showcase-pick-inner {
        min-height: 0;
        max-height: 96vh;
        width: 100%;
        max-width: 100%;
        padding: 14px 12px;
    }

    .showcase-pick-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-height: min(58vh, 520px);
    }

    .showcase-pick-art {
        max-width: 100%;
    }
}

.showcase-pick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-showcase-pick-clear {
    margin-right: auto;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: rgba(80, 20, 20, 0.4);
    color: #fca5a5;
    font-weight: 700;
    cursor: pointer;
}

.btn-showcase-pick-clear.hidden {
    display: none;
}

.btn-showcase-pick-cancel {
    padding: 10px 22px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    color: #e8e8ff;
    cursor: pointer;
}

/* 首頁展示牆 · 背包選卡 */
.home-wall-pick-search-wrap {
    display: flex;
    justify-content: center;
    padding: 0 16px 12px;
}

.home-wall-pick-search {
    width: min(420px, 100%);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 240, 255, 0.45);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 15px;
    text-align: center;
}

.home-wall-pick-search:focus {
    outline: none;
    border-color: rgba(0, 240, 255, 0.75);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

.home-wall-pick-step-slots {
    padding: 0 16px 12px;
}

.home-wall-pick-slot-hint {
    margin: 0 0 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 230, 180, 0.9);
}

.home-wall-slot-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    max-width: 520px;
    margin: 0 auto;
}

.home-wall-slot-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.45);
    color: #e8e8ff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.home-wall-slot-btn:hover {
    border-color: rgba(0, 255, 255, 0.55);
    background: rgba(0, 40, 60, 0.55);
    transform: translateY(-1px);
}

.home-wall-slot-btn.has-custom {
    border-color: rgba(255, 215, 0, 0.45);
}

.home-wall-slot-btn.is-target {
    border-color: rgba(255, 215, 0, 0.75);
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
}

.home-wall-slot-btn__row {
    font-size: 10px;
    font-weight: 700;
    color: rgba(180, 200, 255, 0.75);
}

.home-wall-slot-btn__num {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
}

.home-wall-slot-btn__tag {
    font-size: 9px;
    font-weight: 700;
    color: #ffe566;
}

.home-wall-slot-btn__tag--empty {
    color: rgba(180, 200, 255, 0.55);
}

#home-wall-pick-step-cards.hidden {
    display: none;
}

@media (max-width: 560px) {
    .home-wall-slot-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.showcase-slot.empty .showcase-pedestal {
    min-height: 380px;
    justify-content: center;
    border-style: dashed;
    border-width: 2px;
    border-color: rgba(168, 140, 255, 0.45);
    background: linear-gradient(180deg, rgba(40, 20, 70, 0.4) 0%, rgba(10, 5, 22, 0.6) 100%);
}

.showcase-slot.empty .showcase-slot-glow {
    opacity: 0.25;
    animation: none;
}

.showcase-empty-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 12px;
    background: linear-gradient(180deg, #fff, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 12px rgba(192, 132, 252, 0.6));
}

.showcase-empty-label {
    font-size: 16px;
    font-weight: 800;
    color: rgba(220, 210, 255, 0.95);
    letter-spacing: 0.08em;
}

.showcase-empty-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(180, 190, 230, 0.65);
}

.showcase-pedestal-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(168, 85, 247, 0.5) 0%, transparent 70%);
    filter: blur(4px);
    z-index: 0;
}

.showcase-card-mount {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible !important;
}

@media (min-width: 900px) {
    #showcase-slots {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 720px) {
    .view-panel[data-view='showcase'] {
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
        text-align: center;
    }

    .view-panel[data-view='showcase'] > h2,
    .view-panel[data-view='showcase'] .showcase-intro {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .showcase-arena {
        width: 100%;
        max-width: min(100%, 520px);
        margin-inline: auto;
        padding: 20px 14px 28px;
        box-sizing: border-box;
    }

    #showcase-slots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-items: stretch;
        width: 100%;
        max-width: min(520px, 100%);
        margin-inline: auto;
        gap: 14px 12px;
    }

    .showcase-slot {
        width: 100%;
        max-width: none;
        margin-inline: 0;
    }

    .showcase-slot.empty .showcase-pedestal {
        min-height: min(220px, 34dvh);
        width: 100%;
    }

    .showcase-slot.filled .showcase-card-art {
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    #showcase-slots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
    }

    .showcase-slot.empty .showcase-pedestal {
        min-height: min(200px, 32dvh);
    }
}
