/* GLOBAL RESETS AND FONTS */
:root {
    --color-neon-cyan: #00ffff;
    --color-neon-blue: #0077ff;
    --color-bg-dark: #05070f; /* Even darker background */
    --color-glass-dark: rgba(15, 25, 45, 0.1); /* Lighter glass body for more contrast */
    --color-glass-border: rgba(0, 119, 255, 0.6);
    --color-text-light: #e6f7ff;
    --color-error-red: #ff3366;
    --shadow-depth: 0 10px 40px 0 rgba(0, 0, 0, 0.6);
    --shadow-neon: 0 0 10px var(--color-neon-cyan), 0 0 30px var(--color-neon-blue), 0 0 50px var(--color-neon-blue); /* More intense neon */
    --font-primary: 'Orbitron', sans-serif;
    --font-secondary: 'Share Tech Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden; 
}

body {
    font-family: var(--font-secondary);
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- BACKGROUND ANIMATION --- */

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 20, 40, 0.9) 0%, var(--color-bg-dark) 70%);
    filter: blur(0.5px); /* Less blur for sharpness */
    z-index: -2;
}

/* New: Subtle Scientific Grid Overlay for Depth */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    transform: perspective(500px) rotateX(70deg) translateY(50px);
    transform-origin: bottom;
    animation: gridPulse 8s ease-in-out infinite alternate;
}

@keyframes gridPulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.5; }
}


.light-streaks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15) 0%, rgba(0, 119, 255, 0.15) 25%, transparent 50%, rgba(0, 255, 255, 0.15) 75%, rgba(0, 119, 255, 0.15) 100%);
    background-size: 300% 300%;
    animation: moveStreaks 45s linear infinite;
    opacity: 0.3;
}

@keyframes moveStreaks {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

.particle-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle, rgba(255, 255, 255, 0.3) 1px, transparent 1px) 0 0 / 25px 25px,
        radial-gradient(circle, rgba(0, 255, 255, 0.3) 1px, transparent 1px) 12px 12px / 25px 25px;
    opacity: 0.5;
    animation: pulseParticles 10s ease-in-out infinite alternate;
}

/* --- LOGIN CONTAINER & CARD --- */

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1500px; /* Increased perspective for better 3D effect */
    z-index: 10;
    animation: fadeSlideIn 1.5s ease-out forwards;
    opacity: 0;
    transform: translateY(50px);
    position: relative; /* To position projection */
}

@keyframes fadeSlideIn {
    to { opacity: 1; transform: translateY(0); }
}

/* New: Card Projection (Adds serious depth and luxury) */
.card-projection {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%) translateZ(-100px) rotateX(10deg);
    width: 440px; /* Slightly wider than the card */
    height: 100%;
    background: rgba(0, 119, 255, 0.1);
    border-radius: 20px;
    filter: blur(30px);
    opacity: 0.7;
    z-index: -1;
    transition: transform 0.5s ease-in-out;
}

.login-container:hover .card-projection {
     transform: translateX(-50%) translateZ(-50px) rotateX(0deg);
}

.login-card {
    width: 420px;
    padding: 40px;
    border-radius: 20px;
    
    /* ULTRA MODERN GLASSMORPHISM */
    background: var(--color-glass-dark);
    box-shadow: var(--shadow-depth), var(--shadow-neon);
    backdrop-filter: blur(20px) saturate(200%); /* More intense blur/saturation */
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    
    /* NEON BORDER */
    border: 2px solid var(--color-glass-border); /* Thicker border */
    position: relative;
    overflow: hidden; 
    
    /* 3D TILT EFFECT */
    transform: rotateX(8deg) rotateY(-8deg) translateZ(0); /* Increased initial tilt */
    transition: transform 0.5s ease-in-out;
}

.login-card:hover {
    transform: rotateX(0deg) rotateY(0deg) translateZ(0);
}

/* --- LOGO AND TITLE --- */

