/* =========================================================================
   UTOPIA 3026 — Masterclass Final Styles (Redesign Completo)
   ========================================================================= */

:root {
    --primary: #0066ff;
    --primary-glow: rgba(0, 102, 255, 0.4);
    --spring-snappy: cubic-bezier(0.25, 1, 0.5, 1);
    --spring-bouncy: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-fast: 0.2s var(--spring-snappy);
    --transition-smooth: 0.4s var(--spring-snappy);
    --sidebar-slim: 75px;
    --sidebar-expanded: 260px;
    --topbar-height: 70px;
    --glass-blur: 24px;
    --glass-opacity: 0.15;
}

[data-theme="light"] {
    --bg-color: #f2f2f7;
    --text-main: #1c1c1e;
    --text-muted: #8e8e93;
    --glass-bg: rgba(255, 255, 255, var(--glass-opacity));
    --glass-border: rgba(200, 200, 200, 0.4);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --panel-bg: rgba(255, 255, 255, 0.6);
    --panel-hover: rgba(255, 255, 255, 0.85);
    --switch-bg: #e5e5ea;
    --switch-icon: #ff9f0a;
}

[data-theme="dark"] {
    --bg-color: #080910;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --glass-bg: rgba(20, 20, 30, var(--glass-opacity));
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --panel-bg: rgba(12, 12, 22, 0.6);
    --panel-hover: rgba(25, 25, 42, 0.75);
    --switch-bg: #2c2c36;
    --switch-icon: #0a84ff;
}

/* ===== BASE ===== */
html {
    scroll-behavior: smooth;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===== SCROLL PROGRESS ===== */
#scrollProgressWrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 3px;
    z-index: 10000;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.04);
}

#scrollProgress {
    height: 100%;
    width: 0%;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    transition: width 0.1s linear, background var(--transition-smooth);
}

/* ===== GLASS PANEL ===== */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-fast);
}

body.glass-enabled .glass-panel {
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* ===== BUTTONS ===== */
.glass-btn {
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.3s var(--spring-bouncy), filter var(--transition-fast), background var(--transition-fast);
    cursor: pointer;
}

.glass-btn.primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.glass-btn.primary:hover {
    transform: translateY(-3px) scale(1.03);
    filter: brightness(1.15);
}

.glass-btn.secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.glass-btn.secondary:hover {
    background: var(--glass-bg);
}

/* ===== RIPPLE ===== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple-fx {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 100;
}

@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s var(--spring-bouncy);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== GLITCH TEXT ===== */
.tech-title {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

.glitched {
    position: relative;
    display: inline-block;
    font-family: 'Chakra Petch', sans-serif;
}

.glitched::before,
.glitched::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    pointer-events: none;
}

.glitched::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitched::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 83px, 0)
    }

    20% {
        clip: rect(89px, 9999px, 10px, 0)
    }

    40% {
        clip: rect(24px, 9999px, 13px, 0)
    }

    60% {
        clip: rect(78px, 9999px, 57px, 0)
    }

    80% {
        clip: rect(34px, 9999px, 47px, 0)
    }

    100% {
        clip: rect(28px, 9999px, 78px, 0)
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0)
    }

    20% {
        clip: rect(22px, 9999px, 92px, 0)
    }

    40% {
        clip: rect(8px, 9999px, 49px, 0)
    }

    60% {
        clip: rect(89px, 9999px, 19px, 0)
    }

    80% {
        clip: rect(59px, 9999px, 86px, 0)
    }

    100% {
        clip: rect(98px, 9999px, 32px, 0)
    }
}

/* ===== TILT CARDS ===== */
.tilt-card {
    transform-style: preserve-3d;
    position: relative;
    perspective: 1000px;
    transform: perspective(1000px);
}

.tilt-card>*:not(.tilt-glare-wrapper) {
    transform: translateZ(20px);
}

.tilt-glare-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}

.tilt-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.35) 40%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.tilt-card:hover .tilt-glare {
    opacity: 1;
}

.magnetic-btn {
    display: inline-flex;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1);
}

.magnetic-btn:hover {
    z-index: 50;
}

