/* 
    Binspot Account - Signup Page (Dark Theme)
    File: signup.css
    Author: djoluc
*/

:root, html[htx-dark-mode] {
    --bsp-bg: #090d16;
    --bsp-bg-gradient: radial-gradient(circle at 50% 10%, rgba(59, 130, 246, 0.15), transparent 70%),
                       radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.11), transparent 60%),
                       radial-gradient(circle at 15% 65%, rgba(16, 185, 129, 0.07), transparent 50%);
    --bsp-surface: rgba(15, 23, 42, 0.78);
    --bsp-surface-card: rgba(15, 23, 42, 0.82);
    --bsp-surface-subtle: rgba(30, 41, 59, 0.65);
    --bsp-surface-hover: rgba(51, 65, 85, 0.8);
    --bsp-border: rgba(255, 255, 255, 0.09);
    --bsp-border-hover: rgba(59, 130, 246, 0.45);
    
    --bsp-text-primary: #f8fafc;
    --bsp-text-secondary: #94a3b8;
    --bsp-text-muted: #64748b;
    --bsp-text-subtle: #475569;
    
    --bsp-input-bg: rgba(15, 23, 42, 0.7);
    --bsp-input-border: rgba(255, 255, 255, 0.12);
    --bsp-input-focus: #3b82f6;
    --bsp-input-ring: rgba(59, 130, 246, 0.28);
    --bsp-input-placeholder: #64748b;
    
    --bsp-primary: #3b82f6;
    --bsp-primary-hover: #60a5fa;
    --bsp-primary-glow: rgba(59, 130, 246, 0.38);
    --bsp-primary-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --bsp-primary-gradient-hover: linear-gradient(135deg, #2563eb, #7c3aed);
    
    --bsp-accent: #8b5cf6;
    --bsp-error: #f87171;
    --bsp-error-bg: rgba(239, 68, 68, 0.12);
    --bsp-error-border: rgba(239, 68, 68, 0.45);
    
    --bsp-shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --bsp-shadow-toast: 0 20px 35px -8px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.1);
    --bsp-color-scheme: dark;
}

html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    box-sizing: border-box;
    color-scheme: var(--bsp-color-scheme);
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bsp-bg);
    background-image: var(--bsp-bg-gradient);
    background-attachment: fixed;
    color: var(--bsp-text-primary);
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Page Layout Centering */
htx-page-content,
.htx-page-content,
[htx-page-content] {
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 32px 16px !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Particle Canvas Background */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
}

/* Ambient Hero Mesh Glow */
.hero-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 50% 20%, rgba(59, 130, 246, 0.12), transparent 60%);
    z-index: 0;
    pointer-events: none;
}

/* Signup Main Container */
.bsp-signup-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 460px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Brand Header */
.bsp-brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(30, 41, 59, 0.85);
    border-radius: 20px;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bsp-brand-badge:hover {
    transform: translateY(-2px) scale(1.04);
}

.bsp-brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--bsp-text-primary);
    margin: 0;
    text-align: center;
}

.bsp-brand-subtitle {
    color: var(--bsp-text-secondary);
    font-size: 0.875rem;
    margin-top: 6px;
    text-align: center;
}

/* Ai Gradient Text */
.ai-gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Stepper Pill Indicator */
.bsp-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 24px;
    padding: 6px 14px;
    background: var(--bsp-surface-subtle);
    border: 1px solid var(--bsp-border);
    border-radius: 9999px;
}

.bsp-step-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bsp-text-subtle);
    transition: all 0.25s ease;
}

.bsp-step-pill.active {
    color: var(--bsp-primary);
}

.bsp-step-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background-color: var(--bsp-text-subtle);
    transition: all 0.25s ease;
}

.bsp-step-pill.active .bsp-step-dot {
    width: 18px;
    background: var(--bsp-primary-gradient);
}

/* Glass Card */
.glass {
    background: var(--bsp-surface-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--bsp-border);
    border-radius: 28px;
    box-shadow: var(--bsp-shadow-card);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass:hover {
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(59, 130, 246, 0.25);
}

/* Form Styling */
.bsp-form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bsp-border);
}

.bsp-form-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--bsp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.bsp-form-header-text h3 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--bsp-text-primary);
}

.bsp-form-header-text p {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: var(--bsp-text-muted);
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 18px;
}

