/* ========================================
   808漫剧AIGC - 认证系统样式
   ======================================== */

/* ── 登录弹窗 ──────────────────────────────────── */
#auth-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: authFadeIn 0.3s ease;
}

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

.auth-modal-body {
  width: 420px;
  max-width: 90vw;
  background: var(--bg-secondary, #1e1e2e);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: authSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authSlideUp {
  from { transform: translateY(24px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ── 弹窗头部 ──────────────────────────────────── */
.auth-modal-header {
  text-align: center;
  padding: 32px 32px 20px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.12), rgba(255, 107, 53, 0.02));
}

.auth-modal-logo {
  font-size: 40px;
  margin-bottom: 8px;
}

.auth-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #e4e4e7);
  margin-bottom: 4px;
}

.auth-modal-subtitle {
  font-size: 13px;
  color: var(--text-tertiary, #71717a);
}

/* ── 标签切换 ──────────────────────────────────── */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 32px;
}

.auth-tab {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary, #71717a);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.auth-tab:hover {
  color: var(--text-secondary, #a1a1aa);
}

.auth-tab.active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
}

/* ── 表单区域 ──────────────────────────────────── */
.auth-form {
  padding: 24px 32px 32px;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary, #e4e4e7);
  font-size: 14px;
  margin-bottom: 12px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.auth-form input:focus {
  outline: none;
  border-color: #ff6b35;
  background: rgba(255, 107, 53, 0.04);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.auth-form input::placeholder {
  color: var(--text-tertiary, #52525b);
}

.auth-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #ff6b35, #ff8855);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.auth-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

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

/* ── 表单提示 ──────────────────────────────────── */
.auth-form-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary, #52525b);
  margin-top: 16px;
  line-height: 1.6;
}

.auth-form-hint a {
  color: #ff6b35;
  text-decoration: none;
  cursor: pointer;
}

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

/* ── 注册福利提示 ──────────────────────────────── */
.auth-perks {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 107, 53, 0.06);
}

.auth-perk {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary, #a1a1aa);
}

.auth-perk-icon {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}

/* ── 顶栏用户区域 ──────────────────────────────── */
.user-info-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-credits {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 107, 53, 0.05));
  border: 1px solid rgba(255, 107, 53, 0.2);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s;
}

.user-credits .credits-icon {
  font-size: 14px;
}

.user-credits .credits-num {
  color: #ff8855;
  min-width: 20px;
  text-align: right;
}

.credits-flash {
  animation: creditsPulse 0.6s ease;
}

@keyframes creditsPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); box-shadow: 0 0 16px rgba(255, 107, 53, 0.4); }
  100% { transform: scale(1); }
}

.user-name {
  font-size: 13px;
  color: var(--text-secondary, #a1a1aa);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--text-tertiary, #71717a);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

/* ── Toast 提示 ────────────────────────────────── */
.auth-toast {
  display: none;
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10001;
  transition: opacity 0.3s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
}

.auth-toast-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.auth-toast-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.auth-toast-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* ── 积分不足提示遮罩 ──────────────────────────── */
.credits-empty-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  font-size: 13px;
  color: #f87171;
  margin: 8px 0;
}

/* ── 响应式 ────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-modal-body {
    width: 95vw;
  }
  .auth-modal-header {
    padding: 24px 20px 16px;
  }
  .auth-form {
    padding: 20px;
  }
  .user-name {
    display: none;
  }
  .auth-tab {
    font-size: 13px;
  }
}

/* ── 手机号登录 ──────────────────────────────────── */
.phone-input-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s;
  overflow: hidden;
}

.phone-input-wrap:focus-within {
  border-color: #ff6b35;
  background: rgba(255, 107, 53, 0.04);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.phone-prefix {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary, #a1a1aa);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.phone-input-wrap input {
  flex: 1;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--text-primary, #e4e4e7);
  font-size: 14px;
  outline: none;
}

.phone-input-wrap input::placeholder {
  color: var(--text-tertiary, #52525b);
}

.otp-input-wrap {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.otp-input-wrap input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary, #e4e4e7);
  font-size: 16px;
  letter-spacing: 4px;
  text-align: center;
  transition: all 0.2s;
  box-sizing: border-box;
}

.otp-input-wrap input:focus {
  outline: none;
  border-color: #ff6b35;
  background: rgba(255, 107, 53, 0.04);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.otp-input-wrap input::placeholder {
  color: var(--text-tertiary, #52525b);
  letter-spacing: 0;
}

.btn-send-otp {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 107, 53, 0.3);
  background: rgba(255, 107, 53, 0.08);
  color: #ff8855;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 110px;
}

.btn-send-otp:hover:not(:disabled) {
  background: rgba(255, 107, 53, 0.15);
  border-color: rgba(255, 107, 53, 0.5);
}

.btn-send-otp:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