/* ===== FLUID BACKGROUND ===== */
.fluid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -20;
    pointer-events: none;
}

.color-blob {
    position: absolute;
    filter: blur(90px);
    border-radius: 50%;
    opacity: 0.45;
    transition: background var(--transition-smooth);
}

.blob-1 {
    top: -10%;
    left: -5%;
    width: 55vw;
    height: 55vh;
    background: var(--primary);
    animation: blobFloat1 12s ease-in-out infinite alternate;
}

.blob-2 {
    bottom: -10%;
    right: 5%;
    width: 45vw;
    height: 45vh;
    background: #bf5af2;
    animation: blobFloat2 10s ease-in-out infinite alternate;
}

.blob-3 {
    top: 40%;
    left: 50%;
    width: 30vw;
    height: 30vh;
    background: #32d74b;
    transform: translate(-50%, -50%);
    opacity: 0.18;
    animation: blobFloat1 14s ease-in-out infinite alternate-reverse;
}

@keyframes blobFloat1 {
    from {
        transform: translate(0, 0) scale(1)
    }

    to {
        transform: translate(3%, 5%) scale(1.08)
    }
}

@keyframes blobFloat2 {
    from {
        transform: translate(0, 0)
    }

    to {
        transform: translate(-4%, 3%) scale(1.05)
    }
}

[data-theme="light"] .blob-1 {
    opacity: 0.25;
}

[data-theme="light"] .blob-2 {
    background: #ff9f0a;
    opacity: 0.2;
}

[data-theme="light"] .blob-3 {
    opacity: 0.1;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    pointer-events: none;
    opacity: 0.04;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="1" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)"/%3E%3C/svg%3E');
}

.network-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -15;
}

.network-bg.active {
    opacity: 1 !important;
}

/* =========================================================================
   INTRO GATE — UTOPIA / 2526 con portale O
   ========================================================================= */
.intro-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #05060f;
    transition: opacity 0.7s ease;
}

.intro-gate.exiting {
    opacity: 0;
    pointer-events: none;
}

.intro-bg-blobs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.intro-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.ib1 {
    width: 60vw;
    height: 60vh;
    top: -20%;
    left: -10%;
    background: var(--primary);
    opacity: 0.3;
    animation: blobFloat1 8s ease-in-out infinite alternate;
}

.ib2 {
    width: 50vw;
    height: 50vh;
    bottom: -20%;
    right: -10%;
    background: #bf5af2;
    opacity: 0.25;
    animation: blobFloat2 10s ease-in-out infinite alternate;
}

.intro-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
}

.intro-label {
    font-family: 'Chakra Petch', sans-serif;
    font-size: clamp(0.65rem, 1.5vw, 0.85rem);
    letter-spacing: 5px;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeSlideUp 0.8s 0.2s var(--spring-bouncy) forwards;
}

.intro-title-wrap {
    display: flex;
    font-family: 'Chakra Petch', sans-serif;
    font-size: clamp(5rem, 14vw, 13rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
    color: #fff;
}

.intro-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(80px) scale(0.8);
    animation: letterBounce 0.7s var(--spring-bouncy) forwards;
}

.il-1 {
    animation-delay: 0.3s;
}

.il-2 {
    animation-delay: 0.4s;
}

.il-3 {
    animation-delay: 0.5s;
}

.il-4 {
    animation-delay: 0.6s;
}

.il-5 {
    animation-delay: 0.7s;
}

.il-6 {
    animation-delay: 0.8s;
}

.intro-o-letter {
    color: var(--primary);
    text-shadow: 0 0 40px var(--primary-glow), 0 0 80px var(--primary-glow);
    transition: transform 0.9s cubic-bezier(0.2, 0, 0.1, 1), opacity 0.5s ease, text-shadow 0.3s;
    transform-origin: center center;
    position: relative;
}

.intro-o-letter.zooming {
    transform: scale(35);
    opacity: 0;
}

.intro-year {
    font-family: 'Chakra Petch', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: 18px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
    opacity: 0;
    animation: fadeSlideUp 0.8s 1s var(--spring-bouncy) forwards;
}

