* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --dark: #1e1b4b;
    --light: #f8fafc;
    --success: #10b981;
    --error: #ef4444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark) 0%, #312e81 50%, var(--primary) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Animated background elements */
body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    left: -250px;
    animation: float 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -200px;
    right: -200px;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rise 15s infinite ease-in;
}

@keyframes rise {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 45px;
    border-radius: 24px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: translateY(30px);
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    border-radius: 24px 24px 0 0;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    transform: scale(0);
}

.logo-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

h2 {
    text-align: center;
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(-10px);
}

.subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 30px;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-10px);
}

.form-group {
    margin-bottom: 22px;
    opacity: 0;
    transform: translateX(-20px);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f8fafc;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-wrapper .icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.input-wrapper .toggle-password {
    pointer-events: auto;
    cursor: pointer;
    transition: color 0.3s;
}

.input-wrapper .toggle-password:hover {
    color: var(--primary);
}

.btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.5);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0);
}

.links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(10px);
}

.links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.links a:hover::after {
    width: 100%;
}

.links a:hover {
    color: var(--primary-dark);
}

.link {
    text-align: center;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(10px);
}

.link a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.link a:hover {
    color: var(--primary-dark);
}

.error, .success {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
}

.error {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.success {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Admin specific styles */
.admin-container .container {
    max-width: 400px;
}

.admin-container .logo-icon {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
}

.admin-container .btn {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.4);
}

.admin-container .btn:hover {
    box-shadow: 0 15px 35px rgba(236, 72, 153, 0.5);
}

.admin-container .container::before {
    background: linear-gradient(90deg, var(--accent), var(--secondary), var(--primary));
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 30px 25px;
        margin: 20px;
    }
    
    h2 {
        font-size: 24px;
    }
}
