/* Reset & Base - Fullscreen Immersive */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --secondary: #60A5FA;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #10b981;
    --transition: 0.3s ease;
}

body {
    font-family: 'Nunito', 'Baloo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: var(--light);
    line-height: 1.6;
    margin: 0;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Scene Container - Fullscreen Immersive */
.scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

#renderCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    touch-action: none;
    outline: none;
}

/* Loading Overlay — Parallax Zoom Intro */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow: hidden;
    transition: opacity 1s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-overlay.hidden {
    display: none;
}

/* Background clouds — slow zoom */
.loading-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.loading-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    animation: loadingBgZoom 8s ease-out forwards;
}

@keyframes loadingBgZoom {
    0%   { transform: scale(1.06); }
    100% { transform: scale(1.22); }
}

/* Logo — zooms 10% faster than background for parallax depth feel */
.loading-logo {
    position: relative;
    z-index: 1;
    width: clamp(280px, 50vw, 700px);
    height: auto;
    transform: scale(0.85);
    opacity: 0;
    animation: loadingLogoZoom 7.3s ease-out forwards;
    filter: drop-shadow(0 8px 40px rgba(0, 0, 0, 0.5));
    margin-bottom: 60px;
}

@keyframes loadingLogoZoom {
    0%   { transform: scale(0.85); opacity: 0; }
    12%  { opacity: 1; }
    100% { transform: scale(1.08); opacity: 1; }
}

/* Bottom bar + text */
.loading-bottom {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    z-index: 2;
    text-align: center;
}

.loading-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    backdrop-filter: blur(4px);
}

