/* styles.css — estratto da index.html */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --pink: #ec4899;
    --dark: #0f0f23;
    --light: #f8fafc;
}

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

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
    animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(90deg); }
}

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

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Header */
header {
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    border-radius: 2px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scaleX(1); }
    50% { opacity: 0.7; transform: scaleX(0.95); }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 10px 0;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: #fff;
    transform: translateY(-2px);
}

.nav-links a:hover::before {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 140px 0 100px;
    text-align: center;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%),
        conic-gradient(from 0deg, transparent 0deg, rgba(139, 92, 246, 0.1) 90deg, transparent 180deg, rgba(236, 72, 153, 0.1) 270deg, transparent 360deg);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #6366f1 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInUp 1s ease-out;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #8b5cf6;
    animation: slideInUp 1s ease-out 0.2s both;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: slideInUp 1s ease-out 0.4s both;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideInUp 1s ease-out 0.6s both;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 18px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.6);
}

.cta-secondary {
    background: transparent;
    border: 2px solid rgba(139, 92, 246, 0.8);
    box-shadow: none;
}

.cta-secondary:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
}

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

/* Services Section */
.services {
    padding: 120px 0;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.section-title {
    text-align: center;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 4rem;
    color: #fff;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

/* Responsive for tablets */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.service-card {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(99, 102, 241, 0.3);
    padding: 2.5rem;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.3);
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(5deg);
}

.service-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
    position: relative;
    z-index: 2;
}

.service-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    position: relative;
    z-index: 2;
    font-size: 1.1rem;
    flex-grow: 1;
}

/* About Section */
.about {
    padding: 120px 0;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

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

.about-text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.feature-item {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(99, 102, 241, 0.3);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-item:hover::before {
    opacity: 1;
}

.feature-item:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(236, 72, 153, 0.5);
}

.feature-item h4 {
    color: #fff;
    margin: 1rem 0 0.5rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.feature-item p {
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 2;
}

/* Social Section */
.social-section {
    padding: 100px 0;
    text-align: center;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(99, 102, 241, 0.3);
    color: white;
    padding: 20px 30px;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
    border-color: rgba(139, 92, 246, 0.6);
}

.social-link.discord {
    border-color: rgba(114, 137, 218, 0.3);
}

.social-link.discord:hover {
    box-shadow: 0 20px 40px rgba(114, 137, 218, 0.4);
    border-color: rgba(88, 101, 242, 0.6);
}

.social-link.instagram {
    border-color: rgba(240, 148, 51, 0.3);
}

.social-link.instagram:hover {
    box-shadow: 0 20px 40px rgba(240, 148, 51, 0.4);
    border-color: rgba(188, 24, 136, 0.6);
}

/* Footer */
footer {
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 3rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

    .feature-item {
        padding: 1.5rem;
    }
}

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Preloader styles */
#preloader {
     position: fixed;
     z-index: 3000;
     inset: 0;
     background: #0f0f23;
     color: #8b5cf6;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: opacity 0.45s ease;
     font-family: 'Fira Mono', 'Consolas', monospace;
     font-size: 1.1rem;
     letter-spacing: 1px;
     padding: 0 16px; /* aggiunto padding per evitare overflow */
 }
#preloader pre {
     margin: 0;
     text-align: center;
     user-select: none;
     white-space: pre-wrap; /* permette il wrapping */
     word-break: break-all;
 }
/* Terminal-like lines inside preloader */
.pre-line { display:block; text-align:left; margin:2px 0; white-space:pre-wrap; }
.pre-line .cmd { color:#4ade80; font-weight:600; }
.pre-line .out { color: rgba(255,255,255,0.78); font-weight:400; margin-left:8px; display:inline-block; }
#preloader-text { font-size:1rem; line-height:1.25; color:#9ae6b4; }
.pre-caret { display:inline-block; margin-left:6px; color:#9ae6b4; animation: blinkCaret 650ms steps(1) infinite; }

 /* Responsive preloader ASCII */
 @media (max-width: 600px) {
     #preloader pre {
         font-size: 0.75rem;
         line-height: 1.1;
         white-space: pre-line; /* forza il wrapping sulle linee */
     }
 }
@media (max-width: 400px) {
    #preloader pre {
        font-size: 0.62rem;
        line-height: 1.05;
    }
}

/* Glitch effect for logo */
.glitch {
    position: relative;
    animation: glitch 4s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}
