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

        :root {
            --bg-primary: hsl(250, 50%, 5%);
            --text-primary: hsl(0, 0%, 98%);
            --text-muted: hsl(0, 0%, 60%);
            --card-bg: hsl(250, 40%, 8%);
            --border: hsl(250, 30%, 20%);
            
            --primary: hsl(280, 100%, 70%);
            --secondary: hsl(190, 100%, 50%);
            --accent: hsl(320, 100%, 60%);
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            overflow-x: hidden;
            line-height: 1.6;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1rem;
        }

        /* Hero Section */
        .hero {
            position: relative;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .hero-bg {
            position: absolute;
            inset: 0;
            background: linear-gradient(to bottom right, var(--bg-primary), hsl(250, 30%, 15%));
            opacity: 0.5;
        }

        .glow-1 {
            position: absolute;
            top: 25%;
            left: 25%;
            width: 384px;
            height: 384px;
            background: var(--primary);
            border-radius: 50%;
            filter: blur(120px);
            opacity: 0.2;
            animation: float 3s ease-in-out infinite;
        }

        .glow-2 {
            position: absolute;
            bottom: 25%;
            right: 25%;
            width: 384px;
            height: 384px;
            background: var(--secondary);
            border-radius: 50%;
            filter: blur(120px);
            opacity: 0.2;
            animation: float 3s ease-in-out infinite;
            animation-delay: 1s;
        }

        .glow-3 {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 600px;
            height: 600px;
            background: var(--accent);
            border-radius: 50%;
            filter: blur(150px);
            opacity: 0.1;
            animation: glow 2s ease-in-out infinite;
        }

        .hero-content {
            position: relative;
            z-index: 10;
            text-align: center;
            padding: 2rem 1rem;
            animation: fadeInUp 0.6s ease-out;
        }

        .badge {
            display: inline-block;
            padding: 0.5rem 1.5rem;
            margin-bottom: 1.5rem;
            border-radius: 9999px;
            border: 1px solid rgba(186, 130, 254, 0.3);
            background: rgba(186, 130, 254, 0.1);
            color: var(--primary);
            font-size: 0.875rem;
            font-weight: 500;
            backdrop-filter: blur(4px);
        }

        .hero h1 {
            font-size: clamp(3rem, 10vw, 9rem);
            font-weight: 900;
            line-height: 1;
            margin-bottom: 1.5rem;
        }

        .gradient-text {
            background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
            background-size: 300%;
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: gradient 8s ease infinite;
        }

        .hero p {
            font-size: clamp(1.25rem, 2vw, 1.5rem);
            color: var(--text-muted);
            max-width: 48rem;
            margin: 0 auto 3rem;
            line-height: 1.6;
        }

        .hero p .highlight {
            color: var(--primary);
        }

        .button-group {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            align-items: center;
            margin-bottom: 4rem;
        }

        @media (min-width: 640px) {
            .button-group {
                flex-direction: row;
                justify-content: center;
            }
        }

        .btn {
            padding: 1rem 2rem;
            border-radius: 9999px;
            font-weight: 700;
            font-size: 1.125rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
            border: none;
        }

        .btn-primary {
            position: relative;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            color: var(--bg-primary);
            overflow: hidden;
        }

        .btn-primary:hover {
            transform: scale(1.05);
            box-shadow: 0 0 40px rgba(186, 130, 254, 0.6);
        }

        .btn-secondary {
            border: 2px solid var(--secondary);
            color: var(--secondary);
            background: transparent;
        }

        .btn-secondary:hover {
            background: var(--secondary);
            color: var(--bg-primary);
            transform: scale(1.05);
            box-shadow: 0 0 40px rgba(6, 182, 212, 0.6);
        }

        .scroll-indicator {
            position: absolute;
            bottom: 2.5rem;
            left: 50%;
            transform: translateX(-50%);
            animation: bounce 2s infinite;
        }

        .scroll-box {
            width: 1.5rem;
            height: 2.5rem;
            border: 2px solid rgba(186, 130, 254, 0.5);
            border-radius: 9999px;
            display: flex;
            justify-content: center;
            padding-top: 0.5rem;
        }

        .scroll-dot {
            width: 0.25rem;
            height: 0.75rem;
            background: var(--primary);
            border-radius: 9999px;
            animation: glow 2s ease-in-out infinite;
        }

        /* Projects Section */
        .projects {
            padding: 8rem 1rem;
            position: relative;
            overflow: hidden;
        }

        .projects-glow {
            position: absolute;
            top: 0;
            right: 0;
            width: 384px;
            height: 384px;
            background: var(--accent);
            border-radius: 50%;
            filter: blur(120px);
            opacity: 0.1;
        }

        .section-header {
            text-align: center;
            margin-bottom: 5rem;
            animation: fadeInUp 0.6s ease-out;
        }

        .section-title {
            font-size: clamp(3rem, 8vw, 5rem);
            font-weight: 900;
            margin-bottom: 1.5rem;
        }

        .section-description {
            font-size: 1.25rem;
            color: var(--text-muted);
            max-width: 48rem;
            margin: 0 auto;
        }

        .project-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 2rem;
            position: relative;
            z-index: 10;
        }

        @media (min-width: 768px) {
            .project-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (min-width: 1024px) {
            .project-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        .project-card {
            position: relative;
            padding: 2rem;
            background: rgba(30, 20, 60, 0.5);
            backdrop-filter: blur(4px);
            border: 1px solid rgba(186, 130, 254, 0.3);
            border-radius: 1rem;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.5s ease;
            animation: scaleIn 0.5s ease-out;
        }

        .project-card:nth-child(1) { animation-delay: 0s; }
        .project-card:nth-child(2) { animation-delay: 0.1s; }
        .project-card:nth-child(3) { animation-delay: 0.2s; }

        .project-card:hover {
            transform: scale(1.05);
            border-color: rgba(186, 130, 254, 0.5);
            box-shadow: 0 20px 60px -10px rgba(186, 130, 254, 0.2);
        }

        .project-gradient {
            position: absolute;
            inset: 0;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        .project-card:hover .project-gradient {
            opacity: 0.1;
        }

        .gradient-1 {
            background: linear-gradient(135deg, var(--primary), var(--accent));
        }

        .gradient-2 {
            background: linear-gradient(135deg, var(--secondary), var(--primary));
        }

        .gradient-3 {
            background: linear-gradient(135deg, var(--accent), var(--secondary));
        }

        .project-icon {
            width: 3rem;
            height: 3rem;
            margin-bottom: 1rem;
            border-radius: 0.75rem;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.3s ease;
        }

        .project-card:hover .project-icon {
            transform: scale(1.1);
        }

        .project-icon-inner {
            width: 1.5rem;
            height: 1.5rem;
            border: 2px solid var(--bg-primary);
            border-radius: 0.25rem;
        }

        .project-card h3 {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 0.75rem;
            transition: color 0.3s ease;
        }

        .project-card:hover h3 {
            color: var(--primary);
        }

        .project-card p {
            color: var(--text-muted);
            margin-bottom: 1.5rem;
        }

        .tech-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .tech-tag {
            padding: 0.25rem 0.75rem;
            font-size: 0.75rem;
            font-weight: 500;
            border-radius: 9999px;
            background: hsl(250, 30%, 15%);
            color: var(--text-primary);
            border: 1px solid var(--border);
            transition: border-color 0.3s ease;
        }

        .project-card:hover .tech-tag {
            border-color: rgba(186, 130, 254, 0.3);
        }

        .project-glow {
            position: absolute;
            inset: -4px;
            background: linear-gradient(135deg, var(--primary), var(--accent), var(--secondary));
            filter: blur(40px);
            opacity: 0;
            transition: opacity 0.3s ease; /* Togli transition sul background */
            pointer-events: none; /* Importante! */
        }

        .project-card:hover .project-glow {
            opacity: 0.8; /* Aumenta un po' l'opacità */
        }

        .project-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(
                600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
                rgba(186, 130, 254, 0.15),
                transparent 40%
            );
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .project-card:hover::before {
            opacity: 1;
        }
        /* Skills Section */
        .skills {
            padding: 8rem 1rem;
            position: relative;
        }

        .skills-glow {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 384px;
            height: 384px;
            background: var(--secondary);
            border-radius: 50%;
            filter: blur(120px);
            opacity: 0.1;
        }

        .skills-container {
            max-width: 56rem;
            margin: 0 auto;
            position: relative;
            z-index: 10;
        }

        .skill-item {
            margin-bottom: 2rem;
            animation: fadeInUp 0.6s ease-out;
        }

        .skill-item:nth-child(1) { animation-delay: 0s; }
        .skill-item:nth-child(2) { animation-delay: 0.1s; }
        .skill-item:nth-child(3) { animation-delay: 0.2s; }
        .skill-item:nth-child(4) { animation-delay: 0.3s; }
        .skill-item:nth-child(5) { animation-delay: 0.4s; }
        .skill-item:nth-child(6) { animation-delay: 0.5s; }

        .skill-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.75rem;
        }

        .skill-name {
            font-size: 1.125rem;
            font-weight: 700;
        }

        .skill-level {
            font-size: 1.125rem;
            font-weight: 700;
            color: var(--primary);
        }

        .skill-bar-bg {
            height: 0.75rem;
            background: hsl(250, 30%, 15%);
            border-radius: 9999px;
            overflow: hidden;
            position: relative;
        }

        .skill-bar {
            height: 100%;
            background: linear-gradient(135deg, var(--primary), var(--accent), var(--secondary));
            border-radius: 9999px;
            position: relative;
            transition: width 1s ease-out;
        }

        .skill-bar::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            background-size: 300%;
            animation: gradient 8s ease infinite;
        }

        .skill-bar-glow {
            position: absolute;
            top: 0;
            height: 100%;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            filter: blur(8px);
            opacity: 0.5;
            transition: width 1s ease-out;
        }

        /* Contact Section */
        .contact {
            padding: 8rem 1rem;
            position: relative;
            overflow: hidden;
        }

        .contact-glow {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 800px;
            height: 800px;
            background: var(--primary);
            border-radius: 50%;
            filter: blur(150px);
            opacity: 0.1;
            animation: glow 2s ease-in-out infinite;
        }

        .contact-content {
            max-width: 56rem;
            margin: 0 auto;
            text-align: center;
            position: relative;
            z-index: 10;
            animation: fadeInUp 0.6s ease-out;
        }

        .contact h2 {
            font-size: clamp(3rem, 10vw, 6rem);
            font-weight: 900;
            line-height: 1.1;
            margin-bottom: 2rem;
        }

        .contact h2 .subtitle {
            display: block;
            margin-top: 0.5rem;
        }

        .contact-description {
            font-size: clamp(1.25rem, 2vw, 1.5rem);
            color: var(--text-muted);
            margin-bottom: 3rem;
            max-width: 48rem;
            margin-left: auto;
            margin-right: auto;
        }

        .contact-buttons {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            justify-content: center;
            margin-bottom: 4rem;
        }

        @media (min-width: 640px) {
            .contact-buttons {
                flex-direction: row;
            }
        }

        .contact-buttons .btn {
            padding: 1.25rem 2.5rem;
        }

        .social-links {
            display: flex;
            justify-content: center;
            gap: 2rem;
            color: var(--text-muted);
        }

        .social-links a {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 1.125rem;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .social-links a:hover {
            transform: scale(1.1);
        }

        .social-links a svg {
            width: 2rem;
            height: 2rem;
        }

        .social-links a:nth-child(1):hover { color: var(--primary); }
        .social-links a:nth-child(2):hover { color: var(--accent); }
        .social-links a:nth-child(3):hover { color: var(--secondary); }

        .contact-buttons .btn-secondary {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            justify-content: center;
        }

        .contact-buttons .btn-secondary svg {
            width: 1.5rem;
            height: 1.5rem;
        }

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

        @keyframes glow {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

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

        @keyframes fadeInUp {
            0% {
                opacity: 0;
                transform: translateY(30px);
            }
            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes scaleIn {
            0% {
                opacity: 0;
                transform: scale(0.9);
            }
            100% {
                opacity: 1;
                transform: scale(1);
            }
        }

        @keyframes bounce {
            0%, 100% {
                transform: translateX(-50%) translateY(0);
            }
            50% {
                transform: translateX(-50%) translateY(-10px);
            }
        }

        * {
            cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="8" fill="%23ba82fe" opacity="0.6"/><circle cx="16" cy="16" r="4" fill="%23ba82fe"/></svg>') 16 16, auto !important;
        }

        a, button, .project-card, .btn, .social-links a {
            cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="10" fill="%23ba82fe"/><circle cx="16" cy="16" r="5" fill="white"/></svg>') 16 16, pointer !important;
        }
        @font-face {
            font-family: 'BBH Sans Hegarty';
            src: url('BBHSansHegarty-Regular.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
            font-display: swap; /* Aggiungi questo */
        }

        body {
            font-family: 'BBH Sans Hegarty', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        * {
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
        }

        /* Forza rendering GPU per elementi nitidi */
        .hero-content, .project-card, .section-title {
            transform: translateZ(0);
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }

        /* About Section */
        .about {
            padding: 8rem 1rem;
            position: relative;
            overflow: hidden;
        }

        .about-glow {
            position: absolute;
            top: 50%;
            left: 20%;
            width: 500px;
            height: 500px;
            background: var(--accent);
            border-radius: 50%;
            filter: blur(120px);
            opacity: 0.1;
            animation: float 4s ease-in-out infinite;
        }

        .about-content {
            max-width: 56rem;
            margin: 0 auto;
            position: relative;
            z-index: 10;
        }

        .about-text {
            animation: fadeInUp 0.6s ease-out;
        }

        .about-text h2 {
            margin-bottom: 2rem;
        }

        .about-text p {
            font-size: 1.25rem;
            color: var(--text-muted);
            line-height: 1.8;
            margin-bottom: 1.5rem;
        }

        .about-text p:last-child {
            margin-bottom: 0;
        }

        /* Floating Badges */
        .floating-badge {
            position: absolute;
            z-index: 5;
            animation: floatDiagonal 8s ease-in-out infinite;
        }

        .floating-badge a {
            display: inline-block;
            padding: 0.75rem 1.5rem;
            border-radius: 9999px;
            border: 1px solid rgba(186, 130, 254, 0.3);
            background: rgba(186, 130, 254, 0.1);
            backdrop-filter: blur(8px);
            color: var(--primary);
            font-size: 0.875rem;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s ease;
            white-space: nowrap;
        }

        .floating-badge a:hover {
            background: rgba(186, 130, 254, 0.2);
            border-color: rgba(186, 130, 254, 0.6);
            transform: scale(1.1);
            box-shadow: 0 0 20px rgba(186, 130, 254, 0.4);
        }

        /* Posizioni diverse per ogni badge */
        .floating-badge-1 {
            top: 20%;
            right: 10%;
            animation-delay: 0s;
        }

        .floating-badge-2 {
            bottom: 30%;
            left: 8%;
            animation-delay: 2s;
        }

        .floating-badge-3 {
            top: 60%;
            right: 15%;
            animation-delay: 4s;
        }

        /* Animazione diagonale */
        @keyframes floatDiagonal {
            0%, 100% {
                transform: translate(0, 0);
            }
            25% {
                transform: translate(-20px, -30px);
            }
            50% {
                transform: translate(20px, 20px);
            }
            75% {
                transform: translate(-15px, 25px);
            }
        }

        h1, h2, h3, .section-title {
            text-shadow: 0 0 1px rgba(0, 0, 0, 0.01);
            -webkit-font-smoothing: antialiased;
        }



        /* Riduci i blur */
        .glow-1, .glow-2, .glow-3 {
            filter: blur(100px); /* Era 120px */
        }

        .project-card {
            backdrop-filter: blur(2px); /* Era 4px */
        }

        .badge {
            backdrop-filter: blur(2px); /* Era 4px */
        }

        :root {
            --bg-primary: hsl(250, 50%, 7%); /* Era 5% */
            --text-primary: hsl(0, 0%, 100%); /* Era 98% */
        }

        @media screen and (-webkit-min-device-pixel-ratio:0) {
        body {
            -webkit-font-smoothing: subpixel-antialiased;
            font-smooth: always;
            }
        }

        /* Fallback fonts migliori per Linux */
        body {
            font-family: 'BBH Sans Hegarty', 'Inter', 'Roboto', 'Ubuntu', 'Cantarell', sans-serif;
        }

        /* Modal fullscreen per iframe */
        .modal-fullscreen {
            max-width: 95vw;
            max-height: 95vh;
            display: flex;
            flex-direction: column;
        }

        .modal-header-mini {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border);
            flex-wrap: wrap;
        }

        .modal-header-mini h3 {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--primary);
            margin: 0;
        }

        /* Device switcher */
        .device-switcher {
            display: flex;
            gap: 0.5rem;
            background: rgba(186, 130, 254, 0.1);
            padding: 0.25rem;
            border-radius: 0.5rem;
            margin-left: auto;
        }

        .device-btn {
            padding: 0.5rem;
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            border-radius: 0.375rem;
            transition: all 0.2s ease;
        }

        .device-btn:hover {
            color: var(--primary);
            background: rgba(186, 130, 254, 0.1);
        }

        .device-btn.active {
            color: var(--primary);
            background: rgba(186, 130, 254, 0.2);
        }

        .open-external {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: rgba(186, 130, 254, 0.1);
            border: 1px solid rgba(186, 130, 254, 0.3);
            border-radius: 0.5rem;
            color: var(--primary);
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 600;
            transition: all 0.2s ease;
        }

        .open-external:hover {
            background: rgba(186, 130, 254, 0.2);
            transform: translateY(-2px);
        }

        /* Browser mockup */
        .iframe-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: var(--bg-primary);
        }

        .browser-bar {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.75rem 1rem;
            background: rgba(30, 20, 60, 0.5);
            border-bottom: 1px solid var(--border);
        }

        .browser-dots {
            display: flex;
            gap: 0.5rem;
        }

        .browser-dots span {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--border);
        }

        .browser-dots span:nth-child(1) { background: #ff5f57; }
        .browser-dots span:nth-child(2) { background: #febc2e; }
        .browser-dots span:nth-child(3) { background: #28c840; }

        .browser-url {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 0.5rem;
            font-size: 0.875rem;
            color: var(--text-muted);
        }

        .browser-url svg {
            flex-shrink: 0;
        }

        /* Iframe container con device sizes */
        .iframe-wrapper iframe {
            flex: 1;
            width: 100%;
            height: 100%;
            border: none;
            background: white;
        }

        /* Device sizes */
        .iframe-wrapper.tablet iframe {
            max-width: 768px;
            margin: 0 auto;
        }

        .iframe-wrapper.mobile iframe {
            max-width: 375px;
            margin: 0 auto;
        }

        /* Modal footer */
        .modal-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border);
            gap: 1rem;
            flex-wrap: wrap;
        }

        .btn-sm {
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
        }

        /* Mobile */
        @media (max-width: 768px) {
            .device-switcher {
                display: none;
            }
            
            .modal-header-mini {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .open-external {
                width: 100%;
                justify-content: center;
            }
        }

        /* Magnetic buttons enhancement */
        .btn, .project-card {
            will-change: transform;
        }

        .btn:hover {
            z-index: 100;
        }

        /* Glow più forte al movimento */
        .btn-primary:hover {
            box-shadow: 0 0 50px rgba(186, 130, 254, 0.8);
        }

        .btn-secondary:hover {
            box-shadow: 0 0 50px rgba(6, 182, 212, 0.8);
        }

        /* Sound Toggle */
        .sound-toggle {
            position: fixed;
            top: 2rem;
            right: 2rem;
            z-index: 1000;
            width: 3rem;
            height: 3rem;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(186, 130, 254, 0.1);
            border: 1px solid rgba(186, 130, 254, 0.3);
            border-radius: 50%;
            color: var(--primary);
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(8px);
        }

        .sound-toggle:hover {
            background: rgba(186, 130, 254, 0.2);
            transform: scale(1.1);
            box-shadow: 0 0 20px rgba(186, 130, 254, 0.4);
        }

        .sound-toggle.muted {
            color: var(--text-muted);
            border-color: var(--border);
        }

/* Welcome Screen */
        .welcome-screen {
            position: fixed;
            inset: 0;
            z-index: 99999;
            background: var(--bg-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 1;
            transition: opacity 0.8s ease;
        }

        .welcome-screen.fade-out {
            opacity: 0;
            pointer-events: none;
        }

        .welcome-content {
            text-align: center;
            animation: welcomeFadeIn 1s ease-out;
        }

        .welcome-logo {
            margin-bottom: 2rem;
            overflow: hidden;
        }

        .logo-text {
            font-size: clamp(4rem, 15vw, 10rem);
            font-weight: 900;
            background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
            background-size: 300%;
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: welcomeGradient 3s ease infinite, welcomeScale 1.5s ease-out;
        }

        .welcome-tagline {
            font-size: 1.5rem;
            color: var(--text-muted);
            margin-bottom: 3rem;
            min-height: 2rem; /* Per evitare jump */
        }

        .welcome-tagline::after {
            content: '|';
            animation: blink 1s step-end infinite;
            margin-left: 0.1em;
        }

        /* Loading Bar */
        .loading-bar {
            width: 300px;
            height: 3px;
            background: rgba(186, 130, 254, 0.2);
            border-radius: 9999px;
            overflow: hidden;
            margin: 0 auto;
            opacity: 0;
            animation: welcomeFadeIn 1s ease-out 2s forwards;
        }

        .loading-progress {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
            background-size: 200%;
            border-radius: 9999px;
            width: 0%;
            animation: loadingProgress 1.5s ease-out 2s forwards, welcomeGradient 2s ease infinite;
        }

        /* Animations */
        @keyframes welcomeFadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

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

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

        @keyframes loadingProgress {
            0% {
                width: 0%;
            }
            100% {
                width: 100%;
            }
        }

        @keyframes blink {
            0%, 50% {
                opacity: 1;
            }
            51%, 100% {
                opacity: 0;
            }
        }

        .scorrimento {
            width: 100%;
            overflow: hidden;
            white-space: nowrap;
        }

        .scorrimento span {
            display: inline-block;
            padding-left: 100%;
            animation: scorrere 10s linear infinite;
        } 

        @keyframes scorrere {
            0% { transform: translateX(0); }
            100% { transform: translateX(-100%); }
        }