.loading-progress {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

#loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* UI Overlay - Minimal */
.ui-overlay {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 1000;
    pointer-events: none;
}

.ui-overlay > * {
    pointer-events: all;
}

.scene-controls {
    display: none; /* Hidden for immersive experience */
}

.scene-info {
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

/* ==========================================
   SOCIAL BAR — bottom center links
   ========================================== */
.social-bar {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    z-index: 1000;
    pointer-events: all;
}

.social-link {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.social-link:hover {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

/* ==========================================
   VOLUME CONTROL — bottom right
   ========================================== */
.volume-btn {
    position: fixed;
    bottom: 14px;
    right: 20px;
    z-index: 1001;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0;
}

.volume-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.volume-icon {
    width: 18px;
    height: 18px;
}

.volume-slider-wrap {
    position: fixed;
    bottom: 54px;
    right: 20px;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 12px 8px;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.volume-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 4px;
    height: 80px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

/* Cards Section - Hidden for immersive mode */
.cards-section {
    display: none;
}

/* Modals - Hidden for immersive mode */
.modal {
    display: none;
}

/* ==========================================
   Hotspot Overlay - Back Button & Popups
   ========================================== */

.hotspot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2000;
}

/* Back Button - Glassmorphism */
.hotspot-back-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    padding: 0.6rem 1.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    cursor: pointer;
    pointer-events: all;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}

.hotspot-back-btn.visible {
    opacity: 1;
    transform: translateX(0);
}

.hotspot-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Popup Container */
.hotspot-popup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hotspot-popup.visible {
    opacity: 1;
}

/* Generic popup text */
.popup-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    letter-spacing: 0.04em;
    line-height: 1.8;
}

.popup-sub {
    display: block;
    margin-top: 0.3rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
}

/* PORTE - Staff only message */
.popup-text--staff {
    font-size: 1.3rem;
}

/* CARTES - Hint */
.popup-text--hint {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
}

/* CAISSE - Market Dashboard */
.hotspot-popup--caisse {
    align-items: center;
    justify-content: flex-start;
    padding-left: 8%;
}

/* ============================================= */
/*  CAISSE DASHBOARD — flat clean design         */
/* ============================================= */

.caisse-dashboard {
    pointer-events: auto;
    animation: caisseFadeSlide 0.6s ease forwards;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

@keyframes caisseFadeSlide {
    from { opacity: 0; transform: translateX(-30px) scale(0.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

.caisse-card {
    width: 440px;
    padding: 24px 28px 0;
    border-radius: 18px;
    background: rgba(12, 14, 20, 0.95);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Centered logo */
.caisse-logo-wrap {
    text-align: center;
    margin-bottom: 16px;
}

.caisse-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
}

/* Market Cap label */
.caisse-mcap-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.4);
}

/* Big Market Cap Number — flat, no gradient */
.caisse-mcap-big {
    text-align: center;
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    padding: 4px 0 6px;
    color: #fff;
    line-height: 1;
}

/* 24h change */
.caisse-change {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0 0 16px;
}

.caisse-change--up {
    color: #22c55e;
}

.caisse-change--down {
    color: #ef4444;
}

/* DexScreener chart embed */
.caisse-chart {
    width: 100%;
    height: 260px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    border-radius: 0 0 18px 18px;
}

.caisse-chart iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* CARTES - Open Shop Button */
.shop-open-btn {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 0.8rem 2.2rem;
    border: 2px solid #60A5FA;
    border-radius: 14px;
    background: #3B82F6;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    pointer-events: all;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.2s ease;
    box-shadow:
        0 4px 20px rgba(59, 130, 246, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.shop-open-btn.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.shop-open-btn:hover {
    background: #60A5FA;
    box-shadow:
        0 8px 35px rgba(59, 130, 246, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15);
    transform: translateX(-50%) translateY(-2px);
}

.shop-open-btn:active {
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    transform: translateX(-50%) translateY(0);
}

/* CADRE - Callout annotation with line to frame */
.hotspot-popup--cadre {
    align-items: flex-start;
    justify-content: flex-start;
}

.cadre-callout {
    position: absolute;
    top: 18%;
    left: 22%;
    max-width: 380px;
    transition: transform 0.1s ease-out;
}

.cadre-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    line-height: 1.5;
    text-shadow: 0 2px 20px rgba(0,0,0,0.7), 0 4px 40px rgba(0,0,0,0.4);
}

.cadre-sub {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
    text-shadow: 0 2px 15px rgba(0,0,0,0.6);
}

.cadre-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

/* ==========================================
   BOOSTER SHOP — Two Panel Layout
   ========================================== */

.shop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 5000;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: all;
    overflow: hidden;
}

.shop-overlay.shop-visible {
    opacity: 1;
}

.shop-container {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 2rem;
    gap: 2rem;
}

/* === Left Panel === */
.shop-left {
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 2rem 0;
    position: relative;
}

@keyframes shopSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SVG purchase widget — the asset.svg IS the button */
.shop-svg-widget {
    cursor: pointer;
    animation: shopSlideIn 0.5s ease;
    transition: transform 0.3s ease, filter 0.3s ease;
    max-width: 420px;
}

.shop-svg-widget:hover {
    transform: translateY(-3px);
    filter: brightness(1.08);
}

.shop-svg-widget:active {
    transform: translateY(0) scale(0.98);
}

.shop-svg-asset {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

/* Payment Section */
.shop-payment-section {
    text-align: center;
    animation: shopFadeIn 0.3s ease;
    padding: 0.8rem 1rem;
    background: rgba(12, 15, 30, 0.95);
    border: 1.5px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    max-width: 320px;
    width: 100%;
}

@keyframes shopFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.shop-payment-header {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.shop-payment-amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: #3B82F6;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    margin-bottom: 2px;
}

.shop-payment-to {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 8px;
}

.shop-wallet-address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    margin-bottom: 0.6rem;
}

.shop-wallet-text {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.02em;
}

.shop-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.shop-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.shop-payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.shop-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3B82F6;
    border-radius: 50%;
    animation: shopSpin 1s linear infinite;
}

@keyframes shopSpin {
    to { transform: rotate(360deg); }
}

.shop-status-timeout {
    color: #f87171;
}

/* Success */
.shop-success {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: shopSuccessIn 0.6s ease;
    padding: 1.2rem;
    background: rgba(12, 15, 30, 0.95);
    border: 1.5px solid rgba(59, 130, 246, 0.15);
    border-radius: 16px;
}

@keyframes shopSuccessIn {
    0% { opacity: 0; transform: scale(0.8); }
    50% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

.shop-success-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3B82F6;
    border: 2px solid #60A5FA;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}

.shop-success-text {
    font-size: 1rem;
    font-weight: 700;
    color: #3B82F6;
}

.shop-success-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* === Right Panel: Gallery === */
.shop-right {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: rgba(8, 10, 22, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 1.2rem;
    border: 1px solid rgba(59, 130, 246, 0.12);
    animation: shopSlideIn 0.5s ease 0.15s backwards;
}

/* Card Grid */
.shop-gallery {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: max-content;
    gap: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    padding-bottom: 2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
    align-content: start;
}

.shop-gallery::-webkit-scrollbar {
    width: 4px;
}

.shop-gallery::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.shop-gallery::-webkit-scrollbar-track {
    background: transparent;
}

/* Individual Card */
.shop-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    aspect-ratio: 2/3;
}

.shop-card:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    z-index: 2;
}

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

.shop-card-number {
    display: none;
}

/* Gallery celebrate (after payment) */
.shop-gallery-celebrate .shop-card {
    animation: shopCardPop 0.5s ease backwards;
}

.shop-gallery-celebrate .shop-card:nth-child(3n)   { animation-delay: 0.05s; }
.shop-gallery-celebrate .shop-card:nth-child(3n+1) { animation-delay: 0.1s; }
.shop-gallery-celebrate .shop-card:nth-child(3n+2) { animation-delay: 0.15s; }

@keyframes shopCardPop {
    0% { transform: scale(0.9); opacity: 0.5; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Close Button --- */
.shop-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background: rgba(10, 10, 20, 0.8);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(8px);
    z-index: 5002;
}

.shop-close-btn:hover {
    background: #3B82F6;
    border-color: #60A5FA;
    color: #fff;
}

/* --- Card Zoom Modal --- */
.shop-card-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6000;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.shop-card-modal.shop-modal-visible {
    opacity: 1;
}

.shop-card-modal-img {
    max-height: 80vh;
    max-width: 80vw;
    border-radius: 16px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    transition: transform 0.3s ease;
    cursor: default;
}

.shop-modal-visible .shop-card-modal-img {
    transform: scale(1);
}

.shop-card-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.3);
    background: rgba(10, 10, 20, 0.85);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-card-modal-close:hover {
    background: #3B82F6;
    border-color: #60A5FA;
}

/* ==========================================
   SETTINGS — gear button + modal
   ========================================== */

.settings-btn {
    position: fixed;
    bottom: 14px;
    left: 20px;
    z-index: 1001;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.3s;
    padding: 0;
}

.settings-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.25);
    transform: rotate(45deg);
}

/* Settings Modal Backdrop */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-modal.settings-open {
    display: flex;
    opacity: 1;
}

/* Settings Panel */
.settings-panel {
    width: 440px;
    max-width: 90vw;
    background: rgba(12, 14, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(59, 130, 246, 0.08);
    animation: settingsSlideIn 0.3s ease;
}

@keyframes settingsSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.03em;
}

.settings-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.settings-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.settings-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.settings-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.settings-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.settings-input:focus {
    border-color: rgba(59, 130, 246, 0.5);
}

.settings-input--mono {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

.settings-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.settings-submit-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    background: #3B82F6;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.settings-submit-btn:hover {
    background: #60A5FA;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.settings-error {
    font-size: 0.78rem;
    color: #f87171;
    min-height: 1.2em;
    margin: 0;
}

.settings-saved {
    font-size: 0.78rem;
    color: #34d399;
    min-height: 1.2em;
    margin: 0;
    transition: opacity 0.3s ease;
}

.settings-current {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    word-break: break-all;
    line-height: 1.5;
}

.settings-current:empty {
    display: none;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
    .ui-overlay {
        bottom: 1rem;
        right: 1rem;
    }

    .scene-info {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }

    .hotspot-back-btn {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .caisse-mcap-big {
        font-size: 2.2rem;
    }

    .caisse-card {
        width: 320px;
        padding: 16px 20px 0;
    }

    .hotspot-popup--caisse {
        padding-left: 4%;
    }

    .caisse-logo {
        height: 48px;
    }

    .caisse-chart {
        height: 200px;
    }

    .popup-text--staff,
    .popup-text--bio {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Shop responsive */
    .shop-container {
        flex-direction: column;
        padding: 1rem;
        gap: 0.8rem;
    }

    .shop-left {
        width: 100%;
        padding: 0;
    }

    .shop-svg-widget {
        max-width: 100%;
    }

    .shop-right {
        padding: 0.8rem;
        flex: 1;
        min-height: 0;
    }

    .shop-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    /* Settings responsive */
    .settings-btn {
        bottom: 10px;
        left: 14px;
        width: 32px;
        height: 32px;
    }

    .settings-panel {
        padding: 20px 22px;
    }
}

/* ============================================================
   MARKETPLACE BUTTON (social bar)
   ============================================================ */
.marketplace-btn {
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    border: 1.5px solid rgba(139, 92, 246, 0.6);
    border-radius: 20px;
    padding: 6px 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.marketplace-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.5), 0 4px 16px rgba(59, 130, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.9);
}
.marketplace-btn:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================================
   MARKETPLACE OVERLAY
   ============================================================ */
.mp-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(8, 10, 18, 0.97);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    overflow: hidden;
}
.mp-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Header — realistic card market style */
.mp-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    background: rgba(255,255,255,0.02);
}
.mp-header-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.mp-logo {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #fff;
}
.mp-logo-badge {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: 6px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: #fff;
    text-transform: uppercase;
}

