:root {
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-light: #e4e4e7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: background 1s ease;
}

/* Morning Animation */
body.morning .animated-background {
    background: linear-gradient(to bottom, #87CEEB 0%, #FFE4B5 50%, #FFA500 100%);
}

/* Afternoon Animation */
body.afternoon .animated-background {
    background: linear-gradient(to bottom, #87CEEB 0%, #6DB3F2 100%);
}

/* Evening Animation */
body.evening .animated-background {
    background: linear-gradient(to bottom, #FF6B6B 0%, #FFA500 50%, #4A148C 100%);
}

/* Night Animation */
body.night .animated-background {
    background: linear-gradient(to bottom, #0F2027 0%, #203A43 50%, #2C5364 100%);
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card h2 {
    color: var(--primary-color);
    font-size: 28px;
}

.form-control, .input-group-text {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.input-group-text {
    background-color: #f8f9fa;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

/* Sun Animation for Morning/Afternoon */
body.morning .animated-background::before,
body.afternoon .animated-background::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    top: 10%;
    right: 10%;
    box-shadow: 0 0 60px #FFD700;
    animation: pulse 3s ease-in-out infinite;
}

body.morning .animated-background::before {
    top: 20%;
    animation: sunrise 2s ease forwards;
}

@keyframes sunrise {
    from {
        top: 100%;
        opacity: 0;
    }
    to {
        top: 20%;
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Moon and Stars for Night */
body.night .animated-background::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #F0E68C 0%, #E6E6FA 100%);
    border-radius: 50%;
    top: 10%;
    right: 10%;
    box-shadow: 0 0 40px #F0E68C;
}

body.night .animated-background::after {
    content: '✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 20px;
    color: white;
    animation: twinkle 3s ease-in-out infinite;
    letter-spacing: 100px;
    line-height: 100px;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Sunset Animation for Evening */
body.evening .animated-background::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #FF6B6B 0%, #FFA500 100%);
    border-radius: 50%;
    top: 60%;
    right: 10%;
    box-shadow: 0 0 60px #FF6B6B;
    animation: sunset 3s ease forwards;
}

@keyframes sunset {
    from {
        top: 20%;
    }
    to {
        top: 90%;
        opacity: 0.5;
    }
}

@media (max-width: 768px) {
    .login-card {
        padding: 30px 20px;
    }
}
