/* Login Page Specific Styles - Lethality-Inspired Glassy Design */

/* Top Loading Bar */
.top-loader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 4px !important;
    background: rgba(74, 158, 255, 0.3) !important;
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.top-loader.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.top-loader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4A9EFF, #7B61FF);
    box-shadow: 0 0 15px #4A9EFF, 0 0 8px #4A9EFF, 0 2px 20px rgba(74, 158, 255, 0.5);
    border-radius: 0 2px 2px 0;
    transition: width 0.1s ease;
}

.top-loader.active .top-loader-progress {
    animation: loadProgress 1.5s ease-out forwards;
}

.top-loader-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.8), rgba(123, 97, 255, 0.6));
    opacity: 0;
    box-shadow: 0 0 20px #4A9EFF, 0 0 10px #4A9EFF;
    border-radius: 0 2px 2px 0;
}

.top-loader.active .top-loader-glow {
    animation: glowMove 1.5s ease-out forwards;
}

@keyframes loadProgress {
    0% { width: 0%; }
    15% { width: 25%; }
    40% { width: 50%; }
    65% { width: 75%; }
    85% { width: 90%; }
    100% { width: 100%; }
}

@keyframes glowMove {
    0% { left: 0%; opacity: 0; }
    10% { opacity: 1; }
    15% { left: 20%; }
    40% { left: 45%; }
    65% { left: 70%; }
    85% { left: 85%; opacity: 1; }
    100% { left: 95%; opacity: 0; }
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main Container */
.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 20px 40px;
    min-height: calc(100vh - 80px);
    box-sizing: border-box;
}

/* Two Column Grid Layout */
.login-container {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

/* Left Column - Welcome Text */
.login-welcome {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.welcome-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 400px;
}

/* Right Column - Glassy Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 28px 40px;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    position: relative;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 0 20px rgba(255, 255, 255, 0.02);
}

/* Card title */
.card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    text-transform: none !important;
}

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(74, 158, 255, 0.3);
    box-shadow:
        0 0 0 2px rgba(74, 158, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

/* Terms Box */
.terms-group {
    margin-bottom: 24px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    cursor: pointer;
}

.terms-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: white;
    text-decoration: underline;
}

/* Submit Button - Animated Gradient */
.submit-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: #4A9EFF;
    color: white;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Solid blue background */
.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #4A9EFF;
    transition: all 0.3s ease;
}

.submit-btn:hover::before {
    background: #3a8eef;
}

/* Shine effect on hover */
.submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.submit-btn:hover::after {
    opacity: 1;
}

/* Inner shadow for depth */
.submit-btn {
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.2), 0 10px 30px rgba(74, 158, 255, 0.4);
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* Forgot link */
.forgot-section {
    text-align: center;
    margin-top: 20px;
}

.forgot-text {
    font-size: 14px;
    color: var(--text-tertiary);
}

.forgot-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--primary);
}

/* Message Boxes */
.message-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.message-box.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.message-box.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.message-box.warning {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.2);
    color: #fde047;
}

.message-box.info {
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
    color: #93c5fd;
}

.message-icon {
    font-size: 16px;
    flex-shrink: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Error State */
.form-input.input-error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.05);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .loading-spinner {
    display: block;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Override footer padding for login page */
footer {
    padding: 30px 40px;
    position: relative;
    z-index: 10;
}

/* Responsive Design */
@media (max-width: 900px) {
    .login-container {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 450px;
    }

    .login-welcome {
        text-align: center;
    }

    .welcome-title {
        font-size: 32px;
    }

    .welcome-subtitle {
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 500px) {
    .login-main {
        padding-top: 100px;
    }

    .login-container {
        padding: 20px 16px;
    }

    .login-card {
        padding: 32px 24px;
        min-height: auto;
    }

    .welcome-title {
        font-size: 28px;
    }

    .card-title {
        font-size: 20px;
    }
}
