        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --secondary: #8b5cf6;
            --accent: #ec4899;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --bg-dark: #0a0e1a;
            --bg-card: #131829;
            --bg-card-hover: #1a1f3a;
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --border: #2d3748;
            --glow: rgba(99, 102, 241, 0.5);
        }

        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-20px); }
        }

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

        @keyframes slideInLeft {
            from {
                opacity: 0;
                transform: translateX(-50px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(50px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

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

        @keyframes scaleIn {
            from {
                opacity: 0;
                transform: scale(0.8);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        @keyframes rotateGlow {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes shimmer {
            0% { background-position: -1000px 0; }
            100% { background-position: 1000px 0; }
        }

        @keyframes particleFloat {
            0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.3; }
            25% { transform: translate(50px, -50px) rotate(90deg); opacity: 0.6; }
            50% { transform: translate(0, -100px) rotate(180deg); opacity: 0.3; }
            75% { transform: translate(-50px, -50px) rotate(270deg); opacity: 0.6; }
        }

        @keyframes neonPulse {
            0%, 100% { 
                box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary), 0 0 20px var(--primary); 
            }
            50% { 
                box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 40px var(--primary), 0 0 60px var(--primary); 
            }
        }

        @keyframes borderFlow {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 50%, #0a0e1a 100%);
            background-size: 200% 200%;
            animation: gradientShift 15s ease infinite;
            color: var(--text-primary);
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
            padding: 20px;
        }

        /* Animated particles background */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                        radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
            animation: float 20s ease-in-out infinite;
            pointer-events: none;
            z-index: 0;
        }

        body::after {
            content: '';
            position: fixed;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background-image: 
                radial-gradient(circle, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
                radial-gradient(circle, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
            background-size: 50px 50px, 80px 80px;
            background-position: 0 0, 40px 40px;
            animation: particleFloat 60s linear infinite;
            pointer-events: none;
            z-index: 0;
        }

        .container {
            max-width: 100%; /* Rimosso il limite! */
            width: 100%;
            margin: 0 auto;
            padding: 0 2rem; /* Padding ai lati */
            position: relative;
            z-index: 1;
        }

        /* Header with epic effects */
        h1 {
            text-align: center;
            font-family: 'Orbitron', sans-serif;
            font-size: 3.5rem;
            font-weight: 900;
            background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
            background-size: 300% 300%;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 3rem;
            animation: gradientShift 5s ease infinite, float 4s ease-in-out infinite;
            text-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
            letter-spacing: 2px;
            position: relative;
            filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.6));
        }

        h1::before {
            content: '⚡';
            position: absolute;
            left: -60px;
            animation: pulse 2s ease-in-out infinite;
        }

        h1::after {
            content: '⚡';
            position: absolute;
            right: -60px;
            animation: pulse 2s ease-in-out infinite 1s;
        }

        /* KPI Dashboard */
        .kpi-dashboard {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 20px;
            margin-bottom: 35px;
            animation: slideInUp 0.6s ease-out;
        }

        .kpi-card {
            background: linear-gradient(135deg, rgba(19, 24, 41, 0.8) 0%, rgba(26, 31, 58, 0.6) 100%);
            backdrop-filter: blur(30px) saturate(180%);
            border: 2px solid transparent;
            background-image: linear-gradient(135deg, rgba(19, 24, 41, 0.8), rgba(26, 31, 58, 0.6)),
                               linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
            background-origin: border-box;
            background-clip: padding-box, border-box;
            padding: 20px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            gap: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .kpi-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
        }

        .kpi-icon {
            font-size: 2.2rem;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
            display: flex;
            align-items: center;
            justify-content: center;
            width: 50px;
            height: 50px;
        }

        .kpi-content {
            display: flex;
            flex-direction: column;
        }

        .kpi-label {
            font-size: 0.85rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 600;
        }

        .kpi-value {
            font-family: 'Orbitron', sans-serif;
            font-size: 1.6rem;
            font-weight: 900;
            color: var(--text-primary);
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
            margin-top: 2px;
        }

        /* Charts with glass morphism */
        .charts-wrapper {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
            gap: 30px;
            margin-bottom: 30px;
            max-width: 100%; /* Nessun limite */
        }

        .graph-box {
            background: linear-gradient(135deg, rgba(19, 24, 41, 0.8) 0%, rgba(26, 31, 58, 0.6) 100%);
            backdrop-filter: blur(30px) saturate(180%);
            padding: 30px;
            border-radius: 24px;
            border: 2px solid transparent;
            background-image: linear-gradient(135deg, rgba(19, 24, 41, 0.8), rgba(26, 31, 58, 0.6)),
                               linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
            background-origin: border-box;
            background-clip: padding-box, border-box;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                        inset 0 1px 0 rgba(255, 255, 255, 0.1);
            height: 450px;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden;
            animation: slideInUp 0.6s ease-out;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .graph-box::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(99, 102, 241, 0.1), transparent);
            transform: rotate(45deg);
            animation: shimmer 3s infinite;
        }

        .graph-box:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 30px 80px rgba(99, 102, 241, 0.4),
                        inset 0 1px 0 rgba(255, 255, 255, 0.2);
            border-image: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899) 1;
        }

        .graph-box:nth-child(1) {
            animation-delay: 0.1s;
        }

        .graph-box:nth-child(2) {
            animation-delay: 0.2s;
        }

        .graph-box h2 {
            text-align: center;
            margin: 0 0 20px 0;
            color: var(--text-primary);
            font-size: 1.4rem;
            font-weight: 800;
            position: relative;
            z-index: 1;
            text-transform: uppercase;
            letter-spacing: 1px;
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .graph-box canvas {
            flex-grow: 1;
            max-height: 360px;
            position: relative;
            z-index: 1;
        }

        /* Controls with premium styling */
        .controls {
            background: linear-gradient(135deg, rgba(19, 24, 41, 0.9) 0%, rgba(26, 31, 58, 0.7) 100%);
            backdrop-filter: blur(30px) saturate(180%);
            padding: 30px;
            border-radius: 24px;
            margin-bottom: 30px;
            border: 2px solid;
            border-image: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899) 1;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                        inset 0 1px 0 rgba(255, 255, 255, 0.1);
            position: relative;
            overflow: hidden;
            animation: slideInLeft 0.6s ease-out;
        }

        .controls::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
            animation: shimmer 3s infinite;
        }

        .controls-row {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            align-items: center;
            margin-bottom: 20px;
            position: relative;
            z-index: 1;
        }

        .search-bar {
            padding: 12px 20px;
            border-radius: 12px;
            border: 2px solid var(--border);
            background: rgba(10, 14, 26, 0.8);
            color: var(--text-primary);
            min-width: 250px;
            flex: 1;
            font-size: 1rem;
            transition: all 0.3s ease;
            position: relative;
        }

        .search-bar:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
            transform: scale(1.02);
        }

        #rarity-filter {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            border: none;
            padding: 0;
        }

        .rarity-chip {
            position: relative;
        }

        .rarity-chip input {
            display: none;
        }

        .rarity-chip span {
            padding: 8px 16px;
            border-radius: 12px;
            background: rgba(45, 55, 72, 0.8);
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 600;
            border: 2px solid transparent;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            display: inline-block;
            position: relative;
            overflow: hidden;
        }

        .rarity-chip span::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(99, 102, 241, 0.3);
            transition: width 0.4s, height 0.4s, top 0.4s, left 0.4s;
        }

        .rarity-chip:hover span {
            transform: scale(1.1);
            border-color: var(--primary);
        }

        .rarity-chip input:checked + span {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            border-color: var(--primary);
            font-weight: 700;
            box-shadow: 0 5px 20px rgba(99, 102, 241, 0.5);
            animation: neonPulse 2s ease-in-out infinite;
        }

        .rarity-chip input:checked + span::before {
            width: 300px;
            height: 300px;
            top: -150px;
            left: -150px;
        }

        .sort-group {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .sort-group select {
            padding: 10px 16px;
            background: rgba(10, 14, 26, 0.8);
            color: var(--text-primary);
            border: 2px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .sort-group select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
        }

        .action-btn {
            padding: 10px 20px;
            background: linear-gradient(135deg, rgba(51, 65, 85, 0.8), rgba(45, 55, 72, 0.8));
            color: var(--text-primary);
            border: 2px solid var(--primary);
            border-radius: 12px;
            cursor: pointer;
            font-weight: 700;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
        }

        .action-btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: var(--primary);
            transition: width 0.5s, height 0.5s, top 0.5s, left 0.5s;
            transform: translate(-50%, -50%);
            z-index: -1;
        }

        .action-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
            color: white;
        }

        .action-btn:hover::before {
            width: 300px;
            height: 300px;
        }

        .action-btn:active {
            transform: scale(0.95);
        }

        .checkbox-label {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            font-size: 0.95rem;
            user-select: none;
            padding: 8px 12px;
            border-radius: 10px;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .checkbox-label:hover {
            background: rgba(99, 102, 241, 0.1);
        }

        .checkbox-label input {
            accent-color: var(--primary);
            width: 20px;
            height: 20px;
            cursor: pointer;
        }

        .info-btn {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            width: 32px;
            height: 32px;
            text-align: center;
            border-radius: 50%;
            line-height: 32px;
            font-weight: 900;
            cursor: pointer;
            display: inline-block;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
        }

        .info-btn:hover {
            transform: scale(1.2) rotate(180deg);
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
        }

        .status-container {
            display: flex;
            align-items: center;
            gap: 15px;
            width: 100%;
            border-top: 2px solid var(--border);
            padding-top: 20px;
            margin-top: 15px;
        }

        .status-text {
            font-family: 'Orbitron', monospace;
            color: var(--primary);
            font-size: 1rem;
            flex-grow: 1;
            font-weight: 700;
            text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
            /* animation: pulse 2s ease-in-out infinite; */
        }

        /* Cards con griglia dinamica e dimensioni ottimizzate */
        #card-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Dimensione minima ridotta */
            gap: 25px;
            min-height: 200px;
            perspective: 1000px;
        }

        .card {
            background: linear-gradient(135deg, rgba(19, 24, 41, 0.9) 0%, rgba(26, 31, 58, 0.7) 100%);
            backdrop-filter: blur(20px) saturate(180%);
            border: 2px solid rgba(255, 255, 255, 0.05);
            border-radius: 16px;
            transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            animation: scaleIn 0.5s ease-out backwards;
            box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .card::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
            border-radius: 16px;
            z-index: -1;
            opacity: 0;
            transition: opacity 0.35s ease;
        }

        .card:hover::before {
            opacity: 0.8;
        }

        .card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 0 25px 50px rgba(99, 102, 241, 0.3),
                        0 0 30px rgba(139, 92, 246, 0.2);
            border-color: rgba(255, 255, 255, 0.15);
        }

        .fav-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(10, 14, 26, 0.85);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: #94a3b8;
            font-size: 1.1rem;
            cursor: pointer;
            z-index: 11;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
        }

        .fav-btn:hover {
            background: rgba(10, 14, 26, 0.95);
            color: #fff;
            transform: scale(1.15);
            border-color: rgba(255, 255, 255, 0.4);
            box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
        }

        .fav-btn:active {
            transform: scale(0.9);
        }

        .fav-btn.active {
            color: #ffd700;
            text-shadow: 0 0 10px #ffd700;
            background: rgba(255, 215, 0, 0.15);
            border-color: rgba(255, 215, 0, 0.6);
            box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
        }

        .card-image-wrapper {
            width: 100%;
            aspect-ratio: 63/88;
            overflow: hidden;
            position: relative;
            background: linear-gradient(135deg, rgba(10, 14, 26, 0.9) 0%, rgba(19, 24, 41, 0.9) 100%);
            border-bottom: 2px solid rgba(255, 255, 255, 0.05);
        }

        .card img {
            width: 100%;
            height: 100%;
            display: block;
            object-fit: cover;
            transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
            filter: brightness(0.9) contrast(1.05);
        }

        .card:hover img {
            transform: scale(1.06);
            filter: brightness(1.05) contrast(1.1);
        }

        .card-info {
            padding: 18px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            flex-grow: 1;
        }

        .card-name {
            font-weight: 800;
            font-size: 1.1rem;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            letter-spacing: 0.5px;
            transition: color 0.3s ease;
        }

        .card:hover .card-name {
            color: #ffffff;
            text-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
        }

        .card-ratio-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .card-ratio {
            font-size: 1.6rem;
            font-weight: 900;
            font-family: 'Orbitron', sans-serif;
            letter-spacing: -0.5px;
        }

        .trend-badge {
            font-size: 0.75rem;
            font-weight: 800;
            padding: 4px 10px;
            border-radius: 20px;
            backdrop-filter: blur(10px);
            display: inline-flex;
            align-items: center;
            gap: 4px;
            border: 1px solid transparent;
            font-family: 'Orbitron', monospace;
        }

        .trend-badge.trend-up {
            background: rgba(16, 185, 129, 0.1);
            color: #10b981;
            border-color: rgba(16, 185, 129, 0.2);
            box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
        }

        .trend-badge.trend-down {
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
            border-color: rgba(239, 68, 68, 0.2);
            box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
        }

        .trend-badge.trend-neutral {
            background: rgba(148, 163, 184, 0.1);
            color: #94a3b8;
            border-color: rgba(148, 163, 184, 0.2);
        }

        .card-stats-wrapper {
            display: flex;
            flex-direction: column;
            gap: 10px;
            position: relative;
            margin-top: 2px;
        }

        .card-rarity-row {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }

        /* Styled Premium Rarity Badges */
        .rarity-badge {
            font-size: 0.72rem;
            font-weight: 800;
            text-transform: uppercase;
            padding: 3px 8px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            letter-spacing: 0.5px;
            display: inline-block;
        }

        .rarity-promo {
            background: linear-gradient(135deg, #475569, #334155);
            color: #cbd5e1;
            border-color: rgba(148, 163, 184, 0.3);
            box-shadow: 0 0 8px rgba(148, 163, 184, 0.1);
        }

        .rarity-common {
            background: linear-gradient(135deg, #1e293b, #0f172a);
            color: #94a3b8;
        }

        .rarity-uncommon {
            background: linear-gradient(135deg, #0369a1, #0c4a6e);
            color: #38bdf8;
            border-color: rgba(56, 189, 248, 0.2);
        }

        .rarity-rare {
            background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
            color: #60a5fa;
            border-color: rgba(96, 165, 250, 0.3);
            box-shadow: 0 0 10px rgba(29, 78, 216, 0.3);
        }

        .rarity-double-rare {
            background: linear-gradient(135deg, #6d28d9, #4c1d95);
            color: #a78bfa;
            border-color: rgba(167, 139, 250, 0.4);
            box-shadow: 0 0 12px rgba(109, 40, 217, 0.4);
        }

        .rarity-illustration-rare {
            background: linear-gradient(135deg, #b45309, #78350f);
            color: #fbbf24;
            border-color: rgba(251, 191, 36, 0.4);
            box-shadow: 0 0 12px rgba(180, 83, 9, 0.4);
        }

        .rarity-special-art {
            background: linear-gradient(135deg, #be185d, #831843);
            color: #f472b6;
            border-color: rgba(244, 114, 182, 0.4);
            box-shadow: 0 0 15px rgba(190, 24, 93, 0.4);
        }

        .rarity-immersive {
            background: linear-gradient(135deg, #0f766e, #115e59);
            color: #2dd4bf;
            border-color: rgba(45, 212, 191, 0.4);
            box-shadow: 0 0 15px rgba(15, 118, 110, 0.4);
        }

        .rarity-crown {
            background: linear-gradient(135deg, #b59410, #806000);
            color: #fffbeb;
            border-color: #ffd700;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
            font-weight: 900;
            animation: pulse 2s ease-in-out infinite;
        }

        .rarity-shiny {
            background: linear-gradient(135deg, #475569, #1e293b, #64748b);
            color: #f1f5f9;
            border-color: rgba(241, 245, 249, 0.3);
            box-shadow: 0 0 12px rgba(241, 245, 249, 0.2);
        }

        .card-stats-grid {
            display: flex;
            flex-direction: column;
            gap: 6px;
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-top: 4px;
        }

        .card-stat-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 500;
        }

        .stat-emoji {
            font-size: 1rem;
            width: 18px;
            display: inline-block;
            text-align: center;
        }

        .sparkline-container {
            width: 70px;
            height: 35px;
            position: absolute;
            right: 0;
            bottom: 0;
            pointer-events: none;
            opacity: 0.85;
            transition: opacity 0.3s ease;
        }

        .card:hover .sparkline-container {
            opacity: 1;
        }

        .sparkline-canvas {
            width: 100%;
            height: 100%;
        }

        .card:nth-child(1) { animation-delay: 0.05s; }
        .card:nth-child(2) { animation-delay: 0.1s; }
        .card:nth-child(3) { animation-delay: 0.15s; }
        .card:nth-child(4) { animation-delay: 0.2s; }
        .card:nth-child(5) { animation-delay: 0.25s; }
        .card:nth-child(6) { animation-delay: 0.3s; }

        /* Responsive - adattamento dinamico */
        @media (max-width: 768px) {
            h1 { font-size: 2rem; }
            .charts-wrapper { grid-template-columns: 1fr; }
            #card-container { 
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 15px;
            }
            h1::before, h1::after { display: none; }
            .container {
                padding: 0 1rem;
            }
        }

        @media (min-width: 769px) and (max-width: 1200px) {
            #card-container {
                grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Tablet */
            }
        }

        @media (min-width: 1201px) and (max-width: 1600px) {
            #card-container {
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Desktop normale */
            }
        }

        @media (min-width: 1601px) {
            #card-container {
                grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Schermi grandi */
            }
        }
        .new-banner {
            position: absolute;
            top: -5px;
            left: -5px;
            background: linear-gradient(135deg, #ff4d4d, #f59e0b);
            color: white;
            font-size: 0.6rem;
            font-weight: 800;
            padding: 2px 6px;
            border-radius: 3px;
            z-index: 10;
            box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.3);
            pointer-events: none;
            text-transform: uppercase;
            animation: pulse 2s ease-in-out infinite;
        }
        .donation-box {
            background: linear-gradient(135deg, rgba(19, 24, 41, 0.9) 0%, rgba(26, 31, 58, 0.7) 100%);
            backdrop-filter: blur(30px);
            border: 2px solid;
            border-image: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899) 1;
            border-radius: 24px;
            padding: 20px;
            margin-bottom: 30px;
            text-align: center;
            animation: slideInUp 0.6s ease-out;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }
        .donation-box p {
            font-family: 'Orbitron', sans-serif;
            font-size: 1.1rem;
            background: linear-gradient(135deg, #f1f5f9, #94a3b8);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin: 0 0 20px 0;
            letter-spacing: 1px;
        }
        .donation-actions {
            display: flex;
            justify-content: center;
            gap: 15px;
            align-items: center;
        }
        .kofi-btn {
            background: #00b9fe;
            color: white;
            text-decoration: none;
            padding: 10px 20px;
            border-radius: 12px;
            font-weight: 700;
            font-family: 'Inter', sans-serif;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(0, 185, 254, 0.4);
        }
        .kofi-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 8px 20px rgba(0, 185, 254, 0.6);
            filter: brightness(1.1);
        }
        .news-btn {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            text-decoration: none;
            padding: 10px 20px;
            border-radius: 12px;
            font-weight: 700;
            font-family: 'Inter', sans-serif;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
        }
        .news-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 8px 20px rgba(99, 102, 241, 0.6);
        }
        /* News Page Styles */
        .news-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 40px 20px;
        }
        .news-header {
            text-align: center;
            margin-bottom: 50px;
        }
        .news-item {
            background: linear-gradient(135deg, rgba(19, 24, 41, 0.9) 0%, rgba(26, 31, 58, 0.7) 100%);
            backdrop-filter: blur(20px);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 25px;
            margin-bottom: 30px;
            animation: slideInUp 0.5s ease-out backwards;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        }
        .news-date {
            font-family: 'Orbitron', sans-serif;
            color: var(--primary);
            font-size: 0.9rem;
            margin-bottom: 10px;
            display: block;
        }
        .news-title {
            font-size: 1.5rem;
            font-weight: 800;
            margin-bottom: 15px;
            background: linear-gradient(135deg, var(--text-primary), var(--primary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .news-content {
            color: var(--text-secondary);
            line-height: 1.6;
        }
        .back-btn {
            display: inline-block;
            margin-bottom: 30px;
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        .back-btn:hover {
            color: var(--text-primary);
            transform: translateX(-5px);
        }

        /* Pagination */
        #pagination-controls {
            display: flex;
            justify-content: center;
            gap: 25px;
            align-items: center;
            margin-top: 30px;
            padding: 25px;
            background: linear-gradient(135deg, rgba(19, 24, 41, 0.9) 0%, rgba(26, 31, 58, 0.7) 100%);
            backdrop-filter: blur(30px);
            border-radius: 20px;
            border: 2px solid;
            border-image: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899) 1;
            animation: slideInUp 0.6s ease-out;
        }

        #page-info {
            font-family: 'Orbitron', monospace;
            font-weight: 700;
            font-size: 1.1rem;
            color: var(--primary);
            text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
        }

        /* Modal with epic styling */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.85);
            z-index: 999;
            backdrop-filter: blur(15px);
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal-content {
            background: linear-gradient(135deg, rgba(19, 24, 41, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
            backdrop-filter: blur(30px) saturate(180%);
            margin: 5% auto;
            padding: 40px;
            width: 90%;
            max-width: 700px;
            border-radius: 24px;
            border: 3px solid;
            border-image: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899) 1;
            position: relative;
            animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8),
                        inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }

        .close-btn {
            position: absolute;
            right: 25px;
            top: 20px;
            color: var(--text-secondary);
            font-size: 32px;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            z-index: 99;
        }

        .close-btn:hover {
            color: var(--danger);
            background: rgba(239, 68, 68, 0.2);
            transform: rotate(90deg) scale(1.2);
        }

        .modal-content h2 {
            background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-top: 0;
            font-family: 'Orbitron', sans-serif;
            font-size: 2rem;
            margin-bottom: 25px;
        }

        .modal-content p {
            margin: 20px 0;
            line-height: 1.8;
            color: var(--text-secondary);
        }

        .modal-content strong {
            color: var(--text-primary);
            font-weight: 700;
        }

        /* Loading animation */
        .loading {
            text-align: center;
            padding: 60px;
            color: var(--text-secondary);
            font-size: 1.2rem;
        }

        .spinner {
            width: 60px;
            height: 60px;
            margin: 0 auto 20px;
            border: 4px solid rgba(99, 102, 241, 0.2);
            border-top: 4px solid var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Scrollbar */
        ::-webkit-scrollbar {
            width: 12px;
        }

        ::-webkit-scrollbar-track {
            background: var(--bg-dark);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, var(--primary), var(--secondary));
            border-radius: 10px;
            border: 2px solid var(--bg-dark);
        }

        ::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, var(--secondary), var(--accent));
            box-shadow: 0 0 15px rgba(99, 102, 241, 0.8);
        }

        /* Pokémon Card Details Modal Premium Layout */
        .card-details-modal-content {
            max-width: 950px;
            width: 95%;
            padding: 30px;
            overflow-y: auto;
            max-height: 90vh;
        }

        .card-details-layout {
            display: grid;
            grid-template-columns: 1fr 2fr;
            gap: 35px;
            align-items: start;
        }

        .card-details-left {
            display: flex;
            justify-content: center;
            align-items: center;
            position: sticky;
            top: 0;
        }

        .modal-card-image-container {
            width: 100%;
            max-width: 280px;
            aspect-ratio: 63/88;
            border-radius: 14px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8),
                        0 0 30px rgba(99, 102, 241, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.1);
            overflow: hidden;
            animation: float 4s ease-in-out infinite;
            background: rgba(10, 14, 26, 0.9);
        }

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

        .card-details-right {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        #modal-card-name {
            font-family: 'Orbitron', sans-serif;
            font-size: 2.2rem;
            font-weight: 900;
            margin: 0;
            background: linear-gradient(135deg, #ffffff 30%, #a5b4fc);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
            letter-spacing: 1px;
        }

        .modal-rarity-badge-container {
            display: flex;
            align-items: center;
            margin-top: -5px;
        }

        .modal-metrics-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 15px;
        }

        .modal-metric-item {
            background: rgba(10, 14, 26, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 16px;
            padding: 15px;
            display: flex;
            align-items: center;
            gap: 15px;
            transition: all 0.3s ease;
        }

        .modal-metric-item:hover {
            background: rgba(99, 102, 241, 0.1);
            border-color: rgba(99, 102, 241, 0.3);
            transform: translateY(-2px);
        }

        .modal-metric-emoji {
            font-size: 2rem;
            filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
        }

        .modal-metric-info {
            display: flex;
            flex-direction: column;
        }

        .modal-metric-label {
            font-size: 0.75rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 600;
        }

        .modal-metric-value {
            font-family: 'Orbitron', sans-serif;
            font-size: 1.35rem;
            font-weight: 900;
            color: #ffffff;
            margin-top: 2px;
        }

        .modal-chart-section {
            background: rgba(10, 14, 26, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 18px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .modal-chart-section h3 {
            font-family: 'Inter', sans-serif;
            font-size: 1.1rem;
            font-weight: 800;
            color: var(--text-primary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .modal-chart-container {
            height: 250px;
            width: 100%;
            position: relative;
        }

        /* Mobile overrides at the very bottom to ensure priority */
        @media (max-width: 768px) {
            .card-details-layout {
                grid-template-columns: 1fr !important;
                gap: 25px !important;
            }
            .card-details-left {
                position: relative !important;
                top: auto !important;
                margin-bottom: 10px !important;
            }
        }
