/* ==============================
   登录注册弹窗样式 (DAULSEN 3D)
   ============================== */

.auth-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}

.auth-overlay.active {
  display: flex;
}

.auth-modal {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 380px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.25s ease;
}

.auth-modal::-webkit-scrollbar {
  width: 4px;
}

.auth-modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.auth-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.auth-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: 1px;
}

.auth-logo p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin: 6px 0 0;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 3px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s;
}

.auth-tab.active {
  background: #e63946;
  color: #fff;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

.auth-form-group {
  margin-bottom: 18px;
}

.auth-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}

.auth-form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.auth-form-group input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.auth-form-group input:focus {
  border-color: #e63946;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.auth-submit-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #e63946, #c1121f);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.35);
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-text-btn {
  width: 100%;
  margin-top: 10px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-text-btn:hover {
  color: #fff;
}

.auth-inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
}

.auth-inline-btn {
  width: 120px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-inline-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.auth-inline-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-form-hint {
  margin: -4px 0 14px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
}

.auth-error {
  background: rgba(230, 57, 70, 0.12);
  border: 1px solid rgba(230, 57, 70, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #ff6b6b;
  margin-bottom: 16px;
  display: none;
}

.auth-error.show {
  display: block;
}

.auth-success {
  background: rgba(46, 213, 115, 0.12);
  border: 1px solid rgba(46, 213, 115, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #2ed573;
  margin-bottom: 16px;
  display: none;
}

.auth-success.show {
  display: block;
}

.auth-user-btn {
  display: flex;
  align-items: center;
  gap: 0;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  padding: 2px;
  border-radius: 24px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 32px;
  min-height: 32px;
  justify-content: center;
}

.auth-user-btn:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.user-avatar:empty { display: none; }

.user-btn-label {
  white-space: nowrap;
  padding: 0 12px;
}

.auth-user-menu {
  position: relative;
  display: inline-block;
}

.auth-user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  width: 280px;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  z-index: 1100;
  overflow: hidden;
}

.auth-user-dropdown.show {
  display: block;
}

.auth-user-dropdown .dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-user-dropdown .dropdown-header .user-email {
  font-size: 13px;
  color: #fff;
  font-weight: 500;
}

.auth-user-dropdown .dropdown-header .user-plan {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

/* ========== 个人信息摘要 ========== */
.profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.2s;
}

.profile-summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.profile-avatar.trial { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.profile-avatar.monthly { background: linear-gradient(135deg, #f59e0b, #f97316); }
.profile-avatar.quarterly { background: linear-gradient(135deg, #10b981, #059669); }
.profile-avatar.yearly { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.profile-avatar.lifetime { background: linear-gradient(135deg, #ec4899, #d946ef); }
.profile-avatar.default { background: linear-gradient(135deg, #6366f1, #4f46e5); }

.profile-summary .profile-info {
  flex: 1;
  min-width: 0;
}

.profile-summary .profile-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-summary .profile-email {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-phone {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.profile-summary .profile-chevron {
  color: rgba(255, 255, 255, 0.2);
  font-size: 16px;
}

/* ========== 配额进度条 ========== */
.quota-section {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.quota-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.quota-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.quota-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.quota-count strong {
  color: #fff;
}

.quota-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.quota-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.quota-bar-fill.low { background: linear-gradient(90deg, #2ed573, #7bed9f); }
.quota-bar-fill.medium { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.quota-bar-fill.high { background: linear-gradient(90deg, #ff6b6b, #ee5a24); }
.quota-bar-fill.full { background: linear-gradient(90deg, #ff4757, #c1121f); }

/* ========== 有效期倒计时 ========== */
.expiry-countdown {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.expiry-countdown .countdown-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.expiry-countdown .countdown-text {
  flex: 1;
}

.expiry-countdown .countdown-text strong {
  color: #fff;
  font-weight: 500;
}

.expiry-countdown.urgent {
  background: rgba(230, 57, 70, 0.08);
  color: #ff6b6b;
}

.expiry-countdown.urgent .countdown-text strong {
  color: #ff6b6b;
}

/* ========== 激活密钥区域 ========== */
.activate-key-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.activate-key-section h4 {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 12px;
  font-weight: 500;
}

.key-input-group {
  display: flex;
  gap: 8px;
}

.key-input-group input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 13px;
  letter-spacing: 1px;
  outline: none;
  transition: all 0.2s;
  font-family: 'Courier New', monospace;
}

.key-input-group input:focus {
  border-color: #e63946;
}

.key-input-group button {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: #e63946;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.key-input-group button:hover {
  background: #c1121f;
}

.license-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  margin-top: 12px;
  font-size: 13px;
}

.license-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.license-status .dot.active {
  background: #2ed573;
  box-shadow: 0 0 6px rgba(46, 213, 115, 0.4);
}

.license-status .dot.expired {
  background: #ff6b6b;
}

.license-status .dot.inactive {
  background: rgba(255, 255, 255, 0.2);
}

.license-status .license-info {
  flex: 1;
}

.license-status .license-info .plan-name {
  font-weight: 500;
  color: #fff;
}

.license-status .license-info .expiry {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

.auth-user-dropdown .dropdown-item {
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.auth-user-dropdown .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.auth-user-dropdown .dropdown-item.danger {
  color: #ff6b6b;
}

.auth-user-dropdown .dropdown-item.danger:hover {
  background: rgba(230, 57, 70, 0.1);
}

/* ========== 个人信息弹窗 ========== */
.profile-overlay .auth-modal {
  width: 440px;
  padding: 32px 36px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-header .profile-avatar.large {
  width: 56px;
  height: 56px;
  font-size: 22px;
  font-weight: 700;
}

.profile-header .profile-meta {
  flex: 1;
}

.profile-header .profile-meta h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px;
}

.profile-header .profile-meta p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
}

/* 个人信息标签页切换 */
.profile-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 3px;
}

.profile-tab {
  flex: 1;
  padding: 9px;
  text-align: center;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s;
}

.profile-tab.active {
  background: #e63946;
  color: #fff;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

/* 资料编辑表单 */
.profile-form {
  display: none;
}

.profile-form.active {
  display: block;
}

.profile-form .form-tip {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 4px;
}

/* 许可证信息面板 */
.license-info-panel {
  display: none;
  padding: 4px 0;
}

.license-info-panel.active {
  display: block;
}

.license-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.license-card .card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.license-card .card-row + .card-row {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.license-card .card-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.license-card .card-value {
  font-size: 13px;
  color: #fff;
  font-weight: 500;
}

.license-card .card-value.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  background: rgba(46, 213, 115, 0.15);
  color: #2ed573;
}

.license-card .card-value.badge.expired-badge {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

.license-card .card-value.badge.inactive-badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}

/* 详细配额展示 */
.quota-detail {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.quota-detail .quota-detail-header {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

.quota-detail .quota-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
}

.quota-detail .quota-stat-row .stat-label {
  color: rgba(255, 255, 255, 0.4);
}

.quota-detail .quota-stat-row .stat-value {
  color: #fff;
}

.quota-detail .quota-detail-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,0.72);
}

.quota-detail .quota-detail-header strong {
  color: #ffd32a;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.quota-formula {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 211, 42, 0.18);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 211, 42, 0.1), rgba(139, 92, 246, 0.08));
  font-size: 12px;
  color: rgba(255,255,255,0.62);
}

.quota-formula strong {
  color: #ffd32a;
  font-size: 15px;
  letter-spacing: 0;
  white-space: nowrap;
}

.quota-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.quota-breakdown-card {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  padding: 11px 12px;
}

.quota-breakdown-card .qb-label {
  color: rgba(255,255,255,0.52);
  font-size: 12px;
  line-height: 1.35;
}

.quota-breakdown-card strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
}

.quota-breakdown-card small {
  color: rgba(255,255,255,0.38);
  font-size: 11px;
  line-height: 1.35;
}

.quota-breakdown-card-income {
  grid-column: 1 / -1;
}

.quota-reset-note {
  margin-top: 9px;
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  line-height: 1.6;
}

.quota-detail .quota-stat-row {
  align-items: center;
  gap: 12px;
}

.quota-detail .quota-stat-row .stat-value {
  text-align: right;
  color: rgba(255,255,255,0.82);
  font-weight: 700;
}

/* 修改密码 */
.password-section-title {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  margin: 20px 0 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ========== 头像上传 ========== */
.profile-avatar-wrapper {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.profile-avatar-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #1a1a2e;
  background: #e63946;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  z-index: 2;
}

.profile-avatar-upload-btn:hover {
  background: #c1121f;
  transform: scale(1.1);
}

.profile-avatar-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.profile-avatar-loading .orbit-spinner {
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.25));
}

.profile-avatar.large {
  width: 56px;
  height: 56px;
  font-size: 22px;
  font-weight: 700;
}

.profile-avatar.with-img {
  background: transparent !important;
  overflow: hidden;
}

.profile-avatar.with-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== 项目管理 ========== */
.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.projects-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  margin: 0;
}

.btn.btn-sm.btn-primary {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: #e63946;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn.btn-sm.btn-primary:hover {
  background: #c1121f;
}

.project-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.project-list::-webkit-scrollbar {
  width: 3px;
}

.project-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.project-empty {
  text-align: center;
  padding: 30px 0;
  color: rgba(255,255,255,0.25);
  font-size: 13px;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.2s;
  cursor: default;
}

.project-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}

.project-item-info {
  flex: 1;
  min-width: 0;
}

.project-item-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-item-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-item-time {
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.project-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.project-item-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
}

.project-item-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.project-item-btn.danger:hover {
  background: rgba(230,57,70,0.2);
  color: #ff6b6b;
}

.project-edit-form {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 16px;
  margin-top: 8px;
}

.project-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-edit-header h4 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.project-edit-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.project-edit-close:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.project-edit-actions {
  margin-top: 20px;
}

.required {
  color: #e63946;
  margin-left: 2px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 响应式 */
/* ========== 升级套餐弹窗 (Pricing Modal) ========== */
.pricing-overlay .pricing-modal {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 32px 28px 28px;
  width: 820px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.25s ease;
}

.pricing-modal::-webkit-scrollbar {
  width: 4px;
}

.pricing-modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.pricing-header {
  text-align: center;
  margin-bottom: 28px;
}

.pricing-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.pricing-header p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.pricing-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  position: relative;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.pricing-card.popular {
  border-color: #e63946;
  background: rgba(230, 57, 70, 0.08);
}

.pricing-card.popular:hover {
  border-color: #e63946;
  background: rgba(230, 57, 70, 0.12);
}

.pricing-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #e63946;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.pricing-card-header {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.pricing-card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.pricing-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pricing-price {
  margin: 0 0 14px;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-height: 56px;
}

.pricing-amount {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.pricing-original {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: line-through;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 auto 18px;
  text-align: left;
  display: table;
}

.pricing-features li {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  padding: 5px 0;
}

.pricing-features li::before {
  content: "✓";
  color: #2ed573;
  font-weight: 700;
  margin-right: 6px;
}

.pricing-features li strong {
  color: #fff;
}

.pricing-contact-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.pricing-contact-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pricing-contact-btn.popular-btn {
  background: #e63946;
  color: #fff;
  border-color: #e63946;
}

.pricing-contact-btn.popular-btn:hover {
  background: #c1121f;
}

/* ========== 积分包区块容器 ========== */
#pricing-credit-packs {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
#pricing-credit-packs-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-align: center !important;
  margin: 0 0 14px;
  display: block;
  width: 100%;
}

/* ========== 积分包卡片 ========== */
.credit-pack-card {
  border-color: rgba(46, 213, 115, 0.2) !important;
  background: rgba(46, 213, 115, 0.04) !important;
  padding: 16px 14px !important;
}
.credit-pack-card:hover {
  border-color: rgba(46, 213, 115, 0.35) !important;
  background: rgba(46, 213, 115, 0.07) !important;
}
.credit-pack-card .pricing-card-header { min-height: auto; }
.credit-pack-card .pricing-price { padding-top: 8px; margin-bottom: 10px; min-height: auto; }
.credit-pack-card .pricing-action { margin-top: 10px; }

.credit-pack-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 4px 0 0;
}
.credit-pack-amount .cp-plus { font-size: 22px; font-weight: 700; color: #2ed573; }
.credit-pack-amount .cp-num { font-size: 32px; font-weight: 800; color: #2ed573; letter-spacing: -1px; }
.credit-pack-amount .cp-label { font-size: 13px; color: rgba(255,255,255,0.4); margin-left: 2px; }

/* ========== 支付按钮（支付宝 + 微信） ========== */
.pricing-action {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.pricing-pay-btn {
  flex: 1;
  padding: 9px 6px;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.5px;
}

.pricing-pay-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.alipay-btn {
  background: linear-gradient(135deg, #1677ff, #0958d9);
}

.alipay-btn:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(22, 119, 255, 0.35);
  transform: translateY(-1px);
}

.wechat-btn {
  background: linear-gradient(135deg, #07c160, #06ad56);
}

.wechat-btn:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(7, 193, 96, 0.35);
  transform: translateY(-1px);
}

/* ========== 密钥兑换区域（升级弹窗） ========== */
.pricing-redeem-section {
  margin: 12px 0 8px;
  padding: 0 8px;
}

.pricing-redeem-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.pricing-redeem-divider::before,
.pricing-redeem-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.pricing-redeem-divider span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.pricing-redeem-title {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 14px;
}

.pricing-redeem-row {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.pricing-redeem-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  outline: none;
  transition: all 0.2s;
  text-align: center;
}

.pricing-redeem-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  letter-spacing: 0;
}

.pricing-redeem-input:focus {
  border-color: #e63946;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.pricing-redeem-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #e63946, #c1121f);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.pricing-redeem-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.35);
}

.pricing-redeem-btn:active {
  transform: translateY(0);
}

.pricing-redeem-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pricing-redeem-msg {
  text-align: center;
  font-size: 13px;
  margin-top: 10px;
  min-height: 20px;
}

.pricing-redeem-msg-success {
  color: #2ed573;
}

.pricing-redeem-msg-error {
  color: #ff6b6b;
}

.pricing-footer {
  text-align: center;
}

.pricing-footer p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.pricing-link-btn {
  background: none;
  border: none;
  color: #e63946;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.pricing-link-btn:hover {
  color: #ff6b6b;
}

/* 响应式: 定价卡片在窄屏下2列布局 */
@media (max-width: 760px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-overlay .pricing-modal {
    padding: 24px 18px 20px;
  }
}

/* ──── 专用支付弹窗（桌面 + 移动端共用）──── */
.payment-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px) saturate(1.3);
  display: flex; align-items: center; justify-content: center;
}
.payment-modal {
  background: linear-gradient(160deg, #191928 0%, #10101e 55%, #0c0c19 100%);
  border-radius: 24px;
  width: 368px; max-width: calc(100vw - 32px);
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 32px 80px rgba(0,0,0,0.65),
    0 0 0 1px rgba(7,193,96,0.1) inset;
}
/* 品牌色顶线 */
.payment-modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 5%, #07C160 30%, #09e86e 70%, transparent 95%);
  opacity: 0.85;
}
.payment-modal[data-method="alipay"]::before {
  background: linear-gradient(90deg, transparent 5%, #1677FF 30%, #4096ff 70%, transparent 95%);
}
.payment-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 22px 0;
}
.pm-title {
  margin: 0; color: #fff; font-size: 16px; font-weight: 700; letter-spacing: -0.2px;
  display: flex; align-items: center; gap: 10px;
}
.pm-method-icon {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: #07C160;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; letter-spacing: 0;
  box-shadow: 0 3px 10px rgba(7,193,96,0.35);
}
.pm-method-icon.pm-icon-alipay {
  background: #1677FF;
  box-shadow: 0 3px 10px rgba(22,119,255,0.35);
}
.payment-modal-close {
  width: 28px; height: 28px; border-radius: 7px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.4); font-size: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.payment-modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.16); }
.payment-modal-body { padding: 18px 22px 24px; }

/* 信息卡片 — 统一边框行 */
.pm-meta {
  display: flex;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
  margin-bottom: 18px;
  overflow: hidden;
}
.pm-meta-row {
  flex: 1; text-align: center;
  padding: 13px 8px;
  position: relative;
}
.pm-meta-row:not(:last-child) {
  border-right: 1px solid rgba(255,255,255,0.07);
}
.pm-meta-label {
  display: block; font-size: 10px; color: rgba(255,255,255,0.28);
  margin-bottom: 5px; letter-spacing: 0.8px; text-transform: uppercase;
}
.pm-meta-value {
  font-size: 13px; color: rgba(255,255,255,0.88); font-weight: 600;
}
.pm-meta-price {
  color: #f5a623; font-size: 17px; font-weight: 700;
  text-shadow: 0 0 16px rgba(245,166,35,0.28);
}

/* QR 区域 */
.pm-qr-wrap {
  text-align: center; margin: 0 0 14px;
  background: #f7f7f7;
  padding: 22px 24px 16px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
/* 扫码角标 */
.pm-scan-frame { position: absolute; inset: 0; pointer-events: none; }
.psf-tl, .psf-tr, .psf-bl, .psf-br {
  position: absolute; width: 18px; height: 18px;
  border-color: #07C160; border-style: solid; opacity: 0.65;
}
.psf-tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
.psf-tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
.psf-bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
.psf-br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }
.payment-modal[data-method="alipay"] .psf-tl,
.payment-modal[data-method="alipay"] .psf-tr,
.payment-modal[data-method="alipay"] .psf-bl,
.payment-modal[data-method="alipay"] .psf-br { border-color: #1677FF; }
.pm-qr-img { display: block; width: 168px; height: 168px; margin: 0 auto; border-radius: 3px; }
.pm-qr-hint {
  margin: 12px 0 0; font-size: 12px; color: #999;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.pm-qr-hint-strong { color: #07C160; font-weight: 600; }
.payment-modal[data-method="alipay"] .pm-qr-hint-strong { color: #1677FF; }

/* 状态条 */
.pm-status-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 0 2px; font-size: 12px; color: rgba(255,255,255,0.4);
}
.pm-pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #07C160; flex-shrink: 0;
  animation: pmPulse 1.6s ease-in-out infinite;
}
.payment-modal[data-method="alipay"] .pm-pulse-dot { background: #1677FF; }
@keyframes pmPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}
.pm-status-text { line-height: 1; }

/* 成功块 */
.pm-success-block { text-align: center; padding: 8px 0 4px; }
.pm-success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(7,193,96,0.09);
  border: 2px solid rgba(7,193,96,0.25);
  color: #07C160; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 0 24px rgba(7,193,96,0.12);
}
.pm-success-title { font-size: 16px; color: #fff; font-weight: 600; margin-bottom: 4px; }
.pm-success-sub { font-size: 12px; color: rgba(255,255,255,0.35); }

/* 订单号 */
.pm-order-no {
  text-align: center; font-size: 11px; color: rgba(255,255,255,0.18);
  margin-top: 10px; letter-spacing: 0.5px;
  font-family: 'SF Mono', Consolas, 'Courier New', monospace;
}

@media (max-width: 480px) {
  .auth-modal {
    padding: 28px 24px 24px;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    margin: 12px;
  }

  .auth-inline-row {
    grid-template-columns: 1fr;
  }

  .auth-inline-btn {
    width: 100%;
  }

  .key-input-group {
    flex-direction: column;
  }

  .profile-overlay .auth-modal {
    padding: 24px 20px;
    width: 100%;
  }

  .auth-user-dropdown {
    width: 260px;
    right: -20px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
