@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600&family=Roboto&display=swap');

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #0f1115; /* Fallback dark color */
    color: white;
    height: 100vh;
    display: flex;
    flex-direction: column; /* Stacks header, section, footer vertically */
    /* If you were using a money-ground or other element, remove the flex-direction: column */
}

/* Ensure header is on top of the starfield */
header {
    width: 100%;
    padding: 1rem 2rem;
    background-color: #12151c;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #00ffff;
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.05);
    position: relative; /* Needed to set a z-index against fixed elements */
    z-index: 5; 
}


/* --- STARFIELD BACKGROUND STYLES --- */
#starfield-container {
    /* Cover the entire viewport */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* Send it to the very back */
    z-index: -2; 
    overflow: hidden; 
}


/* --- LOGIN SECTION STYLES (Content on top) --- */
.login-section {
    /* CRITICAL: flex: 1 tells this section to consume all available vertical space,
       which correctly centers the login-box and pushes the footer down. */
    flex: 1; 
    
    display: flex;
    justify-content: center; /* Centers .login-box horizontally */
    align-items: center;     /* Centers .login-box vertically */
    padding: 2rem;
    
    /* CRITICAL: Bring the login form ABOVE the starfield (z-index: -2) */
    position: relative; 
    z-index: 1; 
}

.login-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 2rem;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    backdrop-filter: blur(10px); /* This applies the blur to the starfield behind it */
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
    animation: fadeIn 0.6s ease;
}

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

.login-box h2 {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 1.5rem;
    color: #00ffff;
}

form label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
    color: #90e0ef;
    font-weight: 500;
}

form input {
    width: 100%;
    padding: 0.7rem;
    border: none;
    border-radius: 10px;
    background: rgba(0, 255, 255, 0.08);
    color: white;
    outline: none;
    margin-bottom: 0.7rem;
    transition: box-shadow 0.3s;
}

form input:focus {
    box-shadow: 0 0 8px #00ffff;
}

button {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #00bcd4, #007ea7);
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.3s ease;
}

button:hover {
    background: linear-gradient(135deg, #00ffff, #00bcd4);
    transform: scale(1.03);
    box-shadow: 0 0 12px #00ffff;
}

.error-msg {
    margin-top: 1rem;
    text-align: center;
    color: #ff4d4d;
    font-size: 0.9rem;
}