/* ===== Auth Page Styles ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(18, 18, 30, 0.7);
    --bg-input: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-focus: rgba(124, 58, 237, 0.5);
    --text-primary: #f0f0f5;
    --text-secondary: rgba(240, 240, 245, 0.6);
    --text-tertiary: rgba(240, 240, 245, 0.4);
    --accent-purple: #7c3aed;
    --accent-purple-light: #a78bfa;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --gradient-primary: linear-gradient(135deg, #7c3aed, #06b6d4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
}

.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: rgba(124, 58, 237, 0.1);
    top: -150px;
    left: -150px;
    animation: float 20s ease-in-out infinite;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: rgba(6, 182, 212, 0.08);
    bottom: -100px;
    right: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -20px);
    }
}

/* Auth Container */
.auth-container {
    display: flex;
    height: 100vh;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px;
    gap: 60px;
    align-items: center;
}

/* Brand Side */
.auth-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    margin-bottom: 40px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand-logo span {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dot {
    color: var(--accent-purple-light);
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.brand-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brand-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.brand-stat svg {
    color: var(--accent-green);
    flex-shrink: 0;
}

/* Forms Side */
.auth-forms {
    width: 420px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    backdrop-filter: blur(20px);
}

/* Tabs */
.auth-tabs {
    display: flex;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 32px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.auth-tab.active {
    color: var(--text-primary);
}

.tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 6px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.form-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

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

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

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    transition: all 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.input-wrapper svg {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.input-wrapper input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    padding: 13px 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

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

/* Message */
.form-message {
    margin-bottom: 16px;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: none;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.form-message.show {
    display: flex;
    padding: 10px 14px;
}

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

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.btn-submit:hover {
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
    transform: translateY(-2px);
}

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

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

.btn-submit .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-footer a {
    color: var(--accent-purple-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.form-footer a:hover {
    color: var(--accent-purple);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        padding: 24px;
        gap: 32px;
        overflow-y: auto;
    }

    .auth-brand {
        text-align: center;
        align-items: center;
    }

    .brand-title {
        font-size: 1.8rem;
    }

    .brand-stats {
        align-items: center;
    }

    .auth-forms {
        width: 100%;
        max-width: 420px;
    }
}

/* ===== Language Toggle ===== */
.lang-toggle {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 3px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s;
}

.lang-toggle:hover {
    border-color: rgba(124, 58, 237, 0.3);
}

.lang-toggle span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 26px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 100px;
    color: rgba(240, 240, 245, 0.4);
    transition: all 0.25s ease;
}

.lang-toggle span.active {
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    color: white;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.auth-lang-toggle {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}