/* DSLLM Authentication Styles */
/* Inherited CSS Variables from index.html */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --selft-color: #8b5cf6;
    --bg-color: #ffffff;
    --dark-bg: #0f172a;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --gradient-selft: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-light: #cbd5e1;
    --border-color: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--gradient-selft);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Auth Container */
.auth-container {
    background: var(--bg-color);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    margin: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    .auth-hero {
        display: none;
    }
}

/* Hero Section (Left) */
.auth-hero {
    background: var(--gradient-selft);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    justify-content: center;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
    text-align: left;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.feature-list li::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Form Section (Right) */
.auth-form-section {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Language Switcher */
.language-switch {
    display: flex;
    gap: 0.25rem;
    background: var(--border-color);
    border-radius: 6px;
    padding: 2px;
    margin-bottom: 2rem;
    justify-content: center;
}

.language-switch button {
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.language-switch button.active {
    background: var(--primary-color);
    color: white;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--bg-color);
    color: var(--text-color);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Plan Selection */
.plan-selection {
    margin-bottom: 1.5rem;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.plan-option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-color);
}

.plan-option:hover {
    border-color: var(--primary-color);
}

.plan-option.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.plan-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.plan-price {
    color: var(--text-light);
    font-size: 0.8rem;
}

.plan-popular {
    background: var(--selft-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 0.95rem;
    width: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Social Auth */
.social-auth {
    margin: 1.5rem 0;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: var(--text-light);
    font-size: 0.9rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.divider span {
    background: var(--bg-color);
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-social {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-social:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* Footer Links */
.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Footer Links - UPDATED WITH FORCE ENABLE */
.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* FORCE ENABLE ALL FORM FOOTER LINKS */
.form-footer a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    display: inline !important;
    position: relative !important;
}

.form-footer a:hover {
    text-decoration: underline !important;
    color: var(--primary-dark) !important;
}

.form-footer p {
    color: var(--text-light) !important;
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Force enable specific link types */
a[onclick*="showRegister"],
a[onclick*="showLogin"], 
a[onclick*="showForgotPassword"],
a[data-translate="sign-up"],
a[data-translate="sign-in"],
a[data-translate="forgot-password"] {
    color: var(--primary-color) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    text-decoration: none !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}

a[onclick*="showRegister"]:hover,
a[onclick*="showLogin"]:hover,
a[onclick*="showForgotPassword"]:hover,
a[data-translate="sign-up"]:hover,
a[data-translate="sign-in"]:hover,
a[data-translate="forgot-password"]:hover {
    text-decoration: underline !important;
    color: var(--primary-dark) !important;
}

/* Remove any disabled states */
.form-footer a:disabled,
.form-footer a[disabled] {
    pointer-events: auto !important;
    opacity: 1 !important;
    color: var(--primary-color) !important;
}

/* Force clickable for all anchor tags in auth forms */
.auth-form a[href="#"] {
    color: var(--primary-color) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    position: relative !important;
    z-index: 10 !important;
}

.auth-form a[href="#"]:hover {
    text-decoration: underline !important;
    color: var(--primary-dark) !important;
}

/* Force override any conflicting styles */
.auth-form .form-footer * {
    pointer-events: auto !important;
}

/* Specific fix for Vietnamese text links */
.form-footer p a {
    color: var(--primary-color) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

/* Loading State */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Success/Error States */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

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

/* Hide/Show Forms */
.auth-form {
    display: none;
}

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

/* Language Content */
.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
}
