/* Authentication Page Styles */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0A0B1A 0%, #1A1B3A 50%, #0A0B1A 100%);
    position: relative;
    overflow-x: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(100, 52, 191, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(100, 52, 191, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 6rem 1rem 2rem 1rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(100, 52, 191, 0.1);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6434BF, #8B5CF6, #6434BF);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #E0E7FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    color: #fff;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: #6434BF;
    box-shadow: 0 0 0 3px rgba(100, 52, 191, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.75rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.5rem;
    margin-top: 0.75rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #6434BF;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    position: relative;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: #6434BF;
    border-color: #6434BF;
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-container a {
    color: #6434BF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.checkbox-container a:hover {
    color: #8B5CF6;
}

.forgot-link {
    color: #6434BF;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #8B5CF6;
}

.auth-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #6434BF 0%, #8B5CF6 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.auth-btn::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 ease;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(100, 52, 191, 0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.auth-footer a {
    color: #6434BF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #8B5CF6;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #6434BF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    backdrop-filter: blur(20px);
}

.message.show {
    transform: translateX(0);
}

.message.success {
    background: linear-gradient(135deg, #10B981, #059669);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.message.error {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Username feedback styles */
.username-feedback {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.username-feedback.error {
    color: #EF4444;
    opacity: 1;
}

.username-feedback.success {
    color: #10B981;
    opacity: 1;
}

.username-feedback.checking {
    color: #6434BF;
    opacity: 1;
}

.username-feedback.checking::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top: 2px solid #6434BF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .auth-container {
        padding: 5rem 1rem 2rem 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
        max-width: 100%;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .message {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        transform: translateY(-100px);
    }
    
    .message.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 4rem 1rem 1rem 1rem;
    }
    
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .form-group input {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
    }
    
    .form-group i {
        left: 0.875rem;
    }
    
    .password-toggle {
        right: 0.875rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.auth-btn:focus,
.google-btn:focus,
input:focus {
    outline: 2px solid #6434BF;
    outline-offset: 2px;
}

.checkbox-container:focus-within .checkmark {
    box-shadow: 0 0 0 2px #6434BF;
}

/* Authentication page specific navbar adjustments */
.auth-page .navbar {
    background: rgba(18, 18, 24, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
