/* ============================================
   LAGGONE AI - AUTH STYLES
   Login, Register, Forgot Password
   ============================================ */

/* Auth Wrapper */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 700px;
}

/* Left Side - Branding */
.auth-branding {
    position: relative;
    padding: var(--space-2xl);
    background: var(--gradient-dark);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.branding-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
}

.auth-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.auth-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.branding-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.branding-main h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.branding-main p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.feature-item .feature-icon {
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.feature-item strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
}

.feature-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.branding-stats {
    display: flex;
    gap: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--glass-border);
}

.branding-stats .stat {
    text-align: center;
}

.branding-stats .value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-light);
}

.branding-stats .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Background Animations */
.branding-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: floatShape 8s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
    animation: floatShape 10s ease-in-out infinite 1s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--accent);
    top: 50%;
    right: 20%;
    animation: floatShape 12s ease-in-out infinite 2s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.05); }
}

/* Right Side - Form */
.auth-form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    background: var(--bg-card);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 360px;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-header a {
    color: var(--primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.auth-header a:hover {
    color: var(--primary-light);
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.social-btn:hover {
    background: var(--glass-hover);
    border-color: var(--primary);
}

.social-btn.google:hover {
    border-color: #EA4335;
}

.social-btn.discord {
    background: rgba(88, 101, 242, 0.1);
    border-color: rgba(88, 101, 242, 0.3);
}

.social-btn.discord:hover {
    background: rgba(88, 101, 242, 0.2);
    border-color: #5865F2;
}

.social-btn.discord i {
    color: #5865F2;
    font-size: 1.25rem;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.divider span {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.forgot-link {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 400;
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--primary-light);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i:first-child {
    position: absolute;
    left: var(--space-md);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input-wrapper input {
    width: 100%;
    padding: var(--space-md) 44px var(--space-md) calc(var(--space-md) * 2 + 1rem);
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
}

.input-wrapper input:focus + i:first-child,
.input-wrapper:focus-within i:first-child {
    color: var(--primary);
}

.input-wrapper input::placeholder {
    color: var(--text-dim);
}

.toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 2;
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--text);
}

/* Checkbox */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.checkbox-wrapper input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkmark::after {
    content: '✓';
    font-size: 0.7rem;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-fast);
}

.checkbox-wrapper input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

/* Auth Message */
.auth-message {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

.auth-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
}

/* Footer */
.auth-footer {
    margin-top: var(--space-xl);
    text-align: center;
}

.auth-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.auth-footer a:hover {
    color: var(--primary);
}

/* Password Strength */
.password-strength {
    display: flex;
    gap: 4px;
    margin-top: var(--space-sm);
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    transition: background var(--transition-base);
}

.strength-bar.active {
    background: var(--danger);
}

.strength-bar.active.medium {
    background: var(--warning);
}

.strength-bar.active.strong {
    background: var(--success);
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* Terms Checkbox */
.terms-wrapper {
    font-size: 0.85rem;
}

.terms-wrapper a {
    color: var(--primary);
}

/* Game Selection */
.game-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.game-option {
    position: relative;
}

.game-option input {
    display: none;
}

.game-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.game-option label:hover {
    border-color: var(--primary);
}

.game-option input:checked + label {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary);
}

.game-option label i {
    font-size: 1.5rem;
}

.game-option label span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Rank Selection */
.rank-slider {
    margin-top: var(--space-sm);
}

.rank-slider input[type="range"] {
    width: 100%;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    appearance: none;
    cursor: pointer;
}

.rank-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.rank-display {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.current-rank {
    text-align: center;
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--glass-bg);
    border-radius: var(--radius-md);
}

.current-rank .rank-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-light);
}

/* Responsive */
@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
    
    .auth-branding {
        display: none;
    }
    
    .auth-form-container {
        padding: var(--space-xl);
    }
}

@media (max-width: 480px) {
    .auth-wrapper {
        padding: var(--space-md);
    }
    
    .auth-form-container {
        padding: var(--space-lg);
    }
    
    .game-selection {
        grid-template-columns: repeat(2, 1fr);
    }
}
