@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('../img/bg-pattern.gif') no-repeat center center;
    background-size: cover;
    z-index: -1;
}
/* Per dispositivi mobili */
@media screen and (max-width: 768px) {
    .background {
        background-image: url('../img/bg-phone.gif');
    }
}


.cyber-nav {
    
    padding: 20px;
    background: rgba(255, 255, 255, 0);
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.cyber-nav a {
    text-decoration: none;
    color: rgb(92, 215, 234);
    font-weight: bold;
    margin: 0 10px;
    padding: 12px 24px;
    border: 2px solid rgb(92, 215, 234);
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Press Start 2P', cursive;
    position: relative;
}

.cyber-nav a:hover {
    background: rgb(92, 215, 234);
    color: #000000;
    box-shadow: 0 0 15px rgb(92, 215, 234);
    text-shadow: 0px 0px 5px rgb(92, 215, 234);
}

.cyber-nav a::after {
    content: attr(data-text);
    position: absolute;
    left: 2px;
    text-shadow: -2px 0 rgb(92, 215, 234);
    clip: rect(0, 0, 0, 0);
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0% {
        clip: rect(24px, 550px, 90px, 0);
    }
    50% {
        clip: rect(10px, 550px, 80px, 0);
    }
    100% {
        clip: rect(30px, 550px, 100px, 0);
    }
}

.cyber-button {
    display: inline-block;
    background: #000000;
    color: rgb(92, 215, 234);
    border: 2px solid rgb(92, 215, 234);
    padding: 12px 24px;
    margin: 0 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    text-align: center;
}

.cyber-button:hover {
    background: rgb(92, 215, 234);
    color: #ffffff;
    box-shadow: 0 0 15px rgb(92, 215, 234);
}

.scroll-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.cyber-panel {
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.8s ease;
    display: flex;
    align-items: center;
    margin: 50px 0;
    background: rgba(0, 0, 0, 0.569);
    padding: 40px;
    border-left: 3px solid rgb(92, 215, 234);
}

.cyber-panel.right {
    transform: translateX(100%);
    flex-direction: row-reverse;
    border-left: none;
    border-right: 3px solid rgb(92, 215, 234);
}

.cyber-panel.active {
    opacity: 1;
    transform: translateX(0);
}

.cyber-panel img {
    width: 400px;
    height: 250px;
    object-fit: cover;
    border: 2px solid rgb(92, 215, 234);
}

.panel-content {
    padding: 0 40px;
    color: #ffffff !important; /* Forza il colore bianco su tutto il testo */
}


.cyber-footer {
    text-align: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.339);
    margin-top: 100px;
}

@media (max-width: 768px) {
    .cyber-panel {
        flex-direction: column;
        transform: translateY(100%);
    }
    
    .cyber-panel.active {
        transform: translateY(0);
    }
    
    .cyber-panel img {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* 🌍 Responsive Design per Mobile */
@media (max-width: 768px) {
    /* I cyber-panel saranno centrati invece di alternati */
    .cyber-panel {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    /* Le immagini diventeranno più adattabili */
    .cyber-panel img {
        width: 100%;
        height: auto;
    }
    
    /* Miglioriamo lo spazio per il testo */
    .panel-content {
        padding: 15px;
    }

    /* I bottoni saranno più facili da premere su mobile */
    .cyber-button {
        width: 100%;
        text-align: center;
        display: block;
        margin: 10px 0;
        padding: 12px;
    }


    body {
        font-size: 16px;
    }
    
    h2 {
        font-size: 20px;
    }

    /* Il menu di navigazione diventa più compatto */
    .cyber-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .cyber-nav a {
        padding: 10px;
        width: 90%;
        text-align: center;
    }

    /* Ottimizzazione per il footer */
    .cyber-footer {
        text-align: center;
        padding: 20px;
        color: #ffffff
    }
    

}

.search-container {
    text-align: center;
    margin-top: 15px;
    flex-direction: column;

}


#search {
    width: 80%;
    max-width: 400px;
    text-align: center;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #007BFF;
    border-radius: 5px;
    outline: none;
    flex-direction: column;

}

@media (max-width: 768px) {
    .cyber-panel {
        flex-direction: column !important; /* Disposizione verticale su mobile */
        text-align: center;
        align-items: center;
    }
    
    .cyber-panel.right {
        flex-direction: column-reverse !important; 
    }

    .cyber-panel img {
        width: 100%;
        height: auto;
    }
    
    .panel-content {
        padding: 15px;
    }
}

/* 🌍 Stile per tutti i link (a) */
a {
    color: #fff !important; /* Imposta il colore bianco */
    font-weight: bold; /* Imposta il testo in grassetto */
    text-decoration: none; /* Rimuove il sottolineato */
}

/* Effetto hover per migliorare la visibilità */
a:hover {
    color: rgb(227, 106, 203) !important; /* ✅ Spazio prima di !important */
    text-shadow: 0px 0px 10px

}


/* 🌍 Evita lo scorrimento orizzontale */
html, body {
    overflow-x: hidden; /* Nasconde lo scorrimento laterale */
    width: 100%;
}

/* Assicura che tutti i contenuti rimangano dentro i limiti */
.container, .scroll-container, .cyber-panel {
    max-width: 100vw; /* Impedisce agli elementi di superare la larghezza dello schermo */
    overflow-x: hidden;
}

/* Sezioni che potrebbero uscire dai limiti */
.cyber-panel {
    display: flex;
    flex-wrap: wrap; /* Evita che i contenuti escano fuori dallo schermo */
    justify-content: center; /* Centra i contenuti */
}

/* Evita che elementi assoluti escano dai limiti */
* {
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* Stile per il titolo glitchato */
.glitch {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: rgb(92, 215, 234); /* Azzurro cyberpunk */
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    animation: flicker 1.5s infinite alternate;
}

/* Effetto glitch */
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    clip: rect(0, 0, 0, 0);
    animation: glitch 0.5s infinite alternate;
}

/* Colore dei glitch */
.glitch::before {
    color: rgb(0, 255, 255); /* Un azzurro più chiaro per l'effetto */
    left: 2px;
    text-shadow: -2px 0 rgba(0, 255, 255, 0.8);
    animation: glitch 0.3s infinite alternate-reverse;
}

.glitch::after {
    color: rgb(191, 16, 162); /* Viola per contrasto */
    left: -2px;
    text-shadow: -2px 0 rgba(191, 16, 162, 0.8);
    animation: glitch 0.3s infinite alternate;
}

/* Effetto glitch */
@keyframes glitch {
    0% {
        clip: rect(20px, 9999px, 50px, 0);
    }
    50% {
        clip: rect(40px, 9999px, 100px, 0);
    }
    100% {
        clip: rect(60px, 9999px, 30px, 0);
    }
}

/* Effetto lampeggiante */
@keyframes flicker {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Comportamento mobile per scroll fluido */
@media (max-width: 768px) {
    .cyber-panel {
        transform: translateY(80px); /* spinta verticale in entrata */
        transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    }

    .cyber-panel.active {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Comportamento desktop */
@media (min-width: 769px) {
    .cyber-panel {
        transform: translateX(-100%);
        transition: transform 0.8s ease-out, opacity 0.8s ease-out;
    }

    .cyber-panel.right {
        transform: translateX(100%);
    }

    .cyber-panel.active {
        transform: translateX(0);
        opacity: 1;
    }
}
