/* u_login.css - Complete Modern Login Style */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0f1f 0%, #0f172a 50%, #1e1b4b 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Animated Background Particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(251, 191, 36, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundShift 20s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
    0% {
        transform: scale(1) rotate(0deg);
    }
    100% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Floating Particles */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(168, 85, 247, 0.3), transparent),
        radial-gradient(2px 2px at 60% 20%, rgba(236, 72, 153, 0.3), transparent),
        radial-gradient(2px 2px at 80% 80%, rgba(251, 191, 36, 0.3), transparent);
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    animation: particleFloat 30s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(-50px, -50px) rotate(360deg);
    }
}

/* ==================== */
/* AUTH CONTAINER */
/* ==================== */

.auth-container {
    background: rgba(20, 25, 45, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px 45px;
    width: 100%;
    max-width: 440px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(168, 85, 247, 0.1);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.05), transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

.auth-container::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.05), transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

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

/* ==================== */
/* LOGO / HEADER */
/* ==================== */

.auth-container h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #ffffff, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 1px;
    position: relative;
}

.auth-container h2::after {
    content: '👋';
    font-size: 1.8rem;
    background: none;
    -webkit-text-fill-color: initial;
    display: inline-block;
    margin-left: 10px;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(15deg);
    }
    75% {
        transform: rotate(-10deg);
    }
}

/* Subtitle */
.auth-container > p:first-of-type {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    margin-bottom: 30px;
    position: relative;
}

/* ==================== */
/* MESSAGES */
/* ==================== */

.success {
    background: rgba(16, 185, 129, 0.15);
    border-left: 4px solid #10b981;
    color: #34d399;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.5s ease;
}

.success::before {
    content: '✅';
    font-size: 1.1rem;
}

.error {
    background: rgba(239, 68, 68, 0.15);
    border-left: 4px solid #ef4444;
    color: #f87171;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.5s ease;
}

.error::before {
    content: '⚠️';
    font-size: 1.1rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== */
/* FORM STYLES */
/* ==================== */

form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    z-index: 1;
}

/* Form Groups */
form input[type="text"],
form input[type="password"],
form input[type="email"] {
    padding: 16px 20px;
    background: rgba(10, 15, 31, 0.8);
    border: 2px solid rgba(168, 85, 247, 0.2);
    border-radius: 16px;
    color: #ffffff;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    width: 100%;
    outline: none;
}

form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

form input:focus {
    border-color: #a855f7;
    background: rgba(10, 15, 31, 0.95);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.2);
    transform: translateY(-2px);
}

form input:hover {
    border-color: rgba(168, 85, 247, 0.4);
}

/* Input Icons */
form input[type="text"] {
    padding-left: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(168,85,247,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 18px center;
    background-size: 20px;
}

form input[type="password"] {
    padding-left: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(168,85,247,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 18px center;
    background-size: 20px;
}

form input[type="email"] {
    padding-left: 50px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(168,85,247,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 18px center;
    background-size: 20px;
}

/* Password Toggle (Optional) */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #a855f7;
}

/* ==================== */
/* SUBMIT BUTTON */
/* ==================== */

form button[type="submit"] {
    padding: 16px 30px;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    margin-top: 10px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

form button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

form button[type="submit"]:hover::before {
    width: 400px;
    height: 400px;
}

form button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.5);
    background: linear-gradient(135deg, #c084fc, #8b5cf6);
}

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

form button[type="submit"]::after {
    content: '→';
    margin-left: 10px;
    transition: transform 0.3s ease;
    display: inline-block;
}

form button[type="submit"]:hover::after {
    transform: translateX(5px);
}

/* ==================== */
/* LINKS */
/* ==================== */

.auth-container > p:last-of-type {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 25px;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.auth-container a {
    color: #a855f7;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.auth-container a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    transition: width 0.3s ease;
}

.auth-container a:hover::after {
    width: 100%;
}

.auth-container a:hover {
    color: #c084fc;
}

/* ==================== */
/* DIVIDER */
/* ==================== */

.divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), transparent);
}

