/* ════════════════════════════════════════════════════════════════
   cards.css — CARD VISUAL SYSTEM (mirrors cards.html inline styles)
   Shared by the Collection (cards.html) page and the Auction House
   inspection modal (auction.html) so the rendered card is identical.

   NOTE: cards.html still keeps its own inline copy for now; this file
   is the source of truth for the Auction page. Keep them in sync when
   editing card frame / rarity / texture visuals.
   ════════════════════════════════════════════════════════════════ */

@font-face {
    font-family: 'Deciso';
    src: url('/static/fonts/Deciso-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Deciso';
    src: url('/static/fonts/Deciso-RegularItalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Deciso';
    src: url('/static/fonts/Deciso-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Deciso';
    src: url('/static/fonts/Deciso-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Deciso';
    src: url('/static/fonts/Deciso-BoldItalic.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Deciso';
    src: url('/static/fonts/Deciso-BoldItalic.otf') format('opentype');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Deciso';
    src: url('/static/fonts/Deciso-BoldItalic.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Deciso';
    src: url('/static/fonts/Deciso-BoldItalic.otf') format('opentype');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}

/* ─── Keyframes used by cards ─── */
@keyframes cardsPopIn {
    from { opacity: 0; transform: scale(0.7) translateY(30px) rotateX(20deg); }
    to { opacity: 1; transform: scale(1) translateY(0) rotateX(0); }
}
@keyframes cardsCardFlipIn {
    0% { transform: rotateY(180deg) scale(0.6); opacity: 0; }
    60% { transform: rotateY(-10deg) scale(1.05); opacity: 1; }
    80% { transform: rotateY(5deg) scale(0.98); opacity: 1; }
    100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}
@keyframes cardsBurnAway {
    0% { opacity: 1; transform: scale(1); filter: brightness(1); }
    40% { filter: brightness(2) saturate(3); }
    100% { opacity: 0; transform: scale(0.3) translateY(-60px); filter: brightness(3) saturate(0); }
}

/* ─── SHINY PARTICLE EFFECTS ─── */
@keyframes cardsShinyFloatOut {
    0% { opacity: 0; transform: translate(-50%,-50%) translate(var(--sx),var(--sy)) scale(0.9); }
    10% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%,-50%) translate(var(--ex),var(--ey)) scale(0.4); }
}
@keyframes cardsShinyBurstOut {
    0% { opacity: 0; transform: translate(-50%,-50%) translate(var(--sx),var(--sy)) scale(1.2); filter: blur(0); }
    12% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%,-50%) translate(var(--ex),var(--ey)) scale(0.35); filter: blur(0.4px); }
}
@keyframes cardsEpicPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(155,89,182,0.3), 0 10px 30px rgba(0,0,0,0.6); }
    50% { box-shadow: 0 0 25px rgba(155,89,182,0.6), 0 10px 30px rgba(0,0,0,0.6); }
}
@keyframes cardsLegPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(241,196,15,0.4), 0 10px 30px rgba(0,0,0,0.6); }
    50% { box-shadow: 0 0 35px rgba(241,196,15,0.8), 0 10px 30px rgba(0,0,0,0.6); }
}

