/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #fd79a8;
    --dark-color: #2d3436;
    --light-color: #ddd6fe;
    --white: #ffffff;
    --matrix-green: #00ff00;
    --matrix-dark: #001100;
    --matrix-bg: #000000;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --shadow-1: 0 10px 30px rgba(108, 92, 231, 0.3);
    --shadow-2: 0 20px 60px rgba(108, 92, 231, 0.4);
    --shadow-3: 0 30px 90px rgba(108, 92, 231, 0.5);
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--white);
    overflow-x: hidden;
    background: var(--matrix-bg);
    position: relative;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: pan-y;
}

/* Prevent page scroll when mobile menu is open */
.menu-open {
    overflow: hidden;
    height: 100vh;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 10px;
}

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


/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
    border-bottom: 1px solid rgba(0, 255, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo a {
    text-decoration: none;
    display: block;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin-top: -6px;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    border-radius: 25px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    z-index: -1;
}

.nav-menu a:hover::before {
    opacity: 0.3;
    transform: scale(1);
}

.nav-menu a:hover {
    color: var(--white);
    transform: translateY(-2px);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    gap: 0.5rem;
}

.dropdown-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 0.5rem; /* Aggiunto padding laterale */
    margin-top: 10px;
    overflow: hidden; /* Aggiunto per nascondere l'overflow */
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 5px; /* Aggiunto per arrotondare gli angoli */
    position: relative;
}

.dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: var(--gradient-1);
    transition: width 0.3s ease;
    z-index: -1;
    border-radius: 5px; /* Aggiunto per coerenza */
}

.dropdown-menu a:hover::before {
    width: 100%;
}

.dropdown-menu a:hover {
    color: var(--white);
    padding-left: 2rem;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section - STESSO SFONDO DELLA LOADING SCREEN (chiaro e luminoso) */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 0 2rem;
    position: relative;
    overflow: hidden;
    background: 
        radial-gradient(circle at 20% 20%, rgba(108, 92, 231, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(253, 121, 168, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 60% 40%, rgba(74, 172, 254, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #000000, #0a0a0a, #1a1a2e, #16213e, #000000);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
}

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

.hero-content {
    max-width: 800px;
    text-align: center;
    z-index: 2;
    animation: slideInLeft 1s ease-out;
}

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

.hero-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
    line-height: 1.2;
    text-align: center;
}

.highlight {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(240, 147, 251, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(240, 147, 251, 0.8));
    }
}

.hero-content h2 {
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.hero-content h2::after {
    content: '|';
    color: var(--accent-color);
    animation: blink 1s infinite;
    margin-left: 2px;
    display: var(--cursor-display, inline);
}

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

.hero-content p {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
}

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s forwards;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--white);
    box-shadow: var(--shadow-1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
}

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

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark-color);
    transform: translateY(-3px);
}

/* Hero Image */
.hero-image {
    display: none;
}

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

.profile-card {
    width: 300px;
    height: 400px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    animation: cardFloat 6s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0px) rotateY(0deg); }
    50% { transform: translateY(-20px) rotateY(10deg); }
}

.profile-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, var(--matrix-green), var(--accent-color), var(--secondary-color), var(--matrix-green));
    animation: rotate 4s linear infinite;
    z-index: -1;
}

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

.profile-card::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 18px;
    z-index: -1;
}

.profile-img i {
    font-size: 8rem;
    color: var(--white);
    animation: pulse 2s ease-in-out infinite;
}

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

/* Section Styles */
section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--white); /* Titoli in bianco per migliore leggibilità con Matrix */
    position: relative;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); /* Leggero glow bianco */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-2);
    border-radius: 2px;
    animation: expandLine 1s ease-out;
}

@keyframes expandLine {
    from { width: 0; }
    to { width: 100px; }
}

/* About Section */
.about {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.about-text p:nth-child(2) {
    animation-delay: 0.3s;
}


.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-item {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 2rem 1rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(0, 255, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}

.skill-item:hover::before {
    left: 0;
    opacity: 0.1;
}

.skill-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-2);
}