.bsp-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bsp-text-secondary);
    margin-bottom: 6px;
    padding-left: 2px;
    transition: color 0.2s ease;
}

.input-group:focus-within .bsp-label {
    color: var(--bsp-primary);
}

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

.bsp-input-icon {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bsp-text-subtle);
    font-size: 0.9375rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-group:focus-within .bsp-input-icon {
    color: var(--bsp-primary);
}

.bsp-input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--bsp-text-primary);
    background-color: var(--bsp-input-bg);
    border: 1.5px solid var(--bsp-input-border);
    border-radius: 14px;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bsp-input::placeholder {
    color: var(--bsp-input-placeholder);
}

.bsp-input:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.bsp-input:focus {
    border-color: var(--bsp-input-focus);
    box-shadow: 0 0 0 4px var(--bsp-input-ring);
    background-color: rgba(15, 23, 42, 0.9);
}

/* Date input custom styling */
.bsp-input[type="date"] {
    color: var(--bsp-text-primary);
    color-scheme: var(--bsp-color-scheme);
}

/* Input Error States */
.input-error {
    border-color: var(--bsp-error) !important;
    background-color: var(--bsp-error-bg) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.bsp-error-msg {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding-left: 4px;
    color: var(--bsp-error);
    font-size: 0.75rem;
    font-weight: 600;
}

.bsp-error-msg.visible-error {
    display: flex;
}

/* Submit Action Button */
.bsp-submit-btn-wrap {
    position: relative;
    padding-top: 8px;
}

.bsp-submit-btn-glow {
    position: absolute;
    inset: 6px 0 0 0;
    background: var(--bsp-primary-gradient);
    border-radius: 16px;
    filter: blur(12px);
    opacity: 0.35;
    transition: opacity 0.3s ease, filter 0.3s ease;
    z-index: 0;
}

.bsp-submit-btn-wrap:hover .bsp-submit-btn-glow {
    opacity: 0.65;
    filter: blur(16px);
}

.bsp-submit-btn {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--bsp-primary-gradient);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bsp-submit-btn:hover {
    background: var(--bsp-primary-gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -5px rgba(59, 130, 246, 0.5);
}

.bsp-submit-btn:active {
    transform: translateY(1px) scale(0.99);
}

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

/* Divider */
.bsp-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0 18px;
}

.bsp-divider-line {
    flex-grow: 1;
    height: 1px;
    background: var(--bsp-border);
}

.bsp-divider-text {
    padding: 0 14px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bsp-text-subtle);
    background: transparent;
}

/* Secondary Actions / Home Button */
.bsp-sso-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.bsp-sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    background: var(--bsp-surface-subtle);
    border: 1px solid var(--bsp-border);
    border-radius: 12px;
    color: var(--bsp-text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bsp-sso-btn:hover {
    background: var(--bsp-surface-hover);
    color: var(--bsp-text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Footer Support Link */
.bsp-footer-card {
    margin-top: 24px;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--bsp-text-muted);
}

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

.bsp-link:hover {
    color: var(--bsp-primary-hover);
    text-decoration: underline;
}

/* Security Trust Toast */
#securityToast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
    pointer-events: none;
}

#securityToast.visible-toast {
    transform: translateY(0);
    opacity: 1;
}

.bsp-toast-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 18px;
    box-shadow: var(--bsp-shadow-toast);
}

.bsp-toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.15);
    color: var(--bsp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.bsp-toast-title {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bsp-text-primary);
}

.bsp-toast-desc {
    margin: 1px 0 0;
    font-size: 0.6875rem;
    color: var(--bsp-text-muted);
}

/* Animations & Micro-Interactions */
.error-shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(3px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.stagger-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.hidden-el {
    display: none !important;
}

/* Responsive Queries */
@media (max-width: 480px) {
    htx-page-content,
    .htx-page-content,
    [htx-page-content] {
        padding: 20px 12px !important;
    }
    
    .glass {
        padding: 24px 20px !important;
        border-radius: 22px;
    }
    
    .bsp-brand-title {
        font-size: 1.35rem;
    }

    #securityToast {
        bottom: 12px;
        right: 12px;
        left: 12px;
        transform: translateY(30px);
    }
    
    .bsp-toast-inner {
        padding: 10px 14px;
    }
}
