        :root {
            --bg: #000000;
            --text-main: #f5f5f7;
            --text-muted: #86868b;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background-color: var(--bg);
            color: var(--text-main);
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
        }

        /* TIPOGRAFIA */
        h1 {
            font-size: clamp(3.5rem, 8vw, 8rem);
            font-weight: 800;
            letter-spacing: -0.04em;
            line-height: 1.05;
        }

        h2 {
            font-size: clamp(2.5rem, 6vw, 6rem);
            font-weight: 700;
            letter-spacing: -0.03em;
            line-height: 1.1;
        }

        p {
            font-size: clamp(1.2rem, 2vw, 1.8rem);
            color: var(--text-muted);
            font-weight: 500;
            line-height: 1.4;
        }

        .gradient-text {
            background: linear-gradient(135deg, #ffffff 0%, #86868b 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* NAVBAR */
        nav {
            position: fixed;
            top: 0;
            width: 100%;
            padding: 20px 5vw;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 100;
            mix-blend-mode: difference;
            /* Rimane visibile sia su bianco che su nero */
        }

        .logo-text {
            font-weight: 700;
            font-size: 1.2rem;
            letter-spacing: -0.02em;
        }

        .nav-contact-btn {
            background: #eee;
            color: #000;
            padding: 8px 20px;
            border-radius: 20px;
            text-decoration: none;
            font-weight: 600;
            font-size: 0.9rem;
            transition: transform 0.3s ease;
        }

        .nav-ai-btn {
            color: #ccc;
            text-decoration: none;
            font-weight: 500;
            font-size: 0.9rem;
            transition: color 0.3s ease;
        }

        .nav-ai-btn:hover {
            color: #eee;
        }

        .nav-contact-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 0 20px rgba(245, 245, 247, 0.3);
        }

        /* HERO SECTION */
        .hero {
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
        }

        .hero-logo {
            width: 100%;
            max-width: 400px;
            margin-bottom: 2rem;
            overflow: visible;
        }

        .hero-bg-video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: -1;
            opacity: 0.15;
            /* Teniamo l'opacità bassa per un effetto super premium */
            pointer-events: none;
        }

        /* Setup per animare il logo disegnandolo e creare l'effetto neon */
        #logo-path {
            stroke-dasharray: 400;
            stroke-dashoffset: 400;
            filter: drop-shadow(0 0 8px rgba(245, 245, 247, 0.4)) drop-shadow(0 0 16px rgba(245, 245, 247, 0.2));
        }

        .logo-text-domain,
        .logo-text-payoff {
            opacity: 0;
            transform: translateY(10px);
        }

        /* SEZIONE TEXT REVEAL (Effetto illuminazione testo a step) */
        .reveal-section {
            height: 500vh;
            /* Aumentato ulteriormente per 3 step completi */
            position: relative;
        }

        .reveal-sticky {
            position: sticky;
            top: 0;
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 10vw;
            overflow: hidden;
        }

        .reveal-text {
            position: absolute;
            top: 50%;
            left: 50%;
            font-size: clamp(2.5rem, 5.5vw, 4.5rem);
            letter-spacing: -0.03em;
            line-height: 1.1;
            text-align: center;
            max-width: 1200px;
            width: 100%;
            opacity: 0;
            /* Lo animiamo con GSAP */
            visibility: hidden;
            /* Evita sovrapposizioni invisibili sui bottoni */
        }

        .reveal-thin {
            font-size: clamp(2.0rem, 4.5vw, 3.5rem);
            font-weight: 200;
            letter-spacing: -0.03em;
            line-height: 1;
            text-align: center;
        }

        .reveal-paragraph-container {
            position: relative;
            max-width: 1000px;
            width: 100%;
            min-height: 160px;
            /* Evita il collasso della sezione per il testo più grande */
        }


        .font-thin {
            font-weight: 200;
        }

        /* SERVICES (Immersive Sticky Cards) */
        .services-container {
            padding: 5vh 5vw;
            position: relative;
            padding-bottom: 20vh;
            /* Spazio extra per lo scroll finale */
        }

        .service-card {
            position: sticky;
            top: 10vh;
            /* Ferma la carta sotto l'header */
            height: 80vh;
            width: 100%;
            border-radius: 40px;
            overflow: hidden;
            margin-bottom: 5vh;
            display: flex;
            align-items: flex-end;
            /* Testo in basso */
            padding: 5vw;
            background: #000;
            box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.8);
            /* Ombra marcata tra le carte */
            transform-origin: center center;
            will-change: transform, filter;
            border: 1px solid rgba(255, 255, 255, 0.05);
            /* Parallax 3D config */
            transform-style: preserve-3d;
            perspective: 1000px;
        }

        .card-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 0;
            filter: brightness(0.6);
            transition: filter 0.5s;
        }

        .service-card:hover .card-bg {
            filter: brightness(0.4);
        }

        .card-content {
            position: relative;
            z-index: 2;
            max-width: 800px;
        }

        .card-title {
            font-size: clamp(3rem, 5vw, 6rem);
            font-weight: 800;
            letter-spacing: -0.04em;
            line-height: 1.1;
            margin-bottom: 1.5rem;
        }

        .card-desc {
            font-size: 1.25rem;
            color: #ddd;
            line-height: 1.6;
            max-width: 600px;
        }

        .huge-bg-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) translateZ(-50px);
            font-size: clamp(8rem, 20vw, 25rem);
            font-weight: 800;
            color: rgba(255, 255, 255, 0.03);
            pointer-events: none;
            z-index: 1;
            margin: 0;
            line-height: 1;
        }

        /* CASE STUDY 3D */
        .case-study-3d {
            height: 300vh;
            /* Permette uno scroll lungo per animare il 3D */
            background: #050505;
            /* Un nero leggermente meno profondo per far risaltare il modello */
            position: relative;
            z-index: 5;
        }

        .case-3d-sticky {
            position: sticky;
            top: 0;
            height: 100vh;
            width: 100%;
            overflow: hidden;
            display: flex;
            align-items: center;
        }

        #canvas-3d {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            outline: none;
        }

        .case-3d-content {
            position: relative;
            z-index: 2;
            padding: 5vw;
            pointer-events: none;
        }

        .case-3d-title {
            font-size: clamp(3rem, 5vw, 6rem);
            font-weight: 800;
            letter-spacing: -0.04em;
            line-height: 1.1;
            margin-bottom: 1.5rem;
            text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
        }

        .case-3d-desc {
            font-size: 1.25rem;
            color: #ccc;
            line-height: 1.6;
            text-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
        }

        /* SEZIONE ESPANSIONE (L'effetto Box Apple) */
        .expand-section {
            height: 250vh;
            position: relative;
            background-color: #000;
        }

        .expand-sticky {
            position: sticky;
            top: 0;
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            background-color: #000;
        }

        .expand-media {
            width: 35vw;
            height: 45vh;
            border-radius: 50px;
            overflow: hidden;
            position: relative;
            z-index: 1;
            background-color: #ffffff;
        }

        .expand-media img,
        .expand-video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            position: relative;
            z-index: 1;

        }

        .expand-text {
            position: absolute;
            bottom: 10vh;
            width: 100%;
            z-index: 2;
            font-size: clamp(4rem, 10vw, 12rem);
            font-weight: 800;
            letter-spacing: -0.05em;
            color: #000;
            z-index: 0;
            /* Rimettiamo 2 per stare sopra al video */
            /* mix-blend-mode: difference; */
            text-align: center;
        }

        /* FOOTER CTA */
        .cta-section {
            padding-top: 10em;
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            position: relative;
        }

        .cta-title {
            font-size: clamp(3rem, 8vw, 7rem);
            font-weight: 800;
            letter-spacing: -0.05em;
            margin-bottom: 1rem;
        }

        .btn {
            display: inline-block;
            margin-top: 2rem;
            padding: 1.2rem 3.5rem;
            background: var(--text-main);
            color: var(--bg);
            border-radius: 50px;
            text-decoration: none;
            font-weight: 600;
            font-size: 1.2rem;
            transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        }

        .btn:hover {
            transform: scale(1.05);
            box-shadow: 0 0 30px rgba(245, 245, 247, 0.2);
        }

        .cta-reminder {
            margin-top: 3rem;
            font-size: clamp(1rem, 1.5vw, 1.2rem);
            color: var(--text-muted);
            letter-spacing: 0.02em;
        }

        .cta-element {
            opacity: 0;
            transform: translateY(40px);
        }

        /* PORTFOLIO: WEB (Mac Window UI) */
        .portfolio-web {
            padding: 10vh 5vw;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        .mac-window {
            width: 100%;
            max-width: 1400px;
            background: #111;
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
        }

        .mac-header {
            background: #222;
            padding: 15px 20px;
            display: flex;
            align-items: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .mac-buttons {
            display: flex;
            gap: 8px;
            margin-right: 30px;
        }

        .mac-btn {
            width: 12px;
            height: 12px;
            border-radius: 50%;
        }

        .mac-btn.close {
            background: #ff5f56;
        }

        .mac-btn.min {
            background: #ffbd2e;
        }

        .mac-btn.max {
            background: #27c93f;
        }

        .mac-tabs {
            display: flex;
            gap: 10px;
            overflow-x: auto;
        }

        .mac-tabs::-webkit-scrollbar {
            display: none;
        }

        .mac-tab {
            padding: 8px 20px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            font-size: 0.9rem;
            color: #888;
            cursor: pointer;
            transition: all 0.3s;
            white-space: nowrap;
        }

        .mac-tab:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
        }

        .mac-tab:active {
            background: rgba(255, 255, 255, 0.15);
        }

        .mac-tab.active {
            background: rgba(255, 255, 255, 0.15);
            color: #fff;
            font-weight: 600;
            /* Rimuoviamo lo scale fisso per la tab selezionata, altrimenti sballa l'impaginazione */
        }

        .mac-body {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 9;
            background: #000;
        }

        .mac-content {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.4s ease, visibility 0.4s ease;
            overflow-y: auto;
            overflow-x: hidden;
        }

        /* Scrollbar in stile Mac */
        .mac-content::-webkit-scrollbar {
            width: 8px;
        }

        .mac-content::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.02);
        }

        .mac-content::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.15);
            border-radius: 10px;
        }

        .mac-content::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .mac-content.active {
            opacity: 1;
            visibility: visible;
        }

        .mac-img {
            width: 100%;
            height: auto;
            display: block;
        }

        /* PORTFOLIO: MEDIA (Horizontal Scroll) */
        .portfolio-media {
            height: 500vh;
            /* Più spazio = scroll molto più lento e immersivo */
            background: #000;
            position: relative;
        }

        .media-sticky {
            position: sticky;
            top: 0;
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            overflow: hidden;
        }

        .media-section-title {
            padding: 0 5vw;
            font-size: clamp(3rem, 5vw, 5rem);
            margin-bottom: 3rem;
            margin-top: 2rem;
        }

        .media-track {
            display: flex;
            gap: 4vw;
            /* 50vw di padding fa in modo che la prima card inizi fuori centro a destra, 
               così deve scorrere per arrivare al centro (e attivare lo zoom) */
            padding: 0 50vw;
            width: max-content;
        }

        .media-card {
            width: 60vw;
            max-width: 900px;
            flex-shrink: 0;
        }

        .media-card-inner {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 9;
            border-radius: 20px;
            overflow: hidden;
            background: #111;
            cursor: pointer;
        }

        .media-card-inner img,
        .media-card-inner video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
        }

        .play-btn {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 80px;
            height: 80px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: white;
            transition: background 0.3s, transform 0.3s;
        }

        .media-card-inner:hover .play-btn {
            background: rgba(255, 255, 255, 0.3);
            transform: translate(-50%, -50%) scale(1.1);
        }

        /* APPLE VOLUME CONTROL */
        #apple-volume-control {
            position: fixed;
            right: 30px;
            top: 50%;
            transform: translateY(-50%) translateX(100px);
            opacity: 0;
            visibility: hidden;
            z-index: 9999;
            /* Sfondo e bordo originali rimossi per delegarli a ::after e ::before */
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-radius: 40px;
            overflow: hidden;
            /* Taglia l'animazione al bordo */
            padding: 20px 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
            transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease, visibility 0.5s;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        }

        /* Effetto scia luminosa AI (Bordo Rotante) */
        #apple-volume-control::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 150%;
            height: 150%;
            /* Una scia che sfuma: grigio base -> blu -> fucsia brillante */
            background: conic-gradient(from 0deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.1) 60%, #8c9eff 85%, #ff80ab 100%);
            animation: ai-border-spin 3s linear infinite;
            z-index: -2;
            filter: blur(15px);
            /* Ammorbidisce il taglio netto del raggio, creando un effetto glow/sfumato naturale */
        }

        /* Sfondo scuro interno che "buca" l'animazione lasciando solo il bordo */
        #apple-volume-control::after {
            content: '';
            position: absolute;
            inset: 2px;
            /* Spessore del bordo colorato (2px) */
            border-radius: 38px;
            /* Un po' meno del raggio esterno */
            background: rgba(40, 40, 40, 0.7);
            z-index: -1;
        }

        @keyframes ai-border-spin {
            from {
                transform: translate(-50%, -50%) rotate(0deg);
            }

            to {
                transform: translate(-50%, -50%) rotate(360deg);
            }
        }

        #apple-volume-control.visible {
            transform: translateY(-50%) translateX(0);
            opacity: 1;
            visibility: visible;
        }

        #volume-mute-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.3s, transform 0.2s;
            color: #fff;
        }

        #volume-mute-btn:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: scale(1.05);
        }

        .volume-slider-wrapper {
            height: 150px;
            display: flex;
            justify-content: center;
        }

        #volume-slider {
            -webkit-appearance: slider-vertical;
            appearance: slider-vertical;
            width: 15px;
            height: 150px;
            background: transparent;
            cursor: pointer;
            outline: none;
            accent-color: #ffffff;
            /* Rimuove il viola di default del browser */
        }

        .media-card h4 {
            margin-top: 1.5rem;
            font-size: 1.8rem;
            font-weight: 600;
            letter-spacing: -0.02em;
        }

        /* CLASSI INIZIALI PER GSAP */
        .fade-up,
        .fade-up-hero {
            opacity: 0;
            transform: translateY(50px);
        }

        @media (max-width: 900px) {

            .service-block,
            .service-block:nth-child(even) {
                flex-direction: column;
                margin-bottom: 15vh;
                text-align: center;
            }

            .service-media {
                width: 100%;
                height: 50vh;
            }

            .expand-media {
                width: 80vw;
                height: 40vh;
            }

            .mac-body {
                aspect-ratio: auto;
                height: 60vh;
            }

            .ai-architect-container {
                padding: 0 5vw;
            }
        }

        /* AI PROJECT ARCHITECT UI */
        .ai-architect-container {
            max-width: 800px;
            margin: 0 auto;
            text-align: left;
        }

        .ai-subtitle {
            font-size: 1.25rem;
            color: #aaa;
            margin-bottom: 3rem;
            line-height: 1.6;
        }

        .ai-form {
            position: relative;
            margin-bottom: 2rem;
        }

        #ai-idea-input {
            width: 100%;
            height: 150px;
            background: #111;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 1.5rem;
            color: #fff;
            font-size: 1.1rem;
            font-family: 'Inter', sans-serif;
            resize: none;
            transition: border-color 0.3s;
        }

        #ai-idea-input:focus {
            outline: none;
            border-color: rgba(255, 255, 255, 0.5);
        }

        #ai-analyze-btn {
            margin-top: 1rem;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            background: #fff;
            color: #000;
            padding: 15px;
            border-radius: 30px;
            font-size: 1.1rem;
            font-weight: 700;
            border: none;
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s;
        }

        #ai-analyze-btn:hover {
            transform: scale(1.02);
            box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
        }

        /* CHAT UI STYLES */
        .ai-chat-container {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            margin-top: 2rem;
        }

        .chat-bubble {
            display: flex;
            gap: 15px;
            max-width: 90%;
            opacity: 0;
            transform: translateY(20px);
            animation: slideUpFade 0.5s forwards cubic-bezier(0.25, 1, 0.5, 1);
        }

        @keyframes slideUpFade {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes drawLogo {
            to {
                stroke-dashoffset: 0;
            }
        }

        /* GLOBAL LOADER */
        .global-loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: #000;
            z-index: 10000;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: opacity 0.8s ease, transform 0.8s ease, visibility 0.8s;
        }

        #logo-path {
            stroke-dasharray: 400;
            stroke-dashoffset: 400;
            animation: drawLogo 2s infinite alternate ease-in-out;
        }

        .loader-progress-text {
            color: #888;
            font-size: 0.9rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }

        #loader-percent {
            color: #fff;
            font-weight: bold;
        }

        .user-bubble {
            align-self: flex-end;
            flex-direction: row-reverse;
        }

        .ai-bubble {
            align-self: flex-start;
        }

        .chat-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.8rem;
            font-weight: 700;
        }

        .user-avatar {
            background: #fff;
            color: #000;
        }

        .ai-avatar {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .chat-message {
            padding: 1.2rem 1.5rem;
            border-radius: 20px;
            font-size: 1.05rem;
            line-height: 1.6;
        }

        .user-bubble .chat-message {
            background: #222;
            color: #fff;
            border-bottom-right-radius: 4px;
        }

        .ai-bubble .chat-message {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #e0e0e0;
            border-bottom-left-radius: 4px;
        }

        .typing-indicator {
            display: flex;
            gap: 5px;
            padding: 5px 0;
        }

        .typing-indicator span {
            width: 8px;
            height: 8px;
            background: rgba(255, 255, 255, 0.5);
            border-radius: 50%;
            animation: bounce 1.4s infinite ease-in-out both;
        }

        .typing-indicator span:nth-child(1) {
            animation-delay: -0.32s;
        }

        .typing-indicator span:nth-child(2) {
            animation-delay: -0.16s;
        }

        @keyframes bounce {

            0%,
            80%,
            100% {
                transform: scale(0);
            }

            40% {
                transform: scale(1);
            }
        }

        .ai-response-text strong {
            color: #fff;
        }

        .ai-response-text ul {
            padding-left: 1.5rem;
            margin: 1rem 0;
        }

        .ai-response-text li {
            margin-bottom: 0.5rem;
        }

        .error-message {
            color: #ff5f56 !important;
            font-weight: 500;
        }

        .secondary-btn {
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: #fff;
            padding: 12px 24px;
            border-radius: 30px;
            text-decoration: none;
            display: inline-block;
            transition: all 0.3s ease;
        }

        .secondary-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
        }

        /* CUSTOM CURSOR */
        body.custom-cursor-active * {
            cursor: none !important;
        }

        .cursor {
            position: fixed;
            top: 0;
            left: 0;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            pointer-events: none;
            z-index: 99999;
            transform: translate(-50%, -50%);
            transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), height 0.3s cubic-bezier(0.25, 1, 0.5, 1);

            /* Effetto Lente in Vetro (Apple visionOS style) */
            background-color: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(4px) saturate(150%);
            -webkit-backdrop-filter: blur(4px) saturate(150%);
            box-shadow:
                inset 0 0 0 1px rgba(255, 255, 255, 0.2),
                inset 0 2px 5px rgba(255, 255, 255, 0.1),
                0 4px 10px rgba(0, 0, 0, 0.2);

            display: none;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 700;
            font-size: 14px;
            letter-spacing: 0.05em;
        }

        body.custom-cursor-active .cursor {
            display: flex;
        }

        body.custom-cursor-active .play-btn {
            display: none;
            /* Nasconde il bottone play nativo se c'è il cursore custom */
        }

        .cursor.hover {
            width: 60px;
            height: 60px;
            background-color: rgba(255, 255, 255, 0.1);
            /* Sfocatura aumentata e luminosità per dare l'effetto di refrazione della lente */
            backdrop-filter: blur(0px) saturate(180%) brightness(1.5);
            -webkit-backdrop-filter: blur(0px) saturate(180%) brightness(1.5);
            box-shadow:
                inset 0 0 0 1.5px rgba(255, 255, 255, 0.3),
                inset 0 10px 20px rgba(255, 255, 255, 0.15),
                0 15px 30px rgba(0, 0, 0, 0.5);
        }

        .cursor.play {
            width: 45px;
            height: 45px;
            background-color: #fff;
            mix-blend-mode: difference;
            border-radius: 0;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            box-shadow: none;
            clip-path: polygon(15% 10%, 15% 90%, 95% 50%);
        }

        .cursor.pause {
            width: 40px;
            height: 40px;
            background-color: #fff;
            mix-blend-mode: difference;
            border-radius: 0;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            box-shadow: none;
            /* Due rettangoli usando clip-path sovrapposto o semplicemente polygon uniti al bordo superiore (non visibile per 0%) */
            clip-path: polygon(10% 0, 40% 0, 40% 100%, 10% 100%, 10% 0, 60% 0, 90% 0, 90% 100%, 60% 100%, 60% 0);
        }

        /* Chat History Scrollabile */
        .chat-history {
            max-height: 50vh;
            overflow-y: auto;
            padding-right: 10px;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .chat-history::-webkit-scrollbar {
            width: 5px;
        }

        .chat-history::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
        }

        .chat-history::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 5px;
        }

        /* Area Input Chat */
        .chat-input-area {
            display: flex;
            gap: 10px;
            align-items: center;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 30px;
            padding: 5px 5px 5px 20px;
            margin-top: 1rem;
        }

        .chat-input-area input {
            flex: 1;
            background: transparent;
            border: none;
            color: #fff;
            font-size: 1rem;
            outline: none;
            font-family: inherit;
        }

        .chat-input-area input::placeholder {
            color: rgba(255, 255, 255, 0.3);
        }

        .chat-send-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #fff;
            color: #000;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: transform 0.2s;
            flex-shrink: 0;
        }

        .chat-send-btn:hover {
            transform: scale(1.05);
        }