/* ==================== */
/* SOCIAL LOGIN (Optional) */
/* ==================== */

.social-login {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.social-btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    flex: 1;
    justify-content: center;
}

.social-btn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
    transform: translateY(-2px);
}

.social-btn.google {
    color: #ea4335;
}

.social-btn.facebook {
    color: #1877f2;
}

.social-btn.github {
    color: #ffffff;
}

/* ==================== */
/* RESPONSIVE DESIGN */
/* ==================== */

/* Tablet (768px - 1023px) */


/* Mobile Large (425px - 767px) */
@media screen and (max-width: 767px) {
    .auth-container {
        padding: 35px 25px;
        max-width: 100%;
        border-radius: 24px;
        margin: 15px;
    }
    
    .auth-container h2 {
        font-size: 1.8rem;
    }
    
    .auth-container h2::after {
        font-size: 1.4rem;
    }
    
    form input[type="text"],
    form input[type="password"],
    form input[type="email"] {
        padding: 14px 18px;
        padding-left: 45px;
        font-size: 0.95rem;
    }
    
    form button[type="submit"] {
        padding: 14px 25px;
        font-size: 1rem;
    }
    
    .social-login {
        flex-direction: column;
    }
}

/* Mobile Medium (375px - 424px) */
@media screen and (max-width: 424px) {
    .auth-container {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .auth-container h2 {
        font-size: 1.5rem;
    }
    
    .auth-container h2::after {
        font-size: 1.2rem;
    }
    
    form input[type="text"],
    form input[type="password"],
    form input[type="email"] {
        padding: 12px 15px;
        padding-left: 40px;
        font-size: 0.9rem;
        border-radius: 14px;
    }
    
    form button[type="submit"] {
        padding: 12px 20px;
        font-size: 0.95rem;
        border-radius: 14px;
    }
    
    .auth-container > p:last-of-type {
        font-size: 0.85rem;
    }
}

/* Mobile Small (320px - 374px) */
@media screen and (max-width: 374px) {
    .auth-container {
        padding: 25px 15px;
    }
    
    .auth-container h2 {
        font-size: 1.3rem;
    }
    
    form input[type="text"],
    form input[type="password"],
    form input[type="email"] {
        padding: 10px 12px;
        padding-left: 35px;
        font-size: 0.85rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    form button[type="submit"]:hover {
        transform: none;
    }
    
    .auth-container a:hover::after {
        width: 0;
    }
    
    form button[type="submit"]:active {
        transform: scale(0.98);
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    form input {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0a0f1f 0%, #0f172a 50%, #1e1b4b 100%);
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body::after {
        animation: none;
    }
    
    .auth-container h2::after {
        animation: none;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c084fc, #f472b6);
}

/* Selection Color */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(168, 85, 247, 0.3);
    color: #ffffff;
}

/* ==================== */
/* FORM VALIDATION STYLES */
/* ==================== */

form input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.1);
}

form input:valid:not(:placeholder-shown) {
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

/* ==================== */
/* LOADING STATE */
/* ==================== */

form button[type="submit"].loading {
    pointer-events: none;
    opacity: 0.7;
}

form button[type="submit"].loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== */
/* EXTRA: ANIMATED DECORATIVE ELEMENTS */
/* ==================== */

/* Glowing orb decoration */
.auth-container .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.auth-container .orb-1 {
    width: 150px;
    height: 150px;
    top: -50px;
    right: -50px;
    background: rgba(168, 85, 247, 0.15);
    animation: orbFloat 8s ease-in-out infinite;
}

.auth-container .orb-2 {
    width: 120px;
    height: 120px;
    bottom: -40px;
    left: -40px;
    background: rgba(236, 72, 153, 0.12);
    animation: orbFloat 10s ease-in-out infinite reverse;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

/* Remember me checkbox */
.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: -5px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #a855f7;
    cursor: pointer;
    border-radius: 4px;
}

/* Forgot password link */
.forgot-password {
    text-align: right;
    margin-top: -10px;
}

.forgot-password a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

.forgot-password a:hover {
    color: #a855f7;
}