.intro-tagline {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    margin-top: 20px;
    margin-bottom: 50px;
    opacity: 0;
    animation: fadeSlideUp 0.8s 1.2s var(--spring-bouncy) forwards;
}

.intro-enter-btn {
    opacity: 0;
    animation: fadeSlideUp 0.8s 1.5s var(--spring-bouncy) forwards;
    background: var(--primary);
    color: #fff;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 18px 45px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 0 40px var(--primary-glow), 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s var(--spring-bouncy), filter 0.2s, box-shadow 0.3s;
}

.intro-enter-btn:hover {
    transform: translateY(-5px) scale(1.05);
    filter: brightness(1.2);
    box-shadow: 0 0 60px var(--primary-glow);
}

/* O PORTAL */
.o-portal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: var(--bg-color, #080910);
    clip-path: circle(0% at 50% 42%);
    transition: clip-path 1.1s cubic-bezier(0.7, 0, 0.1, 1);
    pointer-events: none;
}

.o-portal.open {
    clip-path: circle(160% at 50% 42%);
}

@keyframes letterBounce {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== APP READY TRANSITION ===== */
.app-element {
    opacity: 0;
    transform: scale(0.92) translateY(35px);
    transition: opacity 1.2s ease, transform 1.2s var(--spring-bouncy), filter 1.2s ease;
    pointer-events: none;
    filter: blur(8px);
}

body.app-ready .app-element {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    filter: blur(0);
}

/* ===== CONTEXT MENU ===== */
.custom-context-menu {
    position: fixed;
    width: 240px;
    z-index: 9000;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transform: scale(0);
    transform-origin: top left;
    opacity: 0;
    transition: transform 0.2s var(--spring-bouncy), opacity 0.2s;
    pointer-events: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.custom-context-menu.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.context-item {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.context-item:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* =========================================================================
   NAVIGATION SIDEBAR
   ========================================================================= */
.glass-sidebar {
    position: fixed;
    display: flex;
    z-index: 1000;
    transition: all var(--transition-smooth);
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.mac-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #bf5af2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px var(--primary-glow);
    transition: box-shadow 0.3s;
}

.sidebar-profile:hover .avatar {
    box-shadow: 0 6px 20px var(--primary-glow);
}

.profile-text .title {
    font-weight: 700;
    font-size: 1.05rem;
    display: block;
}

.profile-text .subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.sidebar-menu {
    display: flex;
}

.menu-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition-fast);
    white-space: nowrap;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    transition: color var(--transition-fast);
    white-space: nowrap;
    color: var(--text-muted);
    cursor: pointer;
}

.nav-item i {
    font-size: 1.35rem;
    flex-shrink: 0;
    width: 25px;
    display: flex;
    justify-content: center;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-main);
}

.nav-item::before {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, var(--primary-glow), transparent);
    border-radius: 10px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: -1;
}

.nav-item:hover::before,
.nav-item.active::before {
    opacity: 1;
}

.nav-item.active {
    color: var(--primary);
}

body.layout-left .glass-sidebar {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: var(--sidebar-slim);
    height: 82vh;
    min-height: 500px;
    flex-direction: column;
    padding: 20px 0;
    border-radius: 28px;
}

body.layout-left .glass-sidebar:hover {
    width: var(--sidebar-expanded);
}

body.layout-left .sidebar-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 22px;
    margin-bottom: 35px;
}

body.layout-left .mac-dots {
    margin-bottom: 22px;
    width: 25px;
    justify-content: center;
}

body.layout-left .profile-text {
    opacity: 0;
}

body.layout-left .glass-sidebar:hover .profile-text {
    opacity: 1;
    transition-delay: 0.1s;
}

