/* 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 {
    pointer-events: none;
    animation: caisseFadeSlide 0.6s ease forwards;
}

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

.caisse-card {
    width: 480px;
    padding: 28px 36px 24px;
    background: rgba(10, 10, 15, 0.85);
    border: 1.5px solid transparent;
    border-image: linear-gradient(135deg, #a78bfa, #06b6d4, #facc15) 1;
    border-radius: 0;
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 0 30px rgba(167, 139, 250, 0.15),
        0 0 60px rgba(6, 182, 212, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Use a wrapper trick for border-radius + gradient border */
.caisse-dashboard {
    border-radius: 24px;
    padding: 1.5px;
    background: linear-gradient(135deg, #a78bfa, #06b6d4, #facc15);
    box-shadow:
        0 0 40px rgba(167, 139, 250, 0.2),
        0 0 80px rgba(6, 182, 212, 0.1);
}

.caisse-card {
    border: none;
    border-image: none;
    border-radius: 22.5px;
    background: rgba(10, 10, 18, 0.92);
}

/* "MARKET CAP" label */
.caisse-mcap-label {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 8px;
    margin-bottom: -4px;
}

/* Token Row - Avatar + Info */
.caisse-token-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.caisse-avatar {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 2px solid #facc15;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    background: rgba(250, 204, 21, 0.08);
}

.caisse-avatar-inner {
    width: 30px;
    height: 30px;
    position: relative;
}

.caisse-pixel-eye {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #000;
    top: 4px;
}
.caisse-pixel-eye.left { left: 2px; }
.caisse-pixel-eye.right { right: 2px; }

.caisse-pixel-mouth {
    position: absolute;
    bottom: 4px;
    left: 2px;
    width: 20px;
    height: 5px;
    background: #000;
}

.caisse-token-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.caisse-token-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

/* Avatar placeholder (pixel face) — hidden when real image loads */
.caisse-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Big Market Cap Number */
.caisse-mcap-big {
    text-align: center;
    font-size: 4.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    padding: 16px 0 20px;
    background: linear-gradient(135deg, #a78bfa, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter:
        drop-shadow(0 0 25px rgba(167, 139, 250, 0.4))
        drop-shadow(0 0 50px rgba(6, 182, 212, 0.2));
    line-height: 1;
}

/* Token ticker */
.caisse-token-ticker {
    font-size: 0.95rem;
    color: #8b8fa3;
    font-weight: 600;
    margin-top: 2px;
}

/* 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 - Dev bio */
.popup-text--bio {
    font-size: 1.1rem;
    max-width: 500px;
}

/* ==========================================
   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.5rem;
    }

    .caisse-card {
        width: 340px;
        padding: 20px 24px 18px;
    }

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

    .caisse-avatar {
        width: 48px;
        height: 48px;
    }

    .caisse-token-name {
        font-size: 0.85rem;
    }

    .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;
    }
}
