/* 弹窗 */
/* ROI Modal */
#roiModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  /* background: rgba(0,0,0,0.4); */
  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0.25),
    rgba(0,0,0,0.55)
  );
  z-index: 1000;
}

#roiModal .box {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  width: 700px;
  max-width: 90vw;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}

#roiModal #roiList {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.data-list-container {
  flex: 1;
  min-height: 0; /* flex 子项需此属性才能正确收缩并出现滚动条 */
  overflow-y: auto;
  overflow-x: hidden;
}

.data-list-container::-webkit-scrollbar {
  width: 8px;
}

.data-list-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.data-list-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.data-list-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.data-list-item:hover {
  background: #f3f4f6 !important;
}

/* 登录弹窗 */
#loginModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0.25),
    rgba(0,0,0,0.55)
  );
  z-index: 1001;
}

#loginModal.show,
#resetModal.show {
  display: flex;
}

#resetModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0.25),
    rgba(0,0,0,0.55)
  );
  z-index: 1001;
}

#resetModal .login-box {
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  width: 400px;
  max-width: 90vw;
  position: relative;
}

#loginModal .login-box {
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  width: 400px;
  max-width: 90vw;
  position: relative;
}

.login-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.login-box-header h2 {
  margin: 0;
  font-size: 24px;
  color: #1f2937;
}

.login-box-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.login-box-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.login-form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.login-form-group input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.login-form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-form-group .form-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: -4px;
}

.login-submit-btn {
  padding: 12px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.login-submit-btn:hover {
  background: #2563eb;
}

.login-submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.login-error-message {
  padding: 12px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}

.login-error-message.show {
  display: block;
}

.login-success-message {
  padding: 12px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}

.login-success-message.show {
  display: block;
}

.login-form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #6b7280;
}

.login-form-footer a {
  color: #3b82f6;
  text-decoration: none;
}

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

.login-form-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 8px;
  text-align: center;
}

/* 注册弹窗 */
#registerModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0.25),
    rgba(0,0,0,0.55)
  );
  z-index: 1001;
}

#registerModal.show {
  display: flex;
}

#registerModal .register-box {
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  width: 400px;
  max-width: 90vw;
  position: relative;
}

.register-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.register-box-header h2 {
  margin: 0;
  font-size: 24px;
  color: #1f2937;
}

.register-box-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.register-box-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.register-form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.register-form-group input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.register-form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.register-form-group .form-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: -4px;
}

.register-submit-btn {
  padding: 12px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.register-submit-btn:hover {
  background: #2563eb;
}

.register-submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.register-error-message {
  padding: 12px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}

.register-error-message.show {
  display: block;
}

.register-form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #6b7280;
}

.register-form-footer a {
  color: #3b82f6;
  text-decoration: none;
}

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

.register-form-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 8px;
  text-align: center;
}

/* 续费订阅弹窗 */
#renewModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0.25),
    rgba(0,0,0,0.55)
  );
  z-index: 1001;
}

#renewModal.show {
  display: flex;
}

#renewModal .renew-box {
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  width: 400px;
  max-width: 90vw;
  position: relative;
}

.renew-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.renew-box-header h2 {
  margin: 0;
  font-size: 24px;
  color: #1f2937;
}

.renew-box-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.renew-box-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.renew-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.renew-form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.renew-form-group input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.renew-form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.renew-form-group .form-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: -4px;
}

.renew-submit-btn {
  padding: 12px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.renew-submit-btn:hover {
  background: #2563eb;
}

.renew-submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.renew-error-message {
  padding: 12px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}

.renew-error-message.show {
  display: block;
}

.renew-success-message {
  padding: 12px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}

.renew-success-message.show {
  display: block;
}

.renew-form-hint {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 8px;
  text-align: center;
}

/* 退出登录确认弹窗 */
#logoutModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0.25),
    rgba(0,0,0,0.55)
  );
  z-index: 1001;
}

#logoutModal.show {
  display: flex;
}

#logoutModal .logout-box {
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  width: 400px;
  max-width: 90vw;
  position: relative;
}

.logout-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.logout-box-header h2 {
  margin: 0;
  font-size: 24px;
  color: #1f2937;
}

.logout-box-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.logout-box-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.logout-message {
  font-size: 16px;
  color: #374151;
  margin-bottom: 24px;
  text-align: center;
}

.logout-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.logout-cancel-btn {
  padding: 10px 20px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.logout-cancel-btn:hover {
  background: #e5e7eb;
}

.logout-confirm-btn {
  padding: 10px 20px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.logout-confirm-btn:hover {
  background: #dc2626;
}

.logout-confirm-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}