body.layout-left .sidebar-menu {
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

body.layout-left .menu-label {
    padding: 0 22px;
    margin-bottom: 8px;
}

body.layout-left .glass-sidebar:hover .menu-label {
    opacity: 1;
    transition-delay: 0.1s;
}

body.layout-left .nav-item {
    padding: 11px 22px;
}

body.layout-left .nav-text {
    opacity: 0;
    font-weight: 500;
    font-size: 0.95rem;
}

body.layout-left .glass-sidebar:hover .nav-text {
    opacity: 1;
    transition-delay: 0.1s;
}

body.layout-left .nav-item::before {
    left: 12px;
    right: 12px;
    top: 0;
    bottom: 0;
}

body.layout-top .glass-sidebar {
    left: 18px;
    top: 14px;
    right: 18px;
    width: calc(100% - 36px);
    height: var(--topbar-height);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    border-radius: 18px;
}

body.layout-top .sidebar-header {
    flex-direction: row;
    gap: 18px;
    margin-bottom: 0;
    padding: 0;
}

body.layout-top .mac-dots {
    align-items: center;
    width: auto;
    margin-bottom: 0;
}

body.layout-top .sidebar-profile {
    opacity: 1;
}

body.layout-top .profile-text {
    opacity: 1;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

body.layout-top .sidebar-menu {
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

body.layout-top .menu-label {
    display: none;
}

body.layout-top .nav-item {
    padding: 8px 14px;
}

body.layout-top .nav-text {
    opacity: 1;
    font-weight: 600;
    font-size: 0.88rem;
}

body.layout-top .nav-item::before {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

/* ===== CONTENT LAYOUT ===== */
.content-wrapper {
    max-width: 1550px;
    margin: 0 auto;
    padding: 0 40px;
    transition: padding-left var(--transition-smooth), padding-top var(--transition-smooth);
}

body.layout-left .content-wrapper {
    padding-left: calc(var(--sidebar-slim) + 80px);
}

body.layout-top .content-wrapper {
    padding-top: calc(var(--topbar-height) + 60px);
    padding-left: 40px;
}

/* ===== SETTINGS PANEL ===== */
.layout-toggle {
    display: flex;
    background: var(--glass-bg);
    padding: 5px;
    border-radius: 12px;
}

.layout-toggle button {
    background: transparent;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
}

.layout-toggle button.active {
    background: var(--panel-hover);
    color: var(--text-main);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.settings-panel {
    position: fixed;
    top: 18px;
    right: -410px;
    width: 380px;
    height: calc(100vh - 36px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 28px;
    overflow-y: auto;
    transition: right var(--transition-smooth);
    border-radius: 28px;
}

.settings-panel.open {
    right: 18px;
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 990;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    backdrop-filter: blur(5px);
}

.settings-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.settings-header h3 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.3rem;
}

.close-btn {
    background: var(--glass-bg);
    border: none;
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-btn:hover {
    background: var(--panel-hover);
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--glass-border);
}

.setting-row.vertical {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.setting-info {
    display: flex;
    flex-direction: column;
}

.setting-title {
    font-weight: 600;
    font-size: 1rem;
}

.setting-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.one-ui-switch {
    width: 58px;
    height: 32px;
    border-radius: 32px;
    background: var(--switch-bg);
    position: relative;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-fast);
}

.switch-knob i {
    color: var(--switch-icon);
    transition: color var(--transition-fast);
}

[data-theme="dark"] .switch-knob {
    transform: translateX(26px);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--switch-bg);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s var(--spring-snappy);
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--c);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.color-dot.active {
    transform: scale(1.2);
    border-color: #fff;
    box-shadow: 0 4px 12px var(--c);
}

/* ===== FLOATING WINDOWS ===== */
.floating-window {
    position: fixed;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    resize: both;
    min-width: 300px;
    min-height: 150px;
    border-radius: 18px;
}

.floating-window.active-window {
    z-index: 200;
    box-shadow: 0 0 30px var(--primary-glow), 0 25px 70px rgba(0, 0, 0, 0.75);
}

.window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.45);
    cursor: grab;
    user-select: none;
    border-bottom: 1px solid var(--glass-border);
    color: #fff;
    font-weight: 600;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.9rem;
}

.window-header:active {
    cursor: grabbing;
}

.window-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.win-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.win-close-btn:hover {
    background: #ff5f56;
}

.info-tag {
    background: var(--glass-bg);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.pulse-ring {
    animation: pulseRing 2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 50%;
    width: 90px;
    height: 90px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 255, 0.1);
    border: 2px solid var(--primary);
}

@keyframes pulseRing {
    0% {
        transform: scale(0.85);
        box-shadow: 0 0 0 0 var(--primary-glow)
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 25px transparent
    }

    100% {
        transform: scale(0.85);
        box-shadow: 0 0 0 0 transparent
    }
}

/* ===== CHATBOT ===== */
.chat-history {
    padding: 16px;
    max-height: 270px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    padding: 10px 15px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 88%;
    word-break: break-word;
}

.chat-msg.ai {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 16px 16px 16px 4px;
    align-self: flex-start;
}

.chat-msg.user {
    background: var(--primary);
    color: #fff;
    border-radius: 16px 16px 4px 16px;
    align-self: flex-end;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.chat-suggestions {
    padding: 12px;
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.chat-chip {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chat-chip:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* ===== ORBITAL BUBBLE MENU ===== */
.orbital-menu {
    position: fixed;
    bottom: 38px;
    right: 38px;
    width: 70px;
    height: 70px;
    z-index: 100;
    pointer-events: none;
}

.bubble-child {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s var(--spring-bouncy);
    transform: scale(0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.bubble-main {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 1.8rem;
    z-index: 5;
    box-shadow: 0 4px 30px var(--primary-glow);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s var(--spring-bouncy), box-shadow 0.3s;
}

.bubble-main:hover {
    transform: scale(1.08);
}

.orbital-menu.open .bubble-child {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.orbital-menu.open .child-1 {
    transform: translate(-150px, 0) scale(1);
}

.orbital-menu.open .child-1:hover {
    transform: translate(-150px, 0) scale(1.15) !important;
    background: var(--primary);
    color: #fff;
}

.orbital-menu.open .child-2 {
    transform: translate(-138px, -57px) scale(1);
}

.orbital-menu.open .child-2:hover {
    transform: translate(-138px, -57px) scale(1.15) !important;
    background: var(--primary);
    color: #fff;
}

.orbital-menu.open .child-3 {
    transform: translate(-106px, -106px) scale(1);
}

.orbital-menu.open .child-3:hover {
    transform: translate(-106px, -106px) scale(1.15) !important;
    background: var(--primary);
    color: #fff;
}

.orbital-menu.open .child-4 {
    transform: translate(-57px, -138px) scale(1);
}

.orbital-menu.open .child-4:hover {
    transform: translate(-57px, -138px) scale(1.15) !important;
    background: var(--primary);
    color: #fff;
}

.orbital-menu.open .child-5 {
    transform: translate(0, -150px) scale(1);
}

.orbital-menu.open .child-5:hover {
    transform: translate(0, -150px) scale(1.15) !important;
    background: var(--primary);
    color: #fff;
}

/* =========================================================================
   SECTIONS GLOBAL
   ========================================================================= */
.section {
    min-height: 100vh;
    padding: 140px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-header h2 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-family: 'Chakra Petch', sans-serif;
}

.gap-huge {
    gap: 55px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.cards-grid.cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}

.glow-badge {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 100px;
    background: var(--glass-bg);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* =========================================================================
   HERO — RETTANGOLO ORIZZONTALE IMMERSIVO
   ========================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-box {
    width: 100%;
    padding: 70px 80px;
    border-radius: 32px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
    align-items: center;
    min-height: 520px;
    position: relative;
    overflow: hidden;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hero-title {
    font-size: clamp(3.5rem, 7vw, 7rem);
    font-weight: 700;
    line-height: 1.05;
    margin: 18px 0;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-actions {
    margin-bottom: 50px;
}

.hero-cta {
    padding: 18px 45px !important;
    font-size: 1.15rem !important;
    letter-spacing: 0.5px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 3px;
}

.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--glass-border);
}

/* Hero Visual (right side) */
.hero-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-orb-wrap {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-orb {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orb-core {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #bf5af2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    box-shadow: 0 0 60px var(--primary-glow);
    animation: orbPulse 3s ease-in-out infinite;
}

@keyframes orbPulse {

    0%,
    100% {
        box-shadow: 0 0 40px var(--primary-glow)
    }

    50% {
        box-shadow: 0 0 80px var(--primary-glow), 0 0 120px rgba(191, 90, 242, 0.3)
    }
}

.orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--primary-glow);
}

.ring-1 {
    width: 160px;
    height: 160px;
    animation: spinRing 8s linear infinite;
}

.ring-2 {
    width: 210px;
    height: 210px;
    animation: spinRing 12s linear infinite reverse;
    border-color: rgba(191, 90, 242, 0.3);
}

.ring-3 {
    width: 260px;
    height: 260px;
    animation: spinRing 20s linear infinite;
    border-color: rgba(255, 255, 255, 0.07);
}

@keyframes spinRing {
    from {
        transform: rotate(0deg) scaleY(0.35)
    }

    to {
        transform: rotate(360deg) scaleY(0.35)
    }
}

@media (max-width: 900px) {
    .hero-box {
        grid-template-columns: 1fr;
        padding: 50px 40px;
    }

    .hero-right {
        display: none;
    }
}

/* Hero game image (sostituisce l'orb) */
.hero-img-wrap {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-game-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 28px;
    box-shadow: 0 0 60px var(--primary-glow), 0 20px 60px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s var(--spring-bouncy);
}

.hero-game-img:hover {
    transform: scale(1.03) translateY(-4px);
}

.hero-img-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle, var(--primary-glow), transparent 68%);
    z-index: -1;
    animation: orbPulse 3s ease-in-out infinite;
    pointer-events: none;
}

/* Nav logo avatar */
.nav-logo-avatar {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: hidden;
}

/* =========================================================================
   TEAM SECTION — 3 CARD LARGHE
   ========================================================================= */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 35px;
}

.team-card {
    padding: 45px;
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: transform 0.3s var(--spring-bouncy), box-shadow 0.3s;
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 40px var(--primary-glow);
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.team-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #3a86ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 20px var(--primary-glow);
}

.tutor-icon {
    background: linear-gradient(135deg, #ff9500, #ff6b00);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
}

.vr-icon {
    background: linear-gradient(135deg, #30d158, #00c48c);
    box-shadow: 0 6px 20px rgba(48, 209, 88, 0.4);
}

.team-card-header h3 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.team-card-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.team-card-desc {
    font-size: 0.96rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 0;
}

.team-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 28px 0;
}

/* Roles List */
.roles-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.roles-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.role-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    transition: all 0.2s;
}

.role-item:hover {
    background: var(--panel-hover);
    border-color: var(--primary-glow);
    transform: translateX(4px);
}

.role-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-glow), rgba(191, 90, 242, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    flex-shrink: 0;
}

.role-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.role-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-main);
}

.role-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.role-badge {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--primary-glow);
    color: var(--primary);
    letter-spacing: 1px;
    white-space: nowrap;
    border: 1px solid var(--primary-glow);
}

/* Tutors List */
.tutors-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tutor-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    transition: all 0.2s;
}

.tutor-item:hover {
    background: var(--panel-hover);
    border-color: rgba(255, 149, 0, 0.3);
    transform: translateX(4px);
}

.tutor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9500, #ff3b30);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}

.tutor-info {
    display: flex;
    flex-direction: column;
}

.tutor-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.tutor-role {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* VR Specs */
.vr-specs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.spec-item i {
    font-size: 1.4rem;
    color: var(--primary);
    flex-shrink: 0;
}

.spec-item>div {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spec-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 1px;
}

/* =========================================================================
   PLATFORMS SECTION
   ========================================================================= */
.store-card {
    padding: 50px;
    display: flex;
    align-items: center;
    gap: 30px;
    text-align: left;
}

.store-logo {
    font-size: 4rem;
    color: var(--text-main);
    flex-shrink: 0;
}

.store-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-family: 'Chakra Petch', sans-serif;
}

.store-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
}