.skill-item i {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 0.8rem;
    animation: skillIcon 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes skillIcon {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.skill-item span {
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    line-height: 1.2;
    flex-shrink: 0;
}

/* Services Section */
.services {
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: transparent;
    opacity: 0.1;
    clip-path: polygon(20% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(0, 255, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    position: relative;
    animation: iconSpin 10s linear infinite;
}

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

.service-icon i {
    font-size: 2rem;
    color: var(--white);
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.service-card h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: var(--white);
    line-height: 1.6;
}

/* Portfolio Section */
.portfolio {
    background: transparent;
    position: relative;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
}

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

.portfolio-item {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(0, 255, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

.portfolio-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
}



.portfolio-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    position: relative;
}

.portfolio-icon i {
    font-size: 2rem;
    color: var(--white);
    animation: iconBounce 2s ease-in-out infinite;
}

.portfolio-item h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.portfolio-item p {
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.portfolio-btn {
    background: var(--gradient-1);
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.portfolio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

/* Donation Section */
.donation {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

.donation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(108, 92, 231, 0.1), rgba(240, 147, 251, 0.1));
    z-index: -1;
}

.donation-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.donation-text {
    text-align: center;
    width: 100%;
}

.donation-text h3 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.donation-text p {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.donation-details {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.donation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--white);
    transition: all 0.3s ease;
    justify-content: center;
}

.donation-item:hover {
    transform: translateX(10px);
    color: var(--accent-color);
}

.donation-item i {
    width: 20px;
    font-size: 1.5rem;
    color: var(--accent-color);
    animation: contactIcon 2s ease-in-out infinite;
}

.donation-btn {
    background: var(--gradient-1);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-1);
}

.donation-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.donation-btn:hover::before {
    left: 100%;
}

.donation-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
}

.donation-btn i {
    font-size: 1.2rem;
}

/* Contact Section */
.contact {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    position: relative;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.15);
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(108, 92, 231, 0.15), rgba(240, 147, 251, 0.15));
    z-index: -1;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-info p {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--white);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    color: var(--accent-color);
}

.contact-item i {
    width: 20px;
    font-size: 1.2rem;
    color: var(--accent-color);
    animation: contactIcon 2s ease-in-out infinite;
}

@keyframes contactIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    border: none;
    outline: none;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-2);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}

.social-links a:hover::before {
    opacity: 1;
}

.social-links a:hover {
    transform: translateY(-5px) rotate(360deg);
    box-shadow: var(--shadow-2);
    text-decoration: none;
}

/* Contact Form */
.contact-form {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
    text-align: center;
    /* Form fissa - non si ridimensiona */
    width: 100%;
    max-width: 600px;
    min-height: 500px;
    position: relative;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Dimensioni fisse per evitare ridimensionamento */
    box-sizing: border-box;
    height: 50px;
}

