/* --- Variabili Colore (dallo stile del logo) --- */
:root {
    --dark-blue: #0D1A26;
    --gold: #C5A465;
    --light-text: #F0F4F8;
    --dark-blue-rgb: 13, 26, 38; /* Per l'overlay con trasparenza */
}

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

html, body {
    height: 100%;
    overflow: hidden; /* Evita scroll orizzontale/verticale non voluto */
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark-blue);
    color: var(--light-text);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- 1. Sfondo Animato (Mappa e Unità) --- */
.animated-backdrop {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    z-index: -1;
    overflow: hidden;
    /* Aggiungi una leggera prospettiva per effetto 3D */
    perspective: 1000px; 
}

.background-map {
    position: absolute;
    width: 120%; /* Leggermente più grande per permettere il pan */
    height: 120%;
    top: -10%;
    left: -10%;
    object-fit: cover;
    filter: brightness(0.6) contrast(1.2) grayscale(80%) hue-rotate(200deg); /* Effetto ologramma blu/verde */
    opacity: 0.2; /* Opacità per non distrarre */
    animation: panMap 60s linear infinite alternate; /* Movimento lento della mappa */
    transform-origin: center center;
}

@keyframes panMap {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-5%, -5%) scale(1.1); }
}

/* --- Unità Animate (Fanteria e Caccia) --- */
.animated-unit {
    position: absolute;
    z-index: 0; /* Stanno sopra la mappa ma sotto l'overlay */
    opacity: 0.6;
    filter: drop-shadow(0 0 5px rgba(var(--gold-rgb), 0.5)); /* Bagliore dorato */
}

.fighter-jet {
    width: 80px; /* Dimensione dell'aereo */
    height: auto;
}

.infantry {
    width: 40px; /* Dimensione della fanteria */
    height: auto;
}

/* Animazioni Aerei */
.jet-1 {
    top: 20%;
    left: -10%; /* Parte da fuori schermo */
    animation: flyJet1 30s linear infinite;
}

@keyframes flyJet1 {
    0% { transform: translateX(0) translateY(0) rotate(10deg) scale(1); opacity: 0; }
    10% { opacity: 0.6; }
    50% { transform: translateX(120vw) translateY(10vh) rotate(20deg) scale(1.1); } /* Percorso diagonale */
    100% { transform: translateX(200vw) translateY(20vh) rotate(30deg) scale(0.9); opacity: 0; } /* Esce dallo schermo */
}

.jet-2 {
    bottom: 15%;
    right: -10%; /* Parte da fuori schermo a destra */
    animation: flyJet2 35s linear infinite reverse; /* Vola al contrario */
}

@keyframes flyJet2 {
    0% { transform: translateX(0) translateY(0) rotate(-10deg) scale(1); opacity: 0; }
    10% { opacity: 0.6; }
    50% { transform: translateX(-120vw) translateY(-5vh) rotate(-20deg) scale(1.05); }
    100% { transform: translateX(-200vw) translateY(-10vh) rotate(-30deg) scale(0.95); opacity: 0; }
}

/* Animazioni Fanteria */
.unit-1 {
    top: 70%;
    left: -5%;
    animation: moveInfantry1 40s linear infinite;
}

@keyframes moveInfantry1 {
    0% { transform: translateX(0) translateY(0); opacity: 0; }
    10% { opacity: 0.6; }
    50% { transform: translateX(80vw) translateY(-10vh); }
    100% { transform: translateX(120vw) translateY(10vh); opacity: 0; }
}

.unit-2 {
    top: 40%;
    right: -5%;
    animation: moveInfantry2 45s linear infinite reverse;
}

@keyframes moveInfantry2 {
    0% { transform: translateX(0) translateY(0); opacity: 0; }
    10% { opacity: 0.6; }
    50% { transform: translateX(-90vw) translateY(5vh); }
    100% { transform: translateX(-130vw) translateY(-5vh); opacity: 0; }
}

.unit-3 {
    bottom: 30%;
    left: -8%;
    animation: moveInfantry3 50s linear infinite;
}

@keyframes moveInfantry3 {
    0% { transform: translateX(0) translateY(0); opacity: 0; }
    10% { opacity: 0.6; }
    50% { transform: translateX(70vw) translateY(15vh); }
    100% { transform: translateX(110vw) translateY(25vh); opacity: 0; }
}


/* --- 2. Overlay Scuro --- */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--dark-blue-rgb), 0.50); /* Opacità leggermente ridotta */
    z-index: 0;
}

/* --- 3. Contenuto Principale (Stili invariati) --- */
.main-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px;
    animation: fadeInContent 2s ease-out;
}

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

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.logo-main {
    height: 120px;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 15px rgba(197, 164, 101, 0.5));
    animation: logoPulse 4s infinite ease-in-out;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(197, 164, 101, 0.5));
    }
    50% {
        transform: scale(1.03);
        filter: drop-shadow(0 0 25px rgba(197, 164, 101, 0.8));
    }
}

.main-headline {
    font-size: 4.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.main-headline .word {
    display: inline-block;
    opacity: 0;
    animation: revealWord 1s ease-out forwards;
}
.main-headline .word:nth-child(1) { animation-delay: 0.5s; }
.main-headline .word:nth-child(2) { color: var(--gold); animation-delay: 1.0s; }
.main-headline .word:nth-child(3) { animation-delay: 1.5s; }

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

.sub-headline {
    font-size: 1.5rem;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto 50px auto;
    opacity: 0;
    animation: revealWord 1s ease-out 2s forwards;
}

/* --- Countdown (Stili invariati) --- */
#countdown-wrapper {
    background: rgba(0, 0, 0, 0.4);
    padding: 30px 40px;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border-top: 2px solid rgba(197, 164, 101, 0.5);
    opacity: 0;
    animation: revealWord 1s ease-out 2.5s forwards;
}

#countdown-wrapper h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 25px;
    letter-spacing: 1.5px;
}

#countdown-timer {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--dark-blue);
    padding: 20px;
    border-radius: 8px;
    min-width: 100px;
    border: 1px solid var(--gold);
    box-shadow: 0 0 15px rgba(197, 164, 101, 0.2);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(197, 164, 101, 0.5);
}

.countdown-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(197, 164, 101, 0.5);
}

.countdown-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-top: 5px;
}

/* --- 4. Footer Fisso con CTA (Stili invariati) --- */
.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(180deg, transparent 0%, rgba(var(--dark-blue-rgb), 0.8) 100%);
    text-align: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.social-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--gold);
    color: var(--dark-blue);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid var(--gold);
    box-shadow: 0 0 20px rgba(197, 164, 101, 0.4);
}

.social-cta:hover {
    background-color: transparent;
    color: var(--gold);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(197, 164, 101, 0.6);
}

.social-cta i {
    font-size: 1.5rem;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-headline {
        font-size: 3.5rem;
    }
    .sub-headline {
        font-size: 1.3rem;
    }
    .countdown-number {
        font-size: 2.8rem;
    }
    .countdown-item {
        min-width: 80px;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .main-headline {
        font-size: 2.5rem;
    }
    .sub-headline {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    #countdown-timer {
        gap: 15px;
    }
    .countdown-number {
        font-size: 1.6rem;
    }
    .countdown-item {
        min-width: 60px;
        padding: 10px;
    }
    #countdown-wrapper h3 {
        font-size: 0.9rem;
    }
    .logo-main {
        height: 100px;
    }
    .social-cta span {
        display: none;
    }
    .social-cta {
        padding: 14px 16px;
        border-radius: 50%;
    }
    .main-footer {
        padding-bottom: 15px;
    }
}