/* =========================================================================
   STORY SECTION
   ========================================================================= */
.story-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 960px) {
    .story-layout {
        grid-template-columns: 1fr;
    }
}

.story-text-panel {
    padding: 50px;
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.story-chapter {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chapter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 4px;
}

.chapter-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.story-chapter p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.85;
}

.story-chapter strong {
    color: var(--text-main);
}

.story-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 30px 0;
}

.story-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.story-info-card {
    padding: 30px;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.story-info-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.story-info-row i {
    font-size: 1.3rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.story-info-row>div {
    display: flex;
    flex-direction: column;
}

.si-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Chakra Petch', sans-serif;
}

.si-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 2px;
}

.story-quote {
    padding: 28px;
    border-radius: 20px;
    border-left: 3px solid var(--primary);
}

.story-quote blockquote {
    font-size: 1rem;
    font-style: italic;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 12px;
}

.story-quote cite {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: normal;
}

/* =========================================================================
   GALLERY SECTION
   ========================================================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    grid-template-rows: 240px 240px;
    gap: 18px;
    margin-bottom: 30px;
}

.gallery-item {
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}

.gi-1 {
    grid-column: 1 / 3;
    grid-row: 1;
}

/* wide top-left */
.gi-2 {
    grid-column: 3;
    grid-row: 1 / 3;
}

