/* ================== USER LOGIN NERD THEME ================== */

.user-login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
    font-family: 'Open Sans', 'Courier New', monospace;
    padding: 2rem 0;
}

/* Animated background particles */
.user-login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 91, 87, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 255, 127, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 123, 255, 0.05) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Matrix-style background effect */
.matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Ctext x='10' y='20' font-family='monospace' font-size='10'%3E01%3C/text%3E%3Ctext x='30' y='40' font-family='monospace' font-size='8'%3E10%3C/text%3E%3Ctext x='5' y='50' font-family='monospace' font-size='12'%3E11%3C/text%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: matrix-scroll 15s linear infinite;
}

@keyframes matrix-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(60px); }
}

/* Login card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff5b57, transparent);
    animation: scan 3s infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Header section */
.login-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    position: relative;
}

.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff5b57, #ff7675);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 20px rgba(255, 91, 87, 0.3);
    position: relative;
    animation: pulse 2s infinite;
}

.logo-icon::after {
    content: '🎮';
    position: absolute;
    font-size: 2.5rem;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 20px rgba(255, 91, 87, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 15px 30px rgba(255, 91, 87, 0.5); }
}

.login-title {
    color: #2c3e50;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0;
}

/* Form section */
.login-form {
    padding: 1rem 2rem 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    border-color: #74b9ff;
    box-shadow: 0 0 0 3px rgba(116, 185, 255, 0.15);
    background: white;
}

.form-control.is-invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.form-control.is-invalid:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.form-control:focus + .form-icon {
    color: #74b9ff;
}

.form-control.is-invalid + .form-icon {
    color: #e74c3c;
}

.form-check {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
    position: relative;
    padding: 0.5rem 1rem 0.5rem 3rem;
}

.form-check-input {
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #6c757d;
    border-radius: 4px;
    margin-right: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    flex-shrink: 0;
}

.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(108, 117, 125, 0.3);
}

.form-check-input:hover {
    border-color: #495057;
    box-shadow: 0 0 10px rgba(108, 117, 125, 0.2);
    transform: scale(1.05);
}

.form-check-input:checked {
    background: linear-gradient(135deg, #e8f5e8, #f0f9f0);
    border-color: #28a745;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.4);
}

.form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #2c3e50;
    font-size: 14px;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Prevent validation styles from affecting checkbox */
.form-check-input:invalid,
.form-check-input.is-invalid {
    border-color: #6c757d !important;
    box-shadow: none !important;
}

.form-check-input:checked:invalid,
.form-check-input:checked.is-invalid {
    background: linear-gradient(135deg, #e8f5e8, #f0f9f0) !important;
    border-color: #28a745 !important;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.4) !important;
}

.form-check-label {
    color: #495057;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
    font-weight: 500;
}

.form-check-label:hover {
    color: #343a40;
}

.form-check:hover .form-check-input {
    border-color: #495057;
    box-shadow: 0 0 10px rgba(108, 117, 125, 0.3);
}

.form-check:hover .form-check-input:checked {
    border-color: #28a745;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
    background: linear-gradient(135deg, #d4edda, #e8f5e8);
}

/* Additional styling for better visibility */
.form-check-input:checked::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid rgba(40, 167, 69, 0.3);
    border-radius: 6px;
    animation: checkGlow 0.3s ease-out;
}

@keyframes checkGlow {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Buttons */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #ff5b57, #ff7675);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 91, 87, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login::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: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

/* Google Login Button */
.btn-google-login {
    width: 100%;
    padding: 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-google-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(66, 133, 244, 0.3);
    border-color: #4285F4;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
}

.btn-google-login:active {
    transform: translateY(0);
}

.btn-google-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(66, 133, 244, 0.1), transparent);
    transition: left 0.5s;
}

.btn-google-login:hover::before {
    left: 100%;
}

/* Links */
.login-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.login-link {
    color: #ff5b57;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.login-link:hover {
    color: #e74c3c;
    text-decoration: none;
}

.login-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff5b57;
    transition: width 0.3s ease;
}

.login-link:hover::after {
    width: 100%;
}

/* Admin portal link - appears on hover */
.admin-portal {
    position: absolute;
    top: 1rem;
    right: 0;
    z-index: 100;
    width: 200px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
}

.admin-portal .admin-link {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s ease;
}

.admin-portal:hover .admin-link {
    opacity: 1;
    transform: translateX(0);
}

.admin-link {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
}

.admin-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 576px) {
    .login-card {
        margin: 1rem;
        border-radius: 15px;
    }
    
    .login-header {
        padding: 1.5rem 1.5rem 0.5rem;
    }
    
    .login-form {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .logo-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
}

/* Error messages */
.alert {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: none;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

.alert-info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-left: 4px solid #3498db;
}