.hologram-text {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 3.5em; /* Larger logo */
    text-align: center;
    margin-bottom: 15px;
    text-transform: uppercase;
    position: relative;
    
    /* FUTURISTIC BLUE HOLOGRAM GLOW */
    color: var(--color-text-light);
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 30px rgba(0, 119, 255, 1),
        0 0 60px rgba(0, 119, 255, 0.7);
    animation: hologramFlicker 1.8s ease-in-out infinite alternate;
}

/* New: Hologram Scanline Effect */
.hologram-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-neon-cyan), transparent);
    animation: scanline 3s linear infinite;
    opacity: 0.6;
}

@keyframes scanline {
    0% { transform: translateY(0%); }
    100% { transform: translateY(100%); }
}

@keyframes hologramFlicker {
    0% { opacity: 1; }
    50% { opacity: 0.9; }
    100% { opacity: 1; text-shadow: var(--shadow-neon); }
}

.subtitle {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 1em;
    text-align: center;
    color: var(--color-neon-cyan);
    margin-bottom: 35px;
    letter-spacing: 4px; /* Increased letter spacing */
    text-transform: uppercase;
}

/* --- INPUT FIELDS --- */

.input-group {
    position: relative;
    margin-bottom: 30px; /* More spacing */
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8em;
    color: var(--color-neon-cyan);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.input-group input {
    width: 100%;
    padding: 14px 18px; /* Bigger input area */
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px; /* More rounded corners */
    color: var(--color-text-light);
    font-size: 1.1em;
    font-family: var(--font-secondary);
    outline: none;
    transition: border-color 0.4s, box-shadow 0.4s;
}

.input-group input:focus {
    border-color: var(--color-neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
}

.input-group input:focus + .input-glow {
    /* More intense input glow */
    box-shadow: 0 0 20px var(--color-neon-cyan), 0 0 40px var(--color-neon-blue);
}

/* --- LOGIN BUTTON --- */

.login-button {
    width: 100%;
    padding: 18px; /* Taller button */
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 25px;
    position: relative;
    overflow: hidden;
    
    background: linear-gradient(90deg, var(--color-neon-blue), var(--color-neon-cyan));
    color: var(--color-bg-dark);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.2em; /* Bigger text */
    letter-spacing: 3px;
    text-transform: uppercase;
    
    transition: transform 0.2s, box-shadow 0.4s;
    z-index: 1;
}

.login-button:hover {
    background: linear-gradient(90deg, var(--color-neon-cyan), var(--color-neon-blue));
    background-size: 200% auto;
    background-position: right center;
    box-shadow: var(--shadow-neon);
    transform: translateY(-2px); /* Slight lift on hover */
}

/* Enhanced Button Border Glow Effect */
.button-border-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: conic-gradient(from 0deg, var(--color-neon-cyan), var(--color-neon-blue), var(--color-neon-cyan));
    background-size: 400% 400%;
    border-radius: 15px;
    filter: blur(10px); /* More blur */
    z-index: -2;
    opacity: 0;
    transition: opacity 0.4s;
}

.login-button:hover .button-border-glow {
    opacity: 1;
    animation: borderGlow 8s linear infinite; /* Slower, continuous glow */
}

@keyframes borderGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- ERROR MESSAGE --- */

.error-message {
    height: 25px;
    color: var(--color-error-red);
    text-align: center;
    font-family: var(--font-secondary);
    font-size: 1em;
    margin-top: 15px;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Invalid Login Shake Animation */
.shake {
    animation: shake 0.5s ease-in-out;
    /* More pronounced red glow */
    box-shadow: 0 0 20px var(--color-error-red), 0 0 40px rgba(255, 51, 102, 0.7) !important;
    border-color: var(--color-error-red) !important;
}

/* --- FOOTER --- */

.footer {
    margin-top: 25px;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s;
}

.footer:hover {
    color: var(--color-neon-cyan);
}