/* tall right */
.gi-3 {
    grid-column: 1;
    grid-row: 2;
}

/* bottom-left */
.gi-4 {
    grid-column: 2;
    grid-row: 2;
}

/* bottom-center */
.gi-5 {
    display: none;
}

.gi-6 {
    display: none;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.3s;
    cursor: pointer;
}

.gallery-placeholder i {
    font-size: 2.2rem;
    color: var(--primary);
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
}

.gallery-placeholder:hover {
    background: var(--panel-hover);
    border-color: var(--primary-glow);
}

.gallery-placeholder:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.gallery-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.gallery-note i {
    font-size: 1.2rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 1px;
}

.gallery-note code {
    font-family: monospace;
    background: rgba(0, 102, 255, 0.15);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--primary);
    font-size: 0.82rem;
}

@media (max-width: 700px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .gi-1,
    .gi-2,
    .gi-3,
    .gi-4 {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Gallery image class */
.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 18px;
    display: block;
    transition: transform 0.4s var(--spring-bouncy);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.03);
}

/* ===== SIDEBAR: header senza mac-dots (margine top ridotto) ===== */
body.layout-left .sidebar-header {
    padding-top: 5px;
}

/* ===== HERO BOX: nessuna animazione tilt ===== */
.hero-box {
    transform: none !important;
    transition: box-shadow 0.3s ease !important;
}

