/* Auth screen styles */

#auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2a 100%);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
    animation: fadeIn 0.3s ease-out;
}

#auth-screen.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-container {
    width: 90%;
    max-width: 400px;
    background: var(--bg2);
    border: 1px solid var(--tile-border);
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.6);
    animation: slideUp 0.4s ease-out;
}

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

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .logo-icon {
    font-size: 48px;
    color: var(--gold);
    display: block;
    margin-bottom: 12px;
}

.auth-logo .logo-text {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #d4a843 0%, #e8722a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.auth-logo .logo-tagline {
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-input {
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--tile-border);
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.1);
}

.form-input::placeholder {
    color: var(--text-dim);
    opacity: 0.6;
}

.password-strength {
    height: 4px;
    background: var(--tile-border);
    border-radius: 2px;
    margin-top: -8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    background: var(--red);
    transition: all 0.3s;
    border-radius: 2px;
}

.password-strength-bar.weak { width: 33%; background: var(--red); }
.password-strength-bar.medium { width: 66%; background: #f39c12; }
.password-strength-bar.strong { width: 100%; background: var(--green); }

.btn-primary {
    padding: 14px;
    background: var(--gold);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-primary:hover {
    background: #e0b84e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 168, 67, 0.3);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

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

.auth-divider span {
    position: relative;
    background: var(--bg2);
    padding: 0 16px;
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    padding: 12px;
    border: 1px solid var(--tile-border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-social:hover {
    background: var(--bg3);
    border-color: var(--gold-dim);
    transform: translateY(-1px);
}

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

.btn-social.google {
    background: #fff;
    color: #3c4043;
    border-color: #dadce0;
}

.btn-social.google:hover {
    background: #f8f9fa;
    border-color: #dadce0;
}

.btn-social.facebook {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.btn-social.facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
}

.social-icon {
    width: 20px;
    height: 20px;
}

.auth-link {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-dim);
}

.auth-link a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.auth-link a:hover {
    text-decoration: underline;
}

.auth-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
}

.auth-footer a {
    color: var(--gold-dim);
    text-decoration: none;
    margin: 0 8px;
}

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

.auth-error {
    padding: 12px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--red);
    border-radius: 8px;
    color: var(--red);
    font-size: 13px;
    text-align: center;
}

.auth-error.hidden {
    display: none;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: var(--bg);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Language toggle on auth screen */
.language-toggle-auth {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 1001;
}

.lang-toggle-btn {
    padding: 8px 14px;
    background: var(--bg2);
    border: 1px solid var(--tile-border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-toggle-btn:hover {
    background: var(--bg3);
    border-color: var(--gold-dim);
}

.lang-toggle-btn.active {
    background: linear-gradient(135deg, #d4a843 0%, #e8722a 100%);
    border-color: #d4a843;
    color: var(--bg);
}

/* Powered by Conmigo */
.logo-powered {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.logo-powered a {
    color: var(--gold-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.logo-powered a:hover {
    color: #e8722a;
    text-decoration: underline;
}

/* Conmigo link in footer */
.auth-footer .conmigo-link {
    color: #e8722a;
    font-weight: 600;
}

.auth-footer .conmigo-link:hover {
    color: var(--gold);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    #auth-screen {
        align-items: flex-start;
        padding: 10px 0;
    }
    
    .auth-container {
        padding: 24px 20px;
        margin: auto 0;
    }
    
    .auth-logo .logo-text {
        font-size: 28px;
    }
    
    .auth-logo .logo-tagline {
        font-size: 12px;
    }
    
    .language-toggle-auth {
        top: 10px;
        right: 10px;
    }
    
    .lang-toggle-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}
