/* ==============================================================================
   Obsidian Theme & Animated Crystal for Authelia Login Portal
   ============================================================================== */

@keyframes obsidian-float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.03);
    }
}

@keyframes obsidian-glow {
    0% {
        filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.5)) drop-shadow(0 0 30px rgba(124, 58, 237, 0.3));
    }
    100% {
        filter: drop-shadow(0 0 28px rgba(192, 132, 252, 0.85)) drop-shadow(0 0 55px rgba(147, 51, 234, 0.65));
    }
}

@keyframes aurora-bg {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Background Atmosphere */
body {
    background: radial-gradient(ellipse at 50% 20%, #1e1338 0%, #110922 45%, #08040f 100%) !important;
    background-size: 200% 200% !important;
    animation: aurora-bg 15s ease infinite !important;
    min-height: 100vh;
    color: #f3e8ff !important;
    overflow-x: hidden;
}

/* Star dust / ambient glow effect */
body::before {
    content: "";
    position: fixed;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 50% 35%, rgba(147, 51, 234, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Main animated Obsidian Logo */
img[alt="Logo"], .w-16 img {
    width: 108px !important;
    height: 108px !important;
    max-width: none !important;
    margin: 0 auto 1.25rem auto !important;
    animation: obsidian-float 3.6s ease-in-out infinite, obsidian-glow 2.4s ease-in-out infinite alternate !important;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: block !important;
}

img[alt="Logo"]:hover {
    transform: scale(1.12) rotate(2deg) !important;
}

/* Glassmorphism Card for Login Box */
div[id="root"] > div > div > div:has(img[alt="Logo"]),
div[id="root"] .max-w-xs, 
div[id="root"] .max-w-\[444px\] {
    background: rgba(20, 14, 32, 0.82) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.75), 0 0 35px rgba(124, 58, 237, 0.22) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    padding: 2.25rem 2rem !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    position: relative;
    z-index: 1;
}

div[id="root"] .max-w-xs:hover, 
div[id="root"] .max-w-\[444px\]:hover {
    border-color: rgba(192, 132, 252, 0.5) !important;
    box-shadow: 0 20px 56px 0 rgba(0, 0, 0, 0.85), 0 0 45px rgba(147, 51, 234, 0.35) !important;
}

/* Headers and Titles */
h1, h2, h3, h4, h5, h6 {
    color: #faf5ff !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
}

/* Primary Action Buttons */
button[type="submit"] {
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #a855f7 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 0.65rem !important;
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
}

button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 7px 24px rgba(147, 51, 234, 0.65) !important;
    filter: brightness(1.12) !important;
}

button[type="submit"]:active {
    transform: translateY(0px) !important;
}

/* Inputs Styling */
input {
    background: rgba(28, 20, 46, 0.75) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    color: #f5f3ff !important;
    border-radius: 0.65rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

input:focus {
    border-color: #a855f7 !important;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3) !important;
    outline: none !important;
}

/* Links and Secondary Text */
a {
    color: #c084fc !important;
    transition: color 0.2s ease !important;
}

a:hover {
    color: #e9d5ff !important;
    text-decoration: underline !important;
}
