/* --- css/global.css (Versione per Bootstrap) --- */

:root {
    /* --- TEMA SCURO (Default Cyber Core) --- */
    --bg-deep: #0f172a;
    --bg-surface: #1e293b;
    --neon-blue: #3b82f6;
    --neon-cyan: #06b6d4;
    --text-main: #f1f5f9;
    --text-dim: #94a3b8;
    --panel-left: rgba(30, 41, 59, 0.6);
    --panel-right: rgba(15, 23, 42, 0.85);
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.03);
    --grid-line: rgba(6, 182, 212, 0.05);
    --orb-glow: rgba(59, 130, 246, 0.15);
    --shadow-color: rgba(0,0,0,0.5);
}

body.light-mode {
    /* --- TEMA CHIARO (Light Mode) --- */
    --bg-deep: #f8fafc;
    --bg-surface: #ffffff;
    --neon-blue: #0052D4;
    --neon-cyan: #06b6d4;
    --text-main: #0f172a;
    --text-dim: #64748b;
    --panel-left: linear-gradient(135deg, #f8fafc, #eff6ff);
    --panel-right: #ffffff;
    --border-color: #e2e8f0;
    --input-bg: #f8fafc;
    --grid-line: rgba(0, 82, 212, 0.04);
    --orb-glow: rgba(0, 82, 212, 0.1);
    --shadow-color: rgba(0,0,0,0.1);
}

/* Sovrascriviamo le impostazioni di base del body di Bootstrap */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- ANIMAZIONI GLOBALI --- */
@keyframes gridMove {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 0 0, 0 100px, 0 0; }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-10deg); }
    50% { transform: translateY(-20px) rotate(-5deg); }
}

/* --- SFONDI E ORBITE GLOBALI --- */
.cyber-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(var(--bg-deep), var(--bg-deep)), 
                repeating-linear-gradient(0deg, transparent 0, transparent 49px, var(--grid-line) 50px), 
                repeating-linear-gradient(90deg, transparent 0, transparent 49px, var(--grid-line) 50px);
    background-size: 100% 100%, 100px 100px, 100px 100px;
    animation: gridMove 20s linear infinite;
    transition: background 0.4s ease;
}

.glowing-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--orb-glow) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    left: -100px;
    z-index: 0;
    animation: pulse 5s ease-in-out infinite alternate;
    transition: background 0.4s ease;
}

/* Impedisce la selezione accidentale del testo e il menu contestuale su elementi interattivi */
.nav-item, .btn-primary, .type-icon-btn, .user-profile {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Evita l'effetto "evidenziatore blu" al tocco su Android/Chrome */
* {
    -webkit-tap-highlight-color: transparent;
}

/* BLOCCO ZOOM DEFINITIVO (Mantenuto per le app web/mobile) */
html, body {
    touch-action: pan-x pan-y;
    -webkit-text-size-adjust: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Impedisce lo zoom automatico di iOS quando si clicca su un input */
@media screen and (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}