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

body {
    background-color: #030712;
    color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Stili SVG e Animazioni */
#intro-container {
    position: absolute;
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

#intro-container.fade-out {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

#constellation-svg {
    width: 100%;
    height: auto;
    max-height: 70vh;
}

.astro-line {
    stroke: rgba(147, 197, 253, 0.5);
    stroke-width: 1.8;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 3.2s ease-in-out forwards;
}

.astro-star {
    opacity: 0;
    animation: fadeInStar 0.6s ease-in-out forwards;
}
.astro-star.minor { fill: #cbd5e1; filter: drop-shadow(0 0 3px rgba(203, 213, 225, 0.4)); }
.astro-star.medium { fill: #93c5fd; filter: drop-shadow(0 0 5px rgba(147, 197, 253, 0.6)); }
.astro-star.warm { fill: #fdba74; filter: drop-shadow(0 0 5px rgba(253, 186, 116, 0.7)); }
.astro-star.major { fill: #e0f2fe; filter: drop-shadow(0 0 8px #38bdf8); }
.astro-star.brightest { fill: #ffffff; filter: drop-shadow(0 0 14px #ffffff); }

.andromeda-galaxy {
    opacity: 0;
    transform-origin: 380px 390px;
    animation: fadeInGalaxy 1.5s ease-in-out 1s forwards;
}

.intro-title {
    margin-top: 15px;
    font-size: 1.5rem;
    letter-spacing: 0.4em;
    color: #93c5fd;
    opacity: 0;
    animation: fadeInStar 1s ease-in-out 2s forwards;
}

@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes fadeInStar { to { opacity: 1; } }
@keyframes fadeInGalaxy { to { opacity: 0.9; } }

/* Box di Login MFA */
#login-container {
    position: absolute;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    pointer-events: none;
}

#login-container.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.login-card {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 12px;
    padding: 35px 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.1);
}

.login-card h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.login-card .subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 6px;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

#mfa-code {
    letter-spacing: 0.3em;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 10px;
}

.btn-login:hover {
    opacity: 0.9;
}

.btn-login:active {
    transform: scale(0.98);
}