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

body {
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    overflow: hidden;
    background: #0a0e27;
    position: relative;
}

#canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: black;
}


/* Side Image - Left Only */
.side-image-left {
    position: fixed;
    left: 0;
    top: 0;
    width: 35%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1419242902214-272b3f66ee7a?q=80&w=1200&auto=format&fit=crop');
    background-size: cover;
    background-position: center right;
    z-index: 1;
    opacity: 0.6;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
}

.side-image-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(10, 14, 39, 0.8) 100%);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 25px 0;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    z-index: 1000;
    animation: slideDown 0.8s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(45deg, #667eea, #764ba2, #bc8ac1);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoGlow 3s ease infinite;
    letter-spacing: 4px;
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.6));
}

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

/* Main Container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 120px 20px 100px;
    position: relative;
    z-index: 10;
}

/* Form Card with 3D Effect */
.form-card {
    background: rgba(15, 20, 40, 0.95);
    backdrop-filter: blur(30px);
    border-radius: 30px;
    padding: 50px 45px;
    width: 450px;
    max-width: 100%;
    position: relative;
    animation: cardFloat 6s ease-in-out infinite, fadeIn 1s ease;
    transform-style: preserve-3d;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(102, 126, 234, 0.2) inset,
        -20px 0 60px rgba(102, 126, 234, 0.3),
        20px 0 60px rgba(240, 147, 251, 0.3),
        0 -20px 60px rgba(118, 75, 162, 0.3),
        0 20px 60px rgba(102, 126, 234, 0.4);
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0) rotateY(0deg);
    }
    50% {
        transform: translateY(-15px) rotateY(1deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 3D Glow Border Effect */
.card-glow {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg,         #667eea 0%,         #764ba2 25%,         #f093fb 50%,         #764ba2 75%,         #667eea 100%);
    background-size: 300% 300%;
    border-radius: 32px;
    z-index: -1;
    opacity: 0.7;
    filter: blur(12px);
    animation: borderGlow 4s linear infinite;
    -webkit-animation: borderGlow 4s linear infinite;
}

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

.title {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    margin-bottom: 40px;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 6px;
    text-shadow: 
        0 0 10px rgba(102, 126, 234, 0.8),
        0 0 20px rgba(102, 126, 234, 0.6),
        0 0 30px rgba(102, 126, 234, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.5);
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(102, 126, 234, 0.8),
            0 0 20px rgba(102, 126, 234, 0.6),
            0 0 30px rgba(102, 126, 234, 0.4);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(240, 147, 251, 0.8),
            0 0 30px rgba(240, 147, 251, 0.6),
            0 0 45px rgba(240, 147, 251, 0.4);
    }
}

/* Input Groups */
.input-group {
    position: relative;
    margin: 35px 0;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 17px;
    font-weight: 500;
    outline: none;
    transition: all 0.4s ease;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.input-group input:focus {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    box-shadow: 
        0 0 25px rgba(102, 126, 234, 0.5),
        inset 0 0 15px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #f093fb);
    transition: width 0.4s ease;
    border-radius: 2px;
}

.input-group input:focus ~ .bar {
    width: 100%;
}

.forgot {
    display: inline-block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    float: right;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.forgot:hover {
    color: #f093fb;
    transform: translateX(-3px);
    text-shadow: 0 0 10px rgba(240, 147, 251, 0.6);
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 18px;
    margin: 35px 0 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.5),
        0 0 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 3px;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.login-btn:hover .btn-shine {
    left: 100%;
}

.login-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.7),
        0 0 30px rgba(240, 147, 251, 0.5);
}

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

.login-btn.loading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 20px;
    text-align: center;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    z-index: 1000;
    animation: slideUp 0.8s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.copyright {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(45deg, #667eea, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Error Message */
.error-message {
    color: #ff6b6b;
    font-size: 14px;
    font-weight: 500;
    margin-top: 15px;
    text-align: center;
    display: none;
    animation: shake 0.5s ease;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Success Message */
.success-message {
    color: #51cf66;
    font-size: 14px;
    font-weight: 500;
    margin-top: 15px;
    text-align: center;
    display: none;
    text-shadow: 0 0 10px rgba(81, 207, 102, 0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Hide side image on mobile */
    .side-image-left {
        display: none;
    }

    .form-card {
        padding: 40px 30px;
        width: 95%;
        box-shadow: 
            0 25px 60px rgba(0, 0, 0, 0.7),
            0 0 0 1px rgba(102, 126, 234, 0.2) inset;
    }

    .title {
        font-size: 32px;
        letter-spacing: 4px;
    }

    .logo {
        font-size: 28px;
        letter-spacing: 2px;
    }

    .login-btn {
        font-size: 16px;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 28px;
    }

    .form-card {
        padding: 35px 25px;
    }

    .input-group input {
        font-size: 16px;
        padding: 14px 18px;
    }
}

/* ===============================
   PERFORMANCE MODE
================================ */
@media (prefers-reduced-motion: reduce) {
  .form-card,
  .card-glow,
  .logo,
  .title {
    animation: none !important;
  }

  .card-glow {
    filter: blur(6px) !important;
    opacity: 0.35 !important;
  }

  .form-card {
    box-shadow: 0 18px 45px rgba(0,0,0,.65) !important;
  }
}

@media (max-width: 768px) {
  .card-glow {
    filter: blur(7px);
    opacity: 0.45;
  }

  .form-card {
    animation: fadeIn 0.6s ease;
    box-shadow:
      0 18px 45px rgba(0,0,0,.65),
      0 0 0 1px rgba(102, 126, 234, 0.18) inset;
  }

  .title {
    animation: none;
  }

  .logo {
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.4));
  }
}
