:root {
    --primary-color: #e50914;
    --primary-color-dark: #b2070f;
    --background-color: #141414;
    --text-color: #ffffff;
    --text-secondary-color: #b3b3b3;
    --form-background-color: rgba(22, 22, 22, 0.8);
    --input-background-color: rgba(255, 255, 255, 0.05);
    --font-family: 'Inter', sans-serif;
}
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }
@keyframes spin { to { transform: rotate(360deg); } }
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    color: var(--text-color); font-family: var(--font-family);
    background-image: url('background.jpg'); background-size: cover; background-position: center; background-attachment: fixed; background-color: #111;
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
}
body::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.8) 100%); z-index: 0;
}
#tsparticles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.login-container { width: 100%; max-width: 420px; padding: 20px; position: relative; z-index: 1; }
.login-form-wrapper {
    background: var(--form-background-color); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); padding: 40px;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}
.login-form-wrapper:hover { transform: translateY(-5px); box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(229, 9, 20, 0.2); }
.logo { text-align: center; margin-bottom: 30px; }
.logo img {
    max-width: 220px;
    height: auto;
    animation: float 5s ease-in-out infinite;
    background-color: transparent; /* Ensures no accidental background color */
}
.form-group { margin-bottom: 25px; position: relative; }
.form-control {
    width: 100%; height: 55px; background: var(--input-background-color); border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px; color: var(--text-color); padding: 0 50px 0 20px; font-size: 1rem;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.form-control::placeholder { color: transparent; }
.form-control:focus {
    background: rgba(255, 255, 255, 0.1); border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3); outline: none;
}
.form-label {
    position: absolute; top: 18px; left: 20px; color: var(--text-secondary-color); pointer-events: none;
    transition: all 0.2s ease-in-out; background: none; padding: 0 5px;
}
.form-control:focus ~ .form-label,
.form-control:not(:placeholder-shown) ~ .form-label {
    top: -10px; left: 15px; font-size: 0.75rem; color: var(--primary-color);
    background-color: var(--form-background-color); border-radius: 4px;
}
.input-icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--text-secondary-color); transition: color 0.3s ease; }
.form-control:focus ~ .input-icon,
.form-control:focus ~ .password-toggle-icon { color: var(--primary-color); }
.password-toggle-icon { cursor: pointer; z-index: 2; }

.form-options {
    display: flex; justify-content: center;
    align-items: center; margin-bottom: 20px;
    font-size: 0.85rem; padding: 0 5px;
}
.remember-me { display: flex; align-items: center; color: var(--text-secondary-color); cursor: pointer; }
.remember-me input { margin-right: 8px; accent-color: var(--primary-color); }
.remember-me:hover { color: var(--text-color); }

.login-btn {
    width: 100%; height: 50px; font-size: 1rem; font-weight: 700; letter-spacing: 1px;
    border-radius: 10px; background: var(--primary-color); border: none; color: #fff;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.25);
    transition: all 0.3s ease; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.login-btn:hover { background: var(--primary-color-dark); box-shadow: 0 6px 25px rgba(229, 9, 20, 0.4); transform: translateY(-3px); }
.login-btn:active { transform: translateY(1px); box-shadow: 0 2px 10px rgba(229, 9, 20, 0.3); }
.btn-content { transition: opacity 0.3s ease; }
.btn-loading {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center; background: var(--primary-color-dark);
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.login-btn.loading .btn-content { opacity: 0; }
.login-btn.loading .btn-loading { opacity: 1; visibility: visible; }
.spinner {
    width: 20px; height: 20px; margin-right: 10px;
    border: 3px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: var(--text-color);
    animation: spin 1s ease-in-out infinite;
}

.alert {
    border-radius: 8px; margin-bottom: 20px; padding: 15px; font-size: 0.9rem;
    background: rgba(220, 53, 69, 0.2); border: 1px solid rgba(220, 53, 69, 0.3);
    color: #f8d7da; text-align: center;
}
.demo-info {
    background: rgba(255, 255, 255, 0.05); border-left: 3px solid var(--primary-color);
    color: var(--text-secondary-color); padding: 15px; margin-bottom: 25px;
    line-height: 1.6; font-size: 0.85rem; border-radius: 0 8px 8px 0;
}
.demo-info strong { color: var(--text-color); font-weight: 500; }
.demo-info code { background-color: rgba(0,0,0,0.3); padding: 2px 5px; border-radius: 4px; color: #ffc107; }

@media (max-width: 480px) {
    .login-container { padding: 15px; }
    .login-form-wrapper { padding: 30px 25px; }
    .logo img { max-width: 180px; }
}