:root {
    --ai-primary: #6366f1;
    --ai-secondary: #ec4899;
    --ai-accent: #06b6d4;
    --glass: rgba(15, 23, 42, 0.6);
    --border: rgba(255, 255, 255, 0.15);
    --bg-dark: #020617;
}

/* THEME DEFINITIONS */
body.theme-1 {
    --ai-primary: #ff0055;
    --ai-secondary: #00ff99;
    --ai-accent: #00e5ff;
    --bg-dark: #05010a;
}

body.theme-2 {
    --ai-primary: #8a2be2;
    --ai-secondary: #ff4500;
    --ai-accent: #da70d6;
    --bg-dark: #0a0212;
}

body.theme-3 {
    --ai-primary: #00ff7f;
    --ai-secondary: #4b0082;
    --ai-accent: #00ffff;
    --bg-dark: #010a05;
}

body.theme-4 {
    --ai-primary: #C5A059;
    --ai-secondary: #1E1B4B;
    --ai-accent: #C5A059;
    --bg-dark: #0a0802;
}

body.theme-5 {
    --ai-primary: #064E3B;
    --ai-secondary: #F5F7F6;
    --ai-accent: #059669;
    --bg-dark: #010a08;
}

body.theme-6 {
    --ai-primary: #f97316;
    --ai-secondary: #7c2d12;
    --ai-accent: #fbbf24;
    --bg-dark: #0a0501;
}

body.theme-7 {
    --ai-primary: #3b82f6;
    --ai-secondary: #1e3a8a;
    --ai-accent: #60a5fa;
    --bg-dark: #01050a;
}

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

body {
    background-color: var(--bg-dark);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 2000px;
    transition: background 1.5s ease;
}

#webgl-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3;
    pointer-events: none;
}

.theme-switch {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 100;
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
    font-weight: bold;
    transition: 0.3s;
}

.theme-switch:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--ai-primary);
}

.glass-container {
    position: relative;
    z-index: 10;
    width: 420px;
    padding: 40px;
    background: var(--glass);
    backdrop-filter: blur(50px) saturate(200%);
    border: 1px solid var(--border);
    border-radius: 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    text-align: center;
}

/* --- ANIMATED TEXT EFFECTS --- */

.logo-text {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    /* Animated Gradient Background */
    background: linear-gradient(to right,
            var(--ai-accent) 20%,
            #fff 40%,
            var(--ai-secondary) 60%,
            var(--ai-accent) 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;

    /* Continuous Shimmer Animation */
    animation: textShimmer 4s linear infinite;
    display: inline-block;
}

.tagline {
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: bold;
    margin-top: 10px;
    position: relative;
    display: block;

    /* Subtle Glow/Pulse Animation */
    animation: taglinePulse 3s ease-in-out infinite;
}

/* Keyframes for the Shimmering Gradient */
@keyframes textShimmer {
    to {
        background-position: 200% center;
    }
}

/* Keyframes for Tagline breathing effect */
@keyframes taglinePulse {

    0%,
    100% {
        opacity: 0.6;
        letter-spacing: 5px;
        filter: blur(0px);
    }

    50% {
        opacity: 1;
        letter-spacing: 7px;
        filter: drop-shadow(0 0 8px var(--ai-accent));
    }
}

.login-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px;
    border-radius: 15px;
    margin: 25px 0;
    border: 1px solid var(--border);
}

.tab {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.85rem;
    transition: 0.3s;
}

.tab.active {
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
    color: white;
}

.input-box {
    position: relative;
    margin-bottom: 15px;
}

.input-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ai-accent);
    width: 18px;
}

input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 15px;
    color: white;
    outline: none;
}

.btn-ai {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(90deg, var(--ai-primary), var(--ai-secondary));
    color: white;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
}

.btn-ai:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px var(--ai-primary);
}

.form-footer {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.link-accent {
    color: var(--ai-accent);
    text-decoration: none;
}

.link-secondary {
    color: var(--ai-secondary);
    text-decoration: none;
}

/* HUD Orbit Styling */
.scene-hud {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    z-index: 0;
    animation: rotateHUD 80s linear infinite;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 90px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--ai-primary);
    /* Themed Border */
    box-shadow: 0 0 15px var(--ai-primary);
    /* Themed Glow */
    border-radius: 15px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin-left: -70px;
    margin-top: -45px;
    transition: 0.5s;
}

/* Inner Float Animation */
.floating-element i,
.floating-element span {
    animation: innerFloat 3s ease-in-out infinite;
}

.floating-element span {
    animation-delay: 0.2s;
}

@keyframes innerFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.floating-element i {
    margin-bottom: 8px;
    color: var(--ai-accent);
}

.floating-element span {
    font-size: 0.65rem;
    letter-spacing: 1px;
    font-weight: 800;
}

.floating-element:nth-child(1) {
    transform: rotateY(0deg) translateZ(550px);
}

.floating-element:nth-child(2) {
    transform: rotateY(72deg) translateZ(550px);
}

.floating-element:nth-child(3) {
    transform: rotateY(144deg) translateZ(550px);
}

.floating-element:nth-child(4) {
    transform: rotateY(216deg) translateZ(550px);
}

.floating-element:nth-child(5) {
    transform: rotateY(288deg) translateZ(550px);
}

@keyframes rotateHUD {
    from {
        transform: rotateY(0deg);
    }

    to {
        transform: rotateY(360deg);
    }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .glass-container {
        width: 90%;
        max-width: 400px;
        padding: 30px 25px;
        margin: 15px;
    }

    .logo-text {
        font-size: 2.5rem;
    }

    .scene-hud {
        display: block;
        transform: scale(0.6);
        opacity: 0.7;
    }

    .floating-element {
        width: 120px;
        height: 80px;
    }

    .theme-switch {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        white-space: nowrap;
    }

    .theme-switch:hover {
        transform: translateX(-50%) scale(1.05);
    }
}

@media (max-height: 600px) {
    .glass-container {
        padding: 20px;
    }

    .logo-area {
        transform: scale(0.8);
        margin-bottom: -10px;
    }

    .logo-text {
        font-size: 2rem;
    }

    .theme-switch {
        bottom: 10px;
        padding: 8px 15px;
        font-size: 0.7rem;
    }
}