/**
 * LOGIN.CSS - The "Void" Landing Theme
 * Handles the terminal-style animations, floating shapes,
 * and the glassmorphism login/signup forms.
 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #000;
    overflow-x: hidden;
    /* Allow vertical scroll, hide horizontal */
    overflow-y: auto;
    color: white;
}

/* Floating Shapes in Background */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    z-index: -1;
    animation: drift 10s infinite alternate ease-in-out;
}

.shape:nth-child(1) {
    display: none;
    /* Removed for professional look */
}

.shape:nth-child(2) {
    display: none;
    /* Removed for professional look */
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Antigravity Container */
.wrapper {
    position: relative;
    width: 400px;
    background: rgba(255, 255, 255, 0.05);
    /* Very transparent */
    border-radius: 20px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.1),
        /* White glow */
        0 0 40px rgba(0, 0, 0, 0.5);
    /* Dark shadow */
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;

    /* THE ANTIGRAVITY FLOAT */
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* 3D Geometric Orbits (Pure CSS decoration) */
.orbit-object {
    position: fixed;
    /* Fixed to screen */
    width: 80px;
    /* Increased from 60px */
    height: 80px;
    /* Increased from 60px */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    z-index: 0;
    /* Behind wrapper (z-index 1 or implicit) but above bg */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    /* Combined Animations: Orbit (Position) + ColorCycle (Colors) */
    animation: orbit 8s linear infinite, colorCycle 4s linear infinite alternate;
}

.orbit-1 {
    top: -40px;
    /* Half shown (Center on corner) */
    right: -40px;
    /* Half shown */
    animation-delay: 0s, 0s;
}

.orbit-2 {
    bottom: -40px;
    /* Half shown */
    left: -40px;
    /* Half shown */
    /* Removed size/shape overrides to match orbit-1 (Cube, 80px) */
    animation: orbit 8s linear infinite, colorCycle 4s linear infinite alternate-reverse;
    /* Synced Animation */
    animation-delay: -4s, -2s;
    /* Offsets for position and color */
}

@keyframes colorCycle {
    0% {
        border-color: #0ef;
        box-shadow: 0 0 25px rgba(0, 238, 255, 0.5);
        background: linear-gradient(135deg, rgba(0, 238, 255, 0.2), rgba(0, 238, 255, 0.05));
    }

    50% {
        border-color: #ff00ff;
        /* Magenta */
        box-shadow: 0 0 25px rgba(255, 0, 255, 0.5);
        background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(255, 0, 255, 0.05));
    }

    100% {
        border-color: #00ff9d;
        /* Bright Mint/Green */
        box-shadow: 0 0 25px rgba(0, 255, 157, 0.5);
        background: linear-gradient(135deg, rgba(0, 255, 157, 0.2), rgba(0, 255, 157, 0.05));
    }
}

/* Vibrant Shadow Cycle for Login Box */
@keyframes shadowCycle {
    0% {
        box-shadow: 0 0 20px rgba(0, 238, 255, 0.4), 0 0 40px rgba(0, 238, 255, 0.1);
        /* Cyan */
        border-color: rgba(0, 238, 255, 0.3);
    }

    33% {
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.4), 0 0 40px rgba(255, 0, 255, 0.1);
        /* Magenta */
        border-color: rgba(255, 0, 255, 0.3);
    }

    66% {
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.4), 0 0 40px rgba(0, 255, 255, 0.1);
        /* Electric Blue/Cyan mix */
        border-color: rgba(0, 255, 255, 0.3);
    }

    100% {
        box-shadow: 0 0 20px rgba(0, 238, 255, 0.4), 0 0 40px rgba(0, 238, 255, 0.1);
        /* Loop back */
        border-color: rgba(0, 238, 255, 0.3);
    }
}

@keyframes orbit {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(180deg);
    }

    100% {
        transform: translateY(0) rotate(360deg);
    }
}

@keyframes orbit-reverse {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(15px) rotate(-180deg);
    }

    100% {
        transform: translateY(0) rotate(-360deg);
    }
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ffffff, #a0a0a0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.input-box {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
}

.input-box input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 0;
    font-size: 1rem;
    color: #fff;
    outline: none;
    transition: 0.3s;
}

/* Fix for Browser Autofill Background */
.input-box input:-webkit-autofill,
.input-box input:-webkit-autofill:hover,
.input-box input:-webkit-autofill:focus,
.input-box input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #000 inset !important;
    /* Match body bg */
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

.input-box label {
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    transition: 0.3s;
}

