/* Authentication Pages Styling - Matching Dashboard Theme */

/* Import main theme variables */
@import url('/static/css/.css');

/* Body styling to match dashboard */
body {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #0a0f1c;
}

/* Auth Container - Similar to dashboard-content */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* Animated Background - Same as dashboard */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.gradient-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #5b9bd5 50%, #1e3a8a 100%);
    opacity: 0.9;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-20px) translateY(20px); }
}

.particle-field {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

/* Auth Card - Matching dashboard-card styling */
.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: authCardEntry 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--cyber-blue) 0%, transparent 70%);
    opacity: 0.05;
    animation: rotateGlow 20s linear infinite;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes authCardEntry {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Header - Matching dashboard welcome section */
.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 0 30px rgba(126, 200, 227, 0.5);
    position: relative;
}

.auth-logo::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--cyber-blue), var(--cyber-purple), var(--cyber-blue));
    border-radius: 50%;
    z-index: -1;
    animation: rotateBorder 3s linear infinite;
}

@keyframes rotateBorder {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--cyber-blue);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

/* Form Styling - More compact */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    position: relative;
}

.form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    background: rgba(30, 58, 138, 0.3);
    border: 1px solid rgba(126, 200, 227, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(30, 58, 138, 0.5);
    box-shadow: 0 0 15px rgba(126, 200, 227, 0.3);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Input Icons */
.input-icon {
    position: absolute;
    right: 1rem;
    top: 2.5rem;
    color: var(--accent-blue);
    opacity: 0.7;
}

/* Remember Me Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--cyber-blue);
}

.checkbox-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: normal;
}

/* Messages */
#message-container {
    margin-bottom: 1rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

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

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

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

/* Submit Button - Matching dashboard buttons */
.btn-submit {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-purple));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

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

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(126, 200, 227, 0.4);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
}

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

/* Social Login */
.social-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-divider::before,
.social-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--glass-border);
}

.social-divider::before {
    left: 0;
}

.social-divider::after {
    right: 0;
}

.social-buttons {
    display: flex;
    gap: 1rem;
}

.btn-social {
    flex: 1;
    padding: 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-social:hover {
    background: rgba(91, 155, 213, 0.4);
    border-color: var(--cyber-blue);
    transform: translateY(-2px);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--cyber-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Navigation Link */
.back-to-home {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-to-home:hover {
    color: var(--cyber-blue);
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .form-input {
        padding: 0.65rem 0.9rem;
        font-size: 0.9rem;
    }
    
    .btn-submit {
        padding: 0.65rem 1.2rem;
        font-size: 0.95rem;
    }
}

/* Error Messages */
.password-requirements {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.password-requirements ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.password-requirements li {
    color: var(--text-secondary);
    margin: 0.25rem 0;
}

.password-requirements li.valid {
    color: #86efac;
}

.password-requirements li.invalid {
    color: #fca5a5;
}

/* Floating particles for consistency with main app */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: var(--cyber-blue);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 15s infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) scale(1);
        opacity: 0;
    }
}