/* ═══════════ CARD STRUCTURE ═══════════ */
.card-wrapper {
    perspective: 1200px;
    aspect-ratio: 2/3;
    position: relative;
    opacity: 0;
    animation: cardsPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-style: preserve-3d;
}
.card-wrapper.is-new {
    animation: cardsCardFlipIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.card-inner {
    width: 100%; height: 100%; position: relative;
    border-radius: 8px; transform-style: preserve-3d;
    transition: transform 0.12s ease-out;
    cursor: pointer; z-index: 1;
}

.card-front {
    position: absolute; inset: 0;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.card-back {
    position: absolute; inset: 0;
    background: url('/static/images/cards/card_back_sigil.png') center/cover no-repeat;
    border-radius: 8px; border: 2px solid #2a2a3a;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.card-bg {
    position: absolute; inset: 0; border-radius: 8px;
    overflow: hidden; background: url('/static/images/cards/avatar_backdrop.png') center/cover, #0a0a0f;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    transition: .3s;
    border: 2px solid #2a2a3a;
}

.card-avatar {
    width: 100%; height: 100%; object-fit: cover;
    filter: saturate(0.9) contrast(1.05);
    transition: .4s;
}
.card-inner:hover .card-avatar { filter: saturate(1.1) contrast(1.1) brightness(1.05); }

/* ─── Name strip ─── */
.card-name-strip {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    padding: 30px 8px 10px; text-align: center;
    font-family: var(--font-display); font-size: 1.1em; letter-spacing: 1px;
    color: #fff; z-index: 20;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

/* ─── Odds badge ─── */
.odds-badge {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,0.75); color: rgba(255,255,255,0.7);
    font-family: var(--font-num); font-size: 0.75em; font-weight: 700;
    padding: 3px 7px; border-radius: 4px; z-index: 25;
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(6px);
    letter-spacing: 0.5px;
}

/* ─── Global Rank Badge ─── */
.global-rank-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #111, #333);
    border: 1px solid var(--gold); color: var(--gold);
    font-family: var(--font-cond); font-size: 0.85em; font-weight: 700;
    padding: 3px 12px; border-radius: 12px; z-index: 30;
    box-shadow: 0 4px 10px rgba(0,0,0,0.8), 0 0 10px rgba(255,215,0,0.3);
    letter-spacing: 1px; white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* ─── Rarity badge (top-left) ─── Scoped under .card-wrapper so it doesn't
   collide with the .rarity-tag used by Auction listing/list-form cards
   (which are inline text labels, not absolute overlays). ─── */
.card-wrapper .rarity-tag {
    position: absolute; top: 8px; left: 8px;
    font-family: var(--font-cond); font-size: 0.68em; font-weight: 700;
    padding: 2px 8px; border-radius: 3px; z-index: 25;
    text-transform: uppercase; letter-spacing: 1.5px;
    backdrop-filter: blur(6px);
}

/* ─── Signature ─── */
.signature-layer {
    position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%) rotate(-10deg);
    font-family: 'Dancing Script', cursive; font-size: 1.6em; color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.9); z-index: 18; pointer-events: none;
    opacity: 0.85;
}
.sig-gold-ink { color: #ffd700; text-shadow: 0 0 8px rgba(255,215,0,0.6), 0 2px 6px #000; }
.sig-gold { color: #ffd700; text-shadow: 0 0 8px rgba(255,215,0,0.6), 0 2px 6px #000; }
.sig-black-ink { color: #111; text-shadow: 0 0 4px rgba(255,255,255,0.5); font-weight: bold; }

/* ─── Texture overlays ─── */
.overlay {
    position: absolute; inset: 0; pointer-events: none; z-index: 10;
    mix-blend-mode: overlay; transition: .1s; border-radius: 8px;
}
.t-matte .card-avatar { filter: saturate(0.7) contrast(0.9) brightness(0.9); }
.t-matte .overlay { background: url('/static/images/concrete-wall-white.png') center/cover; mix-blend-mode: multiply; opacity: 0.2; }

.t-glossy .overlay { background: url('/static/images/scratches.png') center/cover; mix-blend-mode: screen; opacity: 0.6; }
.t-metallic .overlay { background: url('/static/images/aged_paper_transparent.png') center/cover; mix-blend-mode: overlay; opacity: 0.7; }
.t-glass .overlay {
    backdrop-filter: blur(5px);
    background: rgba(255,255,255,0.1);
    box-shadow: inset 0 0 15px rgba(255,255,255,0.4), inset 0 0 2px rgba(255,255,255,0.8);
    mix-blend-mode: normal;
}
.t-holographic .overlay {
    background: url('/static/images/holographic.gif') center/cover;
    mix-blend-mode: color-dodge; opacity: 0.55; filter: brightness(1.2) contrast(1.2);
}
.t-grime .overlay { background: url('/static/images/cards/Grime_smudges.png') center/cover; mix-blend-mode: normal; opacity: 0.5; }
.t-oil .overlay { background: url('/static/images/cards/oil.png') center/cover; mix-blend-mode: color-dodge; opacity: 0.6; }
.t-interface .overlay { background: url('/static/images/cards/interface_texture.png') center/cover; mix-blend-mode: overlay; opacity: 0.8; }
.t-space .overlay { background: url('/static/images/cards/space.gif') center/cover; mix-blend-mode: color-dodge; opacity: 0.8; }
.t-ocean .overlay { background: url('/static/images/cards/ocean.gif') center/cover; mix-blend-mode: overlay; opacity: 0.6; }
.t-red-sparkles .overlay { background: url('/static/images/cards/red_sparkles.gif') center/cover; mix-blend-mode: screen; opacity: 0.5; }
.t-red-waves .overlay { background: url('/static/images/cards/red_waves.gif') center/cover; mix-blend-mode: screen; opacity: 0.7; }
.t-red-waves-2 .overlay { background: url('/static/images/cards/red_waves2.gif') center/cover; mix-blend-mode: screen; opacity: 0.7; }
.t-futuristic .overlay { background: url('/static/images/cards/futuristic_texture.jpg') center/cover; mix-blend-mode: overlay; opacity: 0.6; }
.t-lines .overlay { background: url('/static/images/cards/texture_lines.gif') center/cover; mix-blend-mode: screen; opacity: 0.6; }
.t-lights .overlay { background: url('/static/images/cards/texture_flashing_lights.gif') center/cover; mix-blend-mode: screen; opacity: 0.6; }
.t-lightning .overlay { background: url('/static/images/cards/texture_lightning.gif') center/cover; mix-blend-mode: screen; opacity: 0.6; }
.t-crow .overlay { background: url('/static/images/cards/texture_crow.gif') center/cover; mix-blend-mode: screen; opacity: 0.6; }
.t-carbon-fibre .overlay { background: url('/static/images/cards/texture_carbon_fibre.png') center/cover; mix-blend-mode: overlay; opacity: 0.75; }
.t-stardust .overlay { background: url('/static/images/cards/stardust.png') center/cover; mix-blend-mode: screen; opacity: 0.75; filter: brightness(1.2); }
.t-prismatic-foil .overlay { background: url('/static/images/cards/texture_prismatic_foil.png') center/cover; mix-blend-mode: color-dodge; opacity: 0.75; filter: brightness(1.15) contrast(1.25); }
.t-liquid-chrome .overlay { background: url('/static/images/cards/chrome.png') center/cover; mix-blend-mode: color-dodge; opacity: 0.65; filter: contrast(1.3); }
.t-void-matrix .overlay { background: url('/static/images/cards/void_matrix.png') center/cover; mix-blend-mode: screen; opacity: 0.7; }

/* ─── Frames ─── */
/* TEST: all frames now render like Tproar — normal blend, full opacity
   (was mix-blend-mode: screen). Revert this rule to restore the old look. */
.card-frame {
    position: absolute; inset: 0; z-index: 25;
    background-size: contain; background-repeat: no-repeat; background-position: center;
    pointer-events: none; mix-blend-mode: normal; opacity: 1;
    transform: scale(1.55);
    image-rendering: pixelated;
}
.f-cyber .card-frame { background-image: url('/static/images/cards/frame_cyber.png'); }
.f-fire .card-frame { background-image: url('/static/images/cards/frame_fire.png'); }
.f-forest .card-frame { background-image: url('/static/images/cards/frame_forest.png'); }
.f-gold .card-frame { background-image: url('/static/images/cards/frame_gold.png'); }
.f-ice .card-frame { background-image: url('/static/images/cards/frame_ice.png'); }
.f-toxic .card-frame { background-image: url('/static/images/cards/frame_toxic.png'); }
.f-mythic .card-frame { background-image: url('/static/images/cards/frame_mythic.png'); }
.f-angelic .card-frame { background-image: url('/static/images/cards/frame_angelic.png'); }
.f-druid .card-frame { background-image: url('/static/images/cards/frame_druid.png'); }
.f-aqua .card-frame { background-image: url('/static/images/cards/frame_aqua.png'); }
.f-valkyrie .card-frame { background-image: url('/static/images/cards/frame_valkyrie.png'); }
.f-cyber-gold .card-frame { background-image: url('/static/images/cards/frame_cyber_gold.png'); }
.f-brimstone .card-frame { background-image: url('/static/images/cards/frame_brimstone.png'); }
.f-tproar .card-frame {
    background-image: url('/static/images/cards/frame_tproar.png');
    mix-blend-mode: normal !important;
    opacity: 1 !important;
}
.f-shadow .card-frame { background-image: url('/static/images/cards/frame_shadow.png'); }
.f-saya .card-frame { background-image: url('/static/images/cards/saya_frame.png'); }
.f-shoggoth .card-frame { background-image: url('/static/images/cards/shoggoth_frame.png'); }
.f-vhs .card-frame {
    background-image: url('/static/images/cards/frame_vhs.png');
    mix-blend-mode: normal !important;
    opacity: 1 !important;
}
.f-decade .card-frame {
    background-image: url('/static/images/cards/frame_decade.png');
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    transform: scale(1.72);
}
.f-decade-x .card-frame {
    background-image: url('/static/images/cards/frame_decade2.png');
    mix-blend-mode: normal !important;
    opacity: 1 !important;
    transform: scale(1.63);
}

/* ─── Color tints ─── */
.color-tint {
    position: absolute; inset: 0; pointer-events: none; z-index: 5;
    mix-blend-mode: color; opacity: 0.45; border-radius: 8px;
}
.col-red .color-tint { background: #e74c3c; }
.col-blue .color-tint { background: #3498db; }
.col-gold .color-tint { background: #f1c40f; mix-blend-mode: overlay; opacity: 0.7; }
.col-void .color-tint { background: #000; mix-blend-mode: multiply; opacity: 0.75; }

/* ═══════════ RARITY STYLES ═══════════ */
/* Common */
.r-common .card-bg { border-color: #3a3a48; }
.r-common .rarity-tag { background: rgba(80,80,100,.5); color: #888; border: 1px solid #555; }

/* Rare */
.r-rare .card-bg { border-color: #3498db; box-shadow: 0 5px 25px rgba(52,152,219,0.25), 0 10px 30px rgba(0,0,0,0.6); }
.r-rare .odds-badge { color: #7ec8f0; border-color: rgba(52,152,219,.4); }
.r-rare .rarity-tag { background: rgba(52,152,219,.2); color: #7ec8f0; border: 1px solid rgba(52,152,219,.5); }
.r-rare .card-name-strip { color: #b8dcf0; }

/* Epic */
.r-epic .card-bg {
    border-color: #9b59b6;
    animation: cardsEpicPulse 3s ease-in-out infinite;
}
.r-epic .odds-badge { color: #c49de0; border-color: rgba(155,89,182,.5); box-shadow: 0 0 6px rgba(155,89,182,.3); }
.r-epic .rarity-tag { background: rgba(155,89,182,.25); color: #d4a8f0; border: 1px solid rgba(155,89,182,.6); text-shadow: 0 0 6px rgba(155,89,182,.4); }
.r-epic .card-name-strip { color: #dab8f0; text-shadow: 0 0 10px rgba(155,89,182,.4), 0 2px 6px rgba(0,0,0,0.8); }

/* Legendary */
.r-legendary .card-bg {
    border-color: #f1c40f;
    animation: cardsLegPulse 2.5s ease-in-out infinite;
}
.r-legendary .odds-badge { color: #f1c40f; border-color: rgba(241,196,15,.5); box-shadow: 0 0 8px rgba(241,196,15,.4); }
.r-legendary .rarity-tag {
    background: linear-gradient(135deg, rgba(241,196,15,.2), rgba(255,170,0,.2));
    color: #ffd700; border: 1px solid rgba(241,196,15,.6);
    text-shadow: 0 0 8px rgba(241,196,15,.5);
}
.r-legendary .card-name-strip { color: #ffe066; text-shadow: 0 0 12px rgba(255,215,0,.5), 0 2px 6px rgba(0,0,0,0.8); }

/* Mythic - Blood Hologram */
.r-mythic { z-index: 10; }

.r-mythic .card-bg {
    border: none;
    box-shadow: inset 0 0 30px rgba(255, 0, 0, 0.7);
}

@keyframes cardsMythicRedFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animated Gradient Border using mask on card-front */
.r-mythic .card-front::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 20;
    border-radius: 8px;
    padding: 4px;
    background: linear-gradient(135deg, #ff0000, #330000, #ff0055, #660000, #ff0000);
    background-size: 300% 300%;
    animation: cardsMythicRedFlow 3s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(255,0,0,0.8);
}

/* Mythic Glow Texture Overlay */
.t-mythic-glow .card-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/static/images/cards/mythic_glow.gif') center/cover;
    pointer-events: none;
    mix-blend-mode: color-dodge;
    opacity: 0.4;
    z-index: 30;
}

@keyframes cardsMythicPulseBg {
    0% { opacity: 0.4; filter: blur(20px); }
    100% { opacity: 0.8; filter: blur(30px); }
}

/* Intense Red Glow behind the card */
.r-mythic::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 12px;
    background: #ff0000;
    filter: blur(20px);
    opacity: 0.6;
    z-index: -1;
    animation: cardsMythicPulseBg 2s alternate infinite;
}

.r-mythic .card-name-strip {
    color: #ffffff;
    text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000, 0 2px 4px #000;
    font-size: 1.25em;
    letter-spacing: 2px;
}

.r-mythic .odds-badge {
    color: #fff; border-color: #ff0000;
    background: rgba(80, 0, 0, 0.8); box-shadow: 0 0 15px rgba(255,0,0,0.8);
}

.r-mythic .rarity-tag {
    background: linear-gradient(135deg, #800000, #ff0000);
    color: #fff; border: 1px solid #ff4d4d;
    text-shadow: 0 0 5px rgba(255,255,255,0.9);
    box-shadow: 0 0 20px rgba(255,0,0,0.8);
    letter-spacing: 2px;
}

/* Exotic - Green Glow */
.r-exotic { z-index: 11; }

.r-exotic .card-bg {
    border: none;
    box-shadow: inset 0 0 30px rgba(0, 255, 0, 0.7);
}

@keyframes cardsExoticGreenFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.r-exotic .card-front::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 20;
    border-radius: 8px;
    padding: 4px;
    background: linear-gradient(135deg, #00ff00, #004400, #44ff44, #002200, #00ff00);
    background-size: 300% 300%;
    animation: cardsExoticGreenFlow 2.5s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0,255,0,0.8);
}

@keyframes cardsExoticPulseBg {
    0% { opacity: 0.4; filter: blur(20px); }
    100% { opacity: 0.9; filter: blur(35px); box-shadow: 0 0 30px #00ff00; }
}

.r-exotic::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 12px;
    background: #00ff00;
    filter: blur(20px);
    opacity: 0.6;
    z-index: -1;
    animation: cardsExoticPulseBg 1.5s alternate infinite;
}

.r-exotic .card-name-strip {
    color: #ffffff;
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 2px 4px #000;
    font-size: 1.25em;
    letter-spacing: 2px;
}

.r-exotic .odds-badge {
    color: #fff; border-color: #00ff00;
    background: rgba(0, 80, 0, 0.8); box-shadow: 0 0 15px rgba(0,255,0,0.8);
}

.r-exotic .rarity-tag {
    background: linear-gradient(135deg, #008000, #00ff00);
    color: #fff; border: 1px solid #4dff4d;
    text-shadow: 0 0 5px rgba(255,255,255,0.9);
    box-shadow: 0 0 20px rgba(0,255,0,0.8);
    letter-spacing: 2px;
}

/* Extraordinary - Holographic Rainbow */
.r-extraordinary { z-index: 12; }

.r-extraordinary .card-bg {
    border: none;
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.7);
}

@keyframes cardsExtraHoloFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.r-extraordinary .card-front::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 20;
    border-radius: 8px;
    padding: 4px;
    background: linear-gradient(90deg, #ff0000, #ffaa00, #aaff00, #00ffaa, #00aaff, #aa00ff, #ff00aa, #ff0000);
    background-size: 300% 100%;
    animation: cardsExtraHoloFlow 3s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    box-shadow: 0 0 25px rgba(255,255,255,0.6);
}

@keyframes cardsExtraHoloBg {
    0% { background-position: 0% 50%; transform: scale(1); }
    50% { background-position: 100% 50%; transform: scale(1.05); }
    100% { background-position: 0% 50%; transform: scale(1); }
}

.r-extraordinary::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 12px;
    background: linear-gradient(45deg, #ff0000, #ffaa00, #aaff00, #00ffaa, #00aaff, #aa00ff, #ff00aa);
    background-size: 400% 400%;
    filter: blur(25px);
    opacity: 0.8;
    z-index: -1;
    animation: cardsExtraHoloBg 3s ease infinite;
}

.r-extraordinary .card-name-strip {
    color: #ffffff;
    text-shadow: 0 0 8px #ff00ff, 0 0 15px #00ffff, 0 2px 4px #000;
    font-size: 1.5em;
    font-weight: 800;
    letter-spacing: 3px;
}

.r-extraordinary .odds-badge {
    color: #fff; border-color: #fff;
    background: rgba(255, 255, 255, 0.2); box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

.r-extraordinary .rarity-tag {
    background: linear-gradient(90deg, #ff00aa, #00aaff);
    color: #fff; border: 1px solid #fff;
    text-shadow: 0 0 5px rgba(255,255,255,0.9);
    box-shadow: 0 0 20px rgba(255,255,255,0.8);
    letter-spacing: 2px;
}

/* ═══════════ SHINY LAYERS (Legendary+) ═══════════ */
.shiny-layer {
    position: absolute; inset: -10px; z-index: 80; overflow: visible; pointer-events: none;
}
.shiny-glow {
    position: absolute; inset: -2px; z-index: 79; border-radius: 16px; pointer-events: none;
    box-shadow: 0 0 0 1px rgba(255,100,50,0.25), 0 0 18px rgba(255,50,0,0.18), 0 0 44px rgba(255,50,0,0.1);
    mix-blend-mode: screen;
}
.shiny-particle {
    position: absolute; left: 50%; top: 50%; width: var(--size); height: var(--size);
    border-radius: 999px; background: rgba(255,140,50,0.95);
    box-shadow: 0 0 12px rgba(255,100,50,0.6), 0 0 26px rgba(255,50,0,0.4);
    mix-blend-mode: screen; will-change: transform, opacity;
}
.shiny-particle-Exotic {
    background: rgba(0, 255, 0, 0.95) !important;
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.6), 0 0 26px rgba(0, 255, 100, 0.4) !important;
}
.shiny-particle-Extraordinary {
    background: var(--p-color) !important;
    box-shadow: 0 0 12px var(--p-color), 0 0 26px var(--p-color) !important;
}
.shiny-loop {
    animation: cardsShinyFloatOut var(--dur) ease-out infinite var(--delay);
}
.shiny-burst {
    animation: cardsShinyBurstOut var(--dur) cubic-bezier(.12,.9,.2,1) 1 var(--delay);
}

/* ═══════════ AUCTION INSPECT: card-in-stage adapter ═══════════
   In the auction inspection modal the card sits flat (no 3D tilt,
   no entrance animation) inside .ic-stage — mirrors the
   .modal-preview-wrapper adapter in cards.html. */
.insp-preview .ic-stage > .card-wrapper,
.ic-stage > .card-wrapper {
    width: 100%; max-width: 210px; height: auto; opacity: 1 !important;
    animation: none !important; transform: none !important;
}
.insp-preview .ic-stage > .card-wrapper .card-inner,
.ic-stage > .card-wrapper .card-inner {
    transform: none !important;
    cursor: default;
}
