/* Auth Wall */
.auth-wall {
    position: fixed; inset: 0; z-index: 99999;
    background: var(--bg-dark);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 24px; padding: 40px 35px; max-width: 400px; width: 100%;
    text-align: center;
}

.auth-icon {
    width: 70px; height: 70px; border-radius: 50%;
    background: var(--primary); color: white;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.8rem; margin-bottom: 15px;
}

.auth-title {
    font-family: 'Cinzel', serif; font-size: 1.6rem;
    color: var(--text); margin-bottom: 4px;
}

.auth-desc {
    color: var(--text-dim); font-size: 0.85rem; margin-bottom: 20px;
}

.auth-sub {
    color: var(--text-muted); font-size: 0.9rem; margin-bottom: 15px;
}

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

.auth-input-group {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-input); border: 1.5px solid var(--border);
    border-radius: 12px; padding: 0 14px;
    transition: border-color 0.3s;
}

.auth-input-group:focus-within { border-color: var(--primary); }

.auth-input-group i {
    color: var(--text-dim); font-size: 0.9rem; width: 18px; text-align: center;
}

.auth-input-group input {
    flex: 1; background: none; border: none; padding: 14px 0;
    color: var(--text); font-size: 0.95rem; font-family: 'Poppins', sans-serif;
    outline: none;
}

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

.auth-btn {
    background: var(--primary); color: white; border: none;
    border-radius: 12px; padding: 14px; font-size: 1rem;
    font-weight: 600; cursor: pointer; font-family: 'Poppins', sans-serif;
    transition: opacity 0.3s; margin-top: 4px;
}

.auth-btn:hover { opacity: 0.9; }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-back {
    background: none; border: none; color: var(--text-dim);
    font-size: 0.85rem; cursor: pointer; padding: 8px;
    font-family: 'Poppins', sans-serif;
}

.auth-back:hover { color: var(--text); }

.auth-error {
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2);
    border-radius: 8px; padding: 10px; color: #ef4444;
    font-size: 0.85rem; margin-bottom: 10px;
}

.auth-trust {
    color: var(--text-dim); font-size: 0.72rem; margin-top: 15px;
}

/* User Badge in Navbar */
.user-badge-container { position: relative; }

.user-badge {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; padding: 4px 10px 4px 4px;
    border-radius: 20px; border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.user-badge:hover { border-color: var(--primary); }

.user-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700;
}

.user-name-text {
    font-size: 0.8rem; color: var(--text); font-weight: 500;
}

.user-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; padding: 8px; min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0; visibility: hidden; transform: translateY(5px);
    transition: all 0.25s ease; z-index: 1001;
}

.user-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }

.user-menu-header {
    padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}

.user-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; color: var(--text-muted); text-decoration: none;
    font-size: 0.85rem; border-radius: 8px; transition: all 0.2s;
}

.user-menu a:hover { background: rgba(139,92,246,0.1); color: var(--text); }
.user-menu a i { width: 16px; color: var(--primary-light); font-size: 0.8rem; }

/* Light theme */
body.light-theme .auth-wall { background: #f0f0f5; }
body.light-theme .auth-card { background: #fff; border-color: rgba(0,0,0,0.08); }
body.light-theme .auth-input-group { background: #f5f5fa; border-color: #d8d8e8; }
body.light-theme .auth-input-group input { color: #1e1e2e; }
body.light-theme .user-badge { border-color: rgba(0,0,0,0.08); }
body.light-theme .user-menu { background: #fff; border-color: rgba(0,0,0,0.06); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
body.light-theme .user-name-text { color: #1e1e2e; }

@media (max-width: 768px) {
    .auth-card { padding: 30px 20px; }
    .user-name-text { display: none; }
}