/* Nav links */
.mp-nav {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}
.mp-nav-link {
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    background: none;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.mp-nav-link:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.04);
}
.mp-nav-link.active {
    color: #e2e8f0;
    background: rgba(255,255,255,0.08);
}

/* Search bar */
.mp-search-wrap {
    flex: 1;
    max-width: 320px;
    position: relative;
    margin-left: auto;
}
.mp-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.25);
    pointer-events: none;
}
.mp-search {
    width: 100%;
    font-family: inherit;
    font-size: 0.75rem;
    padding: 7px 12px 7px 32px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    color: #e2e8f0;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.mp-search::placeholder { color: rgba(255,255,255,0.25); }
.mp-search:focus {
    border-color: rgba(139,92,246,0.4);
    background: rgba(255,255,255,0.06);
}

/* Header actions */
.mp-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.mp-close {
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 1.3rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mp-close:hover {
    background: rgba(255,255,255,0.14);
}

/* Sub-bar: tabs + stats */
.mp-subbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.mp-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
}
.mp-stat strong {
    color: rgba(255,255,255,0.7);
    font-weight: 800;
}
.mp-stat-sep {
    color: rgba(255,255,255,0.15);
}

/* Wallet Button */
.mp-wallet-btn {
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1.5px solid rgba(139, 92, 246, 0.5);
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.04em;
}
.mp-wallet-btn:hover {
    background: rgba(124, 58, 237, 0.3);
    border-color: #a78bfa;
}
.mp-wallet-btn.connected {
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
}

/* Wallet Dropdown */
.mp-wallet-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 6px;
    min-width: 180px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 10;
}
.mp-wallet-option {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.mp-wallet-option:hover {
    background: rgba(255,255,255,0.08);
}
.mp-wallet-wrap {
    position: relative;
}

/* Tabs */
.mp-tabs {
    display: flex;
    gap: 0;
}
.mp-tab {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.mp-tab:hover {
    color: rgba(255,255,255,0.7);
}
.mp-tab.active {
    color: #a78bfa;
    border-bottom-color: #a78bfa;
}

/* Filters */
.mp-filters {
    display: flex;
    gap: 8px;
    padding: 12px 24px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.mp-filter {
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 16px;
    border: 1.5px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.mp-filter:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
}
.mp-filter.active {
    border-color: currentColor;
    color: #fff;
}
.mp-filter[data-rarity="all"].active    { background: rgba(255,255,255,0.1); }
.mp-filter[data-rarity="blue"].active   { color: #3B82F6; background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.4); }
.mp-filter[data-rarity="purple"].active { color: #8B5CF6; background: rgba(139,92,246,0.12); border-color: rgba(139,92,246,0.4); }
.mp-filter[data-rarity="gold"].active   { color: #F59E0B; background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.4); }
.mp-filter[data-rarity="gray"].active   { color: #9CA3AF; background: rgba(156,163,175,0.1); border-color: rgba(156,163,175,0.3); }

/* Listings Grid */
.mp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    padding: 16px 24px 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.mp-grid::-webkit-scrollbar { width: 6px; }
.mp-grid::-webkit-scrollbar-track { background: transparent; }
.mp-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* Listing Card */
.mp-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
}
.mp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.12);
}
.mp-card-img-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    background: rgba(0,0,0,0.3);
    overflow: hidden;
}
.mp-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mp-card-rarity-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.mp-card-rarity-badge[data-rarity="blue"]   { background: rgba(59,130,246,0.25); color: #60a5fa; }
.mp-card-rarity-badge[data-rarity="purple"] { background: rgba(139,92,246,0.25); color: #a78bfa; }
.mp-card-rarity-badge[data-rarity="gold"]   { background: rgba(245,158,11,0.25); color: #fbbf24; }
.mp-card-rarity-badge[data-rarity="gray"]   { background: rgba(156,163,175,0.2); color: #9ca3af; }

.mp-card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.mp-card-name {
    font-size: 0.8rem;
    font-weight: 800;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mp-card-seller {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mp-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 6px;
}
.mp-card-price {
    font-size: 0.85rem;
    font-weight: 900;
    color: #fbbf24;
}
.mp-card-time {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.25);
}
.mp-buy-btn {
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 6px 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 8px;
    width: 100%;
}
.mp-buy-btn:hover {
    filter: brightness(1.15);
    transform: scale(1.02);
}
.mp-buy-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(0.6);
    transform: none;
}

/* ============================================================
   BUY CONFIRMATION MODAL
   ============================================================ */
.mp-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 5500;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.mp-confirm-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.mp-confirm-panel {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 28px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}
.mp-confirm-img {
    width: 140px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.mp-confirm-name {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 4px;
}
.mp-confirm-seller {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 12px;
}
.mp-confirm-price {
    font-size: 1.3rem;
    font-weight: 900;
    color: #fbbf24;
    margin-bottom: 20px;
}
.mp-confirm-actions {
    display: flex;
    gap: 10px;
}
.mp-confirm-buy {
    flex: 1;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 10px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}
.mp-confirm-buy:hover { filter: brightness(1.15); }
.mp-confirm-cancel {
    flex: 1;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: transparent;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s;
}
.mp-confirm-cancel:hover { background: rgba(255,255,255,0.06); }
.mp-confirm-status {
    margin-top: 14px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    min-height: 1.2em;
}
.mp-confirm-status.success { color: #34d399; }
.mp-confirm-status.error { color: #f87171; }

/* ============================================================
   CASE OPENING OVERLAY
   ============================================================ */
.co-overlay {
    position: fixed;
    inset: 0;
    z-index: 5100;
    background: rgba(8, 10, 18, 0.98);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    overflow: hidden;
}
.co-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Header */
.co-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.co-title {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.co-cost {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    margin-left: auto;
    margin-right: 16px;
}
.co-cost span {
    color: #fbbf24;
    font-weight: 900;
}
.co-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 1.4rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.co-close:hover {
    background: rgba(255,255,255,0.14);
}

/* Open Case Button */
.co-open-btn {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 10px 28px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}
.co-open-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.04);
    box-shadow: 0 0 32px rgba(245, 158, 11, 0.5);
}
.co-open-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
    transform: none;
    box-shadow: none;
}

/* Reels Container */
.co-reels {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    min-height: 0;
    overflow: hidden;
}

/* Single Reel */
.co-reel {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 90px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
}

/* Center indicator */
.co-reel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 100%;
    border-left: 2px solid rgba(251, 191, 36, 0.4);
    border-right: 2px solid rgba(251, 191, 36, 0.4);
    z-index: 3;
    pointer-events: none;
    background: rgba(251, 191, 36, 0.04);
}

/* Arrow indicator above reel */
.co-reel::after {
    content: '\u25BC';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: #fbbf24;
    z-index: 4;
    pointer-events: none;
}

/* Card strip inside reel */
.co-strip {
    display: flex;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    gap: 6px;
    will-change: transform;
}
.co-strip.spinning {
    transition: transform cubic-bezier(0.15, 0.85, 0.35, 1);
}

/* Individual card in reel */
.co-strip-card {
    flex-shrink: 0;
    width: 64px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.3);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.co-strip-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.co-strip-card.winner {
    border-color: #fbbf24;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.5);
}
.co-strip-card.winner[data-rarity="gold"] {
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.7), 0 0 48px rgba(245, 158, 11, 0.3);
}

/* Side fade gradients on reel */
.co-reel-fade-left,
.co-reel-fade-right {
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.co-reel-fade-left {
    left: 0;
    background: linear-gradient(to right, rgba(8,10,18,0.95), transparent);
}
.co-reel-fade-right {
    right: 0;
    background: linear-gradient(to left, rgba(8,10,18,0.95), transparent);
}

/* Status text */
.co-status {
    text-align: center;
    padding: 12px 24px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
    min-height: 2.5em;
}

/* ============================================================
   CASE OPENING RESULTS MODAL
   ============================================================ */
.co-results-overlay {
    position: fixed;
    inset: 0;
    z-index: 5200;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}
.co-results-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.co-results-panel {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 32px;
    max-width: 680px;
    width: 95%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.co-results-title {
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #fbbf24, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.co-results-cards {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.co-result-card {
    width: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.1);
    transition: transform 0.3s;
    background: rgba(0,0,0,0.3);
}
.co-result-card:hover {
    transform: scale(1.05);
}
.co-result-card img {
    width: 100%;
    display: block;
}
.co-result-card-name {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 5px 4px;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.co-result-card[data-rarity="gold"]   { border-color: rgba(245,158,11,0.5); box-shadow: 0 0 16px rgba(245,158,11,0.3); }
.co-result-card[data-rarity="purple"] { border-color: rgba(139,92,246,0.4); }
.co-result-card[data-rarity="blue"]   { border-color: rgba(59,130,246,0.3); }
.co-result-card[data-rarity="gray"]   { border-color: rgba(156,163,175,0.2); }

.co-results-dismiss {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 12px 40px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.co-results-dismiss:hover {
    filter: brightness(1.15);
    transform: scale(1.04);
}

/* ============================================================
   MARKETPLACE + CASE OPENING RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .mp-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 12px 14px 20px;
    }
    .mp-header {
        padding: 10px 14px;
        gap: 8px;
        flex-wrap: wrap;
    }
    .mp-nav { display: none; }
    .mp-search-wrap { max-width: 100%; order: 10; }
    .mp-subbar, .mp-filters {
        padding-left: 14px;
        padding-right: 14px;
    }
    .mp-stats { display: none; }
    .mp-logo { font-size: 0.9rem; }

    .co-reel { height: 72px; }
    .co-strip-card { width: 50px; height: 64px; }
    .co-results-panel { padding: 20px 14px; }
    .co-result-card { width: 70px; }

    .marketplace-btn {
        font-size: 0.62rem;
        padding: 5px 12px;
    }
}
