:root {
    --primary-color: #FF0000;
    --secondary-color: #FF4D4D;
    --accent-color: #FF8080;
    --text-color: #333333;
    --bg-color: #ffffff;
    --card-bg: #f8f9fa;
}

[data-theme="dark"] {
    --primary-color: #FF0000;
    --secondary-color: #800000;
    --accent-color: #400000;
    --text-color: #ffffff;
    --bg-color: #000000;
    --card-bg: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    background: linear-gradient(-45deg, #ff0000, #ff4d4d, #800000, #ff0000);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    position: relative;
    overflow: hidden;
}

.login-container {
    width: 90%;
    max-width: 400px;
    margin: auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: slideIn 0.6s ease-out;
}

.login-form {
    padding: 2.5rem;
    background: var(--bg-color);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    animation: slideIn 0.6s ease-out 0.2s both;
}

.form-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.form-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.role-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: slideIn 0.6s ease-out 0.3s both;
}

.role-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    background: none;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-btn.active {
    background: var(--primary-color);
    color: white;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    animation: slideIn 0.6s ease-out 0.4s both;
}

.input-group input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--card-bg);
    color: var(--text-color);
}

.input-group i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    transition: all 0.3s ease;
    cursor: pointer;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.input-group input:focus + i {
    color: var(--primary-color);
}

.login-button {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    animation: slideIn 0.6s ease-out 0.6s both;
    position: relative;
    overflow: hidden;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.login-button:hover::before {
    width: 300px;
    height: 300px;
}

.login-button:hover {
    transform: translateY(-2px);
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 2;
    animation: slideIn 0.6s ease-out;
}

@media (max-width: 480px) {
    .login-container {
        width: 95%;
        margin: 1rem auto;
    }

    .login-form {
        padding: 1.5rem;
    }

    .form-header h2 {
        font-size: 1.75rem;
    }
}