.hero-box:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 50px var(--primary-glow) !important;
}

/* ===== ROLE ARROW ===== */
.role-arrow {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s;
}

.role-item:hover .role-arrow {
    transform: translateX(3px);
    color: var(--primary);
}

.role-item {
    cursor: pointer;
    user-select: none;
}

.role-item:active {
    transform: scale(0.98);
}

/* ===== POPUP MEMBRI ===== */
.members-popup {
    position: fixed;
    z-index: 5000;
    width: 280px;
    padding: 0;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px var(--primary-glow);
    transform: scale(0.85) translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s var(--spring-bouncy), opacity 0.2s;
    overflow: hidden;
}

.members-popup.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--glass-border);
}

.popup-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--primary);
    text-transform: uppercase;
}

.popup-members {
    list-style: none;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
}

.popup-members li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    transition: background 0.15s;
}

.popup-members li:hover {
    background: var(--panel-hover);
}

.popup-members li i {
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

/* ===== INTRO SCROLL HINT ===== */
.intro-scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.78rem;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeSlideUp 0.8s 2s var(--spring-bouncy) forwards;
}

.intro-scroll-icon {
    font-size: 1.2rem;
    animation: bounceY 1.5s ease-in-out infinite;
}

@keyframes bounceY {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(6px)
    }
}

/* ===== TECH STACK ===== */
.tech-stack-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 50px;
}

.tech-stack-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tech-stack-title i {
    color: var(--primary);
    font-size: 1.2rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 16px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 10px;
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: default;
    transition: all 0.25s var(--spring-bouncy);
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-glow);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px var(--primary-glow);
}

.tech-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}

