/* ThePixelGlobe - Extracted Styles */
        /* Fonts loaded via <link> in head for faster rendering */
        
        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        :root {
            --bg-dark: #0a0a0f;
            --bg-panel: rgba(15, 15, 25, 0.95);
            --accent-cyan: #00f5ff;
            --accent-magenta: #ff00aa;
            --accent-gold: #ffd700;
            --text-primary: #ffffff;
            --text-secondary: #8888aa;
            --border-glow: rgba(0, 245, 255, 0.3);
            --land-color: #2d5a27;
            --ocean-color: #1a4a6e;
        }
        
        body {
            font-family: 'Outfit', sans-serif;
            background: var(--bg-dark);
            color: var(--text-primary);
            overflow-x: hidden;
            min-height: 100vh;
        }
        
        /* ======= LOADING OVERLAY ======= */
        #globe-loading-overlay {
            position: absolute; top: 0; left: 0; right: 0; bottom: 0;
            z-index: 100; display: flex; align-items: center; justify-content: center;
            background: radial-gradient(ellipse at 50% 40%, #0d1025 0%, #060810 70%, #020305 100%);
            pointer-events: none; transition: opacity 1s ease;
            overflow: hidden;
        }
        .gl-content {
            display: flex; flex-direction: column; align-items: center;
            z-index: 2; position: relative;
        }
        
        /* Hex ring spinner */
        .gl-hex-ring {
            width: 110px; height: 110px; position: relative;
            margin-bottom: 20px;
        }
        .gl-ring-svg {
            width: 100%; height: 100%;
            transform: rotate(-90deg);
        }
        .gl-ring-track {
            fill: none; stroke: rgba(0, 245, 255, 0.06); stroke-width: 3;
        }
        .gl-ring-progress {
            fill: none; stroke: url(#gl-gradient); stroke-width: 3;
            stroke-linecap: round;
            stroke-dasharray: 327; /* 2π × 52 */
            stroke-dashoffset: 327;
            transition: stroke-dashoffset 0.4s ease;
        }
        .gl-hex-center {
            position: absolute; top: 50%; left: 50%;
            transform: translate(-50%, -50%);
        }
        .gl-globe-icon {
            position: relative; width: 50px; height: 50px;
            display: flex; align-items: center; justify-content: center;
        }
        .gl-hex {
            position: absolute; font-size: 2.2rem; color: rgba(0, 245, 255, 0.7);
            animation: gl-hex-pulse 2.5s ease-in-out infinite;
        }
        .gl-hex-2 {
            font-size: 1.4rem; color: rgba(160, 60, 255, 0.5);
            animation-delay: -0.8s;
            animation-name: gl-hex-orbit;
        }
        .gl-hex-3 {
            font-size: 1rem; color: rgba(0, 245, 255, 0.3);
            animation-delay: -1.6s;
            animation-name: gl-hex-orbit-2;
        }
        
        @keyframes gl-hex-pulse {
            0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.7; }
            50% { transform: scale(1.15) rotate(30deg); opacity: 1; }
        }
        @keyframes gl-hex-orbit {
            0% { transform: translate(0, -18px) scale(1) rotate(0deg); opacity: 0.5; }
            25% { transform: translate(18px, 0) scale(0.8) rotate(90deg); opacity: 0.3; }
            50% { transform: translate(0, 18px) scale(1) rotate(180deg); opacity: 0.5; }
            75% { transform: translate(-18px, 0) scale(0.8) rotate(270deg); opacity: 0.3; }
            100% { transform: translate(0, -18px) scale(1) rotate(360deg); opacity: 0.5; }
        }
        @keyframes gl-hex-orbit-2 {
            0% { transform: translate(22px, 0) scale(1) rotate(0deg); opacity: 0.3; }
            25% { transform: translate(0, 22px) scale(0.7) rotate(-90deg); opacity: 0.2; }
            50% { transform: translate(-22px, 0) scale(1) rotate(-180deg); opacity: 0.3; }
            75% { transform: translate(0, -22px) scale(0.7) rotate(-270deg); opacity: 0.2; }
            100% { transform: translate(22px, 0) scale(1) rotate(-360deg); opacity: 0.3; }
        }
        
        /* Title */
        .gl-title {
            font-size: 0.8rem; letter-spacing: 3px; text-transform: uppercase;
            color: rgba(0, 245, 255, 0.8); margin-bottom: 24px;
            font-weight: 300;
            background: linear-gradient(90deg, rgba(0,245,255,0.6), rgba(160,60,255,0.6), rgba(0,245,255,0.6));
            background-size: 200% 100%;
            -webkit-background-clip: text; background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: gl-shimmer 3s ease-in-out infinite;
        }
        @keyframes gl-shimmer {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }
        
        /* Progress bar */
        .gl-progress-wrap {
            width: 220px; height: 3px; background: rgba(255,255,255,0.05);
            border-radius: 2px; overflow: hidden; position: relative;
        }
        .gl-progress-bar {
            width: 0%; height: 100%;
            background: linear-gradient(90deg, #00f5ff, #a03cff, #00f5ff);
            background-size: 200% 100%;
            border-radius: 2px;
            transition: width 0.4s ease;
            animation: gl-bar-shimmer 2s linear infinite;
            box-shadow: 0 0 8px rgba(0, 245, 255, 0.3);
        }
        @keyframes gl-bar-shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        
        /* Progress text */
        .gl-progress-text {
            margin-top: 10px; font-size: 0.62rem;
            color: rgba(255, 255, 255, 0.35);
            letter-spacing: 0.5px;
            transition: color 0.3s;
        }
        
        /* Rotating tips */
        .gl-tip {
            margin-top: 32px; font-size: 0.65rem;
            color: rgba(255, 255, 255, 0.2);
            font-style: italic; letter-spacing: 0.3px;
            animation: gl-tip-fade 4s ease-in-out infinite;
            min-height: 1.2em; text-align: center;
            transition: opacity 0.4s ease;
        }
        @keyframes gl-tip-fade {
            0%, 100% { opacity: 0.2; }
            20%, 80% { opacity: 1; }
        }
        
        /* Floating hex particles */
        .gl-particles {
            position: absolute; top: 0; left: 0; right: 0; bottom: 0;
            pointer-events: none; z-index: 1;
        }
        .gl-particle {
            position: absolute;
            left: var(--x); top: var(--y);
            font-size: calc(var(--s) * 1.2rem);
            color: rgba(0, 245, 255, 0.08);
            animation: gl-float var(--d) ease-in-out infinite;
            animation-delay: calc(var(--d) * -0.3);
        }
        @keyframes gl-float {
            0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.08; }
            50% { transform: translateY(-15px) rotate(30deg); opacity: 0.15; }
        }
        
        /* Fade-out state */
        #globe-loading-overlay.gl-done {
            opacity: 0; pointer-events: none;
        }
        
        #globe-container {
            width: 100%;
            height: 70vh;
            position: relative;
            contain: layout style;
        }
        
        /* GPU compositing hints for overlays */
        #loading, #intro-overlay, .controls-panel, 
        #pixel-profile-overlay, #user-profile-overlay,
        #pay-overlay, .pixel-card-overlay {
            contain: layout style;
        }
        
        #cell-tooltip {
            will-change: transform, opacity;
        }
        
        #globe-container canvas { display: block; }
        
        .header {
            position: fixed;
            top: 0; left: 0; right: 0;
            padding: 10px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 100;
            background: linear-gradient(to bottom, rgba(10, 10, 15, 0.95) 0%, transparent 100%);
        }
        
        .logo {
            font-family: 'Space Mono', monospace;
            font-size: 1.2rem;
            font-weight: 700;
        }
        
        .logo span {
            background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        .stats-bar {
            display: flex;
            align-items: center;
            font-family: 'Space Mono', monospace;
            font-size: 0.8rem;
        }
        
        .visitor-indicator {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .visitor-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #22c55e;
            box-shadow: 0 0 6px #22c55e;
            animation: pulse-dot 2s ease-in-out infinite;
        }
        @keyframes pulse-dot {
            0%, 100% { opacity: 1; box-shadow: 0 0 6px #22c55e; }
            50% { opacity: 0.6; box-shadow: 0 0 2px #22c55e; }
        }
        .visitor-count {
            color: #22c55e;
            font-weight: bold;
            font-size: 0.85rem;
        }
        .visitor-label {
            color: var(--text-secondary);
            font-size: 0.7rem;
        }
        .fps-indicator {
            color: var(--text-secondary);
            font-size: 0.7rem;
            margin-left: 12px;
            font-family: 'Space Mono', monospace;
        }
        
        .controls-panel {
            position: relative;
            background: linear-gradient(180deg, 
                rgba(10, 16, 28, 0.99) 0%, 
                rgba(6, 10, 20, 1) 100%);
            border-top: none;
            padding: 0;
            backdrop-filter: blur(40px);
            overflow: hidden;
        }
        
        .controls-panel::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(0, 245, 255, 0.15) 20%,
                rgba(0, 245, 255, 0.5) 50%,
                rgba(0, 245, 255, 0.15) 80%,
                transparent 100%);
            animation: glow-line 4s ease-in-out infinite;
        }
        
        @keyframes glow-line {
            0%, 100% { opacity: 0.7; }
            50% { opacity: 1; }
        }
        
        .controls-inner {
            padding: 20px 28px 28px;
            position: relative;
            max-width: 960px;
            margin: 0 auto;
        }
        
        /* Compact story mode — push content to top */
        .controls-panel.story-active .controls-inner { padding: 8px 16px 12px; }
        .controls-panel.story-active .tabs { margin-bottom: 6px; }
        .controls-panel.story-active .story-header { display: none; }
        .controls-panel.story-active .story-sub-nav { margin-bottom: 6px; }
        .controls-panel.story-active .story-player { padding: 10px; }
        .controls-panel.story-active .story-card { margin-bottom: 6px; }
        .controls-panel.story-active .story-controls { margin-bottom: 4px; }
        .controls-panel.story-active .story-options { margin-bottom: 0; }
        .controls-panel.story-active .story-tab-content { padding: 4px 0 0; }
        
        /* Decorative corner accents */
        .controls-panel::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 120px;
            background: radial-gradient(ellipse at 50% 100%, rgba(0, 245, 255, 0.02) 0%, transparent 70%);
            pointer-events: none;
        }
        
        .tabs {
            display: flex;
            gap: 4px;
            margin-bottom: 20px;
            padding: 4px;
            background: rgba(255, 255, 255, 0.04);
            border-radius: 14px;
            width: fit-content;
            margin-left: auto;
            margin-right: auto;
            border: 1px solid rgba(255, 255, 255, 0.06);
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);
        }
        
        .tab {
            padding: 10px 24px;
            background: transparent;
            border: none;
            border-radius: 10px;
            color: rgba(255, 255, 255, 0.45);
            font-family: 'Outfit', sans-serif;
            font-size: 0.88rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            letter-spacing: 0.2px;
        }
        
        .tab::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.08) 0%, transparent 100%);
            opacity: 0;
            transition: opacity 0.3s;
            border-radius: 14px;
        }
        
        .tab:hover {
            color: rgba(255, 255, 255, 0.85);
        }
        
        .tab:hover::before {
            opacity: 1;
        }
        
        .tab.active {
            font-weight: 600;
        }
        
        .tab.active::before { display: none; }
        
        .tab-content { 
            display: none;
            overflow-x: hidden;
        }
        
        .tab-content.active { 
            display: block;
            animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            overflow-x: hidden;
        }
        
        @keyframes slideUp {
            from { opacity: 0; transform: translateY(15px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .cell-info-bar {
            position: absolute;
            bottom: 16px;
            right: 20px;
            background: linear-gradient(135deg, rgba(0, 50, 70, 0.85) 0%, rgba(0, 35, 55, 0.9) 100%);
            border: 1px solid rgba(0, 245, 255, 0.15);
            border-radius: 30px;
            padding: 10px 22px;
            font-size: 0.82rem;
            display: flex;
            align-items: center;
            gap: 14px;
            z-index: 10;
            box-shadow: 
                0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(15px);
        }
        
        .cell-info-label {
            color: var(--accent-cyan);
            font-weight: 600;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 1.2px;
        }
        
        .cell-info-value {
            color: var(--text-primary);
            font-family: 'Space Mono', monospace;
            font-size: 0.85rem;
        }
        
        /* Cell tooltip for sold cells */
        .cell-tooltip {
            position: fixed;
            background: rgba(0, 30, 45, 0.98);
            border: 1px solid rgba(0, 245, 255, 0.4);
            border-radius: 8px;
            padding: 10px 14px;
            font-size: 0.8rem;
            z-index: 1000;
            pointer-events: none;
            max-width: 300px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5);
            display: none;
        }
        
        .cell-tooltip.visible {
            display: block;
        }
        
        .cell-tooltip-owner {
            color: var(--accent-cyan);
            font-weight: bold;
            margin-bottom: 4px;
        }
        
        .cell-tooltip-desc {
            color: var(--text-primary);
            margin-bottom: 6px;
            line-height: 1.4;
        }
        
        .cell-tooltip-link {
            color: #88ccff;
            font-size: 0.7rem;
            word-break: break-all;
        }
        
        .cell-tooltip-hint {
            color: var(--text-secondary);
            font-size: 0.65rem;
            margin-top: 6px;
            font-style: italic;
        }
        
        /* Pixel Profile Modal */
        /* Gap Fill Modal */
        .pixel-profile-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 2000;
            display: none;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(5px);
        }
        
        .pixel-profile-overlay.visible {
            display: flex;
        }
        
        .pixel-profile-modal {
            background: linear-gradient(145deg, rgba(0, 40, 60, 0.98) 0%, rgba(0, 25, 40, 0.98) 100%);
            border: 1px solid rgba(0, 245, 255, 0.3);
            border-radius: 16px;
            padding: 24px;
            max-width: 420px;
            width: 90%;
            max-height: 85vh;
            overflow-y: auto;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        }
        
        .pixel-profile-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 16px;
        }
        
        .pixel-profile-owner {
            font-size: 1.3rem;
            font-weight: bold;
            color: var(--accent-cyan);
        }
        
        .pixel-profile-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }
        
        .pixel-profile-close:hover {
            color: var(--text-primary);
        }
        
        .profile-showcase {
            display: flex;
            gap: 6px;
            justify-content: center;
            margin-bottom: 12px;
            min-height: 28px;
        }
        .showcase-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 0.72rem;
            font-weight: 600;
            border: 1px solid;
            background: rgba(0,0,0,0.3);
        }
        .showcase-badge .sb-icon { font-size: 0.85rem; }
        .showcase-badge .sb-name { opacity: 0.9; }
        
        .ach-item { position: relative; }
        
        .showcase-header {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            margin-bottom: 8px;
            font-size: 0.7rem;
            color: rgba(255,255,255,0.35);
        }
        
        .pixel-profile-color {
            width: 100%;
            max-width: 240px;
            height: 150px;
            border-radius: 10px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            margin: 0 auto 16px auto;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
        }
        .pixel-profile-color canvas {
            width: 100%;
            height: 100%;
            image-rendering: pixelated;
        }
        
        /* Group/Artwork Info */
        .profile-group-info {
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, rgba(100, 200, 255, 0.1) 100%);
            border: 1px solid rgba(0, 245, 255, 0.3);
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 16px;
            text-align: center;
        }
        
        .profile-group-badge {
            display: inline-block;
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.3) 0%, rgba(100, 200, 255, 0.3) 100%);
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 0.85rem;
            font-weight: bold;
            color: var(--accent-cyan);
            margin-bottom: 8px;
        }
        
        .profile-group-stats {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-bottom: 10px;
        }
        
        .profile-group-highlight {
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
            border: 1px solid rgba(255, 215, 0, 0.4);
            color: #FFD700;
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .profile-group-highlight:hover {
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 165, 0, 0.3) 100%);
            transform: scale(1.05);
        }
        
        .pixel-profile-section {
            margin-bottom: 16px;
        }
        
        .pixel-profile-label {
            font-size: 0.7rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 4px;
        }
        
        .pixel-profile-value {
            color: var(--text-primary);
            font-size: 0.9rem;
            line-height: 1.5;
        }
        
        .pixel-profile-link {
            color: #88ccff;
            text-decoration: none;
            word-break: break-all;
        }
        
        .pixel-profile-link:hover {
            text-decoration: underline;
        }
        
        .pixel-profile-coords {
            font-family: monospace;
            color: var(--accent-cyan);
        }
        
        /* User Profile Modal */
        .up-stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 6px;
            margin-bottom: 10px;
        }
        .up-stat-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            background: rgba(255,255,255,0.03);
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.04);
        }
        .up-stat-icon { font-size: 1.1rem; }
        .up-stat-info { display: flex; flex-direction: column; min-width: 0; }
        .up-stat-val { font-size: 0.85rem; font-weight: 600; color: var(--accent-cyan); }
        .up-stat-label { font-size: 0.6rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; }
        
        .up-artworks {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .up-artworks-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.85rem;
            color: rgba(255,255,255,0.7);
        }
        .up-art-info {
            display: flex;
            align-items: center;
            gap: 8px;
            justify-content: center;
        }
        .up-art-nav {
            display: flex;
            gap: 8px;
            justify-content: center;
            align-items: center;
        }
        .up-art-nav .btn { padding: 6px 12px !important; font-size: 0.75rem !important; }
        
        .pixel-profile-owner.clickable { cursor: pointer; }
        .pixel-profile-owner.clickable:hover { color: var(--accent-cyan); }
        .lb-row-name.clickable, .lb-podium-name.clickable { cursor: pointer; }
        .lb-row-name.clickable:hover, .lb-podium-name.clickable:hover { color: var(--accent-cyan); }
        
        /* Reactions */
        .pixel-reactions {
            display: flex;
            gap: 8px;
            margin: 16px 0 8px;
            padding: 12px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 10px;
            flex-wrap: wrap;
            align-items: center;
        }
        
        .reaction-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            background: rgba(0, 60, 80, 0.4);
            border: 1px solid rgba(0, 245, 255, 0.15);
            border-radius: 20px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.85rem;
        }
        
        .reaction-btn:hover {
            background: rgba(0, 100, 130, 0.5);
            border-color: rgba(0, 245, 255, 0.3);
        }
        
        .reaction-btn.active {
            background: linear-gradient(145deg, rgba(255, 100, 100, 0.3) 0%, rgba(200, 50, 80, 0.3) 100%);
            border-color: rgba(255, 100, 100, 0.5);
        }
        
        .reaction-btn.active .reaction-icon {
            transform: scale(1.2);
        }
        
        .reaction-icon {
            font-size: 1.1rem;
            transition: transform 0.2s;
        }
        
        .reaction-count {
            font-weight: bold;
            min-width: 20px;
            text-align: center;
        }
        
        .story-reactions .reaction-btn { padding: 4px 8px; font-size: 0.7rem; }
        
        /* Share Buttons */
        .pixel-share-section {
            margin-top: 20px;
            padding-top: 16px;
            border-top: 1px solid rgba(0, 245, 255, 0.15);
        }
        
        .share-buttons {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            justify-content: center;
        }
        
        .share-btn {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 6px 10px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.72rem;
            font-weight: 600;
            transition: all 0.2s;
        }
        
        .share-btn-twitter {
            background: #1DA1F2;
            color: white;
        }
        
        .share-btn-twitter:hover {
            background: #0d8ecf;
        }
        
        .share-btn-reddit {
            background: #FF4500;
            color: white;
        }
        
        .share-btn-reddit:hover {
            background: #e03d00;
        }
        
        .share-btn-copy {
            background: rgba(0, 245, 255, 0.2);
            color: var(--accent-cyan);
            border: 1px solid rgba(0, 245, 255, 0.3);
        }
        
        .share-btn-copy:hover {
            background: rgba(0, 245, 255, 0.3);
        }
        
        .share-btn-screenshot {
            background: rgba(100, 200, 100, 0.2);
            color: #88ff88;
            border: 1px solid rgba(100, 200, 100, 0.3);
        }
        
        .share-btn-screenshot:hover {
            background: rgba(100, 200, 100, 0.3);
        }
        
        .share-btn-facebook {
            background: rgba(24, 119, 242, 0.2);
            color: #5b9bf5;
            border: 1px solid rgba(24, 119, 242, 0.3);
        }
        .share-btn-facebook:hover { background: rgba(24, 119, 242, 0.3); }
        
        .share-btn-whatsapp {
            background: rgba(37, 211, 102, 0.2);
            color: #5de88a;
            border: 1px solid rgba(37, 211, 102, 0.3);
        }
        .share-btn-whatsapp:hover { background: rgba(37, 211, 102, 0.3); }
        
        .share-btn-telegram {
            background: rgba(0, 136, 204, 0.2);
            color: #4cb8e8;
            border: 1px solid rgba(0, 136, 204, 0.3);
        }
        .share-btn-telegram:hover { background: rgba(0, 136, 204, 0.3); }
        
        .share-btn-native {
            background: linear-gradient(135deg, rgba(0,245,255,0.25), rgba(0,136,255,0.25));
            color: #00f5ff;
            border: 1px solid rgba(0,245,255,0.4);
            font-weight: 700;
        }
        .share-btn-native:hover { background: linear-gradient(135deg, rgba(0,245,255,0.35), rgba(0,136,255,0.35)); }
        
        /* Comments Section */
        .pixel-comments {
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid rgba(0, 245, 255, 0.15);
        }
        
        .comments-list {
            max-height: 200px;
            overflow-y: auto;
            margin-bottom: 12px;
        }
        
        .comment-item {
            padding: 10px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            margin-bottom: 8px;
            font-size: 0.85rem;
            display: flex;
            gap: 10px;
        }
        
        .comment-upvote {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 36px;
        }
        
        .comment-upvote-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1.2rem;
            padding: 2px;
            opacity: 0.6;
            transition: all 0.2s;
        }
        
        .comment-upvote-btn:hover {
            opacity: 1;
            transform: scale(1.2);
        }
        
        .comment-upvote-btn.upvoted {
            opacity: 1;
            color: #ff6b6b;
        }
        
        .comment-upvote-count {
            font-size: 0.75rem;
            font-weight: bold;
            color: var(--text-secondary);
        }
        
        .comment-content {
            flex: 1;
        }
        
        .comment-author {
            color: var(--accent-cyan);
            font-weight: bold;
            font-size: 0.75rem;
        }
        
        .comment-text {
            color: var(--text-primary);
            margin-top: 4px;
            line-height: 1.4;
        }
        
        .comment-time {
            color: var(--text-secondary);
            font-size: 0.65rem;
            margin-top: 4px;
        }
        
        .comment-input-row {
            display: flex;
            gap: 8px;
        }
        
        .comment-input {
            flex: 1;
            padding: 8px 12px;
            background: rgba(0, 30, 50, 0.5);
            border: 1px solid rgba(0, 245, 255, 0.2);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.8rem;
        }
        
        .comment-input:focus {
            outline: none;
            border-color: var(--accent-cyan);
        }
        
        .comment-submit {
            padding: 8px 16px;
            background: var(--accent-cyan);
            color: var(--bg-dark);
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: bold;
            font-size: 0.8rem;
        }
        
        .comment-submit:hover {
            background: #00d4e0;
        }
        
        .no-comments {
            color: var(--text-secondary);
            font-size: 0.8rem;
            font-style: italic;
            text-align: center;
            padding: 10px;
        }
        
        /* Story Mode Styles */
        .story-tab-content {
            padding: 10px 0;
        }
        
        .story-header {
            text-align: center;
            margin-bottom: 16px;
        }
        
        .story-header h3 {
            color: var(--accent-cyan);
            margin: 0 0 4px 0;
            font-size: 1.1rem;
        }
        
        .story-subtitle {
            color: var(--text-secondary);
            font-size: 0.8rem;
            margin: 0;
        }
        
        .story-empty {
            text-align: center;
            padding: 30px 20px;
            color: var(--text-secondary);
        }
        
        .story-empty-icon {
            font-size: 3rem;
            margin-bottom: 10px;
            opacity: 0.5;
        }
        
        .story-empty-hint {
            font-size: 0.8rem;
            opacity: 0.7;
        }
        
        .story-player {
            background: rgba(0, 20, 40, 0.5);
            border-radius: 12px;
            padding: 16px;
        }
        
        .story-progress {
            height: 4px;
            background: rgba(0, 245, 255, 0.15);
            border-radius: 2px;
            margin-bottom: 12px;
            overflow: hidden;
        }
        
        .story-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-cyan), #00ff88);
            border-radius: 2px;
            transition: width 0.3s ease;
            width: 0%;
        }
        
        .story-counter {
            text-align: center;
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 12px;
        }
        
        .story-counter span:first-child {
            color: var(--accent-cyan);
            font-weight: bold;
            font-size: 1.1rem;
        }
        
        .story-card {
            background: rgba(0, 40, 60, 0.6);
            border: 1px solid rgba(0, 245, 255, 0.2);
            border-radius: 10px;
            padding: 14px;
            margin-bottom: 14px;
        }
        
        .story-card-header {
            display: flex;
            gap: 12px;
            align-items: center;
            margin-bottom: 10px;
        }
        
        .story-card-color {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            flex-shrink: 0;
        }
        
        .story-card-info {
            flex: 1;
        }
        
        .story-card-owner {
            color: var(--accent-cyan);
            font-weight: bold;
            font-size: 1rem;
        }
        
        .story-card-date {
            color: var(--text-secondary);
            font-size: 0.75rem;
            margin-top: 2px;
        }
        
        .story-card-desc {
            color: var(--text-primary);
            font-size: 0.85rem;
            line-height: 1.4;
            margin-bottom: 8px;
        }
        
        .story-card-desc:empty {
            display: none;
        }
        
        .story-card-coords {
            color: var(--text-secondary);
            font-size: 0.75rem;
            font-family: monospace;
        }
        
        .story-card-link { margin: 4px 0 6px; }
        .story-link {
            color: var(--accent-cyan); font-size: 0.75rem; text-decoration: none;
            word-break: break-all; opacity: 0.8; transition: opacity 0.2s;
        }
        .story-link:hover { opacity: 1; text-decoration: underline; }
        
        .story-reactions {
            display: flex; gap: 6px; margin: 8px 0 4px;
            padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.06);
            flex-wrap: wrap; align-items: center;
        }
        
        .story-comments {
            margin-top: 6px; padding-top: 6px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }
        .story-comments-list {
            max-height: 100px; overflow-y: auto; margin-bottom: 6px;
            scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
        }
        .story-comments .comment-input-row { gap: 4px; }
        .story-comments .comment-input { font-size: 0.7rem; padding: 5px 8px; }
        .story-comments .comment-submit { font-size: 0.65rem; padding: 5px 10px; }
        
        .story-controls {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-bottom: 12px;
        }
        
        .story-btn {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 1px solid rgba(0, 245, 255, 0.3);
            background: rgba(0, 60, 80, 0.4);
            color: var(--text-primary);
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .story-btn:hover {
            background: rgba(0, 100, 130, 0.5);
            border-color: var(--accent-cyan);
            transform: scale(1.05);
        }
        
        .story-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            transform: none;
        }
        
        .story-btn-play {
            width: 54px;
            height: 54px;
            font-size: 1.3rem;
            background: linear-gradient(145deg, rgba(0, 245, 255, 0.3), rgba(0, 200, 200, 0.2));
        }
        
        .story-btn-play.playing {
            background: linear-gradient(145deg, rgba(255, 100, 100, 0.3), rgba(200, 50, 80, 0.2));
        }
        
        .story-options {
            display: flex;
            justify-content: center;
            gap: 20px;
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        
        .story-option {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
        }
        
        .story-option input[type="checkbox"] {
            accent-color: var(--accent-cyan);
        }
        
        .story-option select {
            background: rgba(0, 30, 50, 0.8);
            border: 1px solid rgba(0, 245, 255, 0.2);
            border-radius: 4px;
            color: var(--text-primary);
            padding: 2px 6px;
            font-size: 0.75rem;
        }
        
        /* Pixel filter pills – shared between View & Story */
        .pixel-filter {
            display: inline-flex;
            background: rgba(0, 20, 40, 0.6);
            border-radius: 8px;
            padding: 2px;
            gap: 1px;
        }
        .pixel-filter-btn {
            background: transparent;
            border: none;
            color: rgba(255,255,255,0.4);
            font-size: 0.62rem;
            padding: 3px 9px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
            letter-spacing: 0.3px;
        }
        .pixel-filter-btn:hover {
            color: rgba(255,255,255,0.65);
            background: rgba(255,255,255,0.05);
        }
        .pixel-filter-btn.active {
            background: rgba(0, 245, 255, 0.15);
            color: var(--accent-cyan);
            box-shadow: 0 0 6px rgba(0, 245, 255, 0.1);
        }
        
        /* Community Patterns */
        .community-card {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 10px;
            border: 1px solid rgba(0, 245, 255, 0.1);
            border-radius: 10px;
            background: rgba(0, 30, 50, 0.35);
            margin-bottom: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .community-card:hover {
            border-color: rgba(0, 245, 255, 0.35);
            background: rgba(0, 40, 65, 0.45);
        }
        .community-card-rank {
            font-size: 1.1rem;
            min-width: 22px;
            text-align: center;
            opacity: 0.5;
        }
        .community-card-rank.top {
            opacity: 1;
        }
        .community-card canvas {
            border-radius: 6px;
            flex-shrink: 0;
        }
        .community-card-info {
            flex: 1;
            min-width: 0;
        }
        .community-card-name {
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .community-card-meta {
            font-size: 0.65rem;
            color: rgba(255,255,255,0.4);
        }
        .community-card-creator {
            color: rgba(0, 245, 255, 0.5);
        }
        .community-card-commission {
            font-size: 0.6rem;
            color: rgba(255, 215, 0, 0.5);
        }
        .community-votes {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1px;
            flex-shrink: 0;
        }
        .community-vote-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 0.85rem;
            padding: 2px 6px;
            border-radius: 4px;
            transition: all 0.15s;
            line-height: 1;
            opacity: 0.45;
        }
        .community-vote-btn:hover {
            opacity: 0.8;
            background: rgba(255,255,255,0.06);
        }
        .community-vote-btn.voted {
            opacity: 1;
        }
        .community-vote-btn.voted-up {
            color: #4ade80;
            opacity: 1;
        }
        .community-vote-btn.voted-down {
            color: #f87171;
            opacity: 1;
        }
        .community-vote-score {
            font-size: 0.72rem;
            font-weight: 600;
            color: var(--text-primary);
            min-width: 20px;
            text-align: center;
        }
        .community-vote-score.positive { color: #4ade80; }
        .community-vote-score.negative { color: #f87171; }
        
        .community-card-use {
            background: rgba(0, 245, 255, 0.12);
            border: 1px solid rgba(0, 245, 255, 0.25);
            color: var(--accent-cyan);
            font-size: 0.65rem;
            padding: 4px 10px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s;
            flex-shrink: 0;
            white-space: nowrap;
        }
        .community-card-use:hover {
            background: rgba(0, 245, 255, 0.25);
        }
        
        .community-pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
            padding: 10px 0 4px;
        }
        .community-page-btn {
            background: rgba(0, 245, 255, 0.1);
            border: 1px solid rgba(0, 245, 255, 0.2);
            color: var(--accent-cyan);
            width: 32px;
            height: 32px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.8rem;
            transition: all 0.15s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .community-page-btn:hover:not(:disabled) {
            background: rgba(0, 245, 255, 0.2);
        }
        .community-page-btn:disabled {
            opacity: 0.25;
            cursor: not-allowed;
        }
        .community-page-info {
            font-size: 0.7rem;
            color: rgba(255,255,255,0.4);
            min-width: 50px;
            text-align: center;
        }
        
        .btn-community-share {
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.15), rgba(100, 200, 255, 0.1));
            border: 1px solid rgba(0, 245, 255, 0.25);
            color: var(--accent-cyan);
            font-size: 0.72rem;
            padding: 8px 14px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn-community-share:hover {
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.25), rgba(100, 200, 255, 0.2));
            border-color: var(--accent-cyan);
        }
        
        .community-top-badge {
            display: inline-block;
            font-size: 0.55rem;
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 150, 50, 0.15));
            color: #fbbf24;
            padding: 1px 5px;
            border-radius: 4px;
            margin-left: 4px;
            vertical-align: middle;
        }
        .community-new-badge {
            display: inline-block;
            font-size: 0.5rem;
            font-weight: 600;
            letter-spacing: 0.5px;
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(100, 200, 255, 0.15));
            color: var(--accent-cyan);
            padding: 1px 5px;
            border-radius: 4px;
            margin-left: 4px;
            vertical-align: middle;
        }
        
        /* Highlight current story pixel */
        .story-highlight {
            animation: story-pulse 1.5s ease-in-out infinite;
        }
        
        @keyframes story-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        
        /* Story Sub-Navigation */
        .story-sub-nav {
            display: flex;
            gap: 4px;
            margin-bottom: 14px;
            background: rgba(0, 20, 40, 0.6);
            border-radius: 10px;
            padding: 3px;
        }
        .story-sub-nav-btn {
            flex: 1;
            padding: 8px 6px;
            border: none;
            border-radius: 8px;
            background: transparent;
            color: var(--text-secondary);
            font-size: 0.78rem;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 500;
            white-space: nowrap;
        }
        .story-sub-nav-btn:hover { color: var(--text-primary); background: rgba(0,245,255,0.08); }
        .story-sub-nav-btn.active {
            background: linear-gradient(145deg, rgba(0,245,255,0.2), rgba(0,200,200,0.1));
            color: var(--accent-cyan);
            box-shadow: 0 0 12px rgba(0,245,255,0.15);
        }
        .story-sub-content { display: none; }
        .story-sub-content.active { display: block; }
        
        /* Time Travel Styles */
        .tt-header { text-align: center; margin-bottom: 14px; }
        .tt-header h3 { color: #a78bfa; margin: 0 0 4px 0; font-size: 1.1rem; }
        .tt-subtitle { color: var(--text-secondary); font-size: 0.8rem; margin: 0; }
        
        .tt-player {
            background: rgba(20, 10, 40, 0.5);
            border-radius: 12px;
            padding: 16px;
            border: 1px solid rgba(167,139,250,0.15);
        }
        
        .tt-interval-select {
            display: flex;
            gap: 4px;
            margin-bottom: 14px;
            background: rgba(0,0,0,0.2);
            border-radius: 8px;
            padding: 3px;
        }
        .tt-interval-btn {
            flex: 1;
            padding: 7px 4px;
            border: none;
            border-radius: 6px;
            background: transparent;
            color: var(--text-secondary);
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 500;
        }
        .tt-interval-btn:hover { color: var(--text-primary); }
        .tt-interval-btn.active {
            background: linear-gradient(145deg, rgba(167,139,250,0.3), rgba(139,92,246,0.2));
            color: #c4b5fd;
            box-shadow: 0 0 10px rgba(167,139,250,0.15);
        }
        
        .tt-timeline-bar {
            position: relative;
            height: 6px;
            background: rgba(167,139,250,0.12);
            border-radius: 3px;
            margin-bottom: 6px;
            overflow: hidden;
            cursor: pointer;
        }
        .tt-timeline-fill {
            height: 100%;
            background: linear-gradient(90deg, #7c3aed, #a78bfa, #c4b5fd);
            border-radius: 3px;
            transition: width 0.4s ease;
            width: 0%;
        }
        
        .tt-date-display {
            text-align: center;
            margin-bottom: 14px;
        }
        .tt-current-date {
            font-size: 1.3rem;
            font-weight: bold;
            color: #c4b5fd;
            font-family: monospace;
            text-shadow: 0 0 15px rgba(167,139,250,0.4);
        }
        .tt-date-range {
            font-size: 0.7rem;
            color: var(--text-secondary);
            margin-top: 4px;
        }
        
        .tt-stats-row {
            display: flex;
            gap: 8px;
            margin-bottom: 14px;
        }
        .tt-stat {
            flex: 1;
            text-align: center;
            background: rgba(167,139,250,0.08);
            border-radius: 8px;
            padding: 8px 4px;
            border: 1px solid rgba(167,139,250,0.1);
        }
        .tt-stat-value {
            font-size: 1.05rem;
            font-weight: bold;
            color: #c4b5fd;
        }
        .tt-stat-label {
            font-size: 0.65rem;
            color: var(--text-secondary);
            margin-top: 2px;
        }
        .tt-stat-new {
            font-size: 0.65rem;
            color: #34d399;
            margin-top: 2px;
        }
        
        .tt-controls {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-bottom: 12px;
        }
        .tt-btn {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            border: 1px solid rgba(167,139,250,0.3);
            background: rgba(60, 20, 80, 0.4);
            color: var(--text-primary);
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .tt-btn:hover {
            background: rgba(100, 40, 130, 0.5);
            border-color: #a78bfa;
            transform: scale(1.05);
        }
        .tt-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            transform: none;
        }
        .tt-btn-play {
            width: 52px;
            height: 52px;
            font-size: 1.3rem;
            background: linear-gradient(145deg, rgba(167,139,250,0.3), rgba(139,92,246,0.2));
        }
        .tt-btn-play.playing {
            background: linear-gradient(145deg, rgba(255,100,100,0.3), rgba(200,50,80,0.2));
        }
        
        .tt-options {
            display: flex;
            justify-content: center;
            gap: 16px;
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        .tt-option {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
        }
        .tt-option input[type="checkbox"] { accent-color: #a78bfa; }
        .tt-option select {
            background: rgba(30, 10, 50, 0.8);
            border: 1px solid rgba(167,139,250,0.2);
            border-radius: 4px;
            color: var(--text-primary);
            padding: 2px 6px;
            font-size: 0.75rem;
        }
        
        .tt-empty {
            text-align: center;
            padding: 30px 20px;
            color: var(--text-secondary);
        }
        .tt-empty-icon {
            font-size: 3rem;
            margin-bottom: 10px;
            opacity: 0.5;
        }
        
        .tt-rotating-indicator {
            text-align: center;
            font-size: 0.8rem;
            color: #a78bfa;
            margin-top: 8px;
            opacity: 0;
            transition: opacity 0.3s;
        }
        .tt-rotating-indicator.visible { opacity: 1; }
        
        @keyframes tt-glow {
            0%, 100% { box-shadow: 0 0 10px rgba(167,139,250,0.1); }
            50% { box-shadow: 0 0 25px rgba(167,139,250,0.3); }
        }
        .tt-player.playing-glow { animation: tt-glow 2s ease-in-out infinite; }
        
        .controls-row {
            display: flex;
            gap: 30px;
            justify-content: center;
            align-items: flex-start;
        }
        
        .control-section {
            flex: 0 0 auto;
            min-width: 180px;
            max-width: 280px;
        }
        
        .control-section h4 {
            font-size: 0.65rem;
            color: rgba(255, 255, 255, 0.4);
            text-transform: uppercase;
            letter-spacing: 1.8px;
            margin-bottom: 12px;
            font-weight: 500;
        }
        
        .form-group { margin-bottom: 12px; }
        
        label {
            display: block;
            margin-bottom: 6px;
            color: rgba(255, 255, 255, 0.4);
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            font-weight: 500;
        }
        
        input, textarea, select {
            width: 100%;
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            color: white;
            font-family: inherit;
            font-size: 0.85rem;
            transition: all 0.25s ease;
        }
        
        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: rgba(0, 245, 255, 0.4);
            background: rgba(0, 245, 255, 0.04);
            box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.08);
        }
        
        input:hover, select:hover {
            border-color: rgba(255, 255, 255, 0.2);
        }
        
        textarea { resize: vertical; min-height: 50px; }
        
        .color-palette {
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            gap: 5px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.06);
        }
        
        .color-swatch {
            width: 100%;
            aspect-ratio: 1;
            border-radius: 6px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.15s ease;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
        }
        
        .color-swatch:hover { 
            transform: scale(1.15); 
            z-index: 1;
            box-shadow: 0 4px 12px rgba(0,0,0,0.4);
        }
        .color-swatch.selected { 
            border-color: white; 
            transform: scale(1.1);
            box-shadow: 0 0 12px rgba(255,255,255,0.5);
        }
        
        /* Recent colors section */
        .recent-colors {
            display: flex;
            gap: 6px;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
            align-items: center;
        }
        
        .recent-colors-label {
            font-size: 0.6rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-right: auto;
        }
        
        .recent-swatch {
            width: 24px;
            height: 24px;
            border-radius: 4px;
            cursor: pointer;
            border: 1px solid rgba(255,255,255,0.2);
            transition: all 0.15s ease;
        }
        
        .recent-swatch:hover {
            transform: scale(1.1);
            border-color: var(--accent-cyan);
        }
        
        .custom-color-row {
            display: flex;
            gap: 12px;
            align-items: center;
            margin-top: 12px;
            padding: 12px;
            background: rgba(0,0,0,0.2);
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.05);
            overflow: visible;
            position: relative;
        }
        
        .custom-color-row input[type="text"] {
            flex: 1;
            padding: 8px 12px;
            font-family: 'Space Mono', monospace;
            font-size: 0.85rem;
            background: rgba(0,0,0,0.4);
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 6px;
            color: var(--text-primary);
            text-transform: uppercase;
        }
        
        .custom-color-row input[type="text"]:focus {
            outline: none;
            border-color: var(--accent-cyan);
            box-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
        }
        
        .color-picker-wrapper {
            position: relative;
            width: 34px;
            height: 34px;
            flex-shrink: 0;
        }
        
        /* Custom Color Picker Popup */
        .color-picker-popup {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(145deg, rgba(10, 25, 40, 0.98) 0%, rgba(5, 15, 25, 0.99) 100%);
            border: 1px solid rgba(0, 245, 255, 0.3);
            border-radius: 16px;
            padding: 16px;
            z-index: 1000;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 245, 255, 0.1);
            backdrop-filter: blur(20px);
            min-width: 220px;
        }
        
        .color-picker-popup.active {
            display: block;
            animation: popupFadeIn 0.2s ease;
        }
        
        @keyframes popupFadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .color-picker-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        
        .color-picker-header span {
            font-size: 0.8rem;
            color: var(--accent-cyan);
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .color-picker-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 1rem;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 4px;
            transition: all 0.2s;
        }
        
        .color-picker-close:hover {
            color: #ff6b6b;
            background: rgba(255, 100, 100, 0.1);
        }
        
        .color-picker-body {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
        }
        
        #color-wheel {
            border-radius: 50%;
            cursor: crosshair;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3), inset 0 0 20px rgba(0,0,0,0.2);
        }
        
        .color-picker-sliders {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .slider-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .slider-group label {
            font-size: 0.65rem;
            color: rgba(255, 255, 255, 0.4);
            text-transform: uppercase;
            letter-spacing: 1.2px;
            margin: 0;
            font-weight: 500;
        }
        
        .slider-group input[type="range"] {
            width: 100%;
            height: 6px;
            -webkit-appearance: none;
            background: linear-gradient(90deg, rgba(255,255,255,0.08) 0%, rgba(0,245,255,0.3) 100%);
            border-radius: 3px;
            padding: 0;
        }
        
        .slider-group input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--accent-cyan);
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0,245,255,0.3);
        }
        
        /* Preset Scale Slider */
        .preset-slider {
            -webkit-appearance: none;
            appearance: none;
            height: 8px;
            border-radius: 4px;
            background: linear-gradient(to right, rgba(255,255,255,0.12), rgba(0,245,255,0.35));
            outline: none;
            transition: all 0.3s;
        }
        .preset-slider::-webkit-slider-runnable-track {
            height: 8px;
            border-radius: 4px;
        }
        .preset-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: var(--accent-cyan);
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0,245,255,0.4);
            transition: all 0.2s;
            margin-top: -7px;
        }
        .preset-slider::-moz-range-track {
            height: 8px;
            border-radius: 4px;
            background: linear-gradient(to right, rgba(255,255,255,0.12), rgba(0,245,255,0.35));
        }
        .preset-slider::-moz-range-thumb {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: var(--accent-cyan);
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 8px rgba(0,245,255,0.4);
        }
        
        /* Fire animation at max level */
        .preset-slider.max-level {
            background: linear-gradient(to right, #FF4500, #FF6B00, #FF8C00, #FFA500);
            animation: fire-glow 0.5s ease-in-out infinite alternate;
        }
        .preset-slider.max-level::-webkit-slider-thumb {
            background: linear-gradient(135deg, #FFDD00, #FF6600);
            box-shadow: 0 0 20px rgba(255,100,0,0.9), 0 0 40px rgba(255,60,0,0.6), 0 0 60px rgba(255,30,0,0.4);
            animation: fire-pulse 0.3s ease-in-out infinite alternate;
        }
        .preset-slider.max-level::-moz-range-thumb {
            background: linear-gradient(135deg, #FFDD00, #FF6600);
            box-shadow: 0 0 20px rgba(255,100,0,0.9), 0 0 40px rgba(255,60,0,0.6);
        }
        @keyframes fire-glow {
            0% { box-shadow: 0 0 5px rgba(255,100,0,0.5), 0 0 10px rgba(255,60,0,0.3); }
            100% { box-shadow: 0 0 10px rgba(255,100,0,0.8), 0 0 20px rgba(255,60,0,0.5), 0 0 30px rgba(255,30,0,0.3); }
        }
        @keyframes fire-pulse {
            0% { transform: scale(1); box-shadow: 0 0 15px rgba(255,100,0,0.9), 0 0 30px rgba(255,60,0,0.6); }
            100% { transform: scale(1.1); box-shadow: 0 0 25px rgba(255,120,0,1), 0 0 50px rgba(255,80,0,0.8), 0 0 70px rgba(255,40,0,0.5); }
        }
        #preset-scale-value.max-level {
            color: #FF6600 !important;
            text-shadow: 0 0 10px rgba(255,100,0,0.8), 0 0 20px rgba(255,60,0,0.5);
            font-weight: 700 !important;
            animation: fire-text 0.4s ease-in-out infinite alternate;
        }
        @keyframes fire-text {
            0% { color: #FF6600; text-shadow: 0 0 10px rgba(255,100,0,0.8); }
            100% { color: #FFAA00; text-shadow: 0 0 15px rgba(255,150,0,1), 0 0 25px rgba(255,100,0,0.6); }
        }
        
        /* Image/GIF Bars (like Pattern bars) */
        .image-top-bar, .image-bottom-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.7);
            padding: 8px 14px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            margin-bottom: 8px;
            overflow: hidden;
        }
        .image-bottom-bar {
            margin-bottom: 0;
            margin-top: 8px;
        }
        
        /* Image/GIF Size Slider Styling */
        .image-slider, .gif-slider {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 8px;
            border-radius: 4px;
            background: linear-gradient(to right, rgba(0,245,255,0.2), rgba(0,245,255,0.4));
            outline: none;
            transition: all 0.3s ease;
        }
        .image-slider::-webkit-slider-thumb, .gif-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: var(--accent-cyan);
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 8px rgba(0,245,255,0.4);
            transition: all 0.2s ease;
        }
        .image-slider::-moz-range-thumb, .gif-slider::-moz-range-thumb {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: var(--accent-cyan);
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 8px rgba(0,245,255,0.4);
        }
        
        /* Fire animation at max level for Image/GIF sliders */
        .image-slider.max-level, .gif-slider.max-level {
            background: linear-gradient(to right, #FF4500, #FF6B00, #FF8C00, #FFA500);
            animation: fire-glow 0.5s ease-in-out infinite alternate;
        }
        .image-slider.max-level::-webkit-slider-thumb, .gif-slider.max-level::-webkit-slider-thumb {
            background: linear-gradient(135deg, #FFDD00, #FF6600);
            box-shadow: 0 0 20px rgba(255,100,0,0.9), 0 0 40px rgba(255,60,0,0.6), 0 0 60px rgba(255,30,0,0.4);
            animation: fire-pulse 0.3s ease-in-out infinite alternate;
        }
        .image-slider.max-level::-moz-range-thumb, .gif-slider.max-level::-moz-range-thumb {
            background: linear-gradient(135deg, #FFDD00, #FF6600);
            box-shadow: 0 0 20px rgba(255,100,0,0.9), 0 0 40px rgba(255,60,0,0.6);
        }
        
        /* Value display fire effect */
        .image-size-value.max-level, .gif-fps-display.max-level {
            color: #FF6600 !important;
            text-shadow: 0 0 10px rgba(255,100,0,0.8), 0 0 20px rgba(255,60,0,0.5);
            font-weight: 700 !important;
            animation: fire-text 0.4s ease-in-out infinite alternate;
        }
        
        /* Slider container styling */
        .image-slider-container {
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding: 8px 0;
        }
        .slider-label-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.85rem;
        }
        .slider-label-row label {
            color: rgba(255,255,255,0.7);
        }
        .slider-value-display {
            font-weight: 600;
            color: var(--accent-cyan);
            min-width: 50px;
            text-align: right;
            transition: color 0.2s, text-shadow 0.2s;
            flex-shrink: 0;
        }
        
        .color-picker-result {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 12px;
            width: 100%;
            box-sizing: border-box;
            border: 1px solid rgba(255, 255, 255, 0.06);
        }
        
        .result-preview {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            border: 2px solid rgba(255,255,255,0.2);
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
        
        #picker-result-hex {
            font-family: 'Space Mono', monospace;
            font-size: 0.9rem;
            color: var(--text-primary);
            letter-spacing: 1px;
        }
        
        .color-picker-apply {
            width: 100%;
            margin-top: 10px;
            padding: 10px;
            font-size: 0.8rem;
        }
        
        .custom-color-preview {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: #00ff00;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s;
            position: relative;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        }
        
        .custom-color-preview::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            border-radius: 50%;
            background: conic-gradient(
                #ff0000, #ff8000, #ffff00, #80ff00, 
                #00ff00, #00ff80, #00ffff, #0080ff,
                #0000ff, #8000ff, #ff00ff, #ff0080, #ff0000
            );
            z-index: -1;
            opacity: 0.6;
            transition: all 0.2s ease;
        }
        
        .custom-color-preview::after {
            content: '🎨';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 16px;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        
        .custom-color-preview:hover {
            transform: scale(1.15);
        }
        
        .custom-color-preview:hover::before {
            opacity: 1;
            animation: spin 3s linear infinite;
        }
        
        .custom-color-preview:hover::after {
            opacity: 1;
        }
        
        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        .cell-info-compact {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            padding: 10px 12px;
            font-size: 0.8rem;
        }
        
        .cell-info-compact .cell-id {
            font-family: 'Space Mono', monospace;
            color: var(--accent-cyan);
            font-size: 0.75rem;
        }
        
        .cell-info-compact .cell-coords {
            color: var(--text-secondary);
            font-size: 0.7rem;
            margin-top: 4px;
        }
        
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 10px;
            font-family: 'Space Mono', monospace;
            font-size: 0.78rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .btn-primary {
            background: linear-gradient(135deg, #00e5f0 0%, #00c8d8 100%);
            color: #061218;
            box-shadow: 0 2px 10px rgba(0, 245, 255, 0.2);
        }
        
        .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0, 245, 255, 0.35); }
        
        .btn-secondary {
            background: rgba(255, 255, 255, 0.06);
            color: var(--text-primary);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.18); }
        
        .btn-small {
            padding: 5px 10px;
            font-size: 0.7rem;
            margin-top: 8px;
        }
        
        /* Image Upload */
        .upload-zone {
            border: 2px dashed rgba(255, 255, 255, 0.12);
            border-radius: 14px;
            padding: 28px 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.02);
        }
        
        .upload-zone:hover, .upload-zone.dragover {
            border-color: var(--accent-cyan);
            background: rgba(0, 245, 255, 0.08);
        }
        
        .upload-icon { font-size: 2.5rem; margin-bottom: 10px; }
        .upload-text { color: var(--text-primary); font-size: 0.9rem; margin-bottom: 5px; }
        .upload-hint { color: var(--text-secondary); font-size: 0.75rem; }
        
        /* Image Preview */
        #image-preview-canvas, #placement-preview-canvas, #country-fill-preview-canvas {
            width: 120px;
            height: 120px;
            border: 1px solid rgba(0, 245, 255, 0.3);
            border-radius: 4px;
            image-rendering: pixelated;
            background: repeating-conic-gradient(rgba(255,255,255,0.06) 0% 25%, transparent 0% 50%) 0 0 / 10px 10px;
        }
        
        #country-fill-preview-canvas {
            width: 100px;
            height: 100px;
        }
        
        .country-fill-stats {
            font-size: 0.85rem;
            color: var(--text-primary);
            margin-bottom: 8px;
        }
        
        .country-fill-name {
            font-size: 1.1rem;
            font-weight: bold;
            color: var(--accent-cyan);
            margin-bottom: 4px;
        }
        
        #fill-country-search {
            width: 100%;
            padding: 8px 12px;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(0, 245, 255, 0.3);
            border-radius: 4px;
            color: var(--text-primary);
            font-size: 0.9rem;
        }
        
        #fill-country-search:focus {
            outline: none;
            border-color: var(--accent-cyan);
        }
        
        .country-search-results {
            max-height: 200px;
            overflow-y: auto;
            background: rgba(0,0,0,0.8);
            border: 1px solid rgba(0, 245, 255, 0.2);
            border-radius: 4px;
            margin-top: 4px;
            display: none;
        }
        
        .country-search-results.visible {
            display: block;
        }
        
        .country-search-item {
            padding: 8px 12px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            font-size: 0.85rem;
        }
        
        .country-search-item:hover {
            background: rgba(0, 245, 255, 0.2);
        }
        
        .country-search-item:last-child {
            border-bottom: none;
        }
        
        .country-search-item .cell-count {
            color: var(--text-secondary);
            font-size: 0.75rem;
        }
        
        .region-selector-label {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin: 8px 0 4px 0;
        }
        
        .region-checkbox-list {
            max-height: 120px;
            overflow-y: auto;
            background: rgba(0,0,0,0.2);
            border-radius: 4px;
            padding: 4px;
        }
        
        .region-selector-compact {
            width: 100%;
            margin: 10px 0;
        }
        
        .region-checkbox-item {
            display: flex;
            align-items: center;
            padding: 4px 8px;
            cursor: pointer;
            border-radius: 3px;
            font-size: 0.85rem;
        }
        
        .region-checkbox-item:hover {
            background: rgba(0, 245, 255, 0.1);
        }
        
        .region-checkbox-item input {
            margin-right: 8px;
            cursor: pointer;
        }
        
        .region-checkbox-item .region-cells {
            color: var(--text-secondary);
            font-size: 0.75rem;
            margin-left: auto;
        }
        
        /* Pattern Builder Styles */
        .pattern-builder-container {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            background: linear-gradient(145deg, rgba(0,0,0,0.5) 0%, rgba(0,20,30,0.4) 100%);
            border: 1px solid rgba(0, 245, 255, 0.2);
            border-radius: 12px;
            padding: 12px;
            margin: 10px 0;
            box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
        }
        
        /* View Tab - Epic Redesign */
        .view-tab-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 0;
            text-align: center;
        }
        
        .view-hero {
            width: 100%;
            padding: 20px 16px 16px;
            background: linear-gradient(180deg, rgba(0,245,255,0.04) 0%, transparent 100%);
            border-bottom: 1px solid rgba(255,255,255,0.04);
            position: relative;
            overflow: hidden;
        }
        .view-hero::before {
            content: '';
            position: absolute;
            top: 0; left: -50%; width: 200%; height: 1px;
            background: linear-gradient(90deg, transparent, rgba(0,245,255,0.3), rgba(160,60,255,0.3), transparent);
            animation: hero-line 4s ease-in-out infinite;
        }
        @keyframes hero-line {
            0%, 100% { transform: translateX(-20%); }
            50% { transform: translateX(20%); }
        }
        
        .view-hero-title {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 3px;
            color: rgba(0,245,255,0.5);
            margin-bottom: 12px;
        }
        
        .view-stats {
            display: flex;
            gap: 8px;
            margin-bottom: 14px;
            justify-content: center;
        }
        
        .view-stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 12px 16px;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
            transition: all 0.3s ease;
            min-width: 80px;
        }
        .view-stat-item:hover {
            background: rgba(0, 245, 255, 0.05);
            border-color: rgba(0, 245, 255, 0.15);
        }
        .view-stat-item.stat-sold {
            border-color: rgba(0,245,255,0.2);
            background: rgba(0,245,255,0.03);
        }
        
        .view-stat-value {
            font-size: 1.15rem;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.95);
            font-family: 'Space Mono', monospace;
        }
        .stat-sold .view-stat-value { color: rgba(0,245,255,0.95); }
        
        .view-stat-label {
            font-size: 0.6rem;
            color: rgba(255, 255, 255, 0.35);
            margin-top: 3px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        /* Progress bar */
        .view-progress-wrap {
            width: 100%;
            margin-bottom: 14px;
        }
        .view-progress-header {
            display: flex;
            justify-content: space-between;
            font-size: 0.6rem;
            color: rgba(255,255,255,0.35);
            margin-bottom: 5px;
            text-transform: uppercase;
            letter-spacing: 0.8px;
        }
        .view-progress-bar {
            width: 100%;
            height: 6px;
            background: rgba(255,255,255,0.06);
            border-radius: 3px;
            overflow: hidden;
            position: relative;
        }
        .view-progress-fill {
            height: 100%;
            border-radius: 3px;
            background: linear-gradient(90deg, rgba(0,245,255,0.6), rgba(160,60,255,0.6), rgba(255,215,0,0.6));
            background-size: 200% 100%;
            animation: progress-shift 3s ease-in-out infinite;
            transition: width 1s ease;
            position: relative;
        }
        .view-progress-fill::after {
            content: '';
            position: absolute;
            right: 0; top: 0;
            width: 20px; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
            animation: progress-glow 2s ease-in-out infinite;
        }
        @keyframes progress-shift {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }
        @keyframes progress-glow {
            0%, 100% { opacity: 0.3; }
            50% { opacity: 1; }
        }
        
        /* Tier summary row */
        .view-tiers-row {
            display: flex;
            gap: 6px;
            justify-content: center;
            flex-wrap: wrap;
            margin-bottom: 0;
        }
        .view-tier-chip {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 3px 8px;
            border-radius: 8px;
            font-size: 0.6rem;
            font-weight: 600;
            letter-spacing: 0.3px;
            transition: transform 0.2s;
        }
        .view-tier-chip:hover { transform: scale(1.08); }
        .view-tier-chip .tier-dot {
            width: 6px; height: 6px;
            border-radius: 50%;
        }
        .chip-basic { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.4); }
        .chip-basic .tier-dot { background: rgba(255,255,255,0.3); }
        .chip-uncommon { background: rgba(76,220,100,0.1); color: rgba(130,255,150,0.8); }
        .chip-uncommon .tier-dot { background: rgba(76,220,100,0.6); box-shadow: 0 0 4px rgba(76,220,100,0.4); }
        .chip-rare { background: rgba(60,160,255,0.1); color: rgba(120,190,255,0.8); }
        .chip-rare .tier-dot { background: rgba(60,160,255,0.6); box-shadow: 0 0 4px rgba(60,160,255,0.4); }
        .chip-epic { background: rgba(160,60,255,0.1); color: rgba(210,150,255,0.8); }
        .chip-epic .tier-dot { background: rgba(160,60,255,0.6); box-shadow: 0 0 4px rgba(160,60,255,0.4); }
        .chip-legendary { background: rgba(255,215,0,0.1); color: rgba(255,215,0,0.85); }
        .chip-legendary .tier-dot { background: rgba(255,215,0,0.7); box-shadow: 0 0 6px rgba(255,215,0,0.5); }
        
        /* Artworks section */
        .view-artworks-section {
            width: 100%;
            padding: 12px 0 0;
        }
        .view-artworks-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 14px;
            margin-bottom: 8px;
        }
        .view-artworks-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: rgba(255,255,255,0.35);
        }
        .view-sort-btn {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.45);
            font-size: 0.65rem;
            padding: 3px 8px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .view-sort-btn:hover {
            background: rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.7);
        }
        
        .view-artworks-container {
            width: 100%;
            max-height: 350px;
            overflow-y: auto;
            padding: 0 10px;
        }
        .view-artworks-empty {
            text-align: center;
            padding: 30px 20px;
            color: rgba(255, 255, 255, 0.3);
        }
        .view-artworks-empty-icon {
            font-size: 2.5rem;
            margin-bottom: 10px;
            opacity: 0.6;
        }
        .view-artworks-empty-cta {
            margin-top: 12px;
            display: inline-block;
            padding: 6px 16px;
            background: rgba(0,245,255,0.1);
            border: 1px solid rgba(0,245,255,0.25);
            border-radius: 8px;
            color: rgba(0,245,255,0.8);
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .view-artworks-empty-cta:hover {
            background: rgba(0,245,255,0.2);
        }
        .view-artworks-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .view-art-card {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.025);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.25s ease;
        }
        .view-art-card:hover {
            background: rgba(0, 245, 255, 0.08);
        }
        /* Tier: Basic (1-19 px) - Clean, minimal */
        .view-art-card.tier-basic {
            border-color: rgba(255,255,255,0.1);
        }
        .view-art-card.tier-basic:hover { border-color: rgba(255,255,255,0.25); }
        
        /* Tier: Uncommon (20-199 px) - Emerald shimmer */
        .view-art-card.tier-uncommon {
            border: 1px solid rgba(76, 220, 100, 0.35);
            box-shadow: 0 0 8px rgba(76, 220, 100, 0.12), inset 0 1px 0 rgba(76, 220, 100, 0.1);
            background: linear-gradient(135deg, rgba(76, 220, 100, 0.04) 0%, transparent 60%);
        }
        .view-art-card.tier-uncommon:hover {
            border-color: rgba(76, 220, 100, 0.6);
            box-shadow: 0 0 14px rgba(76, 220, 100, 0.25), inset 0 1px 0 rgba(76, 220, 100, 0.15);
        }
        .view-art-card.tier-uncommon .view-art-title { color: rgba(130, 255, 150, 0.95); }
        
        /* Tier: Rare (200-999 px) - Sapphire glow with animated border */
        .view-art-card.tier-rare {
            border: 1px solid rgba(60, 160, 255, 0.4);
            box-shadow: 0 0 10px rgba(60, 160, 255, 0.15), 0 0 25px rgba(60, 160, 255, 0.06), inset 0 1px 0 rgba(60, 160, 255, 0.12);
            background: linear-gradient(135deg, rgba(60, 160, 255, 0.06) 0%, rgba(30, 100, 200, 0.03) 50%, transparent 100%);
            animation: rare-shimmer 4s ease-in-out infinite;
        }
        @keyframes rare-shimmer {
            0%, 100% { box-shadow: 0 0 10px rgba(60, 160, 255, 0.15), 0 0 25px rgba(60, 160, 255, 0.06); }
            50% { box-shadow: 0 0 14px rgba(60, 160, 255, 0.25), 0 0 30px rgba(60, 160, 255, 0.1); }
        }
        .view-art-card.tier-rare:hover {
            border-color: rgba(60, 160, 255, 0.75);
            box-shadow: 0 0 20px rgba(60, 160, 255, 0.3), 0 0 40px rgba(60, 160, 255, 0.12);
            animation: none;
        }
        .view-art-card.tier-rare .view-art-title { color: rgba(120, 190, 255, 0.95); }
        
        /* Tier: Epic (1000-4999 px) - Purple aurora with gradient border */
        .view-art-card.tier-epic {
            border: 1px solid transparent;
            background-image: linear-gradient(rgba(15,12,25,0.95), rgba(15,12,25,0.95)), 
                              linear-gradient(135deg, rgba(180, 60, 255, 0.6), rgba(100, 60, 255, 0.3), rgba(220, 80, 255, 0.6));
            background-origin: border-box;
            background-clip: padding-box, border-box;
            box-shadow: 0 0 12px rgba(160, 60, 255, 0.2), 0 0 35px rgba(160, 60, 255, 0.08), inset 0 0 25px rgba(160, 60, 255, 0.04);
            animation: epic-pulse 3s ease-in-out infinite;
        }
        @keyframes epic-pulse {
            0%, 100% { box-shadow: 0 0 12px rgba(160, 60, 255, 0.2), 0 0 35px rgba(160, 60, 255, 0.08), inset 0 0 25px rgba(160, 60, 255, 0.04); }
            50% { box-shadow: 0 0 18px rgba(160, 60, 255, 0.35), 0 0 45px rgba(160, 60, 255, 0.12), inset 0 0 30px rgba(160, 60, 255, 0.06); }
        }
        .view-art-card.tier-epic:hover {
            box-shadow: 0 0 25px rgba(160, 60, 255, 0.4), 0 0 60px rgba(160, 60, 255, 0.15), inset 0 0 35px rgba(160, 60, 255, 0.08);
            animation: none;
        }
        .view-art-card.tier-epic .view-art-title { color: rgba(210, 150, 255, 0.95); }
        .view-art-card.tier-epic .view-art-swatch {
            box-shadow: 0 0 8px rgba(160, 60, 255, 0.4);
        }
        
        /* Tier: Legendary (5000+ px) - Gold holographic with rainbow border + sparkle */
        .view-art-card.tier-legendary {
            border: 1px solid transparent;
            background-image: linear-gradient(rgba(20,16,8,0.95), rgba(20,16,8,0.95)), 
                              linear-gradient(135deg, #FFD700, #FF8C00, #FFD700, #FFF8DC, #FFD700);
            background-origin: border-box;
            background-clip: padding-box, border-box;
            background-size: 100% 100%, 300% 300%;
            box-shadow: 0 0 15px rgba(255, 215, 0, 0.25), 0 0 40px rgba(255, 180, 0, 0.1), 0 0 80px rgba(255, 215, 0, 0.05), inset 0 0 30px rgba(255, 215, 0, 0.04);
            animation: legendary-glow 3s ease-in-out infinite, legendary-border 6s linear infinite;
            position: relative;
            overflow: hidden;
        }
        .view-art-card.tier-legendary::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: conic-gradient(from 0deg, transparent 0deg, rgba(255,215,0,0.06) 60deg, transparent 120deg, 
                                       rgba(255,255,255,0.04) 180deg, transparent 240deg, rgba(255,215,0,0.06) 300deg, transparent 360deg);
            animation: legendary-rotate 8s linear infinite;
            pointer-events: none;
        }
        @keyframes legendary-glow {
            0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.25), 0 0 40px rgba(255, 180, 0, 0.1), 0 0 80px rgba(255, 215, 0, 0.05); }
            50% { box-shadow: 0 0 22px rgba(255, 215, 0, 0.4), 0 0 55px rgba(255, 180, 0, 0.18), 0 0 100px rgba(255, 215, 0, 0.08); }
        }
        @keyframes legendary-border {
            0% { background-position: 100% 100%, 0% 50%; }
            100% { background-position: 100% 100%, 300% 50%; }
        }
        @keyframes legendary-rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        .view-art-card.tier-legendary:hover {
            box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), 0 0 70px rgba(255, 180, 0, 0.25), 0 0 120px rgba(255, 215, 0, 0.1);
        }
        .view-art-card.tier-legendary .view-art-title { 
            color: #FFD700;
            text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
        }
        .view-art-card.tier-legendary .view-art-swatch {
            box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
            border: 1px solid rgba(255, 215, 0, 0.4);
        }
        .view-art-swatch {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            flex-shrink: 0;
            transition: box-shadow 0.2s;
        }
        .tier-rare .view-art-swatch {
            box-shadow: 0 0 6px rgba(60, 160, 255, 0.3);
        }
        .tier-uncommon .view-art-swatch {
            box-shadow: 0 0 4px rgba(76, 220, 100, 0.2);
        }
        .view-art-info {
            flex: 1;
            min-width: 0;
            text-align: left;
        }
        .view-art-title {
            font-size: 0.85rem;
            font-weight: 600;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .view-art-tier-badge {
            font-size: 0.55rem;
            padding: 1px 5px;
            border-radius: 4px;
            letter-spacing: 0.5px;
            font-weight: 700;
            flex-shrink: 0;
        }
        .tier-uncommon-badge {
            background: rgba(76, 220, 100, 0.15);
            color: rgba(130, 255, 150, 0.9);
            border: 1px solid rgba(76, 220, 100, 0.3);
        }
        .tier-rare-badge {
            background: rgba(60, 160, 255, 0.15);
            color: rgba(120, 190, 255, 0.95);
            border: 1px solid rgba(60, 160, 255, 0.35);
        }
        .tier-epic-badge {
            background: rgba(160, 60, 255, 0.2);
            color: rgba(210, 150, 255, 0.95);
            border: 1px solid rgba(160, 60, 255, 0.4);
            box-shadow: 0 0 6px rgba(160, 60, 255, 0.2);
        }
        .tier-legendary-badge {
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 180, 0, 0.15));
            color: #FFD700;
            border: 1px solid rgba(255, 215, 0, 0.5);
            box-shadow: 0 0 8px rgba(255, 215, 0, 0.25);
            text-shadow: 0 0 4px rgba(255, 215, 0, 0.3);
        }
        .view-art-meta {
            font-size: 0.7rem;
            color: rgba(255,255,255,0.45);
            margin-top: 2px;
        }
        .view-art-link {
            font-size: 0.65rem;
            color: var(--accent-cyan);
            opacity: 0.7;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: block;
            margin-top: 1px;
        }
        .view-art-goto {
            flex-shrink: 0;
            background: rgba(0, 245, 255, 0.12);
            border: 1px solid rgba(0, 245, 255, 0.3);
            color: var(--accent-cyan);
            border-radius: 8px;
            padding: 6px 10px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: background 0.2s;
            white-space: nowrap;
        }
        .view-art-goto:hover {
            background: rgba(0, 245, 255, 0.25);
        }
        .view-art-right {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .view-art-cells {
            font-family: 'Space Mono', monospace;
            font-size: 0.75rem;
            color: rgba(255,255,255,0.5);
            white-space: nowrap;
        }
        .tier-uncommon .view-art-cells { color: rgba(130, 255, 150, 0.8); }
        .tier-rare .view-art-cells { color: rgba(120, 190, 255, 0.9); text-shadow: 0 0 6px rgba(60, 160, 255, 0.3); }
        .tier-epic .view-art-cells { color: rgba(210, 150, 255, 0.9); text-shadow: 0 0 6px rgba(160, 60, 255, 0.3); }
        .tier-legendary .view-art-cells { color: #FFD700; font-weight: 700; text-shadow: 0 0 8px rgba(255, 215, 0, 0.4); }
        
        /* Pattern Mode Selection */
        .pattern-mode-select {
            display: flex;
            gap: 8px;
            justify-content: center;
            padding: 20px 8px;
            flex-wrap: wrap;
        }
        
        .mode-option {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 16px 12px;
            background: linear-gradient(145deg, rgba(0, 40, 60, 0.3) 0%, rgba(0, 25, 45, 0.2) 100%);
            border: 1px solid rgba(0, 245, 255, 0.1);
            border-radius: 16px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            min-width: 0;
            flex: 1;
            max-width: 160px;
        }
        
        .mode-option:hover {
            border-color: var(--accent-cyan);
            background: linear-gradient(145deg, rgba(0, 245, 255, 0.1) 0%, rgba(0, 200, 220, 0.05) 100%);
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(0, 245, 255, 0.15);
        }
        
        .mode-icon {
            font-size: 36px;
            margin-bottom: 10px;
        }
        
        .mode-title {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 6px;
        }
        
        .mode-desc {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.5);
            text-align: center;
        }
        
        .btn-back-mode {
            margin-top: 20px;
            padding: 10px 20px;
            font-size: 0.85rem;
        }
        .btn-back-to-view {
            position: absolute;
            top: 20px;
            right: 28px;
            background: rgba(255,60,60,0.15);
            border: 1px solid rgba(255,80,80,0.4);
            color: rgba(255,120,120,0.9);
            font-size: 0.75rem;
            padding: 5px 14px;
            border-radius: 12px;
            cursor: pointer;
            z-index: 20;
            transition: all 0.2s;
        }
        .btn-back-to-view:hover {
            background: rgba(255,60,60,0.3);
            border-color: rgba(255,80,80,0.6);
            color: rgba(255,150,150,1);
        }
        
        #preset-gallery::-webkit-scrollbar { width: 6px; }
        #preset-gallery::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
        #preset-gallery::-webkit-scrollbar-thumb { background: rgba(0,245,255,0.3); border-radius: 3px; }
        #preset-gallery::-webkit-scrollbar-thumb:hover { background: rgba(0,245,255,0.5); }
        
        /* Country search in pattern */
        .country-search-box {
            margin-top: 20px;
            position: relative;
            width: 300px;
        }
        
        .country-search-box input {
            width: 100%;
            padding: 14px 18px;
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 1rem;
            transition: all 0.2s;
        }
        
        .country-search-box input:focus {
            outline: none;
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
        }
        
        .country-info-box {
            margin-top: 15px;
            padding: 15px 25px;
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, rgba(0, 200, 220, 0.05) 100%);
            border: 1px solid rgba(0, 245, 255, 0.2);
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-items: center;
        }
        
        .country-info-box .country-name {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--accent-cyan);
        }
        
        .country-info-box .country-cells {
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.6);
        }
        
        .zoom-info {
            font-size: 0.75rem;
            color: var(--text-secondary);
            padding: 4px 8px;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 4px;
            margin-left: 8px;
            min-width: 38px;
            text-align: center;
            flex-shrink: 0;
        }
        
        .auto-center-label {
            display: flex;
            align-items: center;
            gap: 2px;
            cursor: pointer;
            font-size: 0.75rem;
            color: var(--text-secondary);
            margin-left: 4px;
            flex-shrink: 0;
        }
        .auto-center-label input {
            width: 12px;
            height: 12px;
            margin: 0;
            cursor: pointer;
        }
        .auto-center-label span {
            font-size: 0.8rem;
            opacity: 0.7;
        }
        
        .pattern-select-step {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 240px;
            padding: 50px 40px;
            background: linear-gradient(135deg, 
                rgba(0, 245, 255, 0.03) 0%, 
                rgba(0, 150, 200, 0.02) 50%,
                rgba(0, 80, 120, 0.03) 100%);
            border-radius: 24px;
            border: 1px solid rgba(0, 245, 255, 0.08);
            position: relative;
            overflow: hidden;
        }
        
        .pattern-select-step::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle at center, 
                rgba(0, 245, 255, 0.04) 0%, 
                transparent 45%);
            animation: breathe 5s ease-in-out infinite;
            pointer-events: none;
        }
        
        @keyframes breathe {
            0%, 100% { transform: scale(1); opacity: 0.5; }
            50% { transform: scale(1.15); opacity: 0.9; }
        }
        
        .pattern-select-prompt {
            text-align: center;
            max-width: 480px;
            position: relative;
            z-index: 1;
        }
        
        .pattern-select-prompt .select-icon {
            font-size: 64px;
            margin-bottom: 24px;
            filter: drop-shadow(0 0 25px rgba(0, 245, 255, 0.4));
            animation: float 4s ease-in-out infinite;
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0) scale(1); }
            50% { transform: translateY(-10px) scale(1.05); }
        }
        
        .pattern-select-prompt .select-text {
            font-size: 1.3rem;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 14px;
            line-height: 1.6;
            letter-spacing: 0.2px;
        }
        
        .pattern-select-prompt .select-hint {
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.55);
            line-height: 1.5;
        }
        
        /* Paint step layout */
        .pattern-paint-layout {
            display: flex;
            gap: 20px;
            padding: 18px;
            background: linear-gradient(145deg, 
                rgba(0, 40, 60, 0.35) 0%, 
                rgba(0, 25, 45, 0.25) 100%);
            border-radius: 24px;
            border: 1px solid rgba(0, 245, 255, 0.08);
            overflow: hidden;
        }
        
        .pattern-canvas-area {
            display: flex;
            flex-direction: column;
            gap: 12px;
            background: linear-gradient(180deg, 
                rgba(0, 0, 0, 0.25) 0%, 
                rgba(0, 20, 35, 0.15) 100%);
            padding: 16px;
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.04);
            flex: 1 1 0;
            min-width: 0;
            overflow: hidden;
        }
        
        .pattern-top-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.9rem;
            color: var(--accent-cyan);
            padding: 0 6px;
            height: 28px;
            min-height: 28px;
            overflow: hidden;
        }
        .pattern-top-bar > span {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
            flex: 1;
        }
        
        .pattern-controls-inline {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        
        .grid-size-mini {
            padding: 4px 8px;
            font-size: 0.75rem;
            background: rgba(0,0,0,0.4);
            border: 1px solid rgba(0, 245, 255, 0.2);
            color: var(--text-primary);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .grid-size-mini:hover {
            border-color: var(--accent-cyan);
        }
        
        .btn-tiny:hover {
            background: linear-gradient(180deg, rgba(0, 245, 255, 0.2) 0%, rgba(0, 200, 220, 0.12) 100%);
            border-color: rgba(0, 245, 255, 0.4);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 245, 255, 0.15);
        }
        
        .pattern-builder-container {
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 
                0 8px 32px rgba(0, 0, 0, 0.35),
                inset 0 0 0 1px rgba(0, 245, 255, 0.08);
            max-width: 100%;
        }
        
        .pattern-bottom-bar {
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding: 6px;
        }
        .pattern-bottom-bar .pattern-tools-row {
            display: flex;
            align-items: center;
            gap: 4px;
            flex-wrap: wrap;
        }
        .pattern-bottom-bar .pattern-price-row {
            display: flex;
            justify-content: flex-end;
            align-items: center;
        }
        
        /* Grid Size Sliders */
        .grid-size-sliders {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 12px;
            background: linear-gradient(180deg, rgba(0, 30, 50, 0.5) 0%, rgba(0, 20, 35, 0.4) 100%);
            border-radius: 10px;
            border: 1px solid rgba(0, 245, 255, 0.15);
            margin-bottom: 8px;
            height: 44px;
            min-height: 44px;
            max-height: 44px;
            overflow: hidden;
        }
        
        .grid-slider-row {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
            min-width: 0;
        }
        
        .grid-slider-row label {
            font-size: 0.75rem;
            color: rgba(255,255,255,0.5);
            font-weight: 600;
            width: 14px;
            flex-shrink: 0;
            text-align: center;
        }
        
        .grid-slider {
            -webkit-appearance: none;
            appearance: none;
            flex: 1;
            min-width: 0;
            height: 6px;
            border-radius: 3px;
            background: linear-gradient(to right, rgba(0,245,255,0.2), rgba(0,245,255,0.4));
            outline: none;
            transition: background 0.3s ease;
        }
        
        .grid-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--accent-cyan);
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 6px rgba(0,245,255,0.4);
            transition: all 0.2s ease;
        }
        
        .grid-slider::-moz-range-thumb {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--accent-cyan);
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 6px rgba(0,245,255,0.4);
        }
        
        /* Fire effect at max for grid sliders */
        .grid-slider.max-level {
            background: linear-gradient(to right, #FF4500, #FF6B00, #FF8C00, #FFA500);
            animation: fire-glow 0.5s ease-in-out infinite alternate;
        }
        .grid-slider.max-level::-webkit-slider-thumb {
            background: linear-gradient(135deg, #FFDD00, #FF6600);
            box-shadow: 0 0 15px rgba(255,100,0,0.9), 0 0 30px rgba(255,60,0,0.6), 0 0 45px rgba(255,30,0,0.4);
            animation: fire-pulse 0.3s ease-in-out infinite alternate;
        }
        .grid-slider.max-level::-moz-range-thumb {
            background: linear-gradient(135deg, #FFDD00, #FF6600);
            box-shadow: 0 0 15px rgba(255,100,0,0.9), 0 0 30px rgba(255,60,0,0.6);
        }
        
        .grid-slider-value {
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--accent-cyan);
            width: 26px;
            min-width: 26px;
            flex-shrink: 0;
            text-align: right;
            transition: color 0.2s, text-shadow 0.2s;
        }
        
        .grid-slider-value.max-level {
            color: #FF6600 !important;
            text-shadow: 0 0 8px rgba(255,100,0,0.8), 0 0 16px rgba(255,60,0,0.5);
            font-weight: 700 !important;
            animation: fire-text 0.4s ease-in-out infinite alternate;
        }
        
        .grid-sync-toggle {
            display: flex;
            align-items: center;
            padding: 0 2px;
            flex-shrink: 0;
            width: 32px;
        }
        
        .grid-sync-toggle input[type="checkbox"] {
            display: none;
        }
        
        .grid-sync-toggle label {
            font-size: 1rem;
            cursor: pointer;
            opacity: 0.5;
            transition: all 0.2s ease;
            padding: 4px 6px;
            border-radius: 4px;
            border: 1px dashed rgba(255, 255, 255, 0.3);
            filter: grayscale(100%);
        }
        
        .grid-sync-toggle input[type="checkbox"]:checked + label {
            opacity: 1;
            background: rgba(0, 245, 255, 0.15);
            color: var(--accent-cyan);
            border: 1px solid rgba(0, 245, 255, 0.5);
            filter: none;
        }
        
        .grid-sync-toggle label:hover {
            opacity: 0.85;
            border-color: rgba(255, 255, 255, 0.5);
            filter: none;
        }
        
        .pattern-tools-row {
            display: flex;
            gap: 4px;
            align-items: center;
            flex-wrap: wrap;
        }
        
        .pattern-price-subtle {
            font-size: 0.75rem;
            font-weight: 500;
            color: var(--accent-cyan);
            padding: 4px 10px;
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.12) 0%, rgba(0, 200, 220, 0.06) 100%);
            border-radius: 25px;
            border: 1px solid rgba(0, 245, 255, 0.18);
            box-shadow: 0 4px 15px rgba(0, 245, 255, 0.08);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            height: 28px;
            line-height: 20px;
            text-align: right;
            transition: color 0.2s;
            display: inline-block;
            max-width: 100%;
        }
        
        /* Pattern Transform Controls */
        .transform-hint {
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.6);
        }
        
        .pattern-colors-area {
            display: flex;
            flex-direction: column;
            gap: 14px;
            width: 200px;
            min-width: 200px;
            max-width: 200px;
            flex-shrink: 0;
            padding: 18px;
            background: linear-gradient(180deg, 
                rgba(0, 0, 0, 0.2) 0%, 
                rgba(0, 25, 40, 0.12) 100%);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.04);
            overflow: hidden;
        }
        
        .color-palette.compact {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 4px;
            padding: 8px;
            background: rgba(255, 255, 255, 0.02);
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.04);
        }
        
        .color-palette.compact .color-swatch {
            width: 100%;
            aspect-ratio: 1;
            border-radius: 6px;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
            border: 2px solid transparent;
        }
        
        .color-palette.compact .color-swatch:hover {
            transform: scale(1.2) translateY(-2px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
            z-index: 2;
        }
        
        .color-palette.compact .color-swatch.selected {
            transform: scale(1.12);
            border-color: #fff;
            box-shadow: 
                0 0 0 2px rgba(0, 245, 255, 0.5), 
                0 4px 14px rgba(0, 245, 255, 0.2);
        }
        
        .custom-color-row.compact {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 6px;
        }
        
        .custom-color-input-wrap {
            flex: 1;
            min-width: 0;
        }
        
        .hex-input-row {
            display: flex;
            gap: 8px;
            align-items: center;
        }
        
        .hex-input-row input {
            flex: 1;
            min-width: 0;
            padding: 8px 10px;
            font-size: 0.82rem;
            font-family: 'Space Mono', monospace;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            color: var(--text-primary);
            transition: border-color 0.2s;
            text-transform: uppercase;
        }
        
        .hex-input-row input:focus {
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
            outline: none;
        }
        
        .recent-colors-inline {
            display: flex;
            gap: 6px;
            align-items: center;
        }
        .recent-colors-label {
            font-size: 0.6rem;
            color: rgba(255, 255, 255, 0.4);
            letter-spacing: 0.5px;
            white-space: nowrap;
        }
        .recent-swatch {
            width: 28px !important;
            height: 28px !important;
            border-radius: 6px !important;
            border: 1px solid rgba(255,255,255,0.15) !important;
            background: rgba(255,255,255,0.04);
            cursor: pointer;
            transition: all 0.2s;
            flex-shrink: 0;
        }
        .recent-swatch.has-color {
            border-color: rgba(255,255,255,0.25) !important;
        }
        .recent-swatch:hover.has-color {
            transform: scale(1.12);
            border-color: rgba(0,245,255,0.5) !important;
        }
        .recent-swatch.empty {
            opacity: 0.3;
            cursor: default;
        }
        
        .btn-next {
            margin-top: auto;
            width: 100%;
        }
        
        /* Confirm step layout */
        .pattern-confirm-layout {
            display: flex;
            gap: 28px;
            padding: 22px;
            background: linear-gradient(145deg, 
                rgba(0, 40, 60, 0.35) 0%, 
                rgba(0, 25, 45, 0.25) 100%);
            border-radius: 24px;
            border: 1px solid rgba(0, 245, 255, 0.08);
            overflow: hidden;
        }
        
        .confirm-preview-area {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
            padding: 18px;
            flex-shrink: 0;
            background: linear-gradient(180deg, 
                rgba(0, 0, 0, 0.25) 0%, 
                rgba(0, 20, 35, 0.15) 100%);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.04);
        }
        
        .confirm-preview-area canvas {
            background: rgba(0,0,0,0.35);
            border-radius: 16px;
            border: 1px solid rgba(0, 245, 255, 0.12);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
        }
        
        .confirm-price-box {
            text-align: center;
            padding: 18px 28px;
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.14) 0%, rgba(0, 200, 220, 0.07) 100%);
            border: 1px solid rgba(0, 245, 255, 0.22);
            border-radius: 18px;
            width: 100%;
            box-shadow: 0 6px 25px rgba(0, 245, 255, 0.1);
        }
        
        .confirm-price {
            display: block;
            font-size: 2.6rem;
            font-weight: 700;
            color: var(--accent-cyan);
            text-shadow: 0 0 30px rgba(0, 245, 255, 0.35);
            margin-bottom: 6px;
            letter-spacing: -0.5px;
        }
        
        .confirm-detail {
            display: block;
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.55);
        }
        
        .confirm-form-area {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 14px;
            padding: 18px;
            background: linear-gradient(180deg, 
                rgba(0, 0, 0, 0.18) 0%, 
                rgba(0, 25, 40, 0.1) 100%);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.04);
        }
        
        .confirm-form-area h4 {
            margin: 0 0 5px 0;
            color: var(--text-primary);
            font-size: 1.15rem;
            font-weight: 600;
        }
        
        .confirm-form-area input,
        .confirm-form-area textarea {
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 14px 18px;
            color: var(--text-primary);
            font-size: 0.95rem;
            transition: all 0.25s;
        }
        
        .confirm-form-area input:focus,
        .confirm-form-area textarea:focus {
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 4px rgba(0, 245, 255, 0.08);
            outline: none;
        }
        
        .confirm-buttons {
            display: flex;
            gap: 14px;
            margin-top: 18px;
        }
        
        .confirm-buttons .btn {
            flex: 1;
            padding: 16px 24px;
            border-radius: 14px;
            font-size: 1rem;
            font-weight: 600;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .confirm-buttons .btn-primary {
            background: linear-gradient(135deg, #00f5ff 0%, #00dae8 45%, #00c8d8 100%);
            color: #051520;
            border: none;
            box-shadow: 0 6px 25px rgba(0, 245, 255, 0.3);
        }
        
        .confirm-buttons .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 35px rgba(0, 245, 255, 0.4);
        }
        
        .confirm-buttons .btn-secondary {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: var(--text-primary);
        }
        
        .confirm-buttons .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: var(--accent-cyan);
        }
        
        .pattern-location-info {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 18px;
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, rgba(0, 200, 220, 0.05) 100%);
            border: 1px solid rgba(0, 245, 255, 0.15);
            border-radius: 14px;
            margin-bottom: 12px;
            font-size: 0.95rem;
        }
        
        .pattern-location-info #pattern-location-text {
            color: var(--accent-cyan);
            font-weight: 500;
        }
        
        #pattern-builder-canvas {
            display: block;
            cursor: crosshair;
            border-radius: 14px;
        }
        
        #pattern-builder-canvas.bucket-mode {
            cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctext y='18' font-size='16'%3E🪣%3C/text%3E%3C/svg%3E") 12 12, pointer;
        }
        #pattern-builder-canvas.eraser-mode {
            cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctext y='18' font-size='16'%3E🧹%3C/text%3E%3C/svg%3E") 4 20, pointer;
        }
        #pattern-builder-canvas.pipette-mode {
            cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctext y='18' font-size='16'%3E💉%3C/text%3E%3C/svg%3E") 4 20, crosshair;
        }
        
        .pattern-size-selector {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
            margin-bottom: 12px;
            margin-top: 12px;
        }
        
        .size-presets {
            display: flex;
            gap: 10px;
        }
        
        .size-preset-btn {
            padding: 14px 22px;
            background: linear-gradient(180deg, rgba(30, 45, 60, 0.7) 0%, rgba(20, 35, 50, 0.85) 100%);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: var(--text-primary);
            border-radius: 14px;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .size-preset-btn:hover {
            border-color: rgba(0, 245, 255, 0.35);
            background: linear-gradient(180deg, rgba(0, 245, 255, 0.12) 0%, rgba(0, 200, 220, 0.08) 100%);
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(0, 245, 255, 0.12);
        }
        
        .size-preset-btn.active {
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.22) 0%, rgba(0, 200, 220, 0.14) 100%);
            border-color: var(--accent-cyan);
            color: var(--accent-cyan);
            box-shadow: 0 0 25px rgba(0, 245, 255, 0.18);
        }
        
        .size-custom {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 18px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 14px;
        }
        
        .size-custom input {
            width: 65px;
            padding: 12px 14px;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: var(--text-primary);
            border-radius: 10px;
            font-size: 1.05rem;
            text-align: center;
            transition: all 0.25s;
        }
        
        .size-custom input:focus {
            outline: none;
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
        }
        
        .size-x {
            color: rgba(255, 255, 255, 0.5);
            font-size: 1.2rem;
            font-weight: 500;
        }
        
        /* Mini size controls for paint step */
        .size-presets-mini {
            display: flex;
            gap: 5px;
        }
        
        .size-preset-btn-mini {
            padding: 6px 11px;
            background: linear-gradient(180deg, rgba(30, 45, 55, 0.7) 0%, rgba(20, 35, 45, 0.8) 100%);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: rgba(255, 255, 255, 0.6);
            border-radius: 8px;
            font-size: 0.8rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s;
        }
        
        .size-preset-btn-mini:hover {
            border-color: rgba(0, 245, 255, 0.3);
            color: var(--text-primary);
            background: linear-gradient(180deg, rgba(0, 245, 255, 0.1) 0%, rgba(0, 200, 220, 0.05) 100%);
        }
        
        .size-preset-btn-mini.active {
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.18) 0%, rgba(0, 200, 220, 0.1) 100%);
            border-color: var(--accent-cyan);
            color: var(--accent-cyan);
            box-shadow: 0 3px 12px rgba(0, 245, 255, 0.12);
        }
        
        .size-input-mini {
            width: 46px;
            padding: 6px 8px;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: var(--text-primary);
            border-radius: 8px;
            font-size: 0.85rem;
            text-align: center;
            transition: all 0.2s;
        }
        
        .size-input-mini:focus {
            outline: none;
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.08);
        }
        
        .size-x-mini {
            color: rgba(255, 255, 255, 0.45);
            font-size: 0.9rem;
            font-weight: 500;
        }
        
        .custom-grid-input {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .custom-grid-input input {
            width: 65px;
            padding: 8px 10px;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--text-primary);
            border-radius: 8px;
            font-size: 0.9rem;
            text-align: center;
            transition: all 0.2s;
        }
        
        .custom-grid-input input:focus {
            outline: none;
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
        }
        
        .custom-grid-input .btn-small {
            padding: 8px 12px;
            min-width: auto;
        }
        
        .pattern-tools {
            display: flex;
            gap: 12px;
            margin-top: 14px;
            justify-content: center;
        }
        
        .pattern-tools .btn-small {
            padding: 10px 20px;
            font-size: 0.8rem;
            border-radius: 25px;
        }
        
        .pattern-tools .btn-small.active {
            background: var(--accent-cyan);
            color: #000;
            box-shadow: 0 0 15px rgba(0, 245, 255, 0.4);
        }
        
        .pattern-stats {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 12px;
            text-align: center;
        }
        
        .btn-small {
            padding: 4px 8px;
            font-size: 0.75rem;
        }
        
        .image-info {
            font-size: 0.75rem;
            color: var(--text-secondary);
            margin-bottom: 8px;
            font-family: 'Space Mono', monospace;
        }
        
        .image-info span { color: var(--accent-cyan); }
        
        /* Size Options */
        .size-options {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 6px;
        }
        
        .size-btn {
            padding: 8px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            color: var(--text-primary);
            font-family: 'Space Mono', monospace;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
            text-align: center;
        }
        
        .size-btn span {
            display: block;
            font-size: 0.65rem;
            color: var(--text-secondary);
            margin-top: 2px;
        }
        
        .size-btn:hover {
            border-color: var(--accent-cyan);
            background: rgba(0, 245, 255, 0.1);
        }
        
        .size-btn.selected {
            border-color: var(--accent-cyan);
            background: rgba(0, 245, 255, 0.2);
            color: var(--accent-cyan);
        }
        
        /* Size Sliders */
        .size-sliders {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .slider-row {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .slider-row label {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        
        .slider-row label span {
            color: var(--accent-cyan);
            font-family: 'Space Mono', monospace;
        }
        
        .slider-row input[type="range"] {
            width: 100%;
            height: 6px;
            -webkit-appearance: none;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
            outline: none;
        }
        
        .slider-row input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            background: var(--accent-cyan);
            border-radius: 50%;
            cursor: pointer;
        }
        
        .slider-row input[type="range"]::-moz-range-thumb {
            width: 16px;
            height: 16px;
            background: var(--accent-cyan);
            border-radius: 50%;
            cursor: pointer;
            border: none;
        }
        
        .checkbox-row {
            margin-top: 5px;
        }
        
        .checkbox-row label {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.75rem;
            color: var(--text-secondary);
            cursor: pointer;
        }
        
        .checkbox-row input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: var(--accent-cyan);
        }
        
        .size-info {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 8px;
        }
        
        .size-info span {
            color: var(--accent-cyan);
            font-family: 'Space Mono', monospace;
        }
        
        /* Placement Mode */
        .placement-info {
            text-align: center;
            padding: 10px;
        }
        
        .placement-instructions {
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, rgba(0, 180, 200, 0.05) 100%);
            padding: 20px 30px;
            border-radius: 12px;
            border: 1px solid rgba(0, 245, 255, 0.2);
            font-size: 1rem;
            text-align: center;
            color: var(--text-primary);
        }
        
        .placement-instructions small {
            color: var(--text-secondary);
            display: block;
            margin-top: 8px;
            font-size: 0.8rem;
        }
        
        .placement-preview {
            display: inline-block;
            margin: 10px 0;
        }
        
        .placement-coords {
            font-family: 'Space Mono', monospace;
            font-size: 0.75rem;
            color: var(--accent-cyan);
            margin-bottom: 12px;
        }
        
        .action-row {
            display: flex;
            gap: 12px;
            justify-content: center;
            margin-top: 20px;
        }
        
        /* Price Compact */
        .price-compact {
            text-align: center;
            padding: 15px;
            background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(255,165,0,0.05) 100%);
            border-radius: 10px;
            border: 1px solid rgba(255,215,0,0.2);
            margin-bottom: 15px;
        }
        
        .price-amount {
            font-family: 'Space Mono', monospace;
            font-size: 1.5rem;
            color: var(--accent-gold);
            font-weight: 700;
            text-shadow: 0 0 20px rgba(255,215,0,0.3);
        }
        
        .price-detail {
            display: block;
            font-size: 0.7rem;
            color: var(--text-secondary);
            margin-top: 4px;
        }
        
        /* GIF FPS Selector */
        #gif-fps-selector {
            margin: 10px 0;
            padding: 12px;
            background: linear-gradient(180deg, rgba(0, 30, 50, 0.5) 0%, rgba(0, 20, 35, 0.4) 100%);
            border: 1px solid rgba(0, 245, 255, 0.15);
            border-radius: 10px;
        }
        
        #gif-fps-slider {
            width: 100%;
        }
        
        .gif-price-info {
            font-family: 'Space Mono', monospace;
            font-size: 0.9rem;
            color: var(--accent-gold);
            margin-top: 5px;
        }
        
        #gif-multiplier {
            color: #ff9800;
            font-weight: bold;
        }
        
        /* Action Row */
        .action-row {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            align-items: center;
        }
        
        /* Confirm Arrow Button */
        .btn-confirm-arrow {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.3);
            color: var(--text-secondary);
            font-size: 1.4rem;
            cursor: not-allowed;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .btn-confirm-arrow:not(:disabled) {
            background: var(--accent-cyan);
            border-color: var(--accent-cyan);
            color: #000;
            cursor: pointer;
        }
        
        .btn-confirm-arrow:not(:disabled):hover {
            transform: scale(1.1);
            box-shadow: 0 0 15px var(--accent-cyan);
        }
        
        .btn-confirm-arrow.confirmed {
            background: var(--accent-gold);
            border-color: var(--accent-gold);
            color: #000;
        }
        
        /* Art Transform Toolbar - inside globe, bottom-left */
        .art-toolbar {
            position: absolute;
            left: 12px;
            bottom: 12px;
            z-index: 50;
            display: none;
            animation: tb-slide-in 0.2s ease-out;
        }
        @keyframes tb-slide-in {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .art-tb-bar {
            display: flex;
            align-items: center;
            gap: 3px;
            padding: 4px 6px;
            background: rgba(8, 12, 18, 0.85);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 10px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
        }
        .art-tb-sep {
            width: 1px;
            height: 20px;
            background: rgba(255, 255, 255, 0.06);
            margin: 0 2px;
        }
        .art-tb-btn {
            width: 26px;
            height: 26px;
            border-radius: 6px;
            border: none;
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.45);
            font-size: 0.6rem;
            cursor: pointer;
            transition: all 0.1s;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }
        .art-tb-btn:hover {
            background: rgba(0, 245, 255, 0.12);
            color: var(--accent-cyan);
        }
        .art-tb-btn:active {
            background: rgba(0, 245, 255, 0.2);
            color: var(--accent-cyan);
            transform: scale(0.9);
        }
        .art-tb-btn.rot-btn { color: rgba(255, 200, 100, 0.45); }
        .art-tb-btn.rot-btn:hover { background: rgba(255, 200, 100, 0.1); color: rgba(255, 200, 100, 0.9); }
        .art-tb-btn.rot-btn:active { background: rgba(255, 200, 100, 0.18); }
        .art-tb-deg {
            font-size: 0.58rem;
            color: rgba(255, 200, 100, 0.5);
            font-family: 'Space Mono', monospace;
            min-width: 28px;
            text-align: center;
            user-select: none;
        }
        .art-tb-dpad {
            display: grid;
            grid-template-columns: 24px 24px 24px;
            grid-template-rows: 22px 22px 22px;
            gap: 1px;
        }
        .art-tb-dpad .art-tb-btn { width: 100%; height: 100%; border-radius: 4px; font-size: 0.5rem; }
        .dpad-u { grid-column: 2; grid-row: 1; }
        .dpad-l { grid-column: 1; grid-row: 2; }
        .dpad-r { grid-column: 3; grid-row: 2; }
        .dpad-d { grid-column: 2; grid-row: 3; }
        
        /* No Selection Message */
        .no-selection-msg {
            text-align: center;
            padding: 30px;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }
        
        .no-selection-msg kbd {
            background: rgba(255,255,255,0.1);
            padding: 2px 6px;
            border-radius: 3px;
            font-family: 'Space Mono', monospace;
        }
        
        .btn-secondary.active {
            background: var(--accent-cyan);
            color: var(--bg-dark);
            border-color: var(--accent-cyan);
        }
        
        .globe-side-controls {
            position: absolute;
            left: 20px;
            top: 90px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            z-index: 100;
        }
        
        .globe-side-controls .toggle-btn {
            padding: 10px 14px;
            font-size: 0.75rem;
            border-radius: 25px;
            transition: all 0.2s ease;
            background: rgba(0, 20, 30, 0.9);
            border: 1px solid rgba(255,255,255,0.15);
            backdrop-filter: blur(10px);
            white-space: nowrap;
        }
        
        .globe-side-controls .toggle-btn:hover {
            border-color: var(--accent-cyan);
            background: rgba(0, 40, 60, 0.95);
        }
        
        .globe-side-controls .toggle-btn.active {
            background: rgba(0, 245, 255, 0.15);
            border-color: var(--accent-cyan);
            color: var(--accent-cyan);
            box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
        }
        
        #loading {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: var(--bg-dark);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            transition: opacity 0.5s;
        }
        
        #loading.hidden { opacity: 0; pointer-events: none; }
        
        #loading h2 {
            font-family: 'Space Mono', monospace;
            color: var(--accent-cyan);
            margin-bottom: 20px;
        }
        
        .progress-bar {
            width: 300px;
            height: 4px;
            background: rgba(255,255,255,0.1);
            border-radius: 2px;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta));
            width: 0%;
            transition: width 0.3s;
        }
        
        #progress-text {
            margin-top: 10px;
            color: var(--text-secondary);
            font-size: 0.8rem;
        }
        
        .legend {
            display: flex;
            gap: 15px;
            margin-top: 10px;
            flex-wrap: wrap;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        
        .legend-color {
            width: 14px;
            height: 14px;
            border-radius: 3px;
        }
        
        .country-info {
            background: rgba(0, 245, 255, 0.08);
            border: 1px solid rgba(0, 245, 255, 0.3);
            border-radius: 8px;
            padding: 12px;
            margin-top: 10px;
        }
        
        .country-name {
            font-family: 'Space Mono', monospace;
            font-size: 1rem;
            color: var(--accent-cyan);
            margin-bottom: 5px;
        }
        
        .country-stats {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        
        /* Search Styles */
        .search-container {
            position: relative;
            flex: 1;
            max-width: 400px;
            margin: 0 20px;
        }
        
        .search-input {
            width: 100%;
            padding: 10px 15px;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(0, 245, 255, 0.3);
            border-radius: 25px;
            color: white;
            font-family: 'Outfit', sans-serif;
            font-size: 0.9rem;
            transition: all 0.3s;
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--accent-cyan);
            background: rgba(255, 255, 255, 0.15);
            box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
        }
        
        .search-input::placeholder {
            color: var(--text-secondary);
        }
        
        .search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: rgba(15, 15, 25, 0.98);
            border: 1px solid rgba(0, 245, 255, 0.3);
            border-radius: 10px;
            margin-top: 5px;
            max-height: 300px;
            overflow-y: auto;
            display: none;
            z-index: 1000;
            backdrop-filter: blur(20px);
        }
        
        .search-results.active {
            display: block;
        }
        
        .search-result-item {
            padding: 12px 15px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            transition: background 0.2s;
        }
        
        .search-result-item:hover {
            background: rgba(0, 245, 255, 0.15);
        }
        
        .search-result-item:last-child {
            border-bottom: none;
        }
        
        .search-result-name {
            font-weight: 500;
            color: var(--text-primary);
            font-size: 0.9rem;
        }
        
        .search-result-type {
            font-size: 0.7rem;
            color: var(--text-secondary);
            margin-top: 2px;
        }
        
        .search-loading {
            padding: 15px;
            text-align: center;
            color: var(--text-secondary);
        }
        
        .search-no-results {
            padding: 15px;
            text-align: center;
            color: var(--text-secondary);
        }
        
        .highlight-marker {
            position: absolute;
            pointer-events: none;
        }
    
        /* === Account System === */
        .account-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 14px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            color: rgba(255, 255, 255, 0.7);
            cursor: pointer;
            font-family: 'Outfit', sans-serif;
            font-size: 0.82rem;
            transition: all 0.25s ease;
            margin-left: 12px;
        }
        .account-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.18);
            color: white;
        }
        .account-btn.logged-in {
            border-color: rgba(0, 245, 255, 0.25);
            background: rgba(0, 245, 255, 0.06);
        }
        .account-btn .account-avatar {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            background: rgba(255, 255, 255, 0.08);
        }
        .account-btn.logged-in .account-avatar {
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.3), rgba(0, 180, 220, 0.3));
        }
        .account-btn .account-name {
            max-width: 100px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* Account Modal Overlay */
        .account-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(8px);
            z-index: 2000;
            display: none;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.2s ease;
            contain: layout style paint;
        }
        .account-overlay.visible { display: flex; }
        
        .account-modal {
            background: linear-gradient(180deg, rgba(12, 20, 35, 0.98) 0%, rgba(6, 10, 20, 0.99) 100%);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            width: 90%;
            max-width: 440px;
            max-height: 80vh;
            overflow-y: auto;
            scrollbar-width: none;
            -ms-overflow-style: none;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 245, 255, 0.05);
            position: relative;
        }
        .account-modal::-webkit-scrollbar { display: none; }
        .account-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px 0;
        }
        #ach-overlay .account-modal-header {
            padding: 20px 24px 12px;
        }
        .account-modal-header h3 {
            font-size: 1.1rem;
            font-weight: 600;
            color: white;
            margin: 0;
        }
        .account-modal-close {
            width: 32px; height: 32px;
            border-radius: 50%;
            border: none;
            background: rgba(255, 255, 255, 0.06);
            color: rgba(255, 255, 255, 0.5);
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.2s;
            display: flex; align-items: center; justify-content: center;
        }
        .account-modal-close:hover { background: rgba(255, 255, 255, 0.12); color: white; }
        
        .account-modal-body { padding: 20px 24px 24px; }
        
        /* Auth Forms */
        .auth-form { display: flex; flex-direction: column; gap: 14px; }
        .auth-form .form-field { display: flex; flex-direction: column; gap: 5px; }
        .auth-form .form-field label {
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.45);
            text-transform: uppercase;
            letter-spacing: 1.2px;
        }
        .auth-form .form-field input {
            padding: 11px 14px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            color: white;
            font-size: 0.9rem;
            font-family: 'Outfit', sans-serif;
        }
        .auth-form .form-field input:focus {
            outline: none;
            border-color: rgba(0, 245, 255, 0.4);
            box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.08);
        }
        .auth-submit {
            padding: 12px;
            border: none;
            border-radius: 12px;
            background: linear-gradient(135deg, #00e5f0, #00c8d8);
            color: #061218;
            font-family: 'Outfit', sans-serif;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.25s ease;
            margin-top: 4px;
        }
        .auth-submit:hover { box-shadow: 0 4px 20px rgba(0, 245, 255, 0.3); transform: translateY(-1px); }
        .auth-newsletter-opt {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: rgba(0, 245, 255, 0.03);
            border: 1px solid rgba(0, 245, 255, 0.1);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
            margin: 2px 0 6px;
        }
        .auth-newsletter-opt:hover {
            background: rgba(0, 245, 255, 0.06);
            border-color: rgba(0, 245, 255, 0.2);
        }
        .auth-newsletter-check {
            position: relative;
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }
        .auth-newsletter-check input {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
        }
        .auth-nl-checkmark {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            border-radius: 5px;
            border: 1.5px solid rgba(255,255,255,0.15);
            background: rgba(255,255,255,0.03);
            font-size: 0.7rem;
            color: transparent;
            transition: all 0.2s;
        }
        .auth-newsletter-check input:checked + .auth-nl-checkmark {
            background: rgba(0, 245, 255, 0.15);
            border-color: rgba(0, 245, 255, 0.5);
            color: var(--accent-cyan);
        }
        .auth-newsletter-text {
            display: flex;
            flex-direction: column;
            gap: 1px;
            font-size: 0.75rem;
        }
        
        .auth-switch {
            text-align: center;
            font-size: 0.82rem;
            color: rgba(255, 255, 255, 0.4);
            margin-top: 6px;
        }
        .auth-switch a {
            color: var(--accent-cyan);
            cursor: pointer;
            text-decoration: none;
        }
        .auth-switch a:hover { text-decoration: underline; }
        
        .auth-divider {
            display: flex; align-items: center; gap: 12px;
            color: rgba(255, 255, 255, 0.25);
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .auth-divider::before, .auth-divider::after {
            content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.08);
        }
        .auth-guest-note {
            text-align: center;
            font-size: 0.78rem;
            color: rgba(255, 255, 255, 0.3);
            line-height: 1.5;
            padding: 8px 0;
        }
        
        /* Profile View */
        .profile-header {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-bottom: 20px;
        }
        .profile-avatar-lg {
            width: 52px; height: 52px;
            border-radius: 50%;
            background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(0, 180, 220, 0.3));
            border: 2px solid rgba(0, 245, 255, 0.25);
            display: flex; align-items: center; justify-content: center;
            font-size: 1.5rem;
        }
        .profile-info h4 {
            margin: 0;
            font-size: 1.05rem;
            color: white;
            font-weight: 600;
        }
        .profile-info p {
            margin: 2px 0 0;
            font-size: 0.78rem;
            color: rgba(255, 255, 255, 0.35);
        }
        
        .profile-stats-row {
            display: flex;
            gap: 10px;
            margin-bottom: 18px;
        }
        .profile-stat {
            flex: 1;
            text-align: center;
            padding: 12px 8px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
        }
        .profile-stat-val {
            font-size: 1.15rem;
            font-weight: 700;
            color: white;
            font-family: 'Space Mono', monospace;
        }
        .profile-stat-lbl {
            font-size: 0.65rem;
            color: rgba(255, 255, 255, 0.35);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-top: 2px;
        }
        
        .profile-section-title {
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.4);
            text-transform: uppercase;
            letter-spacing: 1.5px;
            margin-bottom: 10px;
        }
        
        .profile-purchases {
            display: flex;
            flex-direction: column;
            gap: 8px;
            max-height: 240px;
            overflow-y: auto;
        }
        .profile-purchase-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: rgba(255, 255, 255, 0.025);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .profile-purchase-item:hover {
            background: rgba(0, 245, 255, 0.04);
            border-color: rgba(0, 245, 255, 0.12);
        }
        .profile-purchase-color {
            width: 32px; height: 32px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.1);
        }
        .profile-purchase-info { flex: 1; }
        .profile-purchase-name {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.85);
        }
        .profile-purchase-meta {
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.35);
            margin-top: 1px;
        }
        .profile-purchase-cells {
            font-family: 'Space Mono', monospace;
            font-size: 0.78rem;
            color: var(--accent-cyan);
        }
        .profile-purchase-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 4px;
            flex-shrink: 0;
        }
        .profile-purchase-goto {
            background: rgba(0, 245, 255, 0.08);
            border: 1px solid rgba(0, 245, 255, 0.2);
            border-radius: 6px;
            color: var(--accent-cyan);
            font-size: 0.7rem;
            padding: 3px 8px;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        .profile-purchase-goto:hover {
            background: rgba(0, 245, 255, 0.15);
            border-color: rgba(0, 245, 255, 0.4);
        }
        .profile-empty {
            text-align: center;
            padding: 20px;
            color: rgba(255, 255, 255, 0.3);
            font-size: 0.85rem;
        }
        

        /* Music Menu System */
        .music-menu-wrap { position: relative; }
        .music-toggle-bar {
            display: flex; border-radius: 25px; overflow: hidden;
            border: 1px solid rgba(255,255,255,0.15);
            background: rgba(0,20,30,0.9); backdrop-filter: blur(10px);
            align-items: center;
        }
        .mm-vol-inline {
            width: 90px; height: 18px; accent-color: var(--accent-cyan); cursor: pointer;
            margin: 0 4px; flex-shrink: 0; opacity: 0.7; transition: opacity 0.2s;
            -webkit-appearance: none; appearance: none; background: transparent;
        }
        .mm-vol-inline:hover { opacity: 1; }
        .mm-vol-inline::-webkit-slider-runnable-track {
            height: 4px; background: rgba(255,255,255,0.15); border-radius: 2px;
        }
        .mm-vol-inline::-webkit-slider-thumb {
            -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
            background: var(--accent-cyan); margin-top: -5px; cursor: pointer;
            box-shadow: 0 0 6px rgba(0,245,255,0.4);
        }
        .mm-vol-inline::-moz-range-track {
            height: 4px; background: rgba(255,255,255,0.15); border-radius: 2px; border: none;
        }
        .mm-vol-inline::-moz-range-thumb {
            width: 14px; height: 14px; border-radius: 50%; border: none;
            background: var(--accent-cyan); cursor: pointer;
            box-shadow: 0 0 6px rgba(0,245,255,0.4);
        }
        .music-mute-btn {
            padding: 10px 10px; font-size: 0.85rem; border: none; cursor: pointer;
            background: transparent; color: rgba(255,255,255,0.7); transition: all 0.2s;
            border-right: 1px solid rgba(255,255,255,0.08);
        }
        .music-mute-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
        .music-mute-btn.active { color: var(--accent-cyan); }
        .music-mute-btn.muted { color: rgba(255,255,255,0.25); }
        .music-open-btn {
            padding: 10px 12px 10px 10px; font-size: 0.7rem; border: none; cursor: pointer;
            background: transparent; color: rgba(255,255,255,0.6); transition: all 0.2s;
            display: flex; align-items: center; gap: 5px; white-space: nowrap;
            width: 130px;
        }
        .music-open-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
        #music-now-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
        .music-chevron { font-size: 0.6rem; opacity: 0.5; transition: transform 0.2s; }
        .music-menu-wrap.open .music-chevron { transform: rotate(180deg); }
        .music-toggle-bar:has(.music-mute-btn.active) {
            border-color: var(--accent-cyan); 
            box-shadow: 0 0 15px rgba(0,245,255,0.2);
        }

        .music-menu {
            display: none; position: absolute; top: calc(100% + 8px); left: 0;
            background: rgba(8,12,22,0.97); border: 1px solid rgba(0,245,255,0.1);
            border-radius: 12px; padding: 0; min-width: 180px; z-index: 9999;
            backdrop-filter: blur(20px); box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 1px rgba(0,245,255,0.1);
            max-height: 50vh; overflow-y: auto; scrollbar-width: thin;
            scrollbar-color: rgba(0,245,255,0.12) transparent;
        }
        .music-menu-wrap.open .music-menu { display: block; animation: mmSlideIn 0.22s ease-out; }
        @keyframes mmSlideIn { from { opacity:0; transform:translateY(-8px) scale(0.97); } to { opacity:1; transform:translateY(0) scale(1); } }

        .mm-now {
            display: flex; align-items: center; gap: 8px; padding: 8px 12px;
            background: linear-gradient(135deg, rgba(0,245,255,0.06), rgba(0,180,255,0.03));
            border-bottom: 1px solid rgba(255,255,255,0.04); border-radius: 12px 12px 0 0;
        }
        .mm-now-vis { display: flex; gap: 2px; align-items: flex-end; height: 16px; }
        .mm-now-vis span {
            width: 3px; border-radius: 1px; background: var(--accent-cyan);
            animation: mmBar 0.8s ease-in-out infinite alternate;
        }
        .mm-now-vis span:nth-child(1) { height: 6px; animation-delay: 0s; }
        .mm-now-vis span:nth-child(2) { height: 12px; animation-delay: 0.15s; }
        .mm-now-vis span:nth-child(3) { height: 8px; animation-delay: 0.3s; }
        .mm-now-vis span:nth-child(4) { height: 14px; animation-delay: 0.45s; }
        @keyframes mmBar { to { height: 3px; } }
        .mm-now.paused .mm-now-vis span { animation: none; height: 3px; opacity: 0.3; }
        .mm-now-text { font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.8); }

        .mm-group { padding: 2px 0; }
        .mm-group-title {
            padding: 6px 12px 2px; font-size: 0.55rem; font-weight: 700;
            color: rgba(255,255,255,0.2); text-transform: uppercase; letter-spacing: 0.8px;
        }
        .mm-divider { height: 1px; margin: 1px 10px; background: rgba(255,255,255,0.04); }

        .mm-item {
            display: flex; align-items: center; gap: 8px; padding: 5px 12px;
            cursor: pointer; transition: all 0.15s; font-size: 0.73rem;
            color: rgba(255,255,255,0.55); position: relative;
        }
        .mm-item:hover { background: rgba(0,245,255,0.04); color: rgba(255,255,255,0.85); }
        .mm-item.active { color: var(--accent-cyan); background: rgba(0,245,255,0.06); }
        .mm-dot {
            width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
            border: 1.5px solid rgba(255,255,255,0.15); transition: all 0.2s;
        }
        .mm-item.active .mm-dot {
            background: var(--accent-cyan); border-color: var(--accent-cyan);
            box-shadow: 0 0 6px rgba(0,245,255,0.4);
        }
        .mm-item:hover .mm-dot { border-color: rgba(255,255,255,0.35); }

        .mm-badge {
            font-size: 0.5rem; padding: 1px 5px; border-radius: 4px; margin-left: auto;
            font-weight: 600; letter-spacing: 0.3px;
        }
        .mm-badge-gen { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.2); }
        .mm-badge-st { background: rgba(255,215,0,0.08); color: rgba(255,215,0,0.45); border: 1px solid rgba(255,215,0,0.08); }
        .mm-master .mm-dot { border-color: rgba(255,215,0,0.2); }
        .mm-master.active .mm-dot { background: #FFD700; border-color: #FFD700; box-shadow: 0 0 6px rgba(255,215,0,0.4); }
        .mm-master:hover { background: rgba(255,215,0,0.03); }
        .mm-master.active { color: #FFD700; background: rgba(255,215,0,0.05); }

        .mm-vol-section {
            display: flex; align-items: center; gap: 8px; padding: 10px 16px;
            border-top: 1px solid rgba(255,255,255,0.04); margin-top: 2px;
        }
        .mm-vol-icon { font-size: 0.7rem; opacity: 0.4; }
        .mm-vol-slider { flex: 1; accent-color: var(--accent-cyan); height: 3px; cursor: pointer; }
        .mm-vol-val { font-size: 0.62rem; color: rgba(255,255,255,0.25); min-width: 28px; text-align: right; }


        .profile-logout {
            width: 100%;
            padding: 10px;
            border: 1px solid rgba(255, 80, 80, 0.2);
            border-radius: 10px;
            background: rgba(255, 80, 80, 0.06);
            color: rgba(255, 120, 120, 0.8);
            font-family: 'Outfit', sans-serif;
            font-size: 0.82rem;
            cursor: pointer;
            transition: all 0.2s;
            margin-top: 16px;
        }
        .profile-logout:hover {
            background: rgba(255, 80, 80, 0.12);
            border-color: rgba(255, 80, 80, 0.35);
        }

        .profile-nationality-row {
            display: flex; align-items: center; gap: 8px;
            padding: 8px 12px; margin: 8px 0;
            background: rgba(255,255,255,0.03); border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.06);
        }
        .profile-nat-label {
            font-size: 0.75rem; color: rgba(255,255,255,0.5); white-space: nowrap;
        }
        .profile-nat-btn {
            flex: 1; display: flex; align-items: center; gap: 6px;
            background: rgba(0,20,30,0.8); border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px; padding: 6px 10px; color: rgba(255,255,255,0.8);
            font-family: 'Outfit', sans-serif; font-size: 0.75rem; cursor: pointer;
            outline: none; transition: border-color 0.2s;
        }
        .profile-nat-btn:hover { border-color: rgba(0,245,255,0.3); }
        .profile-nat-flag-display { font-size: 1.1rem; line-height: 1; display: flex; align-items: center; }
        .profile-nat-flag-display .flag-img { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; }
        .profile-nat-name { flex: 1; text-align: left; }
        .profile-nat-chevron { font-size: 0.55rem; opacity: 0.4; }
        .flag-picker {
            margin: 0 0 8px 0; padding: 8px;
            background: rgba(0,20,30,0.95); border: 1px solid rgba(0,245,255,0.1);
            border-radius: 10px; animation: mmSlideIn 0.18s ease-out;
        }
        .flag-search {
            width: 100%; box-sizing: border-box; padding: 6px 10px; margin-bottom: 8px;
            background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px; color: #fff; font-family: 'Outfit', sans-serif;
            font-size: 0.75rem; outline: none;
        }
        .flag-search:focus { border-color: var(--accent-cyan); }
        .flag-search::placeholder { color: rgba(255,255,255,0.3); }
        .flag-grid {
            display: grid; grid-template-columns: repeat(6, 1fr);
            gap: 2px; max-height: 180px; overflow-y: auto;
            scrollbar-width: thin; scrollbar-color: rgba(0,245,255,0.12) transparent;
        }
        .flag-cell {
            display: flex; align-items: center; justify-content: center;
            padding: 4px 0; border-radius: 6px;
            cursor: pointer; transition: background 0.15s, transform 0.15s;
            position: relative;
        }
        .flag-cell .flag-img { width: 28px; height: 19px; object-fit: cover; border-radius: 2px; }
        .flag-cell:hover { background: rgba(0,245,255,0.1); transform: scale(1.15); z-index: 1; }
        .flag-cell.active { background: rgba(0,245,255,0.15); box-shadow: 0 0 8px rgba(0,245,255,0.2); }
        .flag-cell[data-name]::after {
            content: attr(data-name); position: absolute; bottom: calc(100% + 4px);
            left: 50%; transform: translateX(-50%); white-space: nowrap;
            background: rgba(0,10,20,0.95); color: rgba(255,255,255,0.9);
            font-size: 0.6rem; padding: 3px 6px; border-radius: 4px;
            pointer-events: none; opacity: 0; transition: opacity 0.15s; z-index: 10;
        }
        .flag-cell:hover::after { opacity: 1; }
        .lb-flag { display: inline-flex; align-items: center; margin-right: 4px; vertical-align: middle; }
        .lb-flag .flag-img { width: 18px; height: 13px; object-fit: cover; border-radius: 2px; }

        
        /* === Achievement System === */
        .achievement-toast {
            position: fixed;
            top: 70px;
            right: 20px;
            z-index: 3000;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 20px;
            background: linear-gradient(135deg, rgba(12, 22, 38, 0.97) 0%, rgba(8, 14, 28, 0.98) 100%);
            border: 1px solid rgba(255, 215, 0, 0.3);
            border-radius: 14px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.1);
            transform: translateX(120%);
            transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
            pointer-events: none;
            max-width: 340px;
        }
        .achievement-toast.show { transform: translateX(0); }
        .achievement-toast .ach-toast-icon {
            font-size: 1.6rem;
            flex-shrink: 0;
            filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4));
        }
        .achievement-toast .ach-toast-info { flex: 1; }
        .achievement-toast .ach-toast-label {
            font-size: 0.6rem;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: rgba(255, 215, 0, 0.7);
            font-weight: 600;
        }
        .achievement-toast .ach-toast-title {
            font-size: 0.92rem;
            color: white;
            font-weight: 600;
            margin-top: 1px;
        }
        .achievement-toast .ach-toast-desc {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.45);
            margin-top: 2px;
        }
        
        /* Easter Egg Toast */
        .easter-egg-toast {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.5);
            z-index: 3001;
            padding: 16px 28px;
            background: linear-gradient(135deg, rgba(12, 22, 38, 0.95) 0%, rgba(8, 14, 28, 0.97) 100%);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 16px;
            box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(135, 207, 250, 0.15);
            color: white;
            font-size: 1.15rem;
            font-weight: 600;
            text-align: center;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            white-space: nowrap;
        }
        .easter-egg-toast.show {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
        
        /* Achievement Panel (in account modal) */
        .ach-tab-bar {
            display: flex;
            gap: 4px;
            margin-bottom: 16px;
            padding: 3px;
            background: rgba(255, 255, 255, 0.04);
            border-radius: 10px;
        }
        .ach-tab-btn {
            flex: 1;
            padding: 8px 12px;
            border: none;
            border-radius: 8px;
            background: transparent;
            color: rgba(255, 255, 255, 0.45);
            font-family: 'Outfit', sans-serif;
            font-size: 0.78rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        .ach-tab-btn.active {
            background: rgba(255, 255, 255, 0.08);
            color: white;
        }
        .ach-tab-btn:hover:not(.active) { color: rgba(255, 255, 255, 0.7); }
        
        .ach-progress-bar {
            height: 4px;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 2px;
            margin-bottom: 16px;
            overflow: hidden;
        }
        .ach-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #FFD700, #FFA500);
            border-radius: 2px;
            transition: width 0.6s ease;
        }
        .ach-progress-label {
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.35);
            text-align: right;
            margin-bottom: 4px;
        }
        
        .ach-grid {
            display: flex;
            flex-direction: column;
            gap: 12px;
            overflow-y: visible;
        }
        .ach-item {
            display: flex;
            align-items: center;
            gap: 18px;
            padding: 18px 22px;
            min-height: 92px;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 14px;
            transition: all 0.2s;
            position: relative;
            overflow: hidden;
        }
        .ach-item.unlocked {
            background: rgba(255, 255, 255, 0.03);
            border-color: rgba(255, 255, 255, 0.08);
        }
        .ach-item.locked { opacity: 0.45; }
        .ach-item.locked.hidden-ach { 
            opacity: 0.3; 
            background: rgba(100, 100, 120, 0.04);
            border-color: rgba(100, 100, 120, 0.1);
            border-style: dashed;
        }
        .ach-item.locked.hidden-ach .ach-icon { filter: grayscale(1) blur(1px); }
        .ach-item.unlocked.hidden-ach {
            background: rgba(160, 100, 255, 0.06);
            border-color: rgba(160, 100, 255, 0.2);
        }
        .ach-item.unlocked.hidden-ach .ach-icon {
            background: rgba(160, 100, 255, 0.12);
        }
        .ach-tier-dots {
            display: flex;
            gap: 6px;
            margin-top: 6px;
            position: relative;
            z-index: 1;
        }
        .ach-tier-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: 1.5px solid rgba(255,255,255,0.15);
            background: transparent;
            transition: all 0.3s;
        }
        .ach-tier-dot.filled {
            border: none;
        }
        /* Rarity effects on achievement items - matching sold pixel cards */
        .ach-item.tier-common {
            border-color: rgba(157,157,157,0.2);
        }
        .ach-item.tier-uncommon {
            border-color: rgba(76,220,100,0.35);
            box-shadow: inset 0 0 12px rgba(76,220,100,0.1);
        }
        .ach-item.tier-uncommon .ach-name { color: rgba(130,255,150,0.95); }
        .ach-item.tier-uncommon .ach-desc { color: rgba(130,230,150,0.5); }
        .ach-item.tier-rare {
            border: 1px solid rgba(60,160,255,0.4);
            box-shadow: inset 0 0 16px rgba(60,160,255,0.08), inset 0 0 40px rgba(60,160,255,0.03);
            background: linear-gradient(135deg, rgba(60,160,255,0.06) 0%, rgba(30,100,200,0.03) 50%, rgba(255,255,255,0.02) 100%) !important;
            animation: ach-rare-shimmer 4s ease-in-out infinite;
        }
        @keyframes ach-rare-shimmer {
            0%, 100% { box-shadow: inset 0 0 16px rgba(60,160,255,0.08), inset 0 0 40px rgba(60,160,255,0.03); }
            50% { box-shadow: inset 0 0 24px rgba(60,160,255,0.14), inset 0 0 50px rgba(60,160,255,0.05); }
        }
        .ach-item.tier-rare .ach-name { color: rgba(120,190,255,0.95); }
        .ach-item.tier-rare .ach-desc { color: rgba(140,190,255,0.5); }
        .ach-item.tier-rare .ach-icon { box-shadow: 0 0 6px rgba(60,160,255,0.25); }
        .ach-item.tier-epic {
            border: 1px solid rgba(180,60,255,0.4);
            background: linear-gradient(135deg, rgba(160,60,255,0.08) 0%, rgba(100,60,255,0.04) 50%, rgba(255,255,255,0.02) 100%) !important;
            box-shadow: inset 0 0 20px rgba(160,60,255,0.1), inset 0 0 50px rgba(160,60,255,0.04);
            animation: ach-epic-pulse 3s ease-in-out infinite;
        }
        @keyframes ach-epic-pulse {
            0%, 100% { box-shadow: inset 0 0 20px rgba(160,60,255,0.1), inset 0 0 50px rgba(160,60,255,0.04); }
            50% { box-shadow: inset 0 0 30px rgba(160,60,255,0.18), inset 0 0 60px rgba(160,60,255,0.07); }
        }
        .ach-item.tier-epic .ach-name { color: rgba(210,150,255,0.95); }
        .ach-item.tier-epic .ach-desc { color: rgba(200,170,255,0.5); }
        .ach-item.tier-epic .ach-icon { box-shadow: 0 0 8px rgba(160,60,255,0.3); }
        .ach-item.tier-legendary {
            border: 1px solid rgba(255,215,0,0.4);
            background: linear-gradient(135deg, rgba(255,215,0,0.08) 0%, rgba(255,180,0,0.04) 50%, rgba(255,255,255,0.02) 100%) !important;
            box-shadow: inset 0 0 24px rgba(255,215,0,0.12), inset 0 0 60px rgba(255,180,0,0.05);
            animation: ach-leg-glow 3s ease-in-out infinite;
            position: relative;
            overflow: hidden;
        }
        .ach-item.tier-legendary::before {
            content: '';
            position: absolute;
            top: -50%; left: -50%;
            width: 200%; height: 200%;
            background: conic-gradient(from 0deg, transparent 0deg, rgba(255,215,0,0.04) 60deg, transparent 120deg, 
                                       rgba(255,255,255,0.02) 180deg, transparent 240deg, rgba(255,215,0,0.04) 300deg, transparent 360deg);
            animation: ach-leg-rotate 8s linear infinite;
            pointer-events: none;
            z-index: 0;
        }
        @keyframes ach-leg-glow {
            0%, 100% { box-shadow: inset 0 0 24px rgba(255,215,0,0.12), inset 0 0 60px rgba(255,180,0,0.05); }
            50% { box-shadow: inset 0 0 35px rgba(255,215,0,0.22), inset 0 0 80px rgba(255,180,0,0.08); }
        }
        @keyframes ach-leg-rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        .ach-item.tier-legendary .ach-name { 
            color: #FFD700;
            text-shadow: 0 0 6px rgba(255,215,0,0.2);
        }
        .ach-item.tier-legendary .ach-icon { 
            box-shadow: 0 0 8px rgba(255,215,0,0.3);
        }
        .ach-item.tier-legendary .ach-desc { color: rgba(255,235,180,0.55); }
        .ach-icon {
            font-size: 2.2rem;
            width: 56px;
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 14px;
            flex-shrink: 0;
            position: relative;
            z-index: 1;
        }
        .ach-item.unlocked .ach-icon {
            background: rgba(255, 255, 255, 0.06);
        }
        .ach-item.locked .ach-icon {
            background: rgba(255, 255, 255, 0.03);
            filter: grayscale(1);
        }
        .ach-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
        .ach-name {
            font-size: 1.05rem;
            color: rgba(255, 255, 255, 0.9);
            font-weight: 600;
        }
        .ach-item.locked .ach-name { color: rgba(255, 255, 255, 0.5); }
        .ach-desc {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.35);
            margin-top: 4px;
        }
        .ach-item.unlocked .ach-desc { color: rgba(255, 255, 255, 0.55); }
        .ach-item-progress {
            height: 5px;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 3px;
            margin-top: 8px;
            overflow: hidden;
            position: relative;
            z-index: 1;
        }
        .ach-item-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, rgba(255, 215, 0, 0.6), rgba(255, 165, 0, 0.8));
            border-radius: 2px;
            transition: width 0.4s ease;
        }
        .ach-badge {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.4);
            font-family: 'Space Mono', monospace;
            flex-shrink: 0;
            position: relative;
            z-index: 1;
        }
        .ach-badge-rarity {
            font-size: 0.72rem !important;
            font-weight: 600;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            opacity: 0.9;
        }
        .ach-unlock-pct {
            font-size: 0.62rem;
            color: rgba(255, 255, 255, 0.4);
            font-family: 'Space Mono', monospace;
            text-align: right;
            margin-top: 3px;
        }
        .ach-counter-row {
            display: flex;
            gap: 8px;
            margin-bottom: 14px;
        }
        .ach-counter {
            flex: 1;
            text-align: center;
            padding: 8px;
            background: rgba(255, 215, 0, 0.03);
            border: 1px solid rgba(255, 215, 0, 0.08);
            border-radius: 10px;
        }
        .ach-counter-val {
            font-size: 1.1rem;
            font-weight: 700;
            color: rgba(255, 215, 0, 0.85);
            font-family: 'Space Mono', monospace;
        }
        .ach-counter-lbl {
            font-size: 0.6rem;
            color: rgba(255, 255, 255, 0.3);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-top: 2px;
        }

        
        /* === Leaderboard === */
        .lb-container {
            padding: 4px 0;
        }
        .lb-header {
            margin-bottom: 14px;
            text-align: center;
        }
        .lb-title-row {
            display: flex;
            align-items: baseline;
            justify-content: center;
            gap: 10px;
        }
        .lb-title {
            font-size: 1.15rem;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.95);
            margin: 0;
            letter-spacing: 0.02em;
        }
        .lb-subtitle {
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.3);
        }
        
        .lb-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 18px;
            justify-content: center;
        }
        .lb-filter {
            padding: 7px 14px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 20px;
            background: rgba(255, 255, 255, 0.02);
            color: rgba(255, 255, 255, 0.4);
            font-family: 'Outfit', sans-serif;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.25s;
            white-space: nowrap;
        }
        .lb-filter:hover {
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.7);
            border-color: rgba(255, 255, 255, 0.12);
        }
        .lb-filter.active {
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 180, 0, 0.06));
            border-color: rgba(255, 215, 0, 0.3);
            color: rgba(255, 215, 0, 0.9);
            box-shadow: 0 0 12px rgba(255, 215, 0, 0.08);
        }
        
        /* Podium - top 3 */
        .lb-podium {
            display: flex;
            align-items: flex-end;
            justify-content: center;
            gap: 6px;
            margin-bottom: 18px;
            min-height: 180px;
            padding: 0 4px;
        }
        .lb-podium-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            flex: 0 0 100px;
        }
        .lb-podium-crown {
            font-size: 1.3rem;
            line-height: 1;
            margin-bottom: -2px;
            filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.4));
        }
        .lb-podium-avatar {
            width: 44px; height: 44px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            font-weight: 700;
            position: relative;
        }
        .lb-podium-item[data-rank="1"] .lb-podium-avatar {
            width: 56px; height: 56px;
            font-size: 1.3rem;
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 180, 0, 0.1));
            border: 2px solid rgba(255, 215, 0, 0.5);
            color: #FFD700;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.15), 0 0 40px rgba(255, 215, 0, 0.05);
            animation: lb-gold-pulse 3s ease-in-out infinite;
        }
        @keyframes lb-gold-pulse {
            0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.15), 0 0 40px rgba(255, 215, 0, 0.05); }
            50% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.25), 0 0 50px rgba(255, 215, 0, 0.1); }
        }
        .lb-podium-item[data-rank="2"] .lb-podium-avatar {
            background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(160, 160, 170, 0.1));
            border: 2px solid rgba(192, 192, 192, 0.4);
            color: #D0D0D0;
        }
        .lb-podium-item[data-rank="3"] .lb-podium-avatar {
            background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(180, 110, 40, 0.1));
            border: 2px solid rgba(205, 127, 50, 0.35);
            color: #CD7F32;
        }
        .lb-podium-name {
            font-size: 0.78rem;
            color: rgba(255, 255, 255, 0.75);
            font-weight: 600;
            max-width: 100px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            text-align: center;
        }
        .lb-podium-item[data-rank="1"] .lb-podium-name { color: rgba(255, 230, 150, 0.95); }
        .lb-podium-val {
            font-size: 0.8rem;
            font-weight: 700;
            font-family: 'Space Mono', monospace;
            color: rgba(255, 255, 255, 0.85);
        }
        .lb-podium-item[data-rank="1"] .lb-podium-val { color: #FFD700; }
        .lb-podium-bar {
            width: 85px;
            border-radius: 10px 10px 0 0;
            display: flex;
            align-items: flex-start;
            justify-content: center;
            padding-top: 10px;
            font-size: 1.3rem;
            font-weight: 700;
            position: relative;
            overflow: hidden;
        }
        .lb-podium-item[data-rank="1"] .lb-podium-bar {
            height: 80px;
            background: linear-gradient(180deg, rgba(255, 215, 0, 0.14) 0%, rgba(255, 215, 0, 0.03) 100%);
            border: 1px solid rgba(255, 215, 0, 0.2);
            border-bottom: none;
            color: rgba(255, 215, 0, 0.8);
        }
        .lb-podium-item[data-rank="2"] .lb-podium-bar {
            height: 56px;
            background: linear-gradient(180deg, rgba(192, 192, 192, 0.1) 0%, rgba(192, 192, 192, 0.02) 100%);
            border: 1px solid rgba(192, 192, 192, 0.15);
            border-bottom: none;
            color: rgba(192, 192, 192, 0.7);
        }
        .lb-podium-item[data-rank="3"] .lb-podium-bar {
            height: 40px;
            background: linear-gradient(180deg, rgba(205, 127, 50, 0.1) 0%, rgba(205, 127, 50, 0.02) 100%);
            border: 1px solid rgba(205, 127, 50, 0.15);
            border-bottom: none;
            color: rgba(205, 127, 50, 0.65);
        }
        .lb-podium-bottom-line {
            width: 100%;
            height: 2px;
            background: linear-gradient(90deg, transparent, rgba(255,215,0,0.2), rgba(192,192,192,0.15), rgba(205,127,50,0.12), transparent);
            margin-bottom: 6px;
        }
        
        /* List rows (4th place onward) */
        .lb-list {
            display: flex;
            flex-direction: column;
            gap: 3px;
            max-height: 250px;
            overflow-y: auto;
        }
        .lb-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: rgba(255, 255, 255, 0.015);
            border: 1px solid rgba(255, 255, 255, 0.03);
            border-radius: 10px;
            transition: all 0.2s;
            position: relative;
        }
        .lb-row:hover {
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.06);
        }
        .lb-row.is-you {
            background: rgba(0, 245, 255, 0.04);
            border-color: rgba(0, 245, 255, 0.15);
            box-shadow: 0 0 12px rgba(0, 245, 255, 0.05);
        }
        .lb-rank {
            width: 26px;
            font-size: 0.78rem;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.25);
            text-align: center;
            font-family: 'Space Mono', monospace;
        }
        .lb-row-avatar {
            width: 32px; height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.78rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.45);
            flex-shrink: 0;
        }
        .lb-row.is-you .lb-row-avatar {
            background: rgba(0, 245, 255, 0.1);
            border-color: rgba(0, 245, 255, 0.25);
            color: var(--accent-cyan);
        }
        .lb-row-name {
            flex: 1;
            font-size: 0.82rem;
            color: rgba(255, 255, 255, 0.7);
            font-weight: 500;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .lb-row.is-you .lb-row-name {
            color: var(--accent-cyan);
            font-weight: 600;
        }
        .lb-row-val {
            font-family: 'Space Mono', monospace;
            font-size: 0.78rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.55);
        }
        .lb-row-bar-bg {
            position: absolute;
            left: 0; top: 0; bottom: 0;
            border-radius: 10px;
            opacity: 0.5;
            pointer-events: none;
            transition: width 0.4s ease;
        }
        /* === Country Leaderboard === */
        .lb-country-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
            max-height: 420px;
            overflow-y: auto;
            padding-right: 4px;
        }
        .lb-country-list::-webkit-scrollbar { width: 4px; }
        .lb-country-list::-webkit-scrollbar-track { background: transparent; }
        .lb-country-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
        
        .lb-country-section-title {
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            padding: 10px 0 6px;
            margin: 0;
        }
        .lb-country-section-title.completed {
            color: #22c55e;
            border-bottom: 1px solid rgba(34,197,94,0.15);
        }
        .lb-country-section-title.in-progress {
            color: rgba(255,255,255,0.4);
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        
        .lb-country-row {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 18px;
            min-height: 64px;
            border-radius: 12px;
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.04);
            transition: all 0.2s;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }
        .lb-country-row:hover {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.08);
        }
        .lb-country-row.completed {
            background: rgba(34,197,94,0.04);
            border-color: rgba(34,197,94,0.15);
        }
        .lb-country-row.completed:hover {
            background: rgba(34,197,94,0.08);
        }
        
        .lb-country-rank {
            font-size: 0.85rem;
            font-weight: 700;
            color: rgba(255,255,255,0.25);
            min-width: 32px;
            text-align: center;
        }
        .lb-country-row.completed .lb-country-rank {
            color: #22c55e;
        }
        
        .lb-country-flag {
            font-size: 1.6rem;
            line-height: 1;
            min-width: 32px;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .lb-country-info {
            flex: 1;
            min-width: 0;
        }
        .lb-country-name {
            font-size: 0.95rem;
            font-weight: 600;
            color: rgba(255,255,255,0.85);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .lb-country-row.completed .lb-country-name {
            color: #86efac;
        }
        .lb-country-meta {
            font-size: 0.78rem;
            color: rgba(255,255,255,0.35);
            margin-top: 2px;
        }
        .lb-country-row.completed .lb-country-meta {
            color: rgba(34,197,94,0.6);
        }
        
        .lb-country-bar-wrap {
            width: 90px;
            height: 8px;
            background: rgba(255,255,255,0.06);
            border-radius: 4px;
            overflow: hidden;
            flex-shrink: 0;
        }
        .lb-country-bar-fill {
            height: 100%;
            border-radius: 3px;
            transition: width 0.6s ease;
            background: linear-gradient(90deg, rgba(0,245,255,0.4), rgba(0,245,255,0.7));
        }
        .lb-country-row.completed .lb-country-bar-fill {
            background: linear-gradient(90deg, #22c55e, #4ade80);
        }
        
        .lb-country-pct {
            font-size: 0.78rem;
            font-weight: 700;
            min-width: 42px;
            text-align: right;
            color: rgba(255,255,255,0.5);
        }
        .lb-country-row.completed .lb-country-pct {
            color: #22c55e;
        }
        
        .lb-country-completed-badge {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            font-size: 0.62rem;
            font-weight: 600;
            color: #22c55e;
            background: rgba(34,197,94,0.1);
            border: 1px solid rgba(34,197,94,0.2);
            border-radius: 6px;
            padding: 2px 6px;
            white-space: nowrap;
        }
        
        .lb-country-stats-bar {
            display: flex;
            justify-content: center;
            gap: 20px;
            padding: 12px 0;
            margin-bottom: 8px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .lb-country-stat {
            text-align: center;
        }
        .lb-country-stat-val {
            font-size: 1.2rem;
            font-weight: 700;
            color: rgba(255,255,255,0.9);
        }
        .lb-country-stat-val.green { color: #22c55e; }
        .lb-country-stat-label {
            font-size: 0.62rem;
            color: rgba(255,255,255,0.35);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        .lb-empty {
            text-align: center;
            padding: 30px;
            color: rgba(255, 255, 255, 0.35);
        }
        
        .lb-you-tag {
            font-size: 0.58rem;
            background: rgba(0, 245, 255, 0.12);
            color: var(--accent-cyan);
            padding: 1px 6px;
            border-radius: 4px;
            margin-left: 6px;
            font-weight: 600;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }
        .lb-podium-you-tag {
            font-size: 0.55rem;
            background: rgba(0, 245, 255, 0.15);
            color: var(--accent-cyan);
            padding: 1px 5px;
            border-radius: 3px;
            font-weight: 600;
        }

        
        /* === Affiliate System === */
        .aff-banner {
            position: fixed;
            top: 0; left: 0; right: 0;
            z-index: 1500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 6px 16px;
            background: linear-gradient(90deg, rgba(120, 80, 255, 0.9), rgba(80, 120, 255, 0.9));
            font-size: 0.78rem;
            color: white;
            font-family: 'Outfit', sans-serif;
            transform: translateY(-100%);
            transition: transform 0.4s ease;
        }
        .aff-banner.show { transform: translateY(0); }
        .aff-banner .aff-banner-name { font-weight: 600; }
        .aff-banner .aff-banner-close {
            position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
            background: none; border: none; color: rgba(255,255,255,0.6);
            cursor: pointer; font-size: 1rem; padding: 2px 6px;
        }
        .aff-banner .aff-banner-close:hover { color: white; }
        
        .aff-ref-badge {
            display: inline-flex; align-items: center; gap: 4px;
            padding: 2px 8px; border-radius: 6px;
            background: rgba(120, 80, 255, 0.15);
            border: 1px solid rgba(120, 80, 255, 0.25);
            font-size: 0.68rem; color: rgba(180, 160, 255, 0.9);
        }
        
        /* Affiliate Admin Panel */

        

        
        .aff-section { margin-bottom: 20px; }
        .aff-section-title {
            font-size: 0.7rem; color: rgba(255,255,255,0.4);
            text-transform: uppercase; letter-spacing: 1.5px;
            margin-bottom: 10px;
        }
        
        .aff-create-row {
            display: flex; gap: 8px; margin-bottom: 12px;
        }
        .aff-create-row input {
            flex: 1; padding: 9px 12px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px; color: white;
            font-family: 'Outfit', sans-serif; font-size: 0.85rem;
        }
        .aff-create-btn {
            padding: 9px 16px; border: none; border-radius: 10px;
            background: linear-gradient(135deg, rgba(120,80,255,0.8), rgba(80,120,255,0.8));
            color: white; font-family: 'Outfit', sans-serif;
            font-size: 0.82rem; font-weight: 600; cursor: pointer;
            transition: all 0.2s; white-space: nowrap;
        }
        .aff-create-btn:hover { box-shadow: 0 4px 16px rgba(120,80,255,0.3); }
        
        .aff-table { width: 100%; border-collapse: collapse; }
        .aff-table th {
            text-align: left; padding: 6px 10px;
            font-size: 0.65rem; color: rgba(255,255,255,0.35);
            text-transform: uppercase; letter-spacing: 1px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .aff-table td {
            padding: 8px 10px; font-size: 0.82rem;
            color: rgba(255,255,255,0.7);
            border-bottom: 1px solid rgba(255,255,255,0.04);
        }
        .aff-code {
            font-family: 'Space Mono', monospace;
            font-size: 0.78rem;
            color: rgba(180, 160, 255, 0.9);
        }
        .aff-earnings {
            font-family: 'Space Mono', monospace;
            color: rgba(100, 255, 160, 0.8);
        }
        .aff-link-copy {
            font-size: 0.7rem; color: rgba(120,80,255,0.7);
            cursor: pointer; text-decoration: underline;
        }
        .aff-link-copy:hover { color: rgba(160,130,255,1); }
        
        .aff-remove-btn {
            background: none; border: none; color: rgba(255,100,100,0.5);
            cursor: pointer; font-size: 0.9rem; padding: 2px 6px;
        }
        .aff-remove-btn:hover { color: rgba(255,100,100,0.9); }
        
        .aff-totals {
            display: flex; gap: 10px; margin-bottom: 16px;
        }
        .aff-total-card {
            flex: 1; text-align: center; padding: 12px 8px;
            background: rgba(120,80,255,0.05);
            border: 1px solid rgba(120,80,255,0.12);
            border-radius: 12px;
        }
        .aff-total-val {
            font-size: 1.1rem; font-weight: 700;
            font-family: 'Space Mono', monospace;
            color: rgba(180,160,255,0.9);
        }
        .aff-total-lbl {
            font-size: 0.6rem; color: rgba(255,255,255,0.3);
            text-transform: uppercase; letter-spacing: 1px; margin-top: 2px;
        }
        
        .aff-empty {
            text-align: center; padding: 20px;
            color: rgba(255,255,255,0.3); font-size: 0.85rem;
        }
        
        .aff-share-row {
            display: flex; align-items: center; gap: 8px;
            padding: 8px 12px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 10px; margin-top: 8px;
        }
        .aff-share-url {
            flex: 1; font-family: 'Space Mono', monospace;
            font-size: 0.72rem; color: rgba(255,255,255,0.5);
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .aff-copy-btn {
            padding: 5px 12px; border: 1px solid rgba(120,80,255,0.3);
            border-radius: 8px; background: rgba(120,80,255,0.1);
            color: rgba(180,160,255,0.9); font-size: 0.72rem;
            cursor: pointer; transition: all 0.2s; white-space: nowrap;
        }
        .aff-copy-btn:hover { background: rgba(120,80,255,0.2); }

        
        /* === Admin Panel === */
        .admin-overlay {
            position: fixed; inset: 0;
            background: rgba(0,0,0,0.7);
            backdrop-filter: blur(12px);
            z-index: 2500;
            display: none;
            align-items: center;
            justify-content: center;
            contain: layout style paint;
        }
        .admin-overlay.visible { display: flex; }
        
        .admin-modal {
            background: linear-gradient(180deg, rgba(10, 14, 28, 0.99), rgba(5, 8, 18, 1));
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 20px;
            width: 94%; max-width: 640px; max-height: 88vh;
            overflow-y: auto;
            box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 40px rgba(120,80,255,0.05);
        }
        .admin-modal-header {
            display: flex; justify-content: space-between; align-items: center;
            padding: 20px 24px 0;
        }
        .admin-modal-header h3 {
            font-size: 1.1rem; font-weight: 600; color: white; margin: 0;
            display: flex; align-items: center; gap: 8px;
        }
        .admin-modal-body { padding: 20px 24px 24px; }
        
        .admin-lock-icon {
            font-size: 0.7rem; padding: 3px 8px;
            background: rgba(120,80,255,0.15);
            border: 1px solid rgba(120,80,255,0.25);
            border-radius: 6px; color: rgba(180,160,255,0.8);
        }
        
        /* Admin Login */
        .admin-login-form {
            display: flex; flex-direction: column; gap: 14px;
            max-width: 320px; margin: 30px auto;
        }
        .admin-login-form input {
            padding: 12px 14px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px; color: white;
            font-family: 'Outfit', sans-serif; font-size: 0.9rem;
            text-align: center;
        }
        .admin-login-form input:focus {
            outline: none;
            border-color: rgba(120,80,255,0.5);
            box-shadow: 0 0 0 3px rgba(120,80,255,0.1);
        }
        .admin-login-btn {
            padding: 12px; border: none; border-radius: 12px;
            background: linear-gradient(135deg, rgba(120,80,255,0.8), rgba(80,120,255,0.8));
            color: white; font-family: 'Outfit', sans-serif;
            font-size: 0.9rem; font-weight: 600;
            cursor: pointer; transition: all 0.25s;
        }
        .admin-login-btn:hover { box-shadow: 0 4px 20px rgba(120,80,255,0.3); }
        .admin-login-hint {
            font-size: 0.75rem; color: rgba(255,255,255,0.25);
            text-align: center;
        }
        .admin-login-error {
            font-size: 0.8rem; color: rgba(255,100,100,0.8);
            text-align: center; display: none;
        }
        
        /* Admin Nav Tabs */
        .admin-nav {
            display: flex; gap: 4px; margin-bottom: 20px;
            padding: 3px; background: rgba(255,255,255,0.04);
            border-radius: 10px;
        }
        .admin-nav-btn {
            flex: 1; padding: 8px 10px; border: none; border-radius: 8px;
            background: transparent; color: rgba(255,255,255,0.4);
            font-family: 'Outfit', sans-serif; font-size: 0.76rem;
            cursor: pointer; transition: all 0.2s;
        }
        .admin-nav-btn.active {
            background: rgba(120,80,255,0.15);
            color: rgba(200,180,255,0.95);
        }
        .admin-nav-btn:hover:not(.active) { color: rgba(255,255,255,0.65); }
        
        .admin-tab { display: none; }
        .admin-tab.active { display: block; }
        
        /* Dashboard Cards */
        .admin-cards {
            display: grid; grid-template-columns: repeat(4, 1fr);
            gap: 10px; margin-bottom: 20px;
        }
        .admin-card {
            text-align: center; padding: 14px 8px;
            background: rgba(255,255,255,0.025);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 12px;
        }
        .admin-card-val {
            font-size: 1.15rem; font-weight: 700;
            font-family: 'Space Mono', monospace;
            color: white;
        }
        .admin-card-lbl {
            font-size: 0.6rem; color: rgba(255,255,255,0.3);
            text-transform: uppercase; letter-spacing: 1px; margin-top: 2px;
        }
        
        /* Admin tables */
        .admin-table { width: 100%; border-collapse: collapse; }
        .admin-table th {
            text-align: left; padding: 6px 10px;
            font-size: 0.63rem; color: rgba(255,255,255,0.3);
            text-transform: uppercase; letter-spacing: 1px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .admin-table td {
            padding: 8px 10px; font-size: 0.8rem;
            color: rgba(255,255,255,0.65);
            border-bottom: 1px solid rgba(255,255,255,0.03);
        }
        .admin-table tr:hover td { background: rgba(255,255,255,0.02); }
        
        .admin-section-title {
            font-size: 0.7rem; color: rgba(255,255,255,0.35);
            text-transform: uppercase; letter-spacing: 1.5px;
            margin-bottom: 10px; margin-top: 18px;
        }
        .admin-section-title:first-child { margin-top: 0; }
        
        .admin-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
        .admin-action-btn {
            padding: 8px 14px; border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px; background: rgba(255,255,255,0.03);
            color: rgba(255,255,255,0.55); font-family: 'Outfit', sans-serif;
            font-size: 0.76rem; cursor: pointer; transition: all 0.2s;
        }
        .admin-action-btn:hover {
            background: rgba(255,255,255,0.06);
            color: rgba(255,255,255,0.85);
        }
        .admin-action-btn.danger {
            border-color: rgba(255,80,80,0.15);
            color: rgba(255,120,120,0.7);
        }
        .admin-action-btn.danger:hover {
            background: rgba(255,80,80,0.1);
            color: rgba(255,120,120,0.95);
        }
        
        .admin-pw-change {
            display: flex; gap: 8px; margin-top: 12px;
        }
        .admin-pw-change input {
            flex: 1; padding: 8px 12px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px; color: white;
            font-family: 'Outfit', sans-serif; font-size: 0.82rem;
        }
        
        .admin-scrollable {
            max-height: 280px; overflow-y: auto;
        }
        
        .admin-input-group { margin-bottom: 12px; }
        .admin-input-group label { display: block; font-size: 11px; color: rgba(255,255,255,0.5); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
        .admin-input-group input[type="text"],
        .admin-input-group input[type="password"] { width: 100%; padding: 8px 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; color: white; font-size: 13px; box-sizing: border-box; font-family: 'Outfit', monospace; }
        .admin-input-group input:focus { border-color: rgba(120,80,255,0.5); outline: none; }
        .admin-btcpay-settings { margin-bottom: 20px; }

        /* === Crypto Payment Modal === */
        .pay-overlay {
            display: none; position: fixed; inset: 0; z-index: 10001;
            background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
            align-items: center; justify-content: center;
            contain: layout style paint;
        }
        .pay-overlay.visible { display: flex; }
        .pay-modal {
            background: linear-gradient(165deg, #1a1a2e 0%, #0d1117 50%, #1a1025 100%);
            border: 1px solid rgba(255,180,0,0.15);
            border-radius: 16px; width: 400px; max-width: 92vw;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(255,180,0,0.05);
        }
        .pay-modal-header {
            padding: 16px 20px; display: flex; justify-content: space-between; align-items: center;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .pay-modal-header h3 { margin: 0; font-size: 1rem; color: #f0f0f0; }
        .pay-modal-body { padding: 24px; text-align: center; }
        
        .pay-step { display: none; }
        .pay-step.active { display: block; }
        
        .pay-summary-icon { font-size: 2.5rem; margin-bottom: 8px; }
        .pay-summary-desc { color: rgba(255,255,255,0.6); font-size: 0.85rem; margin-bottom: 4px; }
        .pay-summary-amount { font-size: 2rem; font-weight: 700; color: #FFD700; margin: 8px 0; text-shadow: 0 0 20px rgba(255,215,0,0.3); }
        .pay-summary-cells { color: rgba(255,255,255,0.4); font-size: 0.8rem; margin-bottom: 20px; }
        
        .pay-crypto-options { background: rgba(255,255,255,0.03); border-radius: 10px; padding: 14px; margin-bottom: 20px; }
        .pay-crypto-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.35); margin-bottom: 8px; }
        .pay-crypto-icons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
        .pay-coin {
            padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600;
            background: rgba(255,180,0,0.08); border: 1px solid rgba(255,180,0,0.15); color: rgba(255,200,50,0.8);
        }
        .pay-crypto-note { font-size: 0.65rem; color: rgba(255,255,255,0.3); margin-top: 6px; }
        
        .pay-btn-primary {
            width: 100%; padding: 14px; border: none; border-radius: 10px; cursor: pointer;
            font-size: 1rem; font-weight: 600; font-family: 'Outfit', sans-serif;
            background: linear-gradient(135deg, #f7931a 0%, #FFD700 50%, #f7931a 100%);
            color: #1a1a2e; transition: all 0.3s; margin-bottom: 8px;
            box-shadow: 0 4px 15px rgba(247,147,26,0.3);
        }
        .pay-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(247,147,26,0.4); }
        .pay-btn-secondary {
            width: 100%; padding: 10px; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
            background: transparent; color: rgba(255,255,255,0.4); cursor: pointer;
            font-size: 0.8rem; font-family: 'Outfit', sans-serif; transition: all 0.2s;
        }
        .pay-btn-secondary:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.15); }
        .pay-btn-outline {
            width: 100%; padding: 10px; border: 1px solid rgba(255,180,0,0.2); border-radius: 8px;
            background: rgba(255,180,0,0.05); color: rgba(255,200,50,0.7); cursor: pointer;
            font-size: 0.85rem; font-family: 'Outfit', sans-serif; transition: all 0.2s; margin-bottom: 8px;
        }
        .pay-btn-outline:hover { background: rgba(255,180,0,0.1); color: rgba(255,200,50,0.9); }
        
        .pay-waiting-spinner {
            width: 48px; height: 48px; margin: 0 auto 16px;
            border: 3px solid rgba(255,180,0,0.1); border-top-color: #FFD700;
            border-radius: 50%; animation: paySpin 1s linear infinite;
        }
        @keyframes paySpin { to { transform: rotate(360deg); } }
        .pay-waiting-title { font-size: 1.1rem; font-weight: 600; color: #f0f0f0; margin-bottom: 8px; }
        .pay-waiting-timer { font-size: 1.8rem; font-weight: 700; color: #FFD700; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
        .pay-waiting-hint { font-size: 0.75rem; color: rgba(255,255,255,0.4); margin-bottom: 16px; }
        
        .pay-status-badge {
            display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
            border-radius: 20px; background: rgba(255,180,0,0.08); margin-bottom: 16px; font-size: 0.78rem; color: rgba(255,200,50,0.7);
        }
        .pay-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #FFD700; animation: payPulse 1.5s ease infinite; }
        @keyframes payPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
        
        .pay-success-icon { font-size: 3rem; margin-bottom: 12px; }
        .pay-success-title { font-size: 1.3rem; font-weight: 700; color: #4CAF50; margin-bottom: 8px; }
        .pay-success-desc { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-bottom: 20px; }
        
        .pay-failed-icon { font-size: 3rem; margin-bottom: 12px; }
        .pay-failed-title { font-size: 1.3rem; font-weight: 700; color: #ff6b6b; margin-bottom: 8px; }
        .pay-failed-desc { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-bottom: 20px; }

        /* =============================================
           UNIFIED BOTTOM PANEL — VISUAL OVERHAUL v2
           ============================================= */
        
        /* ── Keyframes ── */
        @keyframes panelGlow {
            0%, 100% { opacity: 0.6; background-position: 0% 50%; }
            50% { opacity: 1; background-position: 100% 50%; }
        }
        @keyframes tabReveal {
            from { opacity: 0; transform: translateY(8px) scale(0.98); filter: blur(2px); }
            to { opacity: 1; transform: none; filter: blur(0); }
        }
        @keyframes slideUp {
            from { opacity: 0; transform: translateY(15px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @keyframes subtlePulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(0,245,255,0); }
            50% { box-shadow: 0 0 0 4px rgba(0,245,255,0.07); }
        }
        @keyframes thumbGlow {
            0%, 100% { box-shadow: 0 2px 8px rgba(0,245,255,0.35), 0 0 0 0 rgba(0,245,255,0); }
            50% { box-shadow: 0 2px 10px rgba(0,245,255,0.5), 0 0 0 5px rgba(0,245,255,0.06); }
        }
        @keyframes cardShine {
            0% { left: -80%; }
            100% { left: 130%; }
        }
        
        /* ── Controls Panel (root container) ── */
        .controls-panel {
            position: relative;
            background: linear-gradient(180deg,
                rgba(8,13,25,0.99) 0%,
                rgba(5,8,18,1) 100%) !important;
            border-top: none !important;
            padding: 0 !important;
            backdrop-filter: blur(60px) !important;
            overflow: hidden;
        }
        .controls-panel::before {
            content: '' !important;
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 2px !important;
            background: linear-gradient(90deg,
                transparent 0%,
                rgba(0,245,255,0.12) 10%,
                rgba(0,245,255,0.55) 35%,
                rgba(100,80,255,0.35) 65%,
                rgba(0,245,255,0.12) 90%,
                transparent 100%) !important;
            background-size: 200% 100%;
            animation: panelGlow 6s ease-in-out infinite !important;
        }
        .controls-panel::after {
            content: '';
            position: absolute;
            bottom: 0; left: 0; right: 0;
            height: 100px;
            background: radial-gradient(ellipse at 50% 100%,
                rgba(0,245,255,0.015) 0%, transparent 70%);
            pointer-events: none;
        }
        .controls-inner {
            padding: 14px 22px 22px !important;
            position: relative;
            max-width: 960px;
            margin: 0 auto;
            contain: layout style;
            overflow-x: hidden;
        }
        
        /* ── Tabs ── */
        .tabs {
            display: flex;
            gap: 2px !important;
            margin-bottom: 14px !important;
            padding: 3px !important;
            background: rgba(255,255,255,0.025) !important;
            border-radius: 13px !important;
            width: fit-content;
            margin-left: auto !important;
            margin-right: auto !important;
            border: 1px solid rgba(255,255,255,0.04) !important;
            box-shadow: 0 2px 20px rgba(0,0,0,0.25),
                        inset 0 1px 0 rgba(255,255,255,0.02) !important;
        }
        .tab {
            padding: 8px 18px !important;
            background: transparent !important;
            border: none !important;
            border-radius: 10px !important;
            color: rgba(255,255,255,0.4) !important;
            font-family: 'Outfit', sans-serif !important;
            font-size: 0.82rem !important;
            font-weight: 500 !important;
            cursor: pointer;
            transition: all 0.35s cubic-bezier(0.4,0,0.2,1) !important;
            position: relative;
            overflow: hidden;
            letter-spacing: 0.2px;
        }
        .tab::before { display: none !important; }
        /* Per-tab active colors */
        /* ── JEWEL-TONE TAB SYSTEM ── */
        /* 💎 Diamond Cyan */
        .tab[data-tab="view"].active {
            color: #041a1e !important;
            background: linear-gradient(135deg, #67e8f9 0%, #06b6d4 50%, #0891b2 100%) !important;
            box-shadow: 0 3px 16px rgba(6,182,212,0.4), 0 0 30px rgba(6,182,212,0.1), inset 0 1px 0 rgba(255,255,255,0.3) !important;
            font-weight: 700 !important;
        }
        /* 💜 Amethyst */
        .tab[data-tab="story"].active {
            color: #0f0520 !important;
            background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #7c3aed 100%) !important;
            box-shadow: 0 3px 16px rgba(168,85,247,0.4), 0 0 30px rgba(124,58,237,0.1), inset 0 1px 0 rgba(255,255,255,0.3) !important;
            font-weight: 700 !important;
        }
        /* 💚 Emerald */
        .tab[data-tab="multi"].active {
            color: #021a0e !important;
            background: linear-gradient(135deg, #6ee7b7 0%, #10b981 50%, #059669 100%) !important;
            box-shadow: 0 3px 16px rgba(16,185,129,0.4), 0 0 30px rgba(5,150,105,0.1), inset 0 1px 0 rgba(255,255,255,0.3) !important;
            font-weight: 700 !important;
        }
        /* ❤️ Ruby */
        .tab[data-tab="image"].active {
            color: #200510 !important;
            background: linear-gradient(135deg, #fda4af 0%, #fb7185 50%, #e11d48 100%) !important;
            box-shadow: 0 3px 16px rgba(251,113,133,0.4), 0 0 30px rgba(225,29,72,0.1), inset 0 1px 0 rgba(255,255,255,0.3) !important;
            font-weight: 700 !important;
        }
        /* 🏆 Topaz Gold */
        .tab[data-tab="leaderboard"].active {
            color: #1a1302 !important;
            background: linear-gradient(135deg, #fde68a 0%, #fbbf24 50%, #d97706 100%) !important;
            box-shadow: 0 3px 16px rgba(251,191,36,0.4), 0 0 30px rgba(217,119,6,0.1), inset 0 1px 0 rgba(255,255,255,0.3) !important;
            font-weight: 700 !important;
        }
        /* Inactive tab hover glow */
        .tab[data-tab="view"]:not(.active):hover { color: #67e8f9 !important; background: rgba(6,182,212,0.08) !important; }
        .tab[data-tab="story"]:not(.active):hover { color: #c084fc !important; background: rgba(168,85,247,0.08) !important; }
        .tab[data-tab="multi"]:not(.active):hover { color: #6ee7b7 !important; background: rgba(16,185,129,0.08) !important; }
        .tab[data-tab="image"]:not(.active):hover { color: #fda4af !important; background: rgba(251,113,133,0.08) !important; }
        .tab[data-tab="leaderboard"]:not(.active):hover { color: #fde68a !important; background: rgba(251,191,36,0.08) !important; }

        .tab-content.active {
            animation: tabReveal 0.4s cubic-bezier(0.22,0.61,0.36,1) !important;
        }

        /* ── PER-TAB ACCENT COLORS ── */
        /* 💎 View tab - Diamond Cyan */
        #tab-view .view-hero-title { color: #22d3ee !important; text-shadow: 0 0 20px rgba(6,182,212,0.3); }
        #tab-view .view-stat-value { color: #67e8f9 !important; }
        #tab-view .btn-primary { background: linear-gradient(135deg, #22d3ee, #0891b2) !important; color: #041a1e !important; }
        #tab-view .btn-primary:hover { box-shadow: 0 4px 20px rgba(6,182,212,0.35) !important; }
        
        /* 💜 Story tab - Amethyst */
        #tab-story .story-sub-nav-btn.active[data-sub="gallery"] { background: rgba(192,132,252,0.18) !important; color: #d8b4fe !important; border-color: rgba(192,132,252,0.4) !important; box-shadow: 0 0 12px rgba(192,132,252,0.12) !important; }
        #tab-story .story-sub-nav-btn.active[data-sub="timetravel"] { background: rgba(124,58,237,0.2) !important; color: #a78bfa !important; border-color: rgba(124,58,237,0.45) !important; box-shadow: 0 0 12px rgba(124,58,237,0.15) !important; }
        #tab-story .story-sub-nav-btn:hover { background: rgba(168,85,247,0.08) !important; color: #d8b4fe !important; }
        #tab-story .story-subtitle { color: rgba(192,132,252,0.5) !important; }
        #tab-story .story-title { color: #c084fc !important; text-shadow: 0 0 16px rgba(168,85,247,0.2); }
        #tab-story .story-nav-btn { border-color: rgba(168,85,247,0.25) !important; }
        #tab-story .story-nav-btn:hover { background: rgba(168,85,247,0.12) !important; border-color: rgba(168,85,247,0.45) !important; }
        #tab-story .story-counter { color: #c084fc !important; }
        #tab-story .tt-header h3 { color: #a78bfa !important; text-shadow: 0 0 16px rgba(124,58,237,0.25); }
        #tab-story .btn-primary { background: linear-gradient(135deg, #a855f7, #7c3aed) !important; color: #0f0520 !important; }
        #tab-story .story-card { border-color: rgba(168,85,247,0.2) !important; background: rgba(30,10,50,0.6) !important; }
        #tab-story .story-card-owner { color: #c084fc !important; }
        #tab-story .story-card-coords { color: rgba(168,85,247,0.5) !important; }
        #tab-story .story-card:hover { border-color: rgba(168,85,247,0.4) !important; }
        /* Gallery Story sub-section — lighter lavender */
        #sub-gallery .story-title { color: #d8b4fe !important; text-shadow: 0 0 16px rgba(216,180,254,0.15); }
        #sub-gallery .story-counter { color: #d8b4fe !important; }
        #sub-gallery .story-nav-btn { border-color: rgba(192,132,252,0.25) !important; }
        #sub-gallery .story-nav-btn:hover { background: rgba(192,132,252,0.12) !important; border-color: rgba(192,132,252,0.45) !important; }
        #sub-gallery .story-card-owner { color: #d8b4fe !important; }
        /* Time Travel sub-section — deeper violet */
        #sub-timetravel .tt-header h3 { color: #a78bfa !important; text-shadow: 0 0 16px rgba(124,58,237,0.25); }
        #sub-timetravel .tt-interval-btn.active { background: linear-gradient(145deg, rgba(124,58,237,0.3), rgba(99,46,190,0.2)) !important; color: #a78bfa !important; box-shadow: 0 0 10px rgba(124,58,237,0.15) !important; }
        
        /* 💚 Pattern tab - Emerald */
        #tab-multi .mode-icon { color: #6ee7b7 !important; text-shadow: 0 0 12px rgba(16,185,129,0.3); }
        #tab-multi .mode-option:hover { border-color: rgba(16,185,129,0.35) !important; box-shadow: 0 0 16px rgba(16,185,129,0.08) !important; }
        #tab-multi .mode-option:hover .mode-title { color: #6ee7b7 !important; }
        #tab-multi .btn-primary { background: linear-gradient(135deg, #34d399, #059669) !important; color: #021a0e !important; }
        #tab-multi .btn-primary:hover { box-shadow: 0 4px 20px rgba(16,185,129,0.35) !important; }
        #tab-multi .color-picker-header span { color: #6ee7b7 !important; }
        #tab-multi .pattern-stats { color: rgba(110,231,183,0.6) !important; }
        #tab-multi .select-text { color: rgba(110,231,183,0.5) !important; }
        #tab-multi input[type="range"]::-webkit-slider-thumb { background: #10b981 !important; }
        
        /* ❤️ Image tab - Ruby */
        #tab-image .upload-icon { color: #fda4af !important; text-shadow: 0 0 16px rgba(251,113,133,0.3); }
        #tab-image .upload-text { color: #fb7185 !important; }
        #tab-image .btn-primary { background: linear-gradient(135deg, #fb7185, #e11d48) !important; color: #200510 !important; }
        #tab-image .btn-primary:hover { box-shadow: 0 4px 20px rgba(225,29,72,0.35) !important; }
        #tab-image .upload-zone:hover { border-color: rgba(251,113,133,0.4) !important; box-shadow: 0 0 20px rgba(251,113,133,0.08) !important; }
        #tab-image input[type="range"]::-webkit-slider-thumb { background: #fb7185 !important; }
        
        /* 🏆 Leaderboard tab - Topaz Gold */
        #tab-leaderboard .lb-title { color: #fbbf24 !important; text-shadow: 0 0 16px rgba(251,191,36,0.25); }
        #tab-leaderboard .lb-rank-1 { color: #fde68a !important; }
        #tab-leaderboard .lb-header { border-bottom-color: rgba(251,191,36,0.15) !important; }
        
        /* ── UNIFIED SLIDER SYSTEM ── */
        /* Reset all range inputs in the panel */
        .controls-panel input[type="range"],
        .slider-group input[type="range"],
        .grid-slider,
        .preset-slider,
        .image-slider,
        .gif-slider {
            -webkit-appearance: none !important;
            appearance: none !important;
            width: 100%;
            height: 5px !important;
            border-radius: 8px !important;
            background: linear-gradient(90deg,
                rgba(0,245,255,0.08) 0%,
                rgba(0,245,255,0.2) 100%) !important;
            outline: none !important;
            transition: all 0.35s cubic-bezier(0.4,0,0.2,1) !important;
            cursor: pointer;
            position: relative;
            border: none !important;
            margin: 4px 0;
        }
        .controls-panel input[type="range"]:hover,
        .slider-group input[type="range"]:hover,
        .grid-slider:hover,
        .preset-slider:hover,
        .image-slider:hover,
        .gif-slider:hover {
            background: linear-gradient(90deg,
                rgba(0,245,255,0.12) 0%,
                rgba(0,245,255,0.3) 100%) !important;
            box-shadow: 0 0 14px rgba(0,245,255,0.06);
        }
        
        /* Track — WebKit */
        .controls-panel input[type="range"]::-webkit-slider-runnable-track,
        .slider-group input[type="range"]::-webkit-slider-runnable-track,
        .grid-slider::-webkit-slider-runnable-track,
        .preset-slider::-webkit-slider-runnable-track,
        .image-slider::-webkit-slider-runnable-track,
        .gif-slider::-webkit-slider-runnable-track {
            height: 5px;
            border-radius: 8px;
            background: transparent;
        }
        /* Track — Firefox */
        .controls-panel input[type="range"]::-moz-range-track,
        .slider-group input[type="range"]::-moz-range-track,
        .grid-slider::-moz-range-track,
        .preset-slider::-moz-range-track,
        .image-slider::-moz-range-track,
        .gif-slider::-moz-range-track {
            height: 5px;
            border-radius: 8px;
            background: linear-gradient(90deg,
                rgba(0,245,255,0.08) 0%,
                rgba(0,245,255,0.2) 100%);
            border: none;
        }
        
        /* Thumb — WebKit */
        .controls-panel input[type="range"]::-webkit-slider-thumb,
        .slider-group input[type="range"]::-webkit-slider-thumb,
        .grid-slider::-webkit-slider-thumb,
        .preset-slider::-webkit-slider-thumb,
        .image-slider::-webkit-slider-thumb,
        .gif-slider::-webkit-slider-thumb {
            -webkit-appearance: none !important;
            width: 18px !important;
            height: 18px !important;
            border-radius: 50% !important;
            background: radial-gradient(circle at 35% 35%,
                #66ffff 0%, #00e8f0 40%, #00bcc8 100%) !important;
            cursor: pointer !important;
            border: 2px solid rgba(255,255,255,0.2) !important;
            box-shadow:
                0 2px 8px rgba(0,245,255,0.4),
                0 0 0 0 rgba(0,245,255,0) !important;
            transition: all 0.25s cubic-bezier(0.4,0,0.2,1) !important;
            margin-top: -7px !important;
            animation: thumbGlow 3s ease-in-out infinite;
        }
        .controls-panel input[type="range"]:hover::-webkit-slider-thumb,
        .slider-group input[type="range"]:hover::-webkit-slider-thumb,
        .grid-slider:hover::-webkit-slider-thumb,
        .preset-slider:hover::-webkit-slider-thumb,
        .image-slider:hover::-webkit-slider-thumb,
        .gif-slider:hover::-webkit-slider-thumb {
            transform: scale(1.2) !important;
            box-shadow:
                0 3px 16px rgba(0,245,255,0.55),
                0 0 0 5px rgba(0,245,255,0.08) !important;
            animation: none !important;
        }
        .controls-panel input[type="range"]:active::-webkit-slider-thumb,
        .slider-group input[type="range"]:active::-webkit-slider-thumb,
        .grid-slider:active::-webkit-slider-thumb,
        .preset-slider:active::-webkit-slider-thumb,
        .image-slider:active::-webkit-slider-thumb,
        .gif-slider:active::-webkit-slider-thumb {
            transform: scale(1.08) !important;
            box-shadow:
                0 1px 6px rgba(0,245,255,0.6),
                0 0 0 7px rgba(0,245,255,0.1) !important;
            animation: none !important;
        }
        
        /* Thumb — Firefox */
        .controls-panel input[type="range"]::-moz-range-thumb,
        .slider-group input[type="range"]::-moz-range-thumb,
        .grid-slider::-moz-range-thumb,
        .preset-slider::-moz-range-thumb,
        .image-slider::-moz-range-thumb,
        .gif-slider::-moz-range-thumb {
            width: 14px !important;
            height: 14px !important;
            border-radius: 50% !important;
            background: radial-gradient(circle at 35% 35%,
                #66ffff 0%, #00e8f0 40%, #00bcc8 100%) !important;
            cursor: pointer !important;
            border: 2px solid rgba(255,255,255,0.2) !important;
            box-shadow: 0 2px 8px rgba(0,245,255,0.4) !important;
        }
        
        /* ── Slider Fire at Max ── */
        .grid-slider.max-level,
        .preset-slider.max-level,
        .image-slider.max-level,
        .gif-slider.max-level {
            background: linear-gradient(90deg,
                #ff3800 0%, #ff6600 35%, #ff8c00 65%, #ffaa00 100%) !important;
            box-shadow: 0 0 18px rgba(255,100,0,0.3) !important;
        }
        .grid-slider.max-level::-webkit-slider-thumb,
        .preset-slider.max-level::-webkit-slider-thumb,
        .image-slider.max-level::-webkit-slider-thumb,
        .gif-slider.max-level::-webkit-slider-thumb {
            background: radial-gradient(circle at 35% 35%,
                #ffee55 0%, #ff9900 50%, #ff5500 100%) !important;
            border-color: rgba(255,200,0,0.5) !important;
            box-shadow:
                0 0 14px rgba(255,100,0,0.9),
                0 0 28px rgba(255,60,0,0.5),
                0 0 48px rgba(255,30,0,0.25) !important;
            animation: fire-pulse 0.35s ease-in-out infinite alternate !important;
        }
        .grid-slider.max-level::-moz-range-thumb,
        .preset-slider.max-level::-moz-range-thumb,
        .image-slider.max-level::-moz-range-thumb,
        .gif-slider.max-level::-moz-range-thumb {
            background: radial-gradient(circle at 35% 35%,
                #ffee55 0%, #ff9900 50%, #ff5500 100%) !important;
            box-shadow: 0 0 14px rgba(255,100,0,0.9), 0 0 28px rgba(255,60,0,0.5) !important;
        }
        .grid-slider.max-level::-moz-range-track,
        .preset-slider.max-level::-moz-range-track,
        .image-slider.max-level::-moz-range-track,
        .gif-slider.max-level::-moz-range-track {
            background: linear-gradient(90deg,
                #ff3800 0%, #ff6600 35%, #ff8c00 65%, #ffaa00 100%) !important;
        }
        
        /* ── Slider Value Labels ── */
        .grid-slider-value,
        .slider-value-display {
            font-family: 'Space Mono', monospace !important;
            font-size: 0.78rem !important;
            font-weight: 600 !important;
            color: rgba(0,245,255,0.8) !important;
            width: 26px !important;
            min-width: 26px !important;
            flex-shrink: 0 !important;
            text-align: right;
            transition: color 0.2s, text-shadow 0.2s;
            letter-spacing: -0.3px;
        }
        .grid-slider-value.max-level,
        .slider-value-display.max-level,
        .image-size-value.max-level,
        .gif-fps-display.max-level {
            color: #ff7700 !important;
            text-shadow: 0 0 8px rgba(255,100,0,0.7), 0 0 16px rgba(255,60,0,0.3) !important;
        }
        .grid-slider-row label {
            font-size: 0.68rem !important;
            color: rgba(255,255,255,0.35) !important;
            font-weight: 600 !important;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            width: 14px !important;
            flex-shrink: 0 !important;
        }
        .slider-label-row label {
            color: rgba(255,255,255,0.5) !important;
            font-size: 0.8rem !important;
        }
        
        /* ── Buttons ── */
        .btn {
            padding: 10px 20px !important;
            border: none;
            border-radius: 10px !important;
            font-family: 'Outfit', sans-serif !important;
            font-size: 0.8rem !important;
            font-weight: 600 !important;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4,0,0.2,1) !important;
            letter-spacing: 0.3px !important;
            text-transform: none !important;
            position: relative;
            overflow: hidden;
        }
        .btn::after {
            content: '';
            position: absolute;
            top: 0; left: -80%; width: 60%; height: 100%;
            background: linear-gradient(90deg,
                transparent 0%,
                rgba(255,255,255,0.08) 50%,
                transparent 100%);
            transform: skewX(-20deg);
            transition: left 0.5s ease;
            pointer-events: none;
        }
        .btn:hover::after {
            left: 130%;
        }
        
        .btn-primary {
            background: linear-gradient(135deg, #00f2fb 0%, #00c8d8 50%, #00aabb 100%) !important;
            color: #031216 !important;
            box-shadow: 0 2px 14px rgba(0,245,255,0.25) !important;
            font-weight: 700 !important;
        }
        .btn-primary:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 28px rgba(0,245,255,0.4),
                        0 0 40px rgba(0,245,255,0.08) !important;
            filter: brightness(1.05);
        }
        .btn-primary:active {
            transform: translateY(0) !important;
            box-shadow: 0 1px 6px rgba(0,245,255,0.3) !important;
        }
        .btn-primary:disabled {
            opacity: 0.35 !important;
            pointer-events: none;
            box-shadow: none !important;
            filter: grayscale(0.4);
        }
        
        .btn-secondary {
            background: rgba(255,255,255,0.04) !important;
            color: rgba(255,255,255,0.75) !important;
            border: 1px solid rgba(255,255,255,0.07) !important;
        }
        .btn-secondary:hover {
            background: rgba(255,255,255,0.08) !important;
            border-color: rgba(0,245,255,0.2) !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(0,0,0,0.2);
            color: rgba(255,255,255,0.9) !important;
        }
        .btn-secondary:active {
            transform: translateY(0);
        }
        
        .btn-tiny {
            background: rgba(255,255,255,0.05) !important;
            border: 1px solid rgba(255,255,255,0.07) !important;
            border-radius: 8px !important;
            transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s !important;
            flex-shrink: 0;
        }
        .btn-tiny:hover {
            background: rgba(0,245,255,0.1) !important;
            border-color: rgba(0,245,255,0.3) !important;
            transform: translateY(-1px) !important;
            box-shadow: 0 4px 12px rgba(0,245,255,0.1) !important;
        }
        .btn-tiny.active {
            background: rgba(0,245,255,0.14) !important;
            border-color: rgba(0,245,255,0.4) !important;
            box-shadow: 0 0 12px rgba(0,245,255,0.12);
        }
        
        .btn-back-mode {
            margin-top: 16px !important;
            padding: 9px 20px !important;
            border-radius: 10px !important;
        }
        
        /* ── Text Inputs ── */
        .controls-panel input[type="text"],
        .controls-panel input[type="number"],
        .controls-panel input[type="url"],
        .controls-panel textarea,
        .controls-panel select,
        .confirm-form-area input,
        .confirm-form-area textarea {
            background: rgba(255,255,255,0.03) !important;
            border: 1px solid rgba(255,255,255,0.06) !important;
            border-radius: 9px !important;
            color: rgba(255,255,255,0.88) !important;
            font-family: 'Outfit', sans-serif !important;
            font-size: 0.84rem !important;
            transition: all 0.3s cubic-bezier(0.4,0,0.2,1) !important;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.08) !important;
            padding: 10px 14px !important;
        }
        .controls-panel input[type="text"]:hover,
        .controls-panel input[type="number"]:hover,
        .controls-panel input[type="url"]:hover,
        .controls-panel textarea:hover,
        .controls-panel select:hover,
        .confirm-form-area input:hover,
        .confirm-form-area textarea:hover {
            border-color: rgba(255,255,255,0.12) !important;
            background: rgba(255,255,255,0.04) !important;
        }
        .controls-panel input[type="text"]:focus,
        .controls-panel input[type="number"]:focus,
        .controls-panel input[type="url"]:focus,
        .controls-panel textarea:focus,
        .controls-panel select:focus,
        .confirm-form-area input:focus,
        .confirm-form-area textarea:focus {
            outline: none !important;
            border-color: rgba(0,245,255,0.4) !important;
            background: rgba(0,245,255,0.03) !important;
            box-shadow:
                0 0 0 3px rgba(0,245,255,0.06),
                inset 0 1px 3px rgba(0,0,0,0.04) !important;
        }
        .controls-panel input::placeholder,
        .controls-panel textarea::placeholder,
        .confirm-form-area input::placeholder {
            color: rgba(255,255,255,0.18) !important;
        }
        
        /* ── Labels ── */
        .controls-panel label,
        .slider-group label {
            font-size: 0.62rem !important;
            color: rgba(255,255,255,0.3) !important;
            text-transform: uppercase !important;
            letter-spacing: 1.4px !important;
            font-weight: 600 !important;
        }
        .control-section h4 {
            font-size: 0.6rem !important;
            color: rgba(0,245,255,0.35) !important;
            text-transform: uppercase !important;
            letter-spacing: 2.2px !important;
            font-weight: 600 !important;
            margin-bottom: 12px;
        }
        
        /* ── Mode Cards (Pattern / Image mode select) ── */
        .pattern-mode-select {
            gap: 8px !important;
            padding: 16px 8px !important;
        }
        .mode-option {
            padding: 18px 12px !important;
            background: rgba(255,255,255,0.015) !important;
            border: 1px solid rgba(255,255,255,0.05) !important;
            border-radius: 14px !important;
            transition: all 0.4s cubic-bezier(0.4,0,0.2,1) !important;
            flex: 1;
            max-width: 155px !important;
            min-width: 0 !important;
            position: relative;
            overflow: hidden;
        }
        .mode-option::before {
            content: '';
            position: absolute;
            top: -50%; left: -50%;
            width: 200%; height: 200%;
            background: radial-gradient(circle at center,
                rgba(0,245,255,0.06) 0%, transparent 60%);
            opacity: 0;
            transition: opacity 0.5s;
            pointer-events: none;
        }
        .mode-option:hover {
            border-color: rgba(0,245,255,0.25) !important;
            background: rgba(0,245,255,0.03) !important;
            transform: translateY(-4px) !important;
            box-shadow:
                0 8px 28px rgba(0,245,255,0.08),
                0 0 0 1px rgba(0,245,255,0.04) !important;
        }
        .mode-option:hover::before { opacity: 1; }
        .mode-option:active { transform: translateY(-1px) !important; }
        
        .mode-icon {
            font-size: 32px !important;
            margin-bottom: 10px !important;
            transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
        }
        .mode-option:hover .mode-icon { transform: scale(1.12) translateY(-2px); }
        .mode-title {
            font-size: 0.88rem !important;
            font-weight: 600 !important;
            color: var(--text-primary) !important;
            margin-bottom: 5px !important;
        }
        .mode-desc {
            font-size: 0.68rem !important;
            color: rgba(255,255,255,0.35) !important;
            line-height: 1.35 !important;
        }
        
        /* ── Upload Zone ── */
        .upload-zone {
            border: 1.5px dashed rgba(255,255,255,0.08) !important;
            border-radius: 14px !important;
            padding: 24px 20px !important;
            background: rgba(255,255,255,0.012) !important;
            transition: all 0.4s cubic-bezier(0.4,0,0.2,1) !important;
        }
        .upload-zone:hover, .upload-zone.dragover {
            border-color: rgba(0,245,255,0.35) !important;
            background: rgba(0,245,255,0.03) !important;
            box-shadow: 0 0 30px rgba(0,245,255,0.04) !important;
            transform: scale(1.005);
        }
        .upload-icon { transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); }
        .upload-zone:hover .upload-icon { transform: scale(1.12) translateY(-3px); }
        
        /* ── Confirm Step ── */
        .pattern-confirm-layout {
            animation: tabReveal 0.4s cubic-bezier(0.22,0.61,0.36,1) !important;
        }
        .confirm-preview-area {
            background: rgba(255,255,255,0.015) !important;
            border: 1px solid rgba(255,255,255,0.05) !important;
            border-radius: 12px !important;
        }
        .confirm-buttons .btn-primary {
            box-shadow: 0 3px 18px rgba(0,245,255,0.3) !important;
        }
        .confirm-buttons .btn-primary:hover {
            box-shadow: 0 6px 32px rgba(0,245,255,0.45), 0 0 40px rgba(0,245,255,0.1) !important;
        }
        
        /* ── Pattern Price Subtle ── */
        .pattern-price-subtle {
            font-family: 'Space Mono', monospace !important;
            transition: color 0.2s !important;
            contain: layout style !important;
        }
        
        /* ── View Tab Hero ── */
        .view-hero {
            padding: 14px 16px 12px !important;
            background: linear-gradient(180deg, rgba(0,245,255,0.025) 0%, transparent 100%) !important;
            border-bottom: 1px solid rgba(255,255,255,0.025) !important;
        }
        
        /* ── Scrollbars ── */
        #gap-scan-results,
        .country-search-results,
        #preset-gallery,
        .admin-scrollable {
            scrollbar-width: thin;
            scrollbar-color: rgba(0,245,255,0.15) transparent;
        }
        #gap-scan-results::-webkit-scrollbar,
        .country-search-results::-webkit-scrollbar,
        #preset-gallery::-webkit-scrollbar,
        .admin-scrollable::-webkit-scrollbar {
            width: 4px;
        }
        #gap-scan-results::-webkit-scrollbar-track,
        .country-search-results::-webkit-scrollbar-track,
        #preset-gallery::-webkit-scrollbar-track,
        .admin-scrollable::-webkit-scrollbar-track {
            background: transparent;
        }
        #gap-scan-results::-webkit-scrollbar-thumb,
        .country-search-results::-webkit-scrollbar-thumb,
        #preset-gallery::-webkit-scrollbar-thumb,
        .admin-scrollable::-webkit-scrollbar-thumb {
            background: rgba(0,245,255,0.15);
            border-radius: 4px;
        }
        #gap-scan-results::-webkit-scrollbar-thumb:hover,
        .country-search-results::-webkit-scrollbar-thumb:hover,
        #preset-gallery::-webkit-scrollbar-thumb:hover,
        .admin-scrollable::-webkit-scrollbar-thumb:hover {
            background: rgba(0,245,255,0.3);
        }
        
        /* ── Pattern Builder ── */
        .pattern-builder-container {
            border-radius: 14px !important;
            box-shadow:
                0 6px 24px rgba(0,0,0,0.25),
                inset 0 0 0 1px rgba(0,245,255,0.05) !important;
        }
        .pattern-tools-row .btn-tiny {
            border-radius: 8px !important;
        }
        
        /* ── Color Palette ── */
        .color-swatch {
            transition: all 0.2s cubic-bezier(0.4,0,0.2,1) !important;
            border-radius: 4px;
        }
        .color-swatch:hover {
            transform: scale(1.18) !important;
            z-index: 2;
            box-shadow: 0 3px 10px rgba(0,0,0,0.4);
        }
        .color-swatch.selected {
            transform: scale(1.14) !important;
            box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 3px 12px rgba(0,0,0,0.4) !important;
        }
        
        /* ── Back-to-View Button ── */
        .btn-back-to-view {
            position: absolute !important;
            top: 20px !important;
            right: 28px !important;
            border-radius: 10px !important;
            transition: all 0.25s cubic-bezier(0.4,0,0.2,1) !important;
            backdrop-filter: blur(10px);
        }
        .btn-back-to-view:hover {
            background: rgba(255,60,60,0.3) !important;
            border-color: rgba(255,80,80,0.6) !important;
            transform: translateY(-1px);
            box-shadow: 0 3px 10px rgba(255,60,60,0.15);
        }
        
        /* ── Grid Size Mini Inputs ── */
        .grid-size-mini {
            border-radius: 7px !important;
            transition: all 0.25s !important;
        }
        .grid-size-mini:focus {
            border-color: rgba(0,245,255,0.4) !important;
            box-shadow: 0 0 0 2px rgba(0,245,255,0.08) !important;
        }
        
        /* ── Country Search ── */
        .country-search-results {
            border-radius: 10px !important;
            border: 1px solid rgba(255,255,255,0.06) !important;
            overflow: hidden;
        }
        
        /* ── Leaderboard ── */
        .leaderboard-podium {
            animation: tabReveal 0.5s cubic-bezier(0.22,0.61,0.36,1);
        }
        
        /* ── Step Transitions ── */
        #pattern-step-select,
        #pattern-step-preset-config,
        #pattern-step-country,
        #image-step-placement,
        #image-step-confirm,
        #image-step-country-confirm {
            animation: tabReveal 0.35s cubic-bezier(0.22,0.61,0.36,1);
        }
        
        /* ── Grid Sync Toggle ── */
        .grid-sync-toggle label {
            transition: transform 0.25s !important;
        }
        .grid-sync-toggle label:hover {
            transform: scale(1.08) !important;
        }
        
        /* ── Pattern Canvas Cursors ── */
        #pattern-builder-canvas {
            border-radius: 2px;
        }
        
        /* ── Custom Color Wheel ── */
        .custom-color-preview {
            transition: all 0.25s cubic-bezier(0.4,0,0.2,1) !important;
        }
        .custom-color-preview:hover {
            transform: scale(1.1) !important;
            box-shadow: 0 4px 14px rgba(0,0,0,0.4) !important;
        }
        
        /* ── Color Picker Popup ── */
        .color-picker-popup {
            border-radius: 16px !important;
            box-shadow: 0 12px 48px rgba(0,0,0,0.5),
                        0 0 0 1px rgba(0,245,255,0.1) !important;
        }
        .color-picker-apply {
            border-radius: 10px !important;
        }
        
        /* ── Recent Colors (inline) ── */
        .recent-colors-inline {
            display: flex !important;
            gap: 6px !important;
            align-items: center !important;
        }
        .recent-swatch {
            transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s !important;
            width: 28px !important;
            height: 28px !important;
            border-radius: 6px !important;
            flex-shrink: 0 !important;
        }
        .recent-swatch:hover.has-color {
            transform: scale(1.12) translateY(-1px) !important;
        }
        .hex-input-row {
            display: flex !important;
            gap: 8px !important;
            align-items: center !important;
        }
        .hex-input-row input {
            flex: 1 !important;
            min-width: 0 !important;
        }
        .custom-color-row.compact {
            padding: 8px 10px !important;
            background: rgba(255,255,255,0.02) !important;
            border-radius: 10px !important;
            border: 1px solid rgba(255,255,255,0.04) !important;
            flex-direction: column !important;
            gap: 8px !important;
        }
        
        /* ── Image Preview Canvas ── */
        #image-preview-canvas, #placement-preview-canvas, #country-fill-preview-canvas {
            border: 1px solid rgba(0,245,255,0.2) !important;
            border-radius: 6px !important;
        }

        /* === LIVE PURCHASE TOAST === */
        .purchase-toast-container {
            position: fixed; top: 16px; right: 16px; z-index: 10000;
            display: flex; flex-direction: column; gap: 8px;
            pointer-events: none; max-width: 340px;
        }
        .purchase-toast {
            background: linear-gradient(135deg, rgba(15,20,40,0.95), rgba(25,30,60,0.95));
            border: 1px solid rgba(247,147,26,0.4);
            border-radius: 12px; padding: 12px 16px;
            display: flex; align-items: center; gap: 12px;
            backdrop-filter: blur(16px); pointer-events: auto; cursor: pointer;
            animation: toastSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            box-shadow: 0 8px 32px rgba(247,147,26,0.15), 0 0 60px rgba(247,147,26,0.05);
            transform: translateX(120%); opacity: 0;
        }
        .purchase-toast.removing {
            animation: toastSlideOut 0.4s ease-in forwards;
        }
        @keyframes toastSlideIn {
            to { transform: translateX(0); opacity: 1; }
        }
        @keyframes toastSlideOut {
            from { transform: translateX(0); opacity: 1; }
            to { transform: translateX(120%); opacity: 0; }
        }
        .purchase-toast-icon {
            font-size: 1.5rem; flex-shrink: 0;
            animation: toastPulseIcon 1.5s ease infinite;
        }
        @keyframes toastPulseIcon { 50% { transform: scale(1.15); } }
        .purchase-toast-content { flex: 1; min-width: 0; }
        .purchase-toast-title {
            font-size: 0.8rem; font-weight: 700; color: #FFD700;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .purchase-toast-desc {
            font-size: 0.7rem; color: rgba(255,255,255,0.55); margin-top: 2px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .purchase-toast-time {
            font-size: 0.6rem; color: rgba(255,255,255,0.25); margin-top: 3px;
        }

        /* === PIXEL CARD MODAL === */
        .pixel-card-overlay {
            position: fixed; inset: 0; z-index: 9999;
            background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
            display: none; align-items: center; justify-content: center;
            flex-direction: column; gap: 16px;
        }
        .pixel-card-overlay.visible { display: flex; }
        .pixel-card-canvas-wrap {
            border-radius: 16px; overflow: hidden;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px rgba(247,147,26,0.1);
            max-width: 90vw; max-height: 60vh;
        }
        .pixel-card-canvas-wrap canvas { display: block; max-width: 100%; max-height: 60vh; }
        .pixel-card-actions {
            display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
        }
        .pixel-card-btn {
            padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer;
            font-size: 0.85rem; font-weight: 600; transition: all 0.2s;
        }
        .pixel-card-btn-primary {
            background: linear-gradient(135deg, #F7931A, #FFD700);
            color: #000;
        }
        .pixel-card-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(247,147,26,0.4); }
        .pixel-card-btn-secondary {
            background: rgba(255,255,255,0.08); color: #fff;
            border: 1px solid rgba(255,255,255,0.15);
        }
        .pixel-card-btn-secondary:hover { background: rgba(255,255,255,0.15); }
        .pixel-card-close {
            position: absolute; top: 16px; right: 20px; font-size: 1.5rem;
            color: rgba(255,255,255,0.5); cursor: pointer; background: none; border: none;
            padding: 8px;
        }
        .pixel-card-close:hover { color: #fff; }

        /* === FLY-TO INFO CARD === */
        .flyto-info-card {
            position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(40px);
            z-index: 5000; background: linear-gradient(135deg, rgba(15,18,35,0.97), rgba(25,28,55,0.97));
            border: 1px solid rgba(0,245,255,0.25); border-radius: 16px;
            padding: 20px 24px; min-width: 280px; max-width: 400px;
            backdrop-filter: blur(20px); opacity: 0; pointer-events: none;
            transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 60px rgba(0,245,255,0.08);
        }
        .flyto-info-card.visible {
            opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto;
        }
        .flyto-info-owner {
            font-size: 1.1rem; font-weight: 700; color: #fff;
            display: flex; align-items: center; gap: 8px;
        }
        .flyto-info-owner-dot {
            width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0;
            border: 1px solid rgba(255,255,255,0.2);
        }
        .flyto-info-desc {
            font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-top: 6px;
            font-style: italic;
        }
        .flyto-info-meta {
            display: flex; gap: 16px; margin-top: 10px;
            font-size: 0.72rem; color: rgba(255,255,255,0.35);
        }
        .flyto-info-close {
            position: absolute; top: 8px; right: 12px; background: none; border: none;
            color: rgba(255,255,255,0.3); cursor: pointer; font-size: 1.1rem; padding: 4px;
        }
        .flyto-info-close:hover { color: rgba(255,255,255,0.7); }


        /* === INTRO ANIMATION === */
        #intro-overlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            z-index: 99999; 
            background: radial-gradient(ellipse at center, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.85) 100%);
            display: flex;
            flex-direction: column; align-items: center; justify-content: center;
            cursor: pointer; transition: opacity 1.2s ease;
        }
        #intro-overlay.fade-out { opacity: 0; pointer-events: none; }
        #intro-title {
            font-size: clamp(2rem, 6vw, 4.5rem); font-weight: 800;
            letter-spacing: 0.05em; text-align: center;
            background: linear-gradient(135deg, #00f5ff, #a03cff, #00f5ff);
            background-size: 200% 200%;
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: introGradient 3s ease infinite;
            opacity: 0; transform: translateY(30px) scale(0.95);
            transition: opacity 1.5s ease, transform 1.5s ease;
        }
        #intro-title.visible { opacity: 1; transform: translateY(0) scale(1); }
        #intro-subtitle {
            font-size: clamp(0.7rem, 2vw, 1.1rem); color: rgba(255,255,255,0.4);
            margin-top: 12px; letter-spacing: 0.2em; text-transform: uppercase;
            opacity: 0; transition: opacity 1.5s ease 0.5s;
        }
        #intro-subtitle.visible { opacity: 1; }
        #intro-skip {
            position: absolute; bottom: 40px; font-size: 0.75rem;
            color: rgba(255,255,255,0.25); letter-spacing: 0.15em;
            text-transform: uppercase; animation: introSkipPulse 2s ease infinite;
        }
        @keyframes introGradient {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }
        @keyframes introSkipPulse {
            0%, 100% { opacity: 0.25; } 50% { opacity: 0.6; }
        }
        
        /* === MILESTONE CONFETTI === */
        #confetti-canvas {
            position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
            z-index: 90000; pointer-events: none;
        }
        #milestone-banner {
            position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.5);
            z-index: 90001; padding: 24px 48px; border-radius: 16px;
            background: rgba(10,12,30,0.92); border: 2px solid #FFD700;
            box-shadow: 0 0 60px rgba(255,215,0,0.3);
            text-align: center; pointer-events: none;
            opacity: 0; transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34,1.56,0.64,1);
        }
        #milestone-banner.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
        #milestone-banner h2 {
            font-size: 2rem; margin: 0 0 4px 0;
            background: linear-gradient(135deg, #FFD700, #FFA500);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        }
        #milestone-banner p { margin: 0; color: rgba(255,255,255,0.6); font-size: 0.9rem; }
        
        @media (max-width: 600px) {
            .globe-side-controls { gap: 4px; }
            .globe-side-controls .toggle-btn { padding: 6px 8px; font-size: 0.6rem; }
        }

        /* ═══════════════════════════════════════════════════════════
           LANDING PAGE OVERLAY
           ═══════════════════════════════════════════════════════════ */
        #landing-overlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            z-index: 100000;
            background: linear-gradient(135deg, #050812 0%, #0a1628 40%, #0d0d2b 70%, #050812 100%);
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            overflow-y: auto; overflow-x: hidden;
            transition: opacity 0.8s ease, transform 0.8s ease;
            padding: 20px;
        }
        #landing-overlay.hidden {
            opacity: 0; transform: scale(1.05); pointer-events: none;
        }
        .landing-content {
            max-width: 800px; width: 100%; text-align: center;
            animation: landingFadeIn 1s ease-out;
        }
        @keyframes landingFadeIn {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .landing-hex-icon {
            font-size: 4rem; margin-bottom: 16px;
            animation: pulse 3s ease-in-out infinite;
            filter: drop-shadow(0 0 20px rgba(0, 245, 255, 0.4));
        }
        .landing-title {
            font-size: clamp(1.6rem, 5vw, 2.8rem);
            font-weight: 800; letter-spacing: -0.5px;
            background: linear-gradient(135deg, #fff 0%, #00f5ff 50%, #a03cff 100%);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
            background-clip: text; line-height: 1.2; margin-bottom: 12px;
        }
        .landing-subtitle {
            font-size: clamp(0.9rem, 2.5vw, 1.15rem);
            color: rgba(255,255,255,0.6); margin-bottom: 32px;
            line-height: 1.5; max-width: 600px; margin-left: auto; margin-right: auto;
        }
        .landing-stats-row {
            display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
            margin-bottom: 32px;
        }
        .landing-stat {
            background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
            border-radius: 12px; padding: 16px 24px; min-width: 140px;
            backdrop-filter: blur(10px);
        }
        .landing-stat-value {
            font-size: 1.6rem; font-weight: 700; color: #00f5ff;
            font-variant-numeric: tabular-nums;
        }
        .landing-stat-label {
            font-size: 0.75rem; color: rgba(255,255,255,0.45);
            text-transform: uppercase; letter-spacing: 1px; margin-top: 4px;
        }
        .landing-features {
            display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px; margin-bottom: 36px; text-align: left;
        }
        .landing-feature {
            background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
            border-radius: 10px; padding: 16px;
            transition: border-color 0.3s, background 0.3s;
        }
        .landing-feature:hover {
            border-color: rgba(0,245,255,0.2); background: rgba(0,245,255,0.03);
        }
        .landing-feature-icon { font-size: 1.5rem; margin-bottom: 8px; }
        .landing-feature-title { font-weight: 600; color: #fff; margin-bottom: 4px; font-size: 0.95rem; }
        .landing-feature-desc { font-size: 0.8rem; color: rgba(255,255,255,0.5); line-height: 1.4; }
        .landing-cta-btn {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 16px 40px; font-size: 1.15rem; font-weight: 700;
            background: linear-gradient(135deg, #00f5ff 0%, #a03cff 100%);
            color: #050812; border: none; border-radius: 50px;
            cursor: pointer; letter-spacing: 0.5px;
            transition: transform 0.2s, box-shadow 0.3s;
            box-shadow: 0 4px 30px rgba(0,245,255,0.3);
            text-transform: uppercase;
        }
        .landing-cta-btn:hover {
            transform: translateY(-2px) scale(1.02);
            box-shadow: 0 6px 40px rgba(0,245,255,0.5);
        }
        .landing-cta-btn:active { transform: translateY(0) scale(0.98); }
        .landing-price-anchor {
            margin-top: 12px; font-size: 0.85rem; color: rgba(255,255,255,0.4);
        }
        .landing-price-anchor span { color: #00f5ff; font-weight: 600; }
        .landing-scarcity {
            margin-top: 20px; padding: 10px 20px;
            background: rgba(255,165,0,0.08); border: 1px solid rgba(255,165,0,0.15);
            border-radius: 8px; display: inline-block;
        }
        .landing-scarcity-text {
            font-size: 0.8rem; color: rgba(255,165,0,0.8);
        }
        .landing-scarcity-text strong { color: #ffa500; }
        .landing-social-proof {
            margin-top: 28px; display: flex; flex-wrap: wrap;
            gap: 16px; justify-content: center; align-items: center;
        }
        .landing-proof-item {
            font-size: 0.75rem; color: rgba(255,255,255,0.35);
            display: flex; align-items: center; gap: 6px;
        }
        .landing-proof-item span { color: rgba(255,255,255,0.55); font-weight: 500; }
        .landing-scroll-hint {
            margin-top: 24px; font-size: 0.7rem; color: rgba(255,255,255,0.2);
            cursor: pointer;
        }
        .landing-phase-badge {
            display: inline-block; padding: 6px 14px;
            background: linear-gradient(135deg, rgba(0,245,255,0.1), rgba(160,60,255,0.1));
            border: 1px solid rgba(0,245,255,0.2); border-radius: 20px;
            font-size: 0.8rem; color: rgba(0,245,255,0.9);
            margin-bottom: 20px; letter-spacing: 0.5px;
        }
        .landing-trusted-by {
            margin-top: 32px; padding-top: 24px;
            border-top: 1px solid rgba(255,255,255,0.05);
        }
        .landing-trusted-label {
            font-size: 0.65rem; color: rgba(255,255,255,0.2);
            text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px;
        }
        .landing-trust-icons {
            display: flex; gap: 24px; justify-content: center;
            flex-wrap: wrap; align-items: center;
        }
        .landing-trust-item {
            font-size: 0.75rem; color: rgba(255,255,255,0.3);
            display: flex; align-items: center; gap: 6px;
        }

        /* ═══════════════════════════════════════════════════════════
           DYNAMIC PRICING / SCARCITY BAR
           ═══════════════════════════════════════════════════════════ */
        .pricing-phase-bar {
            background: rgba(255,165,0,0.06); border: 1px solid rgba(255,165,0,0.12);
            border-radius: 8px; padding: 8px 14px; margin-bottom: 12px;
            display: flex; align-items: center; justify-content: space-between;
            gap: 10px; font-size: 0.75rem;
        }
        .pricing-phase-current {
            color: #00f5ff; font-weight: 600;
        }
        .pricing-phase-next {
            color: rgba(255,165,0,0.7); font-size: 0.7rem;
        }
        .pricing-phase-progress {
            flex: 1; height: 4px; background: rgba(255,255,255,0.06);
            border-radius: 2px; overflow: hidden; min-width: 60px;
        }
        .pricing-phase-fill {
            height: 100%; border-radius: 2px;
            background: linear-gradient(90deg, #00f5ff, #ffa500);
            transition: width 0.5s ease;
        }
        .bulk-discount-badge {
            display: inline-block; padding: 2px 8px;
            background: rgba(0,200,0,0.1); border: 1px solid rgba(0,200,0,0.2);
            border-radius: 4px; font-size: 0.65rem; color: rgba(0,200,0,0.8);
            margin-left: 6px;
        }
        .founder-badge {
            display: inline-flex; align-items: center; gap: 3px;
            padding: 2px 8px; background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,165,0,0.1));
            border: 1px solid rgba(255,215,0,0.3); border-radius: 4px;
            font-size: 0.6rem; color: #ffd700; font-weight: 600;
        }


        /* ═══ ONBOARDING TUTORIAL ═══ */
        #onboarding-overlay {
            display: none; position: fixed; inset: 0;
            z-index: 45000; pointer-events: none;
        }
        #onboarding-overlay.active { display: block; }
        .onb-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); pointer-events: auto; }
        .onb-tooltip {
            position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
            background: linear-gradient(135deg, #0a1628, #0d0d2b);
            border: 1px solid rgba(0,245,255,0.25); border-radius: 16px; padding: 28px 28px 22px;
            max-width: 360px; width: calc(100vw - 40px); z-index: 45001; pointer-events: auto;
            box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 40px rgba(0,245,255,0.08);
            opacity: 0; transition: opacity 0.3s ease;
        }
        .onb-tooltip.visible { opacity: 1; }
        .onb-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
        .onb-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.12); transition: all 0.3s; }
        .onb-dot.active { background: #00f5ff; box-shadow: 0 0 8px rgba(0,245,255,0.5); transform: scale(1.2); }
        .onb-dot.done { background: rgba(0,245,255,0.4); }
        .onb-icon { font-size: 2rem; text-align: center; margin-bottom: 10px; line-height: 1; }
        .onb-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 8px; text-align: center; }
        .onb-desc { font-size: 0.82rem; color: rgba(255,255,255,0.65); line-height: 1.55; margin-bottom: 20px; text-align: center; }
        .onb-actions { display: flex; gap: 10px; justify-content: center; }
        .onb-btn { padding: 9px 22px; border-radius: 8px; border: none; cursor: pointer; font-size: 0.82rem; font-weight: 600; transition: all 0.2s; }
        .onb-btn-go { background: linear-gradient(135deg, #00f5ff, #0088ff); color: #000; }
        .onb-btn-go:hover { box-shadow: 0 4px 16px rgba(0,245,255,0.3); }
        .onb-btn-skip { background: transparent; color: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.08); }
        .onb-btn-skip:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.2); }
        .onb-pulse {
            position: fixed; width: 80px; height: 80px; border-radius: 50%; pointer-events: none;
            border: 2px solid rgba(0,245,255,0.6); z-index: 45002;
            animation: onbPulse 2s ease infinite; transform: translate(-50%,-50%);
        }
        @keyframes onbPulse { 0%{transform:translate(-50%,-50%) scale(0.8);opacity:1;} 100%{transform:translate(-50%,-50%) scale(1.6);opacity:0;} }

        /* ═══ NEWSLETTER BAR ═══ */
        .nl-bar {
            position: fixed; bottom: 0; left: 0; right: 0; z-index: 39000;
            background: linear-gradient(135deg, #0a1628ee, #0d0d2bee); backdrop-filter: blur(12px);
            border-top: 1px solid rgba(0,245,255,0.15); padding: 12px 20px;
            display: none; align-items: center; justify-content: center; gap: 12px;
            animation: nlSlide 0.5s ease;
        }
        @keyframes nlSlide { from{transform:translateY(100%)} to{transform:translateY(0)} }
        .nl-bar.visible { display: flex; }
        .nl-bar-text { font-size: 0.82rem; color: rgba(255,255,255,0.8); }
        .nl-bar-text strong { color: #00f5ff; }
        .nl-bar-input { padding:8px 14px; border-radius:8px; border:1px solid rgba(0,245,255,0.2); background:rgba(255,255,255,0.05); color:#fff; font-size:0.82rem; width:220px; outline:none; }
        .nl-bar-input:focus { border-color: rgba(0,245,255,0.5); }
        .nl-bar-btn { padding:8px 18px; border-radius:8px; border:none; background:linear-gradient(135deg,#00f5ff,#0088ff); color:#000; font-weight:600; font-size:0.82rem; cursor:pointer; }
        .nl-bar-close { background:none; border:none; color:rgba(255,255,255,0.3); font-size:1.2rem; cursor:pointer; }
        @media(max-width:600px){ .nl-bar{flex-wrap:wrap;gap:8px;padding:10px 14px} .nl-bar-input{width:100%;order:2} .nl-bar-btn{order:3;flex:1} .nl-bar-text{order:1;flex:1;font-size:0.75rem} }

        /* ═══ REFERRAL PANEL (profile) ═══ */
        .ref-panel { background: linear-gradient(135deg,rgba(0,245,255,0.05),rgba(255,215,0,0.03)); border:1px solid rgba(0,245,255,0.15); border-radius:12px; padding:16px; margin-top:16px; }
        .ref-panel-title { font-size:0.85rem; font-weight:700; color:#00f5ff; margin-bottom:4px; }
        .ref-panel-desc { font-size:0.75rem; color:rgba(255,255,255,0.5); margin-bottom:12px; line-height:1.4; }
        .ref-link-row { display:flex; gap:8px; margin-bottom:10px; }
        .ref-link-input { flex:1; padding:8px 12px; border-radius:8px; border:1px solid rgba(0,245,255,0.2); background:rgba(0,0,0,0.3); color:#00f5ff; font-family:'Courier New',monospace; font-size:0.72rem; outline:none; cursor:pointer; }
        .ref-copy-btn { padding:8px 14px; border-radius:8px; border:none; background:rgba(0,245,255,0.15); color:#00f5ff; font-size:0.75rem; font-weight:600; cursor:pointer; }
        .ref-stats { display:flex; gap:12px; margin-top:8px; }
        .ref-stat { flex:1; text-align:center; padding:8px; background:rgba(0,0,0,0.2); border-radius:8px; }
        .ref-stat-val { font-size:1rem; font-weight:700; color:#FFD700; }
        .ref-stat-lbl { font-size:0.65rem; color:rgba(255,255,255,0.4); margin-top:2px; }

        /* ═══ ENHANCED POST-PURCHASE SHARE ═══ */
        .pp-share { background:linear-gradient(135deg,rgba(255,215,0,0.08),rgba(0,245,255,0.05)); border:1px solid rgba(255,215,0,0.2); border-radius:14px; padding:20px; margin-top:12px; text-align:center; }
        .pp-share-title { font-size:1rem; font-weight:700; color:#FFD700; margin-bottom:4px; }
        .pp-share-desc { font-size:0.78rem; color:rgba(255,255,255,0.5); margin-bottom:16px; }
        .share-xl { display:inline-flex; align-items:center; gap:6px; padding:10px 18px; border-radius:10px; border:none; font-size:0.82rem; font-weight:700; cursor:pointer; transition:all 0.2s; margin:3px; }
        .share-xl:hover { transform:translateY(-2px); }
        .share-xl-tw { background:linear-gradient(135deg,#1DA1F2,#0d8de0); color:#fff; box-shadow:0 4px 15px rgba(29,161,242,0.3); }
        .share-xl-rd { background:linear-gradient(135deg,#FF4500,#cc3700); color:#fff; box-shadow:0 4px 15px rgba(255,69,0,0.3); }
        .share-xl-wa { background:linear-gradient(135deg,#25D366,#1da851); color:#fff; box-shadow:0 4px 15px rgba(37,211,102,0.3); }
        .share-xl-tg { background:linear-gradient(135deg,#0088cc,#006daa); color:#fff; box-shadow:0 4px 15px rgba(0,136,204,0.3); }
        .share-xl-fb { background:linear-gradient(135deg,#1877F2,#1060cc); color:#fff; box-shadow:0 4px 15px rgba(24,119,242,0.3); }
        .share-xl-cp { background:rgba(255,255,255,0.1); color:#fff; border:1px solid rgba(255,255,255,0.15); }
        .share-xl-img { background:linear-gradient(135deg,rgba(0,245,255,0.15),rgba(0,136,255,0.15)); color:#00f5ff; border:1px solid rgba(0,245,255,0.25); }
        .share-xl-native { background:linear-gradient(135deg,#00f5ff,#0088ff); color:#000; box-shadow:0 4px 20px rgba(0,245,255,0.3); font-size:0.95rem; padding:14px 32px; }
        .pp-ref-hint { margin-top:14px; padding:10px 14px; background:rgba(0,245,255,0.06); border-radius:8px; font-size:0.75rem; color:rgba(0,245,255,0.7); }
        .pp-ref-hint strong { color:#00f5ff; }

        /* ═══════════════════════════════════════════════════════════
           EMBED WIDGET / SHARE BADGE (Post-Purchase Modal)
           ═══════════════════════════════════════════════════════════ */
        #embed-widget-modal {
            display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            z-index: 50000; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
            align-items: center; justify-content: center; padding: 20px;
        }
        #embed-widget-modal.active { display: flex; }
        .embed-widget-content {
            background: linear-gradient(135deg, #0a1628, #0d0d2b);
            border: 1px solid rgba(0,245,255,0.15); border-radius: 16px;
            padding: 28px; max-width: 520px; width: 100%;
            max-height: 80vh; overflow-y: auto;
        }
        .embed-widget-title {
            font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 6px;
        }
        .embed-widget-subtitle {
            font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-bottom: 20px;
        }
        .embed-option {
            background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
            border-radius: 10px; padding: 14px; margin-bottom: 12px;
        }
        .embed-option-label {
            font-size: 0.8rem; font-weight: 600; color: rgba(0,245,255,0.8); margin-bottom: 8px;
        }
        .embed-code-box {
            background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.06);
            border-radius: 6px; padding: 10px; font-family: 'Courier New', monospace;
            font-size: 0.7rem; color: rgba(255,255,255,0.6); word-break: break-all;
            position: relative; cursor: pointer;
        }
        .embed-code-box:hover { border-color: rgba(0,245,255,0.2); }
        .embed-copy-hint {
            position: absolute; top: 4px; right: 8px;
            font-size: 0.6rem; color: rgba(255,255,255,0.3);
        }
        .embed-badge-preview {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 8px 16px; background: linear-gradient(135deg, #050812, #0a1628);
            border: 1px solid rgba(0,245,255,0.2); border-radius: 8px;
            color: #fff; font-size: 0.8rem; text-decoration: none;
            margin-top: 8px;
        }
        .embed-badge-preview:hover { border-color: rgba(0,245,255,0.4); }

        /* ═══════════════════════════════════════════════════════════
           TRUST & LEGAL MODALS (FAQ, About, ToS, Impressum)
           ═══════════════════════════════════════════════════════════ */
        .legal-modal {
            display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            z-index: 60000; background: rgba(0,0,0,0.75); backdrop-filter: blur(5px);
            align-items: center; justify-content: center; padding: 20px;
        }
        .legal-modal.active { display: flex; }
        .legal-modal-content {
            background: linear-gradient(135deg, #0a1628, #0d0d2b);
            border: 1px solid rgba(0,245,255,0.1); border-radius: 16px;
            padding: 32px; max-width: 680px; width: 100%;
            max-height: 85vh; overflow-y: auto; position: relative;
        }
        .legal-modal-close {
            position: absolute; top: 12px; right: 16px;
            background: none; border: none; color: rgba(255,255,255,0.4);
            font-size: 1.5rem; cursor: pointer; padding: 4px 8px;
        }
        .legal-modal-close:hover { color: #fff; }
        .legal-modal-title {
            font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 20px;
            padding-right: 40px;
        }
        .legal-section { margin-bottom: 20px; }
        .legal-section h3 {
            font-size: 0.95rem; color: #00f5ff; margin-bottom: 8px; font-weight: 600;
        }
        .legal-section p, .legal-section li {
            font-size: 0.85rem; color: rgba(255,255,255,0.6); line-height: 1.6;
        }
        .legal-section ul { padding-left: 20px; }
        .legal-section li { margin-bottom: 6px; }
        .faq-item { margin-bottom: 16px; }
        .faq-question {
            font-size: 0.9rem; font-weight: 600; color: #fff;
            cursor: pointer; padding: 10px 14px;
            background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
            border-radius: 8px; display: flex; justify-content: space-between; align-items: center;
            transition: background 0.2s;
        }
        .faq-question:hover { background: rgba(255,255,255,0.05); }
        .faq-question .faq-arrow { transition: transform 0.3s; }
        .faq-question.open .faq-arrow { transform: rotate(180deg); }
        .faq-answer {
            display: none; padding: 12px 14px;
            font-size: 0.85rem; color: rgba(255,255,255,0.55); line-height: 1.6;
        }
        .faq-answer.open { display: block; }

        /* Footer bar for legal links */
        .legal-footer {
            display: flex; justify-content: center; align-items: center;
            gap: 16px; padding: 8px 12px;
            background: rgba(5,8,18,0.95);
            border-top: 1px solid rgba(255,255,255,0.04);
            flex-wrap: wrap;
        }
        .legal-footer a {
            font-size: 0.65rem; color: rgba(255,255,255,0.25);
            text-decoration: none; cursor: pointer;
            transition: color 0.2s;
        }
        .legal-footer a:hover { color: rgba(255,255,255,0.5); }
        .legal-footer a:last-child { margin-bottom: 0; }

        /* ═══════════════════════════════════════════════════════════
           MOBILE OPTIMIZATIONS
           ═══════════════════════════════════════════════════════════ */
        @media (max-width: 768px) {
            .landing-content { padding: 10px; }
            .landing-title { font-size: clamp(1.3rem, 6vw, 2rem); }
            .landing-subtitle { font-size: 0.85rem; }
            .landing-stats-row { gap: 10px; }
            .landing-stat { padding: 12px 16px; min-width: 100px; }
            .landing-stat-value { font-size: 1.2rem; }
            .landing-features { grid-template-columns: 1fr; gap: 10px; }
            .landing-cta-btn { padding: 14px 28px; font-size: 1rem; }
            .landing-social-proof { gap: 10px; }
            .legal-modal-content { padding: 20px; }
            .embed-widget-content { padding: 20px; }
            
            /* Mobile globe optimizations */
            .header { flex-wrap: wrap; gap: 6px; padding: 6px 10px !important; }
            .search-container { order: 3; width: 100%; }
            .search-input { font-size: 14px !important; } /* prevent iOS zoom */
            .controls-panel { max-height: 50vh !important; }
            .legal-footer { gap: 10px; padding: 6px 8px; }
            .legal-footer a { font-size: 0.6rem; }
            
            /* Mobile story compact */
            .controls-panel.story-active .controls-inner { padding: 6px 10px 8px; }
            .controls-panel.story-active .tabs { gap: 2px; margin-bottom: 4px; }
            .controls-panel.story-active .story-player { padding: 8px; }
            
            /* Touch-friendly buttons */
            .toggle-btn { min-height: 36px; min-width: 36px; }
            .btn { min-height: 40px; }
            
            /* Mobile purchase flow */
            .controls-panel .tab-content { padding: 10px !important; }
        }
        
        @media (max-width: 480px) {
            .landing-stat { min-width: 80px; padding: 10px 12px; }
            .landing-stat-value { font-size: 1rem; }
            .landing-cta-btn { width: 100%; justify-content: center; }
            .landing-hex-icon { font-size: 3rem; }
            .header .logo { font-size: 0.9rem !important; }
            .stats-bar { gap: 4px; }
        }
        
        /* Touch-optimized interactions */
        @media (hover: none) and (pointer: coarse) {
            .cell-info-bar { font-size: 0.8rem !important; padding: 8px 12px !important; }
            .globe-side-controls .toggle-btn { 
                padding: 8px 12px !important; 
                font-size: 0.7rem !important;
                min-height: 40px;
            }
        }

        /* ═══════════════════════════════════════════════════════════
           ANALYTICS CONVERSION FUNNEL (debug overlay, hidden by default)
           ═══════════════════════════════════════════════════════════ */
        #analytics-debug {
            display: none; position: fixed; bottom: 30px; right: 10px;
            z-index: 99999; background: rgba(0,0,0,0.9); border: 1px solid rgba(0,245,255,0.2);
            border-radius: 8px; padding: 12px; font-size: 0.65rem;
            color: rgba(255,255,255,0.6); min-width: 180px;
        }
        #analytics-debug.visible { display: block; }
