:root {
    --primary-purple: #4a1d96;
    --dark-purple: #1a0b2e;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-white: #ffffff;
    --accent-glow: rgba(138, 43, 226, 0.5);
}

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

body {
    background: linear-gradient(to bottom, #1a0b2e 0%, #4a1d96 50%, #6b21a8 100%);
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Background Animations --- */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
    opacity: 0.5;
    animation: move-stars 200s linear infinite;
}

.twinkling {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
    opacity: 0.3;
    animation: twinkle 5s ease-in-out infinite;
}

@keyframes move-stars {
    from { background-position: 0 0; }
    to { background-position: 10000px 5000px; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

/* --- Mountains --- */
.mountains {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 300px;
}

.mountain {
    position: absolute;
    bottom: 0;
    width: 150%;
    height: 100%;
    background-repeat: repeat-x;
    background-position: bottom;
    opacity: 0.8;
}

.mountain-back {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 300" preserveAspectRatio="none"><path d="M0,300 L0,200 L150,100 L300,220 L450,150 L600,250 L800,100 L1000,200 L1000,300 Z" fill="%232e1065" opacity="0.6"/></svg>');
    height: 250px;
    animation: mountain-float 40s linear infinite;
}

.mountain-mid {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 300" preserveAspectRatio="none"><path d="M0,300 L0,250 L200,150 L400,280 L600,180 L800,270 L1000,200 L1000,300 Z" fill="%231e1b4b" opacity="0.8"/></svg>');
    height: 200px;
    animation: mountain-float 25s linear infinite reverse;
}

.mountain-front {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 300" preserveAspectRatio="none"><path d="M0,300 L0,280 L250,200 L500,290 L750,220 L1000,280 L1000,300 Z" fill="%230f172a"/></svg>');
    height: 150px;
    animation: mountain-float 15s linear infinite;
}

@keyframes mountain-float {
    from { transform: translateX(0); }
    to { transform: translateX(-33.33%); }
}

/* --- Login Card --- */
.login-wrapper {
    width: 100%;
    max-width: 900px; /* Increased for split view */
    padding: 20px;
    animation: fadeInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color: var(--text-white);
    position: relative;
    border: 1px solid var(--glass-border);
    display: flex; /* Split layout */
    overflow: hidden;
    min-height: 500px;
}

.login-left {
    flex: 1.2;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.login-right {
    flex: 1;
    position: relative;
    border-left: 1px solid var(--glass-border);
    overflow: hidden;
}

.login-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.login-right::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, transparent, rgba(26, 11, 46, 0.4));
    pointer-events: none;
}

.login-card::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 26px;
    padding: 3px;
    background: linear-gradient(45deg, #ffffff, #e0e0e0, #ffffff, #f0f0f0, #ffffff);
    background-size: 400%;
    -webkit-mask: 
       linear-gradient(#fff 0 0) content-box, 
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    animation: whiteGlow 5s linear infinite;
    pointer-events: none;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.4));
    z-index: 10;
}

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

.login-card h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-weight: 600;
    letter-spacing: 1px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px var(--accent-glow);
}

.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input {
    margin-right: 8px;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: white;
}

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    background: white;
    color: var(--dark-purple);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.register-link {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.register-link a {
    color: white;
    font-weight: 600;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .login-right {
        height: 250px;
        order: -1; /* Image on top for mobile */
        border-left: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .login-left {
        padding: 30px 20px;
    }
    
    .login-card h1 {
        font-size: 2rem;
    }
}
.otp-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.otp-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.hidden {
    display: none !important;
}
