/* --- CONFIGURAZIONE CORE & VARIABILI --- */
:root {
    --bg-color: #050505;
    --main-color: #00f2ff;    /* Ciano Neon */
    --accent-color: #bc13fe;  /* Viola */
    --hot-pink: #ff00f2;      /* Rosa Neon */
    --font-main: 'Courier New', Courier, monospace;
    --terminal-bg: rgba(5, 5, 5, 0.95);
}

body {
    background-color: var(--bg-color);
    background-image: url('DJ Duomo.png'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    text-transform: uppercase;
    overflow-x: hidden;
    animation: background-soft-pulse 30s ease-in-out infinite alternate;
}

@keyframes background-soft-pulse {
    0% { filter: brightness(0.6) contrast(1.1); }
    100% { filter: brightness(0.8) contrast(1.2); }
}

/* --- EFFETTI OVERLAY --- */
.rain {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1; pointer-events: none; opacity: 0.2;
}

.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    z-index: 100; pointer-events: none; opacity: 0.15;
}

/* --- NAVIGAZIONE --- */
.back-nav { 
    padding: 20px; 
    position: sticky; 
    top: 0; 
    z-index: 110; 
    background: rgba(5,5,5,0.85); 
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 242, 255, 0.2);
}

.back-btn {
    color: var(--main-color);
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid var(--main-color);
    padding: 8px 15px;
    transition: 0.3s;
}
.back-btn:hover { background: var(--main-color); color: #000; box-shadow: 0 0 15px var(--main-color); }

/* --- LAYOUT CONTENITORE --- */
.collab-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
    /* FIX: Allineamento centrale per tutti i blocchi figli */
    display: flex;
    flex-direction: column;
    align-items: center; 
}

.page-header { 
    width: 100%; /* Occupa tutto lo spazio per mantenere il bordo a sinistra */
    text-align: left; 
    margin: 40px 0 60px; 
    border-left: 5px solid var(--main-color); 
    padding-left: 20px;
    box-sizing: border-box;
}

.glitch-neon {
    font-size: clamp(2.2rem, 9vw, 4.5rem);
    font-weight: 900;
    letter-spacing: 5px;
    color: #fff;
    animation: neon-flicker 3.5s infinite;
}

@keyframes neon-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { text-shadow: 0 0 10px #fff, 0 0 25px var(--main-color), 0 0 50px var(--accent-color); opacity: 1; }
    20%, 24%, 55% { text-shadow: none; opacity: 0.6; }
}

.subtitle { 
    display: inline-block;
    background: #000;
    color: var(--hot-pink); 
    font-size: 0.8rem; 
    padding: 8px 15px;
    border: 1px solid var(--hot-pink);
    box-shadow: 0 0 15px rgba(255, 0, 242, 0.2);
    /* FIX: Previene sforamento su mobile */
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

/* --- GRID ORIZZONTALE --- */
.collab-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0 40px;
    width: 100%;
    /* FIX: Centra le card se sono poche */
    justify-content: center; 
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--main-color) transparent;
}

.collab-grid::-webkit-scrollbar { height: 6px; }
.collab-grid::-webkit-scrollbar-thumb { background: var(--main-color); border-radius: 10px; }

/* --- COLLAB CARD --- */
.collab-card {
    flex: 0 0 280px;
    background: var(--terminal-bg);
    border: 1px solid rgba(0, 242, 255, 0.2);
    padding: 15px;
    scroll-snap-align: center;
    transition: all 0.4s ease;
    box-sizing: border-box;
}

.collab-card:hover {
    border-color: var(--hot-pink);
    box-shadow: 0 0 20px rgba(255, 0, 242, 0.2);
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    aspect-ratio: 4/5;
    overflow: hidden;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.8);
    transition: 0.5s;
}

.collab-card:hover img { filter: grayscale(0%) brightness(1.1); }

.card-info h3 { 
    font-size: 1.1rem; 
    color: #fff; 
    margin: 0 0 5px; 
    letter-spacing: 1px;
    /* FIX: Evita sforamento nomi */
    overflow-wrap: break-word;
}

.role { color: var(--hot-pink); font-size: 0.75rem; font-weight: bold; margin-bottom: 10px; }

.description { 
    font-size: 0.8rem; 
    line-height: 1.4; 
    text-transform: none; 
    color: #ccc;
    /* FIX: Forza ritorno a capo su mobile */
    white-space: normal;
    overflow-wrap: break-word;
}

/* --- FORM COLLABORATION --- */
.propose-section {
    background: rgba(5, 5, 5, 0.95);
    border: 2px solid var(--main-color);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.3), inset 0 0 15px rgba(0, 242, 255, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 880px; 
    margin: 80px 0; 
    position: relative;
    box-sizing: border-box;
    /* FIX: Assicura centramento perfetto nel contenitore flex */
    align-self: center;
}

.terminal-title {
    color: #fff;
    text-shadow: 0 0 10px var(--main-color), 0 0 20px var(--main-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
    overflow-wrap: break-word;
}

.form-instruction { font-size: 0.75rem; color: #ccc; margin-bottom: 40px; }

.input-group { margin-bottom: 30px; text-align: left; }
.input-group label {
    display: block;
    color: var(--main-color);
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.input-group input, 
.input-group textarea, 
.input-group select {
    width: 100%;
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid var(--main-color);
    padding: 15px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    box-sizing: border-box; /* Cruciale per evitare che l'input esca dai bordi */
}

#submit-btn {
    width: 100%;
    background: var(--hot-pink);
    color: #fff;
    border: none;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 5px;
    cursor: pointer;
    box-shadow: 0 0 25px var(--hot-pink);
    box-sizing: border-box;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .collab-grid {
        gap: 15px; 
        padding: 10px 15px 40px; 
        justify-content: flex-start; /* Permette lo scroll su mobile */
    }

    .collab-card { 
        flex: 0 0 80vw; /* Card più larghe su mobile */
    }
    
    .propose-section { 
        width: 100%;
        padding: 25px 15px; 
        margin: 40px 0; 
    }
    
    .glitch-neon { font-size: 10vw; text-align: center; }
    
    .terminal-title { 
        font-size: 1.2rem; 
        text-align: center; 
        white-space: normal; 
    }
    
    #submit-btn { font-size: 1.1rem; padding: 15px; letter-spacing: 2px; }
}