/* ==============================================================================
   UPX Comic - 极简账号与会员系统样式 (无 Icon 纯净设计)
   ============================================================================== */

/* 顶部导航栏账号按钮区 */
.auth-nav-area {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-search ~ .auth-nav-area {
  margin-left: 0;
}

.auth-nav-btn {
  background: var(--btn-bg, transparent);
  color: var(--btn-text, var(--text, #0F172A));
  border: 1px solid var(--panel-border, var(--border, #E2E8F0));
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.auth-nav-btn:hover {
  background: var(--btn-hover-bg, #F8FAFC);
  border-color: var(--accent, #CBD5E1);
}

.auth-user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--btn-bg, #F8FAFC);
  border: 1px solid var(--panel-border, var(--border, #E2E8F0));
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--btn-text, var(--text, #0F172A));
}

.auth-user-btn:hover {
  border-color: var(--accent, #94A3B8);
}

.auth-vip-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.auth-admin-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #EDE9FE;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

/* 遮罩背景 */
.auth-modal-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.auth-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* 弹窗主体卡片 */
.auth-modal-card {
  width: 100%;
  max-width: 360px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 24px 22px;
  position: relative;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.auth-modal-backdrop.active .auth-modal-card {
  transform: translateY(0) scale(1);
}

/* 关闭按钮 (纯文字无Icon) */
.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 16px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
}

.auth-modal-close:hover {
  background: #F1F5F9;
  color: #0F172A;
}

/* 顶部选项卡切换 (登录 / 注册) */
.auth-tabs {
  display: flex;
  border-bottom: 1.5px solid #F1F5F9;
  margin-bottom: 20px;
}

.auth-tab-item {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  transition: all 0.2s ease;
}

.auth-tab-item.active {
  color: #0F172A;
  border-bottom-color: #0F172A;
}

/* 标题 */
.auth-view-title {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 18px;
  text-align: left;
}

/* 表单组件 */
.auth-form-group {
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: #F8FAFC;
  font-size: 13px;
  color: #0F172A;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: #0F172A;
  background: #FFFFFF;
}

.auth-hint {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 4px;
}

/* 按钮 */
.auth-submit-btn {
  width: 100%;
  padding: 10px;
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.auth-submit-btn:hover {
  background: #1E293B;
}

.auth-submit-btn:disabled {
  background: #94A3B8;
  cursor: not-allowed;
}

/* 辅助链接 */
.auth-links-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 12px;
}

.auth-link {
  color: #2563EB;
  text-decoration: none;
  cursor: pointer;
}

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

/* 提示与报错框 */
.auth-msg-box {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 12px;
  display: none;
}

.auth-msg-error {
  display: block;
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
}

.auth-msg-success {
  display: block;
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  color: #166534;
}

/* 用户个人中心视图 */
.auth-profile-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  font-size: 13px;
}

.auth-profile-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #F1F5F9;
}

.auth-profile-row:last-child {
  border-bottom: none;
}

.auth-profile-key {
  color: #64748B;
}

.auth-profile-val {
  font-weight: 600;
  color: #0F172A;
}

.auth-cache-clear-btn {
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #DC2626;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.3;
}

.auth-cache-clear-btn:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
}

.auth-cache-clear-btn:active {
  transform: scale(0.96);
}

.auth-cache-clear-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-secondary-btn {
  width: 100%;
  padding: 9px;
  background: transparent;
  color: #EF4444;
  border: 1px solid #FCA5A5;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 24px;
  transition: all 0.2s;
}

.auth-secondary-btn:hover {
  background: #FEF2F2;
}

/* ==============================================================================
   自定义轻量封禁弹窗 (替代浏览器原生 alert 弹窗)
   ============================================================================== */
.upx-ban-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}

.upx-ban-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.upx-ban-modal-box {
  width: 100%;
  max-width: 290px;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 26px 22px 20px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif;
}

.upx-ban-modal-backdrop.active .upx-ban-modal-box {
  transform: scale(1);
}

.upx-ban-modal-text {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 22px;
  line-height: 1.4;
  letter-spacing: 0.3px;
}

.upx-ban-modal-confirm {
  width: 100%;
  padding: 10px 0;
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.upx-ban-modal-confirm:hover {
  background: #1E293B;
}

.upx-ban-modal-confirm:active {
  transform: scale(0.98);
}

/* 暗色主题适配 */
body.dark-theme .upx-ban-modal-box {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #F8FAFC;
}

body.dark-theme .upx-ban-modal-text {
  color: #F8FAFC;
}

body.dark-theme .upx-ban-modal-confirm {
  background: #3B82F6;
  color: #FFFFFF;
}

body.dark-theme .upx-ban-modal-confirm:hover {
  background: #2563EB;
}

/* ==============================================================================
   主题化自定义下拉框 (Custom Theme Dropdown)
   ============================================================================== */
.auth-custom-select {
  position: relative;
  user-select: none;
  width: 100%;
}

.auth-custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #0F172A;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 38px;
  box-sizing: border-box;
}

.auth-custom-select-trigger:hover {
  border-color: #CBD5E1;
  background: #FAFAFA;
}

.auth-custom-select.open .auth-custom-select-trigger {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-custom-select-arrow {
  width: 14px;
  height: 14px;
  color: #64748B;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.auth-custom-select.open .auth-custom-select-arrow {
  transform: rotate(180deg);
  color: #2563EB;
}

.auth-custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  padding: 4px;
  z-index: 1000;
  display: none;
  animation: authDropFade 0.15s ease-out;
}

.auth-custom-select.open .auth-custom-select-dropdown {
  display: block;
}

@keyframes authDropFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-custom-select-option {
  padding: 8px 10px;
  font-size: 12.5px;
  color: #334155;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-custom-select-option:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.auth-custom-select-option.selected {
  background: #EFF6FF;
  color: #2563EB;
  font-weight: 600;
}

