/* Authentication Pages Styles */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.8s ease-out;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(
        from 0deg,
        rgba(255, 107, 53, 0.3),
        rgba(247, 147, 30, 0.3),
        rgba(0, 255, 65, 0.3),
        rgba(255, 107, 53, 0.3)
    );
    border-radius: var(--border-radius);
    z-index: -1;
    animation: none !important;
    transform: rotate(0deg) !important;
}

/* Force all pseudo-elements on auth pages to be static */
.auth-page *::before,
.auth-page *::after {
    animation: none !important;
    transform: rotate(0deg) !important;
}

/* Ultra-specific rule to eliminate any rotation animation */
.auth-page .auth-card::before {
    animation: none !important;
    transform: rotate(0deg) !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
}

/* Override any potential animation from other CSS files */
body.auth-page .container .row .col-lg-5 .auth-card::before,
body.auth-page .container .row .col-md-7 .auth-card::before {
    animation: none !important;
    transform: rotate(0deg) !important;
}

@keyframes rotate {
    /* Static - no rotation */
    to { transform: rotate(0deg); }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.5));
}

.auth-header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.auth-form {
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--light);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
    z-index: 2;
}

.input-wrapper.focused .input-icon {
    color: var(--primary);
}

.form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(42, 42, 42, 0.5);
    border: 2px solid rgba(255, 107, 53, 0.2);
    border-radius: var(--border-radius);
    color: var(--light);
    font-size: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(42, 42, 42, 0.8);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
}

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

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.password-toggle:hover {
    color: var(--primary);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: var(--transition);
}

.checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid var(--light);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: var(--transition);
}

.checkbox-wrapper input:checked + .checkmark {
    background: var(--gradient-primary);
    border-color: var(--primary);
}

.checkbox-wrapper input:checked + .checkmark::after {
    opacity: 1;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 107, 53, 0.2);
}

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

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Register Page Specific */
.register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.password-strength {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: var(--transition);
}

.strength-bar.active {
    background: var(--accent);
}

.strength-bar.weak {
    background: #ff3030;
}

.strength-bar.medium {
    background: #ffaa00;
}

.strength-bar.strong {
    background: var(--accent);
}

.password-requirements {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.requirement.met {
    color: var(--accent);
}

.requirement svg {
    width: 14px;
    height: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .register-grid {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    /* ENHANCED MOBILE AUTH OPTIMIZATIONS */
    .form-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 1rem !important;
        min-height: 52px !important;
        border-radius: 12px !important;
    }
    
    .btn-primary {
        min-height: 52px !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        padding: 1rem 2rem !important;
    }
    
    .auth-form .form-group {
        margin-bottom: 1.5rem !important;
    }
    
    .auth-links {
        text-align: center;
        margin-top: 1.5rem;
    }
    
    .auth-links a {
        font-size: 1rem;
        display: inline-block;
        padding: 0.5rem 1rem;
        margin: 0.25rem;
    }
}

/* ULTRA-MOBILE OPTIMIZATIONS */
@media (max-width: 400px) {
    .auth-card {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
        border-radius: 16px;
    }
    
    .auth-header h1 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 1.25rem !important;
        min-height: 56px !important;
        font-size: 16px !important;
    }
    
    .btn-primary {
        min-height: 56px !important;
        font-size: 1.2rem !important;
        width: 100% !important;
        padding: 1.25rem !important;
    }
    
    .auth-form .form-group {
        margin-bottom: 2rem !important;
    }
    
    .auth-description {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* Loading States */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading .btn-icon {
    /* Static loading icon - no rotation */
    opacity: 0.7;
}

/* Error States */
.form-group.error input {
    border-color: #ff3030;
    box-shadow: 0 0 20px rgba(255, 48, 48, 0.2);
}

.error-message {
    color: #ff3030;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Success States */
.form-group.success input {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links .nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    font-size: 0.9rem;
}

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

/* CRITICAL: Force all rotation animations to be static on auth pages */
.auth-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(from 0deg, transparent 0%, var(--primary) 50%, var(--secondary) 100%);
    border-radius: inherit;
    z-index: -1;
    animation: none !important;
    transform: rotate(0deg) !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
}

/* Force all pseudo-elements on auth pages to be static */
.auth-page *::before,
.auth-page *::after {
    animation: none !important;
    transform: rotate(0deg) !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
}

/* Ultra-specific rule to eliminate any rotation animation */
.auth-page .auth-card::before {
    animation: none !important;
    transform: rotate(0deg) !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
}

/* Override any potential animation from other CSS files */
body.auth-page .container .row .col-lg-5 .auth-card::before,
body.auth-page .container .row .col-md-7 .auth-card::before {
    animation: none !important;
    transform: rotate(0deg) !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
}

/* NUCLEAR OVERRIDE: Eliminate ANY possible rotation animation */
html body.auth-page .main-content .container .row .col-lg-5 .auth-card::before,
html body.auth-page .main-content .container .row .col-md-7 .auth-card::before {
    animation: none !important;
    animation-name: none !important;
    animation-duration: 0s !important;
    animation-iteration-count: 0 !important;
    transform: rotate(0deg) !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    -o-animation: none !important;
}

/* Additional nuclear rule for any conic-gradient element */
.auth-page [style*="conic-gradient"]::before,
.auth-page [style*="conic-gradient"]::after,
.auth-page *[class*="auth-card"]::before,
.auth-page *[class*="auth-card"]::after {
    animation: none !important;
    transform: rotate(0deg) !important;
}

/* ABSOLUTE FINAL NUCLEAR OPTION - DISABLE ALL ANIMATIONS ON AUTH PAGES */
.auth-page * {
    animation: none !important;
    animation-name: none !important;
    animation-duration: 0s !important;
    animation-iteration-count: 0 !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    -o-animation: none !important;
}

.auth-page *::before,
.auth-page *::after {
    animation: none !important;
    animation-name: none !important;
    animation-duration: 0s !important;
    animation-iteration-count: 0 !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    -o-animation: none !important;
    transform: rotate(0deg) !important;
}

/* DISABLE ALL SVG ANIMATIONS ON AUTH PAGES */
.auth-page svg * {
    animation: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
}

/* DISABLE ALL CSS AND SVG ANIMATE ELEMENTS ON AUTH PAGES */
.auth-page animate, 
.auth-page animateTransform, 
.auth-page animateMotion {
    display: none !important;
}