.input-box input:focus~label,
.input-box input:valid~label {
    top: -20px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.input-box input:focus {
    border-bottom-color: #fff;
    box-shadow: 0 10px 10px -10px rgba(255, 255, 255, 0.5);
    /* White Pulse */
}

/* Liquid Metal Button */
.btn {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #e0e0e0, #ffffff, #e0e0e0);
    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(255, 255, 255, 0.2);
    color: #333;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

.toggle-link {
    margin-top: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.toggle-link a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.toggle-link a:hover {
    text-decoration: underline;
    text-shadow: 0 0 5px #fff;
}

.hidden {
    display: none;
}

/* Message Styles */
.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    width: 100%;
}

.message.success {
    background: rgba(0, 255, 127, 0.2);
    border: 1px solid rgba(0, 255, 127, 0.5);
    color: #00ff7f;
}

.message.error {
    background: rgba(255, 69, 58, 0.2);
    border: 1px solid rgba(255, 69, 58, 0.5);
    color: #ff453a;
}

/* Jumping Dots Animation */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 4px;
    background-color: #333;
    /* Dark dots for inside the button */
    border-radius: 50%;
    animation: jump 0.6s infinite alternate;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes jump {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-8px);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .wrapper {
        width: 90%;
        /* Breathing room */
        max-width: 400px;
        height: auto;
        /* Allow content to dictate height */
        min-height: auto;
        border-radius: 20px;
        /* Keep rounded corners looks better */
        border: 1px solid rgba(255, 255, 255, 0.1);
        /* Keep border */
        padding: 30px 20px;
        margin: 20px 0;
        /* Add margin for scroll */
        /* Enable float animation again if it fits, or keep static for safe layout */
        animation: float 6s ease-in-out infinite, shadowCycle 8s linear infinite alternate;

        /* Animation inherited from .wrapper class now includes shadowCycle */
    }

    /* Restore and Scale Animations for Mobile */
    .orbit-object {
        display: block;
        transform: scale(0.6);
        /* Make smaller to fit mobile */
        z-index: 0;
    }

    .orbit-1 {
        right: -40px;
        top: -40px;
    }

    .orbit-2 {
        left: -40px;
        bottom: -40px;
    }
}

/* Admin Button Style */
.admin-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Neutral Border */
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    /* Increased size */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    letter-spacing: 0.5px;
}

.admin-btn:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* === DYNAMIC NEON BACKGROUND ANIMATION === */
#background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -5;
    /* Behind everything */
    overflow: hidden;
    pointer-events: none;
}

.geo-shape {
    position: absolute;
    opacity: 0.5;
    /* Reduced opacity */
    /* Single drop-shadow for subtle glow + blur */
    filter: drop-shadow(0 0 8px currentColor) blur(1px);
}

/* Shape Definitions */
.shape-circle {
    border-radius: 50%;
    border: 5px solid currentColor;
    /* Thicker to match triangles */
    background: transparent;
}

.shape-square {
    border: 5px solid currentColor;
    /* Thicker to match triangles */
    background: transparent;
}

.shape-triangle {
    background: transparent;
    border: none;
    /* SVG implementation */
}

/* === GOOGLE SIGN-IN UI POLISH === */
.google-signin-section {
    width: 100%;
    margin-top: 1.5rem;
    display: none; /* Controlled by script.js */
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    animation: fadeInSlideUp 0.8s ease-out forwards;
}

.google-separator {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.google-separator::before,
.google-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

#g_id_signin {
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}

#g_id_signin:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

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

/* Animations are now handled in JS via Web Animations API for full screen drift */

/* --- Splash Screen --- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    /* Match body bg */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.splash-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: contain;
    /* Ensure logo fits in circle */
    background: white;
    /* Clean white background for the logo */
    padding: 12px;
    /* Spacing for badge look */
    z-index: 2;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* White Glimpse Rotating Ring */
.glimpse-ring {
    position: absolute;
    top: 5px;
    /* Adjust for padding difference */
    left: 5px;
    width: 110px;
    /* Slightly larger than logo */
    height: 110px;
    border-radius: 50%;
    border: 3px solid transparent;
    /* Base transparent */
    border-top-color: #ffffff;
    /* Bright white head */
    border-right-color: rgba(255, 255, 255, 0.5);
    /* Fading tail */
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    /* Glow */
    animation: rotateGlimpse 1.2s linear infinite;
    z-index: 1;
}

@keyframes rotateGlimpse {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text-container {
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 300px;
}

#loading-sentence {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-align: center;
    transition: opacity 0.5s ease;
}