* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(173, 216, 230, 0.8), rgba(135, 206, 235, 0.75), rgba(176, 224, 230, 0.8)),
                url("/static/accounts/images/hand-holding-human-brain-futuristic-600nw-2473233657.jpg.77b1c6ed09de.webp");
    background-size: cover;
    background-position: right center;
    background-attachment: fixed;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    align-items: center;
}

body::before,
body::after {
    display: none;
}

.container {
    width: 500px;
    max-width: 90vw;
    margin-left: 5%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.25);
    position: relative;
    z-index: 10;
    height: min(90vh, 620px);
    max-height: 620px;
    overflow: hidden;
}

.login-section {
    display: block;
    opacity: 1;
}

.logo {
    text-align: center;
    margin-bottom: 1.8rem;
    color: #fff;
    height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #f08f4a;
    text-shadow: 0 0 10px rgba(240, 143, 74, 0.5);
    animation: float 3s ease-in-out infinite;
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotateY(0deg);
    }
    50% {
        transform: translateY(-10px) rotateY(180deg);
    }
    100% {
        transform: translateY(0px) rotateY(360deg);
    }
}

.logo h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.logo p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.6;
    color: #fff;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.logo p i {
    font-size: 1.2rem;
    margin-right: 0.5rem;
    color: #5ba3d4;
    text-shadow: 0 0 6px rgba(91, 163, 212, 0.4);
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}

/* Specific styling for error icon to ensure proper centering */
.logo p i.fa-exclamation-triangle {
    color: #ff6b6b;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
    vertical-align: middle;
    line-height: 1;
}

.role-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.role-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

.role-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(120, 195, 221, 0.5);
}

.role-btn.active {
    background: rgba(120, 195, 221, 0.2);
    border-color: rgba(120, 195, 221, 0.8);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(120, 195, 221, 0.3);
}

.role-btn i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.role-btn:hover i {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.role-btn.active i {
    color: #fff;
    text-shadow: 0 0 10px rgba(120, 195, 221, 0.5);
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: rgba(120, 195, 221, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(120, 195, 221, 0.2);
    outline: none;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.toggle-password:hover {
    opacity: 1;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.4rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.forgot-password {
    color: #fff;
    text-decoration: none;
    opacity: 1;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

.forgot-password:hover {
    opacity: 1;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #f08f4a, #f7b74a);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid rgba(240, 143, 74, 0.3);
    box-shadow: 0 4px 15px rgba(240, 143, 74, 0.2);
}

.login-btn:hover {
    background: linear-gradient(45deg, #f7b74a, #ffc966);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(240, 143, 74, 0.4);
}

.back-button {
    text-align: center;
    margin-bottom: 1.5rem;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.back-btn i {
    font-size: 1rem;
}

.back-btn:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.5);
    transform: translateX(-3px);
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }
    
    .container {
        width: 90%;
        margin: 2vh auto;
        padding: 1.5rem;
        height: auto;
        min-height: 500px;
        max-height: 96vh;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 1vh auto;
        border-radius: 16px;
        padding: 1.2rem;
        height: auto;
        min-height: 450px;
        max-height: 98vh;
    }

    .logo {
        margin-bottom: 1rem;
        height: 120px;
    }

    .role-selector {
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group input {
        padding: 12px;
        font-size: 14px;
    }

    .login-btn {
        padding: 12px;
        font-size: 14px;
    }
}

/* Brain animation particles */
.brain-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.brain-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(240, 143, 74, 0.3);
    border-radius: 50%;
    pointer-events: none;
}

.brain-particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation: float-particle 7s ease-in-out infinite;
    width: 12px;
    height: 12px;
}

.brain-particle:nth-child(2) {
    top: 70%;
    left: 85%;
    animation: float-particle 9s ease-in-out infinite;
    animation-delay: 1s;
    width: 10px;
    height: 10px;
}

.brain-particle:nth-child(3) {
    top: 40%;
    left: 90%;
    animation: float-particle 8s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes float-particle {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.7;
        background: rgba(240, 143, 74, 0.3);
    }
    25% {
        background: rgba(120, 195, 221, 0.3);
    }
    50% {
        transform: translateY(-50px) translateX(30px);
        opacity: 0.9;
        background: rgba(240, 143, 74, 0.3);
    }
    75% {
        background: rgba(120, 195, 221, 0.3);
    }
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0.7;
        background: rgba(240, 143, 74, 0.3);
    }
}

/* Add glow to brain icon */
.logo i::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(240, 143, 74, 0.15) 0%, rgba(240, 143, 74, 0) 60%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }
}

/* Language Selector Styles */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.language-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(120, 195, 221, 0.5);
    transform: translateY(-1px);
}

.language-button i {
    font-size: 1rem;
    color: #78c3dd;
}

.language-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 4px;
}

.language-dropdown.show .language-dropdown-content {
    display: block;
}

.language-option {
    display: block;
    padding: 10px 16px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #78c3dd;
}

.language-option.active {
    background: rgba(120, 195, 221, 0.2);
    color: #fff;
    font-weight: 600;
} 