.ti-unity {
    background: linear-gradient(135deg, #333, #666);
}

.ti-github {
    background: linear-gradient(135deg, #24292e, #444);
}

.ti-blender {
    background: linear-gradient(135deg, #ea7600, #ff9a00);
}

.ti-claude {
    background: linear-gradient(135deg, #cc785c, #e8956d);
}

.ti-gemini {
    background: linear-gradient(135deg, #4285f4, #34a853);
}

.ti-perplexity {
    background: linear-gradient(135deg, #1fb8cd, #1a8fa8);
}

.ti-meta {
    background: linear-gradient(135deg, #0081fb, #00c6ff);
}

.ti-ag {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.ti-vscode {
    background: linear-gradient(135deg, #007acc, #1b9dd8);
}

.tech-name {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: center;
}

.tech-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

/* ===== STORY: char cards ===== */
.char-card {
    padding: 22px;
    border-radius: 18px;
}

.char-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.char-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
}

.axel-av {
    background: linear-gradient(135deg, #0066ff, #bf5af2);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.4);
}

.cristian-av {
    background: linear-gradient(135deg, #30d158, #1a9e3f);
    box-shadow: 0 4px 15px rgba(48, 209, 88, 0.4);
}

.char-header h4 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.char-role {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.char-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== STORE CARD: niente tilt, solo hover leggero ===== */
.store-card {
    transition: transform 0.3s var(--spring-bouncy), box-shadow 0.3s, border-color 0.3s !important;
}

.store-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
}

.store-card {
    transform: none;
}

/* Edugate card */
.edugate-card {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 24px;
    max-width: 520px;
    width: 100%;
    padding: 50px 60px;
}

.edugate-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.edugate-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-family: 'Chakra Petch', sans-serif;
}

.edugate-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
}

/* Chars row — personaggi sotto la storia */
.chars-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 30px;
}

@media (max-width: 700px) {
    .chars-row {
        grid-template-columns: 1fr;
    }
}

/* ===== STORY SIDE: gap tra gli elementi ===== */
.story-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.story-quote {
    padding: 26px;
    border-radius: 20px;
    border-left: 3px solid var(--primary);
    position: relative;
}

.story-quote blockquote {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 10px;
}

.story-quote cite {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: normal;
}

/* =========================================================================
   GALLERY VIDEO PLAYER
   ========================================================================= */
.gallery-video-wrap {
    margin-top: 32px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: #000;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.5), 0 0 30px var(--primary-glow);
    position: relative;
    isolation: isolate;
}

.gallery-video-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid var(--glass-border);
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
}

.gallery-video-label i {
    font-size: 1.1rem;
}

.gallery-video {
    width: 100%;
    display: block;
    max-height: 560px;
    background: #000;
    outline: none;
    border-radius: 0 0 22px 22px;
    /* Blocca qualsiasi oscuramento da effetti hover */
    filter: brightness(1) !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
}

/* Assicura che il video non diventi scuro all'hover (browser nativo + CSS) */
.gallery-video:hover,
.gallery-video-wrap:hover .gallery-video {
    filter: brightness(1) !important;
    opacity: 1 !important;
}

/* Style the native controls bar (bottom bar) */
.gallery-video::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

/* RIMUOVE lo scrim scuro che copre tutto il video all'hover */
.gallery-video::-webkit-media-controls-overlay-enclosure {
    background: transparent !important;
}

.gallery-video::-webkit-media-controls-enclosure {
    background: transparent !important;
}

/* Rimuove il pulsante play grande al centro (opzionale - mantieni se preferisci) */
.gallery-video::-webkit-media-controls-overlay-play-button {
    display: none;
}

.gallery-video:focus {
    outline: none;
}

/* ===== TECH ITEM MORE (e altro..) ===== */
.tech-item-more {
    border-style: dashed !important;
    opacity: 0.65;
    transition: all 0.25s var(--spring-bouncy) !important;
    animation: morePulse 3s ease-in-out infinite;
}

.tech-item-more:hover {
    opacity: 1 !important;
    transform: translateY(-5px) !important;
    border-color: var(--primary-glow) !important;
}

@keyframes morePulse {

    0%,
    100% {
        opacity: 0.55;
    }

    50% {
        opacity: 0.75;
    }
}