.form-group textarea {
    /* Textarea con altezza fissa */
    height: 120px !important;
    resize: none;
    overflow-y: auto;
    min-height: 120px;
    max-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
    transform: scale(1.02);
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    transform: translateY(-20px);
    opacity: 0;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

.footer p {
    color: var(--white);
    font-size: 1rem;
}

/* Particles Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--white);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Loading Page */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(108, 92, 231, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(253, 121, 168, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 60% 40%, rgba(74, 172, 254, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #000000, #0a0a0a, #1a1a2e, #16213e, #000000);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.8s ease-out;
    overflow: hidden;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Sfere luminose animate */
.loading-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.loading-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    animation: orbFloat 6s ease-in-out infinite;
}

.orb-1 {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #6c5ce7, transparent);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #fd79a8, transparent);
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.orb-3 {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #74b9ff, transparent);
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.orb-4 {
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, #00b894, transparent);
    top: 10%;
    right: 30%;
    animation-delay: 1s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translateY(-30px) translateX(20px) scale(1.2);
        opacity: 0.8;
    }
    66% {
        transform: translateY(20px) translateX(-15px) scale(0.9);
        opacity: 0.7;
    }
}

/* Contenuto principale */
.loading-content {
    position: relative;
    z-index: 5;
    text-align: center;
}

.loading-logo-container {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loading-logo {
    font-size: 5rem;
    font-weight: 900;
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.logo-letter {
    background: linear-gradient(45deg, #00ff00, #00ffff, #ff00ff, #ffff00, #00ff00);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite, letterPulse 2s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
    transform-origin: center;
}

.logo-letter:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes letterPulse {
    0%, 100% {
        transform: scale(1) rotateY(0deg);
    }
    50% {
        transform: scale(1.1) rotateY(10deg);
    }
}

/* Anelli rotanti */
.loading-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.ring {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 50%;
    animation: ringRotate linear infinite;
}

.ring-1 {
    width: 120px;
    height: 120px;
    border-top-color: #6c5ce7;
    border-right-color: #6c5ce7;
    animation-duration: 3s;
    margin: -60px 0 0 -60px;
}

.ring-2 {
    width: 160px;
    height: 160px;
    border-bottom-color: #fd79a8;
    border-left-color: #fd79a8;
    animation-duration: 4s;
    animation-direction: reverse;
    margin: -80px 0 0 -80px;
}

.ring-3 {
    width: 200px;
    height: 200px;
    border-top-color: #74b9ff;
    border-bottom-color: #74b9ff;
    animation-duration: 5s;
    margin: -100px 0 0 -100px;
}

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

/* Testi */
.loading-text-container {
    margin-bottom: 4rem;
}

.loading-text {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(45deg, #fff, #ddd6fe, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: textShimmer 2s ease-in-out infinite;
}

.loading-subtext {
    font-size: 1.2rem;
    color: #a29bfe;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.8;
}

@keyframes textShimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Barra di caricamento migliorata */
.loading-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-bar {
    width: 400px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(108, 92, 231, 0.3);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe, #fd79a8, #74b9ff, #6c5ce7);
    background-size: 200% 100%;
    animation: gradientShift 2s ease-in-out infinite;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.6);
    width: 0%;
    transition: width 0.3s ease;
}

.loading-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.5), transparent);
    border-radius: 12px;
    animation: glowSweep 3s ease-in-out infinite;
}

.loading-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(108, 92, 231, 0.8);
    font-family: 'Courier New', monospace;
}

@keyframes glowSweep {
    0%, 100% { 
        transform: translateX(-100%);
        opacity: 0;
    }
    50% { 
        transform: translateX(100%);
        opacity: 1;
    }
}

/* RIMOSSO: Stili loading-matrix non più utilizzati
   L'effetto matrix nel caricamento è stato rimosso come richiesto */

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

@keyframes matrixFall {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    5% {
        opacity: 0.3;
    }
    95% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

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

/* App Page Styles - STESSO SFONDO DELLA LOADING SCREEN (più chiaro e luminoso) */
.app-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
    background: 
        radial-gradient(circle at 20% 20%, rgba(108, 92, 231, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(253, 121, 168, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 60% 40%, rgba(74, 172, 254, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #000000, #0a0a0a, #1a1a2e, #16213e, #000000);
}

.app-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.15; /* Aumentata per rendere il background più luminoso come NoteLite */
    animation: float 20s ease-in-out infinite;
    z-index: 0; /* Assicura il corretto layering */
}

.app-hero-content {
    position: relative;
    z-index: 2; /* IDENTICO al z-index di hero-content */
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.app-logo {
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.app-logo-img {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    transition: all 0.3s ease;
    margin-top: 90px;
}

.app-logo-img:hover {
    transform: scale(1.05);

}

.app-hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.app-subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    font-weight: 600;
}

.app-description {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.app-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.app-features {
    padding: 6rem 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.app-features h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    color: var(--white); /* Titolo in bianco per migliore leggibilità con Matrix */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); /* Leggero glow bianco */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #6c5ce7, #fd79a8, #4aa3fe, #00cec9, #55a3ff, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: iconColorShift 3s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
}

/* Animazione per le icone colorate */
@keyframes iconColorShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.feature-card p {
    color: var(--white);
    line-height: 1.6;
}

.app-screenshots {
    padding: 6rem 0;
    background: var(--matrix-bg);
}

.app-screenshots h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    color: var(--white);
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.screenshot-placeholder {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
    padding: 3rem;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.screenshot-placeholder i {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.screenshot-placeholder p {
    color: var(--white);
    font-size: 1.2rem;
}

.app-download {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-1));
    text-align: center;
}

.download-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.download-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.download-content p {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 3rem;
}

.btn-large {
    padding: 1.5rem 3rem;
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.download-info p {
    color: var(--white);
    margin: 0;
    font-size: 1rem;
}

.download-info i {
    color: var(--matrix-green);
    margin-right: 0.5rem;
}

/* Mobile Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .service-card:hover,
    .portfolio-item:hover,
    .skill-item:hover {
        transform: none;
    }
    
    .btn:active {
        transform: translateY(-2px);
    }
    
    .nav-menu a:hover {
        transform: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 90px;
        flex-direction: column;
        background: rgb(0 0 0 / 92%);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 1rem 0; /* tighter padding so last item is fully visible */
        gap: 1rem; /* reduce vertical spacing between items */
        border-bottom: 1px solid rgba(0, 255, 0, 0.3);
        box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
        z-index: 1000;
        /* Added to allow scrolling the menu on small screens */
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar while keeping scroll */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .nav-menu::-webkit-scrollbar { /* Chrome/Safari/Opera */
        width: 0;
        height: 0;
        display: none;
    }

    .nav-menu::before {
        content: '';
        position: fixed;
        top: 90px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .nav-menu.active::before {
        opacity: 1;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Mobile Dropdown Styles */
    .dropdown {
        position: static;
    }

    .dropdown-menu {
        position: static;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(0, 255, 0, 0.3);
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 255, 0, 0.2);
        opacity: 1;
        visibility: visible;
        transform: none;
        margin: 0.5rem 1rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
        padding: 0;
        z-index: 1001;
    }

    .dropdown.active .dropdown-menu {
        /* Increased to fit all items and allow internal scrolling */
        max-height: 240px; /* Ridotto per lasciare spazio al resto del menu */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem 0;
        margin: 0.5rem 1rem;
        /* Hide scrollbar while keeping scroll */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .dropdown.active .dropdown-menu::-webkit-scrollbar { /* Chrome/Safari/Opera */
        width: 0;
        height: 0;
        display: none;
    }

    .dropdown-menu a {
        padding: 0.7rem 1rem; /* slightly tighter */
        font-size: 0.95rem;
    }

    .dropdown-menu a:hover {
        transform: none;
        padding-left: 1rem;
    }

    .dropdown-toggle {
       justify-content: center;
    }

    .dropdown.active .dropdown-toggle i {
        transform: rotate(180deg);
    }

    .hamburger {
        display: flex;
        margin-top: -10px;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 8rem 1rem 2rem 1rem;
        min-height: 90vh; /* Reduce height on mobile */
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 3rem;
    }


    .hero-content h2 {
        font-size: 1.5rem;
    }

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

    .profile-card {
        width: 250px;
        height: 300px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .donation-content {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .donation-text h3 {
        font-size: 1.5rem;
    }
    
    .donation-text p {
        font-size: 1rem;
        max-width: 100%;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 1.2rem 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.1rem;
    }

    .hero-content h2 {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .profile-card {
        width: 200px;
        height: 250px;
    }

    .profile-img i {
        font-size: 6rem;
    }
    
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: var(--white);
    font-size: 3.8rem;
    font-weight: bold;
    text-transform: uppercase;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-anim 2s infinite linear alternate-reverse;
    color: #ff00c1;
    z-index: -1;
}

.glitch::after {
    animation: glitch-anim2 1s infinite linear alternate-reverse;
    color: #00fff9;
    z-index: -2;
}

@keyframes glitch-anim {
    0% {
        clip: rect(42px, 9999px, 44px, 0);
        transform: skew(0.85deg);
    }
    5% {
        clip: rect(12px, 9999px, 59px, 0);
        transform: skew(0.4deg);
    }
    10% {
        clip: rect(48px, 9999px, 29px, 0);
        transform: skew(0.1deg);
    }
    15% {
        clip: rect(42px, 9999px, 73px, 0);
        transform: skew(0.7deg);
    }
    20% {
        clip: rect(63px, 9999px, 27px, 0);
        transform: skew(0.4deg);
    }
    25% {
        clip: rect(34px, 9999px, 55px, 0);
        transform: skew(0.8deg);
    }
    30% {
        clip: rect(86px, 9999px, 73px, 0);
        transform: skew(0.5deg);
    }
    35% {
        clip: rect(20px, 9999px, 20px, 0);
        transform: skew(1deg);
    }
    40% {
        clip: rect(26px, 9999px, 60px, 0);
        transform: skew(0.6deg);
    }
    45% {
        clip: rect(25px, 9999px, 85px, 0);
        transform: skew(0.2deg);
    }
    50% {
        clip: rect(57px, 9999px, 32px, 0);
        transform: skew(0.9deg);
    }
    55% {
        clip: rect(5px, 9999px, 46px, 0);
        transform: skew(0.3deg);
    }
    60% {
        clip: rect(82px, 9999px, 31px, 0);
        transform: skew(0.7deg);
    }
    65% {
        clip: rect(54px, 9999px, 27px, 0);
        transform: skew(0.1deg);
    }
    70% {
        clip: rect(28px, 9999px, 99px, 0);
        transform: skew(0.8deg);
    }
    75% {
        clip: rect(45px, 9999px, 69px, 0);
        transform: skew(0.4deg);
    }
    80% {
        clip: rect(23px, 9999px, 85px, 0);
        transform: skew(0.6deg);
    }
    85% {
        clip: rect(54px, 9999px, 84px, 0);
        transform: skew(0.2deg);
    }
    90% {
        clip: rect(45px, 9999px, 47px, 0);
        transform: skew(0.9deg);
    }
    95% {
        clip: rect(37px, 9999px, 20px, 0);
        transform: skew(0.5deg);
    }
    100% {
        clip: rect(4px, 9999px, 91px, 0);
        transform: skew(0.3deg);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
        transform: skew(0.8deg);
    }
    5% {
        clip: rect(52px, 9999px, 74px, 0);
        transform: skew(0.7deg);
    }
    10% {
        clip: rect(79px, 9999px, 85px, 0);
        transform: skew(0.6deg);
    }
    15% {
        clip: rect(75px, 9999px, 5px, 0);
        transform: skew(0.5deg);
    }
    20% {
        clip: rect(67px, 9999px, 61px, 0);
        transform: skew(0.4deg);
    }
    25% {
        clip: rect(14px, 9999px, 79px, 0);
        transform: skew(0.9deg);
    }
    30% {
        clip: rect(1px, 9999px, 66px, 0);
        transform: skew(0.8deg);
    }
    35% {
        clip: rect(86px, 9999px, 30px, 0);
        transform: skew(0.2deg);
    }
    40% {
        clip: rect(23px, 9999px, 98px, 0);
        transform: skew(0.1deg);
    }
    45% {
        clip: rect(85px, 9999px, 72px, 0);
        transform: skew(0.3deg);
    }
    50% {
        clip: rect(39px, 9999px, 15px, 0);
        transform: skew(0.6deg);
    }
    55% {
        clip: rect(54px, 9999px, 86px, 0);
        transform: skew(0.7deg);
    }
    60% {
        clip: rect(34px, 9999px, 100px, 0);
        transform: skew(0.4deg);
    }
    65% {
        clip: rect(45px, 9999px, 73px, 0);
        transform: skew(0.8deg);
    }
    70% {
        clip: rect(22px, 9999px, 32px, 0);
        transform: skew(0.5deg);
    }
    75% {
        clip: rect(67px, 9999px, 26px, 0);
        transform: skew(0.9deg);
    }
    80% {
        clip: rect(91px, 9999px, 53px, 0);
        transform: skew(0.2deg);
    }
    85% {
        clip: rect(10px, 9999px, 85px, 0);
        transform: skew(0.1deg);
    }
    90% {
        clip: rect(59px, 9999px, 46px, 0);
        transform: skew(0.3deg);
    }
    95% {
        clip: rect(29px, 9999px, 88px, 0);
        transform: skew(0.6deg);
    }
    100% {
        clip: rect(43px, 9999px, 49px, 0);
        transform: skew(0.7deg);
    }
}

@keyframes glitch-skew {
    0% {
        transform: skew(0deg);
    }
    10% {
        transform: skew(2deg);
    }
    20% {
        transform: skew(-2deg);
    }
    30% {
        transform: skew(1deg);
    }
    40% {
        transform: skew(-1deg);
    }
    50% {
        transform: skew(3deg);
    }
    60% {
        transform: skew(-3deg);
    }
    70% {
        transform: skew(1deg);
    }
    80% {
        transform: skew(-1deg);
    }
    90% {
        transform: skew(2deg);
    }
    100% {
        transform: skew(0deg);
    }
}

/* Loading Screen Mobile Responsive */
@media (max-width: 768px) {
    .loading-logo {
        font-size: 3.5rem;
        gap: 0.5rem;
    }
    
    .loading-text {
        font-size: 1.5rem;
    }
    
    .loading-subtext {
        font-size: 1rem;
    }
    
    .loading-bar {
        width: 300px;
        height: 4px;
    }
    
    .loading-percentage {
        font-size: 1.2rem;
    }
    
    .ring-1 {
        width: 80px;
        height: 80px;
        margin: -40px 0 0 -40px;
    }
    
    .ring-2 {
        width: 100px;
        height: 100px;
        margin: -50px 0 0 -50px;
    }
    
    .ring-3 {
        width: 120px;
        height: 120px;
        margin: -60px 0 0 -60px;
    }
    
    /* Nascondi le sfere luminose su mobile */
    .loading-orbs {
        display: none;
    }
}

@media (max-width: 480px) {
    .loading-logo {
        font-size: 2.5rem;
    }
    
    .loading-text {
        font-size: 1.2rem;
    }
    
    .loading-bar {
        width: 250px;
    }
    
    .loading-text-container {
        margin-bottom: 2rem;
    }
    
    .loading-logo-container {
        margin-bottom: 2rem;
    }
}

/* App Page Mobile Responsive */
@media (max-width: 768px) {
    .app-hero h1 {
        font-size: 2.5rem;
    }

    .app-subtitle {
        font-size: 1.2rem;
    }

    .app-description {
        font-size: 1rem;
    }

    .app-buttons {
        flex-direction: column;
        align-items: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .download-info {
        text-align: center;
    }

    .app-features h2,
    .app-screenshots h2,
    .download-content h2 {
        font-size: 2rem;
    }

    .app-logo-img {
        width: 100px;
        height: 100px;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Neon Glow Effects */
.neon-text {
    color: var(--white);
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px var(--primary-color),
        0 0 35px var(--primary-color),
        0 0 40px var(--primary-color);
    animation: neonFlicker 2s infinite alternate;
}

@keyframes neonFlicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor,
            0 0 20px var(--primary-color),
            0 0 35px var(--primary-color),
            0 0 40px var(--primary-color);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* Matrix Rain Effect - POTENZIATO PER TITOLI */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    opacity: 1; /* Massima visibilità per sfondo intenso */
}

.matrix-column {
    position: absolute;
    top: 0;
    color: rgba(0, 255, 0, 0.9); /* Verde matrix super intenso */
    font-family: 'Courier New', monospace;
    font-size: 16px; /* Più grande per visibilità sui titoli */
    line-height: 16px;
    animation: matrixFall linear infinite;
    text-shadow: 
        0 0 8px rgba(0, 255, 0, 0.8), 
        0 0 16px rgba(0, 255, 0, 0.6), 
        0 0 24px rgba(0, 255, 0, 0.4); /* Glow super intenso */
    opacity: 0;
    font-weight: 600; /* Più pesante per massima visibilità */
}

/* RIMOSSO: Tutti i matrix column ora sono solo verdi sfumati per uniformità */

@keyframes matrixFall {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 0.9; /* Entrata più intensa */
    }
    50% {
        opacity: 0.8; /* Maggiore visibilità al centro */
    }
    90% {
        opacity: 0.5; /* Meno sfumatura in uscita */
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}


/* Hero Orbs - Sfere luminose animate per la sezione hero */
.hero-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    animation: heroOrbFloat 8s ease-in-out infinite;
}

.hero-orb-1 {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.6), transparent);
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(253, 121, 168, 0.6), transparent);
    top: 70%;
    right: 15%;
    animation-delay: 3s;
}

.hero-orb-3 {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(74, 172, 254, 0.6), transparent);
    bottom: 20%;
    left: 25%;
    animation-delay: 6s;
}

.hero-orb-4 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 184, 148, 0.6), transparent);
    top: 10%;
    right: 25%;
    animation-delay: 1.5s;
}

.hero-orb-5 {
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, rgba(163, 71, 251, 0.6), transparent);
    top: 50%;
    left: 80%;
    animation-delay: 4.5s;
}

@keyframes heroOrbFloat {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translateY(-40px) translateX(30px) scale(1.3);
        opacity: 0.9;
    }
    66% {
        transform: translateY(30px) translateX(-20px) scale(0.8);
        opacity: 0.7;
    }
}

/* Hero Matrix Effect - SUPER INTENSO SUI TITOLI */
.hero-matrix {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 1; /* Massima visibilità per i titoli */
}

.hero-matrix-column {
    position: absolute;
    top: -100vh;
    color: rgba(0, 255, 0, 1); /* Verde Matrix al massimo */
    font-family: 'Courier New', monospace;
    font-size: 18px; /* Più grande per massima visibilità sui titoli */
    line-height: 18px;
    animation: heroMatrixFall 7s linear infinite; /* Più veloce per intensità */
    text-shadow: 
        0 0 10px rgba(0, 255, 0, 1), 
        0 0 20px rgba(0, 255, 0, 0.8), 
        0 0 30px rgba(0, 255, 0, 0.6); /* Glow super intenso */
    opacity: 0;
    font-weight: 600; /* Più pesante per massima visibilità */
}

@keyframes heroMatrixFall {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 1; /* Entrata al massimo */
    }
    50% {
        opacity: 0.9; /* Mantiene alta visibilità al centro */
    }
    90% {
        opacity: 0.6; /* Meno sfumatura, più visibilità */
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Hero Rings - Anelli rotanti per la sezione hero */
.hero-rings {
    position: absolute;
    top: 20%;
    right: 15%;
    z-index: 1;
}

/* App Hero Rings - Posizionamento diverso per le pagine app */
.app-hero .hero-rings {
    top: 15%;
    left: 10%;
    right: auto;
}

/* Fix per Matrix precision in WebTV - Assicura che il Matrix abbia la stessa intensità */
.app-hero .hero-matrix {
    opacity: 1; /* Massima visibilità identica a .hero */
    z-index: 1; /* Corretto layering */
}

.app-hero .hero-matrix-column {
    color: rgba(0, 255, 0, 1); /* Verde Matrix identico a .hero */
    text-shadow: 
        0 0 10px rgba(0, 255, 0, 1), 
        0 0 20px rgba(0, 255, 0, 0.8), 
        0 0 30px rgba(0, 255, 0, 0.6); /* Glow identico */
}

.hero-ring {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 50%;
    animation: ringRotate linear infinite;
}

.hero-ring-1 {
    width: 150px;
    height: 150px;
    border-top-color: rgba(108, 92, 231, 0.5);
    border-right-color: rgba(108, 92, 231, 0.5);
    animation-duration: 8s;
    margin: -75px 0 0 -75px;
}

.hero-ring-2 {
    width: 200px;
    height: 200px;
    border-bottom-color: rgba(253, 121, 168, 0.5);
    border-left-color: rgba(253, 121, 168, 0.5);
    animation-duration: 12s;
    animation-direction: reverse;
    margin: -100px 0 0 -100px;
}

.hero-ring-3 {
    width: 250px;
    height: 250px;
    border-top-color: rgba(74, 172, 254, 0.5);
    border-bottom-color: rgba(74, 172, 254, 0.5);
    animation-duration: 15s;
    margin: -125px 0 0 -125px;
}

/* Holographic Effect */
.holographic {
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    background-size: 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holographicShift 3s ease-in-out infinite;
}

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

/* Cyberpunk Grid */
.cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(108, 92, 231, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 92, 231, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Floating Elements */
.floating-element {
    position: absolute;
    animation: floatingElement 6s ease-in-out infinite;
}

@keyframes floatingElement {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Morphing Shapes */
.morphing-shape {
    width: 100px;
    height: 100px;
    background: var(--gradient-1);
    border-radius: 50%;
    animation: morphShape 4s ease-in-out infinite;
}

@keyframes morphShape {
    0%, 100% { 
        border-radius: 50%;
        transform: rotate(0deg) scale(1);
    }
    25% { 
        border-radius: 0%;
        transform: rotate(90deg) scale(1.2);
    }
    50% { 
        border-radius: 50% 0%;
        transform: rotate(180deg) scale(0.8);
    }
    75% { 
        border-radius: 0% 50%;
        transform: rotate(270deg) scale(1.1);
    }
}

/* Liquid Animation */
.liquid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(108, 92, 231, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(240, 147, 251, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(74, 172, 254, 0.3) 0%, transparent 50%);
    animation: liquidMove 15s ease-in-out infinite;
    z-index: -1;
}

.app-hero .liquid-bg {
    z-index: -1; /* IDENTICO alla sezione hero */
    opacity: 1; /* Opacità normale identica all'originale */
}

@keyframes liquidMove {
    0%, 100% { 
        background: radial-gradient(circle at 20% 80%, rgba(108, 92, 231, 0.3) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(240, 147, 251, 0.3) 0%, transparent 50%),
                    radial-gradient(circle at 40% 40%, rgba(74, 172, 254, 0.3) 0%, transparent 50%);
    }
    33% { 
        background: radial-gradient(circle at 70% 30%, rgba(108, 92, 231, 0.3) 0%, transparent 50%),
                    radial-gradient(circle at 30% 70%, rgba(240, 147, 251, 0.3) 0%, transparent 50%),
                    radial-gradient(circle at 60% 60%, rgba(74, 172, 254, 0.3) 0%, transparent 50%);
    }
    66% { 
        background: radial-gradient(circle at 80% 70%, rgba(108, 92, 231, 0.3) 0%, transparent 50%),
                    radial-gradient(circle at 20% 30%, rgba(240, 147, 251, 0.3) 0%, transparent 50%),
                    radial-gradient(circle at 50% 20%, rgba(74, 172, 254, 0.3) 0%, transparent 50%);
    }
}

.nav-menu .dropdown-toggle {
    padding: 0.5rem 1rem;
}

.nav-menu .dropdown a.dropdown-toggle {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* WebTV Specific Styles */
.app-logo-icon {
    font-size: 6rem;
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(253, 121, 168, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 0, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: textGlow 3s ease-in-out infinite;
}

.stat-label {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Hero Effects Mobile Responsive - PER TUTTE LE SEZIONI */
@media (max-width: 768px) {
    .hero-orb-1,
    .app-hero .hero-orb-1 {
        width: 50px;
        height: 50px;
        top: 10%;
        left: 5%;
    }
    
    .hero-orb-2,
    .app-hero .hero-orb-2 {
        width: 80px;
        height: 80px;
        top: 75%;
        right: 10%;
    }
    
    .hero-orb-3,
    .app-hero .hero-orb-3 {
        width: 40px;
        height: 40px;
        bottom: 15%;
        left: 15%;
    }
    
    .hero-orb-4,
    .app-hero .hero-orb-4 {
        width: 60px;
        height: 60px;
        top: 5%;
        right: 20%;
    }
    
    .hero-matrix-column,
    .app-hero .hero-matrix-column {
        font-size: 15px; /* Ancora più grande su mobile per massima visibilità sui titoli */
        line-height: 15px;
    }
}

@media (max-width: 480px) {
    .hero-orb,
    .app-hero .hero-orb {
        transform: scale(0.7);
    }
    
    .hero-matrix,
    .app-hero .hero-matrix {
        opacity: 1; /* Massima visibilità anche su mobile piccolissimo */
    }
}

/* Mobile Responsive for WebTV */
@media (max-width: 768px) {
    .app-logo-icon {
        font-size: 4rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    text-decoration: none;
    color: white;
}

.whatsapp-float:active {
    transform: scale(0.95);
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
        font-size: 28px;
    }
}