/* login.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #e63946;
    --dark-red: #d00000;
    --light-red: #ff6b6b;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --text-dark: #2d3748;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: rgb(249, 246, 246);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Animated background elements - Colorful and Highlighted */
body::before {
    content: '🩸';
    position: absolute;
    font-size: 18rem;
    opacity: 0.08;
    top: 5%;
    left: 5%;
    animation: float 6s ease-in-out infinite;
    text-shadow: 
        0 0 20px rgba(230, 57, 70, 0.6),
        0 0 40px rgba(230, 57, 70, 0.4),
        0 0 60px rgba(230, 57, 70, 0.2);
    filter: drop-shadow(0 0 10px rgba(220, 53, 69, 0.8));
    z-index: 1;
}

body::after {
    content: '💉';
    position: absolute;
    font-size: 15rem;
    opacity: 0.08;
    bottom: 8%;
    right: 8%;
    animation: float 8s ease-in-out infinite reverse;
    text-shadow: 
        0 0 20px rgba(213, 13, 13, 0.757),
        0 0 40px rgba(228, 13, 13, 0.869),
        0 0 60px rgba(214, 18, 41, 0.847);
    filter: drop-shadow(0 0 10px rgba(233, 7, 7, 0.861));
    z-index: 1;
}

/* Additional colorful elements */
body::before {
    content: '🩸';
    background: linear-gradient(45deg, #e63946, #ff6b6b, #e63946);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body::after {
    content: '💉';
    background: linear-gradient(45deg, #007bff, #00b4d8, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Add more floating elements */
body::after {
    content: '💉';
}

/* Create additional floating elements with pseudo-elements */
.container::before {
    content: '❤️';
    position: absolute;
    font-size: 8rem;
    opacity: 0.06;
    top: 20%;
    right: 15%;
    animation: float 7s ease-in-out infinite 1s;
    text-shadow: 
        0 0 15px rgba(220, 53, 69, 0.5),
        0 0 30px rgba(220, 53, 69, 0.3);
    filter: drop-shadow(0 0 8px rgba(220, 53, 69, 0.6));
    z-index: 2;
}

.container::after {
    content: '🫀';
    position: absolute;
    font-size: 6rem;
    opacity: 0.06;
    bottom: 25%;
    left: 10%;
    animation: float 9s ease-in-out infinite 2s;
    text-shadow: 
        0 0 15px rgba(108, 117, 125, 0.5),
        0 0 30px rgba(108, 117, 125, 0.3);
    filter: drop-shadow(0 0 8px rgba(108, 117, 125, 0.6));
    z-index: 2;
}

/* Enhanced float animation with color changes */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        filter: hue-rotate(0deg) drop-shadow(0 0 10px rgba(230, 57, 70, 0.8));
    }
    25% {
        transform: translateY(-20px) rotate(5deg) scale(1.05);
        filter: hue-rotate(90deg) drop-shadow(0 0 15px rgba(0, 123, 255, 0.8));
    }
    50% {
        transform: translateY(-10px) rotate(0deg) scale(1.1);
        filter: hue-rotate(180deg) drop-shadow(0 0 20px rgba(40, 167, 69, 0.8));
    }
    75% {
        transform: translateY(-15px) rotate(-5deg) scale(1.05);
        filter: hue-rotate(270deg) drop-shadow(0 0 15px rgba(255, 193, 7, 0.8));
    }
}

/* Add pulsing glow effect */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.08;
        transform: scale(1);
    }
    50% {
        opacity: 0.12;
        transform: scale(1.1);
    }
}

body::before,
body::after,
.container::before,
.container::after {
    animation: 
        float 6s ease-in-out infinite,
        pulse-glow 4s ease-in-out infinite;
}

/* Different animation delays for each element */
body::before { animation-delay: 0s, 0s; }
body::after { animation-delay: 0s, 1s; }
.container::before { animation-delay: 1s, 2s; }
.container::after { animation-delay: 2s, 3s; }

/* Add gradient backgrounds to the elements */
body::before {
    background: linear-gradient(135deg, #e63946, #ff6b6b, #f72585);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body::after {
    background: linear-gradient(135deg, #007bff, #00b4d8, #4361ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container::before {
    background: linear-gradient(135deg, #e63946, #f72585, #7209b7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container::after {
    background: linear-gradient(135deg, #495057, #6c757d, #adb5bd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Add floating particles */
@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 0.1;
    }
    50% {
        transform: translateY(-100px) translateX(50px) rotate(180deg);
        opacity: 0.15;
    }
}

.particle {
    position: absolute;
    font-size: 2rem;
    opacity: 0;
    z-index: 1;
    animation: particle-float 8s linear infinite;
}

/* Create multiple particles */
.particle:nth-child(1) { 
    content: '🔴'; 
    top: 10%; 
    left: 20%; 
    animation-delay: 0s; 
    color: #e63946;
}
.particle:nth-child(2) { 
    content: '🔵'; 
    top: 30%; 
    right: 25%; 
    animation-delay: 2s; 
    color: #007bff;
}
.particle:nth-child(3) { 
    content: '🟢'; 
    bottom: 40%; 
    left: 15%; 
    animation-delay: 4s; 
    color: #28a745;
}
.particle:nth-child(4) { 
    content: '🟡'; 
    bottom: 20%; 
    right: 30%; 
    animation-delay: 6s; 
    color: #ffc107;
}

/* Enhanced container glow */
.container {
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #e63946, #007bff, #28a745, #ffc107, #e63946);
    background-size: 400% 400%;
    border-radius: 25px;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.3;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.login-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), #28a745, var(--primary-red));
    border-radius: 20px 20px 0 0;
}

.login-container h2 {
    text-align: center;
    color: var(--dark-gray);
    margin-bottom: 2rem;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.login-container h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), #28a745);
    border-radius: 2px;
}

.error {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: var(--white);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    border-left: 4px solid var(--dark-red);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

input[type="text"],
input[type="password"] {
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light-gray);
    font-family: inherit;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-red);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
    transform: translateY(-2px);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #a0aec0;
}

button[type="submit"] {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

button[type="submit"]:hover::before {
    left: 100%;
}

button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(230, 57, 70, 0.4);
    background: linear-gradient(135deg, var(--dark-red), var(--primary-red));
}

button[type="submit"]:active {
    transform: translateY(-1px);
}

.signup-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.signup-link p {
    color: var(--text-dark);
    font-size: 0.95rem;
}

.signup-link a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.signup-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: var(--transition);
}

.signup-link a:hover {
    color: var(--dark-red);
}

.signup-link a:hover::after {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .login-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .login-container h2 {
        font-size: 1.8rem;
    }
    
    body::before,
    body::after {
        font-size: 8rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.5rem 1rem;
    }
    
    .login-container h2 {
        font-size: 1.6rem;
    }
    
    input[type="text"],
    input[type="password"] {
        padding: 0.8rem 1.2rem;
    }
    
    button[type="submit"] {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    body::before,
    body::after {
        font-size: 6rem;
    }
}

/* Loading state */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Custom focus styles for accessibility */
input:focus,
button:focus {
    outline: 3px solid var(--primary-red);
    outline-offset: 2px;
}

/* Success message style (for future use) */
.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: var(--white);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
    border-left: 4px solid #2f855a;
}