/* ============================================
   PROJECT BAKSHI - AUTH STYLES
   by WebAppZo AI
   ============================================ */

:root {
    --bg-primary: #080808;
    --bg-secondary: #0f0f0f;
    --bg-card: #141414;
    --bg-input: #1a1a1a;
    --text-primary: #f5f0ef;
    --text-secondary: #a89090;
    --text-muted: #705858;
    --accent-primary: #dc2626;
    --accent-secondary: #ef4444;
    --accent-tertiary: #f87171;
    --accent-glow: rgba(220, 38, 38, 0.3);
    --accent-orange: #f97316;
    --accent-orange-glow: rgba(249, 115, 22, 0.3);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    top: -10%;
    left: -10%;
    animation-duration: 25s;
}

.bg-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-orange), transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-duration: 20s;
    animation-delay: -5s;
}

.bg-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-secondary), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 15s;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -30px) scale(1.1); }
    50% { transform: translate(-30px, 50px) scale(0.9); }
    75% { transform: translate(30px, 30px) scale(1.05); }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* Auth Wrapper */
.auth-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    width: 950px;
    max-width: 95vw;
    min-height: 600px;
    max-height: 90vh;
    background: rgba(22, 22, 31, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(124, 58, 237, 0.08);
    overflow: hidden;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Branding Panel */
.auth-branding {
    flex: 1;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(249, 115, 22, 0.08));
    border-right: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(124, 58, 237, 0.1), transparent 50%);
    animation: rotateGlow 20s linear infinite;
}

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

.brand-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { box-shadow: 0 4px 20px var(--accent-glow); }
    50% { box-shadow: 0 4px 30px var(--accent-glow), 0 0 40px var(--accent-glow); }
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    padding-left: 72px;
}

.highlight-secondary {
    color: var(--accent-tertiary);
    font-weight: 600;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 100px;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-tertiary);
    margin-bottom: 36px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeInLeft 0.5s ease forwards;
}

.feature-item:nth-child(1) { animation-delay: 0.3s; }
.feature-item:nth-child(2) { animation-delay: 0.45s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }
.feature-item:nth-child(4) { animation-delay: 0.75s; }

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.feature-item i {
    color: var(--accent-secondary);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.brand-footer {
    position: relative;
    z-index: 1;
}

.brand-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Auth Panel */
.auth-panel {
    flex: 1;
    padding: 48px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 360px;
}

.auth-form-container.hidden {
    display: none;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition);
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 14px 48px 14px 48px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

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

.input-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(28, 28, 40, 0.8);
}

.input-group input:focus ~ .input-icon,
.input-group input:focus + .input-icon {
    color: var(--accent-secondary);
}

.input-group:has(input:focus) .input-icon {
    color: var(--accent-secondary);
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-orange));
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: var(--transition);
}

.input-group input:focus ~ .input-line {
    left: 0;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    z-index: 1;
}

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

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-hover);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.checkmark::after {
    content: '✓';
    font-size: 12px;
    color: white;
    opacity: 0;
    transition: var(--transition);
}

.remember-me input[type="checkbox"]:checked + .checkmark {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.remember-me input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.loading .btn-text { opacity: 0; }
.btn-primary.loading .btn-loader { opacity: 1; }

.btn-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.btn-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Form Message */
.form-message {
    margin-top: 16px;
    padding: 0;
    text-align: center;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    max-height: 0;
    overflow: hidden;
}

.form-message.show {
    padding: 12px;
    max-height: 80px;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

/* Form Switch */
.form-switch {
    margin-top: 28px;
    text-align: center;
}

.form-switch p {
    font-size: 14px;
    color: var(--text-secondary);
}

.form-switch a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.form-switch a:hover {
    color: var(--accent-tertiary);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
        max-height: 95vh;
        overflow-y: auto;
    }

    .auth-branding {
        padding: 32px 24px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .feature-list { display: none; }

    .auth-panel {
        padding: 32px 24px;
    }

    .brand-logo { gap: 12px; }

    .logo-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .logo-text { font-size: 22px; }
    .brand-tagline { padding-left: 56px; }
    .brand-footer { display: none; }
}

@media (max-width: 480px) {
    .auth-panel {
        padding: 24px 20px;
    }

    .form-header h2 { font-size: 24px; }
}
