/* auth-pages-quantnexus.css - Fusion Redesign */
:root {
    /* Base Variables matching Fusion/Web3 Theme */
    --fusion-bg: #030712; /* Deep Navy/Black */
    --fusion-card-bg: rgba(17, 24, 39, 0.6);
    --fusion-card-border: rgba(255, 255, 255, 0.08); /* Subtle white border */
    --fusion-primary: #3b82f6;
    --fusion-primary-hover: #2563eb;
    --fusion-input-bg: rgba(0, 0, 0, 0.3);
    --fusion-input-border: rgba(255, 255, 255, 0.1);
    --fusion-input-focus-border: #60a5fa;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

    /* Gradients */
    --gradient-btn: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-btn-hover: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

/* Light Theme Overrides */
[data-theme="light"] {
    --fusion-bg: #F9FAFB; /* Cool Gray 50 */
    /* Light glass effect: White with transparency */
    --fusion-card-bg: rgba(255, 255, 255, 0.7); 
    --fusion-card-border: rgba(0, 0, 0, 0.06);
    
    --fusion-input-bg: rgba(255, 255, 255, 0.8);
    --fusion-input-border: rgba(209, 213, 219, 0.8); /* Gray 300 */
    --fusion-input-focus-border: #3b82f6;

    --text-primary: #111827; /* Gray 900 */
    --text-secondary: #4b5563; /* Gray 600 */
    --text-muted: #9ca3af; /* Gray 400 */

    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.1);
    --shadow-card: 0 20px 40px -12px rgba(0, 0, 0, 0.06);
    
    /* Adjust input text color for light bg */
}

/* Specific Light Theme Adjustments */
[data-theme="light"] body {
    /* Lighter background gradient */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(147, 51, 234, 0.05) 0%, transparent 25%);
}

[data-theme="light"] #silver-stream-canvas {
    /* Screen mode hides dark particles on light bg. Use normal or multiply. */
    mix-blend-mode: normal; 
}

[data-theme="light"] .social-hub-panel {
    /* Much lighter gray, barely visible */
    background: rgba(0, 0, 0, 0.03); 
    border-color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] h1 {
    /* Dark gradient for text */
    background: linear-gradient(to right, #111827, #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .form-group input {
    color: #1f2937; /* Gray 800 */
    background: white;
    border: 1px solid #e5e7eb;
}

[data-theme="light"] .form-group input::placeholder {
    color: #9ca3af;
}

[data-theme="light"] .password-toggle-btn {
    color: #6b7280;
}

[data-theme="light"] .password-toggle-btn:hover {
    color: #111827;
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .social-btn {
    background: white;
    border-color: #e5e7eb;
    color: #374151;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

[data-theme="light"] .social-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

[data-theme="light"] .auth-submit-btn {
    /* Fully Transparent Outline Button */
    background: transparent !important; 
    color: #374151; /* Dark text */
    border: 1px solid rgba(0, 0, 0, 0.2); /* Visible border */
    box-shadow: none;
}

[data-theme="light"] .auth-submit-btn:hover {
    background: rgba(0, 0, 0, 0.05) !important; /* Slight hover fill */
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    
    /* Deep Space Background */
    background-color: var(--fusion-bg);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(147, 51, 234, 0.08) 0%, transparent 25%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    
    /* Remove grid lines for cleaner look, or make them very subtle */
}

/* Sparkling Silver Stream Canvas */
#silver-stream-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    /* Optional: Slight blend to integrate with background color */
    mix-blend-mode: screen; 
}

/* Glass Card Container */
.auth-container {
    position: relative;
    z-index: 10;
    text-align: center;
    
    /* Glassmorphism */
    background: var(--fusion-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--fusion-card-border);
    border-radius: 16px; /* Simpler, rounder corners */
    
    box-shadow: var(--shadow-card), var(--shadow-glow);
    
    max-width: 960px; /* Slightly wider */
    width: 95%;
    margin: 40px auto;
    overflow: hidden; /* Contain children */
    animation: fadeIn 0.8s ease-out;
    display: flex;
    transition: max-width 0.3s ease-out, transform 0.3s ease;
}

.auth-container.collapsed {
    max-width: 580px; /* Focus mode */
}

/* Two-column layout */
.auth-main {
    flex: 1;
    padding: 60px 50px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Headings */
h1 {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em; /* Tight tracking for modern feel */
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

/* Social Teaser (Side Bar) */
.auth-teaser {
    width: 120px;
    max-width: 120px;
    border-left: 1px solid var(--fusion-card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    background: rgba(255, 255, 255, 0.01);
}

.auth-teaser:hover {
    background: rgba(255, 255, 255, 0.03);
}

.teaser-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.auth-teaser:hover .teaser-items {
    opacity: 1;
}

.teaser-item {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--fusion-card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.teaser-item .teaser-text { display: none; } /* Icon only for cleaner look */

.teaser-item:hover {
    transform: translateY(-2px);
    border-color: var(--fusion-primary);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.teaser-chevron { display: none; }

/* Hide teaser when panel is expanded */
.auth-teaser.hidden {
    display: none;
}

/* Social Hub Panel (Expanded) */
.social-hub-panel {
    flex: 0.8;
    background: rgba(0, 0, 0, 0.2);
    border-left: 1px solid var(--fusion-card-border);
    display: flex;
    flex-direction: column;
    padding: 60px 40px;
    transition: all 0.3s ease-out;
    opacity: 1;
}

.social-hub-panel.hidden {
    flex: 0 0 0;
    width: 0;
    padding: 0;
    opacity: 0;
    border-left: none;
}

.social-hub-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.social-hub-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--fusion-card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Form Styles */
.auth-form {
    text-align: left;
    margin-top: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--fusion-input-bg);
    border: 1px solid var(--fusion-input-border);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    transition: all 0.2s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus {
    outline: none;
    border-color: var(--fusion-input-focus-border);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-btn);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.auth-submit-btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    background: var(--gradient-btn-hover);
}

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

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(1);
}

/* Links */
.auth-links {
    margin-top: 32px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-links p { margin: 0; }

.auth-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: var(--fusion-primary);
}

/* Messages */
.login-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 24px;
    display: none;
    line-height: 1.5;
}

.login-message.error {
    background: rgba(220, 38, 38, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.login-message.success {
    background: rgba(22, 163, 74, 0.1);
    color: #86efac;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

/* Password Toggle Styles */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 48px; /* Make room for the eye icon */
}

.password-toggle-btn {
    position: absolute;
    right: 4px; /* Slight offset */
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px; /* Match input height roughly */
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: all 0.2s ease;
    z-index: 2;
    border-radius: 8px;
}

.password-toggle-btn:hover {
    opacity: 1;
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.password-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        width: 100%;
        margin: 0;
        min-height: 100vh;
        border-radius: 0;
        border: none;
        background: transparent;
        box-shadow: none;
    }
    
    .auth-main {
        padding: 40px 24px;
        background: var(--fusion-bg);
    }
    
    .auth-teaser, .social-hub-panel {
        display: none !important; /* Hide social sidebar on mobile for simplicity */
    }
}
