/* 基础变量 */
:root {
  --primary-color: #6b7bef;
  --secondary-color: #986adb;
  --success-color: #52c41a;
  --warning-color: #faad14;
  --error-color: #f5222d;
  --text-color: rgba(0, 0, 0, 0.85);
  --bg-color: #f0f2f5;
  --border-color: #d9d9d9;
}

/* 基础样式 */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

.site-layout-content {
  min-height: 100vh;
  padding: 24px;
  background: #fff;
  max-width: 800px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .site-layout-content {
    padding: 16px 12px;
  }
}

/* 页面头部样式 */
.ant-page-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  padding: 48px 16px;
  border-radius: 8px 8px 0 0;
  color: white;
  text-align: center;
}

.ant-page-header-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ant-page-header-heading-title {
  font-size: 32px;
  font-weight: 600;
  margin: 0;
  padding: 0;
  display: block;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  line-height: 1.2;
}

.ant-page-header-heading-sub-title {
  font-size: 16px;
  font-weight: normal;
  margin: 0;
  padding: 0;
  opacity: 0.95;
  letter-spacing: 1px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  line-height: 1.5;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .site-layout-content {
    padding: 24px;
  }
}

/* 移动端适配 */
@media (max-width: 576px) {
  .ant-page-header-heading-sub-title {
    font-size: 14px;
    line-height: 1.4;
    padding: 0 10px;
  }
}

/* 移动端适配 */
@media (max-width: 320px) {
  .ant-page-header-heading-sub-title {
    font-size: 12px;
    line-height: 1.3;
    padding: 0 15px;
  }
}

/* Ant Design 样式定制 */
.ant-form-item {
  margin-bottom: 12px;
}

.ant-form-item-label {
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
  padding: 0;
  line-height: 1.5;
}

.ant-card-body {
  padding: 12px;
}

.ant-card-head {
  min-height: 36px;
  padding: 0 12px;
}

.ant-card-head-title {
  padding: 8px 0;
  font-size: 14px;
}

.ant-alert {
  font-size: 13px;
  padding: 8px 12px;
}

.ant-descriptions-item {
  padding: 4px;
}

.ant-btn {
  height: 32px;
  font-size: 14px;
}

.ant-input,
.ant-select {
  width: 100%;
  height: 32px;
  font-size: 14px;
  padding: 4px 11px;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  transition: all 0.3s;
  outline: none;
  color: var(--text-color);
}

.ant-input:focus,
.ant-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(107, 123, 239, 0.2);
}

.ant-select-single {
  position: relative;
}

.ant-select-show-search {
  padding-right: 30px;
}

.ant-select-multiple {
  height: auto;
  min-height: 32px;
  padding: 4px 8px;
}

/* 单选按钮组 */
.ant-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ant-radio-button-wrapper {
  height: 28px;
  padding: 0 12px;
  line-height: 26px;
  font-size: 13px;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s;
  user-select: none;
}

.ant-radio-button-wrapper:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.ant-radio-button-wrapper-checked {
  color: var(--primary-color);
  background: #e6f7ff;
  border-color: var(--primary-color);
}

/* 单选框 */
.ant-radio-wrapper {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  cursor: pointer;
}

.ant-radio {
  margin-right: 6px;
  position: relative;
  display: inline-block;
}

.ant-radio-input {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  opacity: 0;
  cursor: pointer;
}

.ant-radio-inner {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  transition: all 0.3s;
}

.ant-radio-input:checked + .ant-radio-inner {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
}

.ant-radio-input:checked + .ant-radio-inner::after {
  content: "";
  display: block;
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #fff;
}

/* 按钮样式 */
.ant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  height: 32px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: 400;
}

.ant-btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.ant-btn-primary:hover,
.ant-btn-primary:focus {
  background-color: #40a9ff;
  border-color: #40a9ff;
}

.ant-btn-danger {
  color: #fff;
  background-color: var(--error-color);
  border-color: var(--error-color);
}

.ant-btn-danger:hover,
.ant-btn-danger:focus {
  background-color: #ff4d4f;
  border-color: #ff4d4f;
}

.ant-btn-default {
  background-color: #fff;
  border-color: var(--border-color);
}

.ant-btn-default:hover,
.ant-btn-default:focus {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.ant-btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* 卡片样式 */
.ant-card {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  font-size: 14px;
  background-color: #fff;
  border-radius: 2px;
  position: relative;
}

.ant-card-bordered {
  border: 1px solid #f0f0f0;
}

.site-card {
  border-radius: 0 0 8px 8px;
  box-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.16),
    0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);
}

/* 表格样式 */
.ant-descriptions {
  width: 100%;
}

.ant-descriptions-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  width: 100%;
}

.ant-descriptions-item {
  width: 100% !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  margin-bottom: 2px;
}

.ant-descriptions-item-label {
  color: rgba(0, 0, 0, 0.65);
  font-weight: 500;
}

.ant-descriptions-item-content {
  text-align: right;
}

/* 下拉框自定义样式 */
.ant-select-customized {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7' /%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 16px !important;
  padding-right: 30px !important;
  cursor: pointer !important;
  background-color: #fff !important;
  border-radius: 2px !important;
}

/* 确保Chrome浏览器中的下拉箭头隐藏 */
select.ant-select-customized::-webkit-calendar-picker-indicator {
  opacity: 0 !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

select.ant-select-customized::-ms-expand {
  display: none !important;
}

/* 针对Firefox的特殊处理 */
@-moz-document url-prefix() {
  select.ant-select-customized {
    text-indent: 0.01px;
    text-overflow: "";
    padding-right: 30px !important;
  }
}

/* 针对Safari的特殊处理 */
@media not all and (min-resolution: 0.001dpcm) {
  @supports (-webkit-appearance: none) {
    select.ant-select-customized {
      -webkit-appearance: none !important;
      background-color: white !important;
    }
  }
}

/* 下拉选项样式 */
select.ant-select option {
  padding: 8px 12px;
  min-height: 32px;
  line-height: 22px;
  transition: background 0.3s ease;
  cursor: pointer;
}

select.ant-select option:hover,
select.ant-select option:focus {
  background-color: #f5f5f5;
}

select.ant-select option:checked,
select.ant-select option:active,
select.ant-select option:focus:checked {
  background-color: #e6f7ff;
  color: var(--primary-color);
  font-weight: 500;
}

/* 美化滚动条 */
select.ant-select,
select.ant-select-multiple {
  scrollbar-width: thin;
  scrollbar-color: #d9d9d9 #f5f5f5;
}

select.ant-select::-webkit-scrollbar,
select.ant-select-multiple::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

select.ant-select::-webkit-scrollbar-track,
select.ant-select-multiple::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

select.ant-select::-webkit-scrollbar-thumb,
select.ant-select-multiple::-webkit-scrollbar-thumb {
  background: #d9d9d9;
  border-radius: 3px;
}

select.ant-select::-webkit-scrollbar-thumb:hover,
select.ant-select-multiple::-webkit-scrollbar-thumb:hover {
  background: #bfbfbf;
}

/* 提供空状态下的样式 */
select.ant-select:empty,
select.ant-select-multiple:empty {
  border-color: #f0f0f0;
  background-color: #fafafa;
}

/* 多选下拉框样式 */
select.ant-select-multiple {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  overflow-y: auto;
  max-height: 180px;
  padding: 8px !important;
}

select.ant-select-multiple option {
  padding: 8px 12px;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
  white-space: normal;
  word-break: break-all;
  margin-bottom: 4px;
  background-color: white;
  border-radius: 2px;
}

select.ant-select-multiple option:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

select.ant-select-multiple option:checked {
  background-color: #e6f7ff !important;
  color: var(--primary-color) !important;
  outline: 1px solid var(--primary-color);
}

/* 修复WebKit浏览器中的选项显示问题 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select.ant-select-customized {
    border-color: var(--border-color);
    background-color: white;
  }

  select.ant-select-multiple option {
    padding: 8px;
    margin: 4px 0;
    border-radius: 2px;
  }

  select.ant-select-multiple option:checked {
    background: #e6f7ff linear-gradient(0deg, #e6f7ff 0%, #e6f7ff 100%);
    color: var(--primary-color);
  }
}

/* 添加动画和交互效果 */
.ant-select-wrapper {
  position: relative;
}

.ant-select-wrapper::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s;
  z-index: 1;
}

.ant-select-wrapper:has(.ant-select:focus)::before {
  transform: scaleX(1);
}

/* 触发态样式 */
.ant-select:hover,
.ant-select-customized:hover {
  border-color: var(--primary-color);
}

.ant-select-focused,
.ant-select-customized:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(107, 123, 239, 0.2);
}

/* 表单项聚焦效果 */
.ant-form-item.focused {
  background-color: #f0f7ff;
  border-radius: 2px;
  transition: background-color 0.3s;
}

/* 支付选项样式优化 */
.payment-options {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.ant-radio-wrapper {
  margin-right: 16px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

.ant-radio {
  position: relative;
  display: inline-block;
  margin-right: 8px;
}

.ant-radio-input {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  opacity: 0;
  cursor: pointer;
}

.ant-radio-inner {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  background-color: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 50%;
  transition: all 0.3s;
}

.ant-radio-wrapper-checked .ant-radio-inner::after {
  content: " ";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
  transform: scale(1);
  opacity: 1;
  transition: all 0.3s;
}

.ant-radio-wrapper-checked .ant-radio-inner {
  border-color: var(--primary-color);
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.slide-up {
  animation: slideUp 0.3s ease-in-out;
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 消息提示框样式 */
.message-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 300px;
  max-width: 90%;
}

.message {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  animation: slideIn 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.message-success {
  background-color: #f6ffed;
  border-left: 4px solid #52c41a;
  color: #52c41a;
}

.message-error {
  background-color: #fff2f0;
  border-left: 4px solid #f5222d;
  color: #f5222d;
}

.message-info {
  background-color: #e6f7ff;
  border-left: 4px solid #1890ff;
  color: #1890ff;
}

.message-content {
  flex: 1;
  font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 576px) {
  .site-layout-content {
    padding: 8px;
  }

  .ant-card-body {
    padding: 8px;
  }

  .ant-card-head {
    min-height: 32px;
    padding: 0 8px;
  }

  .ant-card-head-title {
    padding: 6px 0;
  }

  .ant-form-item {
    margin-bottom: 8px;
  }

  .ant-alert {
    font-size: 12px;
    padding: 6px 8px;
  }

  .ant-descriptions-item {
    padding: 2px 4px;
    font-size: 13px;
  }

  .ant-btn {
    height: 30px;
    font-size: 13px;
  }

  .ant-input,
  .ant-select {
    height: 30px;
    font-size: 13px;
  }

  .ant-radio-button-wrapper {
    height: 26px;
    line-height: 24px;
    font-size: 12px;
    padding: 0 8px;
  }
}

/* Ant Design Dropdown 样式 */
.ant-dropdown-container {
  display: block;
  width: 100%;
}

.ant-dropdown-trigger {
  position: relative;
  display: flex;
  width: 100%;
  height: 32px;
  padding: 4px 11px;
  color: rgba(0, 0, 0, 0.85);
  font-size: 14px;
  line-height: 1.5715;
  background-color: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  transition: all 0.3s;
  cursor: pointer;
  align-items: center;
}

.ant-dropdown-trigger:hover {
  border-color: var(--primary-color);
}

.ant-dropdown-trigger-active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(107, 123, 239, 0.2);
  outline: 0;
}

.ant-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 1050;
  background-color: #fff;
  border-radius: 2px;
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
    0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
}

.ant-dropdown-menu {
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 250px;
  overflow-y: auto;
}

.ant-dropdown-menu-item {
  margin: 0;
  padding: 5px 12px;
  font-size: 14px;
  line-height: 22px;
  cursor: pointer;
  transition: all 0.3s;
}

.ant-dropdown-menu-item:hover {
  background-color: #f5f5f5;
}

.ant-dropdown-menu-item-selected {
  background-color: #e6f7ff;
  color: var(--primary-color);
  font-weight: 500;
}

.ant-select-dropdown-visible {
  display: block;
  animation: antSlideUpIn 0.2s;
}

.ant-search-input {
  width: 100%;
  padding: 4px 11px;
  font-size: 14px;
  line-height: 1.5715;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  transition: all 0.3s;
}

.ant-search-input:hover {
  border-color: var(--primary-color);
}

.ant-search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(107, 123, 239, 0.2);
  outline: 0;
}

/* 标签样式 */
.ant-tag {
  display: inline-block;
  padding: 0 7px;
  font-size: 12px;
  line-height: 20px;
  background: #f5f5f5;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  cursor: default;
  margin-right: 4px;
  margin-bottom: 4px;
}

.ant-tag-closable {
  padding-right: 4px;
}

.ant-tag-close-icon {
  margin-left: 4px;
  font-size: 10px;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.45);
}

.ant-tag-close-icon:hover {
  color: rgba(0, 0, 0, 0.85);
}

/* 多选下拉框样式 */
.ant-multiple-select {
  min-height: 32px;
  padding: 4px 4px 4px 11px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.ant-multiple-select .ant-select-selection-placeholder {
  color: rgba(0, 0, 0, 0.25);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s;
}

/* 支付选项样式 */
.payment-options {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.ant-radio-wrapper {
  margin-right: 16px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

.ant-radio {
  position: relative;
  display: inline-block;
  margin-right: 8px;
}

.ant-radio-input {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  opacity: 0;
  cursor: pointer;
}

.ant-radio-inner {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  background-color: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 50%;
  transition: all 0.3s;
}

.ant-radio-wrapper-checked .ant-radio-inner::after {
  content: " ";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
  transform: scale(1);
  opacity: 1;
  transition: all 0.3s;
}

.ant-radio-wrapper-checked .ant-radio-inner {
  border-color: var(--primary-color);
}

/* 消息提示样式 */
.ant-message {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1010;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ant-message-notice {
  padding: 8px;
  margin-bottom: 16px;
  transition: opacity 0.3s;
  opacity: 0;
}

.ant-message-notice-content {
  padding: 10px 16px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
    0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
  pointer-events: all;
  display: inline-block;
}

.ant-message-custom-content {
  display: flex;
  align-items: center;
}

.ant-message-success {
  color: #52c41a;
}

.ant-message-error {
  color: #f5222d;
}

.ant-message-info {
  color: #1890ff;
}

/* 模态框动画 */
@keyframes antSlideUpIn {
  0% {
    transform: scaleY(0.8);
    transform-origin: 0% 0%;
    opacity: 0;
  }
  100% {
    transform: scaleY(1);
    transform-origin: 0% 0%;
    opacity: 1;
  }
}

@keyframes antSlideUpOut {
  0% {
    transform: scaleY(1);
    transform-origin: 0% 0%;
    opacity: 1;
  }
  100% {
    transform: scaleY(0.8);
    transform-origin: 0% 0%;
    opacity: 0;
  }
}

.ant-dropdown-slide-up-enter-active {
  animation: antSlideUpIn 0.2s;
}

.ant-dropdown-slide-up-leave-active {
  animation: antSlideUpOut 0.2s;
}

/* 淡入淡出动画 */
.ant-motion-fade-in {
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* 按钮样式增强 */
.ant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 支付模态框样式 */
.ant-modal-root .ant-btn {
  line-height: 1.5715;
  position: relative;
  display: inline-block;
  font-weight: 400;
  white-space: nowrap;
  text-align: center;
  background-image: none;
  border: 1px solid transparent;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.015);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  user-select: none;
  touch-action: manipulation;
  height: 32px;
  padding: 4px 15px;
  font-size: 14px;
  border-radius: 2px;
  color: rgba(0, 0, 0, 0.85);
  background: #fff;
  border-color: #d9d9d9;
}

.ant-modal-root .ant-btn-primary {
  color: #fff;
  background: var(--primary-color);
  border-color: var(--primary-color);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);
}

.ant-modal-root .ant-btn:hover,
.ant-modal-root .ant-btn:focus {
  color: var(--primary-color);
  background: #fff;
  border-color: var(--primary-color);
}

.ant-modal-root .ant-btn-primary:hover,
.ant-modal-root .ant-btn-primary:focus {
  color: #fff;
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* 模态框样式 */
.ant-modal-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
}

.ant-modal-wrap {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: auto;
  outline: 0;
  -webkit-overflow-scrolling: touch;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ant-modal {
  position: relative;
  width: 90%;
  max-width: 416px;
  margin: 20px auto;
  padding: 0;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
    0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
  z-index: 1001;
  pointer-events: auto;
}

/* 移动端适配 */
@media (max-width: 576px) {
  .ant-modal {
    width: 90%;
    margin: 10px auto;
  }

  .ant-modal-body {
    padding: 16px;
    font-size: 14px;
  }

  .ant-modal-header {
    padding: 12px 16px;
  }

  .ant-modal-footer {
    padding: 8px 12px;
  }

  .ant-btn {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
  }
}

/* 密码输入框样式 */
.ant-input-password {
  position: relative;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}

.ant-input-password .ant-input {
  padding-right: 32px;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

.ant-input-password-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: color 0.3s;
  z-index: 1;
  padding: 0;
  border: 0;
  background: transparent;
}

.ant-input-password-icon:hover {
  color: rgba(0, 0, 0, 0.65);
}

.ant-input-password-icon.active {
  color: #1890ff;
}

/* 移动端适配 */
@media (max-width: 576px) {
  .ant-input-password {
    width: 100%;
    padding: 0;
  }

  .ant-input-password .ant-input {
    padding-right: 28px;
    font-size: 14px;
    height: 36px;
  }

  .ant-input-password-icon {
    right: 6px;
    font-size: 14px;
  }

  .ant-form-item-control {
    width: 100%;
    max-width: 100%;
  }
}

/* 2026 页面视觉与交互优化 */
:root {
  --primary-color: #5b5ce2;
  --primary-hover: #4b4cc9;
  --secondary-color: #7c5ce7;
  --surface-color: rgba(255, 255, 255, 0.94);
  --surface-soft: #f7f7fc;
  --border-color: #e4e6f0;
  --text-color: #202235;
  --muted-color: #73778c;
  --bg-color: #f2f3f8;
  --shadow-soft: 0 18px 60px rgba(39, 43, 78, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(91, 92, 226, 0.11), transparent 28rem),
    radial-gradient(circle at 92% 30%, rgba(124, 92, 231, 0.08), transparent 24rem),
    var(--bg-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: linear-gradient(rgba(91, 92, 226, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 92, 226, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

.site-layout-content {
  position: relative;
  max-width: 880px;
  min-height: auto;
  margin: 44px auto 0;
  padding: 0 24px;
  background: transparent;
}

.ant-page-header {
  position: relative;
  overflow: hidden;
  padding: 54px 28px 48px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(135deg, #4b4cc9 0%, #6958d8 54%, #8a63dc 100%);
  box-shadow: 0 18px 48px rgba(76, 70, 190, 0.22);
}

.ant-page-header::before,
.ant-page-header::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.ant-page-header::before {
  width: 260px;
  height: 260px;
  right: -90px;
  top: -130px;
}

.ant-page-header::after {
  width: 150px;
  height: 150px;
  left: -70px;
  bottom: -85px;
}

.ant-page-header-heading {
  position: relative;
  z-index: 1;
  gap: 12px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.ant-page-header-heading-title {
  color: #fff;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 750;
  letter-spacing: -0.03em;
  text-shadow: 0 3px 16px rgba(31, 25, 91, 0.22);
}

.ant-page-header-heading-sub-title {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.hero-features span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-card {
  margin-top: -8px !important;
  border: 0;
  border-radius: 0 0 24px 24px !important;
  background: var(--surface-color);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.site-card > .ant-card-body {
  padding: 28px 32px 34px !important;
}

.service-notice {
  gap: 4px;
  padding: 14px 16px !important;
  border: 1px solid #f2dfae !important;
  border-radius: 12px !important;
  background: #fffaf0 !important;
  color: #665529;
}

.service-notice .ant-alert-icon {
  margin-top: 4px !important;
  font-size: 16px !important;
}

.service-notice .ant-alert-message + .ant-alert-message {
  margin-top: 3px;
}

.service-notice a {
  color: var(--primary-color);
  font-weight: 600;
}

.catalog-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #d9def8;
  border-radius: 12px;
  background: #f4f6ff;
  color: #4b527b;
}

.catalog-status > i {
  margin-top: 3px;
  color: var(--primary-color);
  font-size: 16px;
}

.catalog-status > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.catalog-status strong {
  color: #32375c;
}

.catalog-status span {
  font-size: 12px;
}

.form-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ececf4;
}

.form-section-heading:first-child {
  margin-top: 20px;
}

.section-step {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 8px 18px rgba(91, 92, 226, 0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.form-section-heading > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.form-section-heading strong {
  color: var(--text-color);
  font-size: 16px;
  font-weight: 700;
}

.form-section-heading small {
  color: var(--muted-color);
  font-size: 12px;
}

.ant-form-item-label {
  color: #35384d;
  font-size: 13px;
  font-weight: 650;
}

.ant-input,
.ant-search-input,
.ant-dropdown-trigger {
  min-height: 44px;
  height: 44px !important;
  padding: 9px 13px;
  border-color: var(--border-color);
  border-radius: 10px;
  background: #fff;
  color: var(--text-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ant-input:hover,
.ant-search-input:hover,
.ant-dropdown-trigger:hover {
  border-color: #a9aaf0;
}

.ant-input:focus,
.ant-search-input:focus,
.ant-dropdown-trigger-active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(91, 92, 226, 0.12);
}

.ant-input::placeholder,
.ant-search-input::placeholder,
.ant-select-selection-placeholder {
  color: #a2a5b4;
}

.ant-input-password-icon {
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.ant-radio-group#categoryGroup {
  gap: 8px !important;
}

#categoryGroup .ant-radio-button-wrapper {
  height: 34px !important;
  margin: 0 !important;
  margin-inline-start: 0 !important;
  padding: 0 13px;
  border-inline-start-width: 1px !important;
  border-color: var(--border-color);
  border-radius: 9px;
  line-height: 32px !important;
  transition: all 0.2s ease;
}

/* Ant Design 会在相邻单选按钮左侧生成分隔线；按钮有间距时需移除 */
#categoryGroup .ant-radio-button-wrapper::before,
#categoryGroup .ant-radio-button-wrapper:not(:first-child)::before {
  display: none !important;
  width: 0 !important;
  content: none !important;
}

#categoryGroup .ant-radio-button-wrapper:hover {
  transform: translateY(-1px);
}

#categoryGroup .ant-radio-button-wrapper-checked {
  border-color: rgba(91, 92, 226, 0.42);
  background: #eeeeff;
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(91, 92, 226, 0.1);
}

.ant-dropdown-arrow {
  right: 14px !important;
  color: #85889a;
}

#productDropdown .ant-dropdown-arrow i {
  font-size: 13px !important;
  transition: transform 0.2s ease;
}

.ant-dropdown-trigger-active .ant-dropdown-arrow i {
  transform: rotate(180deg);
}

.ant-dropdown {
  margin-top: 7px;
  padding: 6px;
  border: 1px solid #ececf4;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(30, 33, 63, 0.15);
  overflow: hidden;
}

.ant-dropdown .ant-search-input {
  min-height: 38px;
  height: 38px !important;
  border-radius: 8px;
}

.ant-dropdown-menu {
  max-height: 280px;
  padding: 5px 0;
}

.ant-dropdown-menu-item {
  margin: 2px 0;
  padding: 9px 11px;
  border-radius: 8px;
  line-height: 1.45;
  transition: background 0.16s ease, color 0.16s ease;
}

.ant-dropdown-menu-item:hover {
  background: #f4f4fc;
}

.ant-dropdown-menu-item-selected {
  background: #eeeeff;
  color: var(--primary-color);
}

.ant-dropdown-empty {
  padding: 28px 12px;
  color: var(--muted-color);
  text-align: center;
}

#productDescriptionContainer {
  padding: 14px 16px !important;
  border-color: #dfe4fb !important;
  border-radius: 11px !important;
  background: #f7f8ff !important;
}

.ant-btn {
  min-height: 40px;
  height: 40px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ant-btn:not([disabled]):hover {
  transform: translateY(-1px);
}

.ant-btn-primary {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, var(--primary-color), #6c5ddb);
  box-shadow: 0 8px 18px rgba(91, 92, 226, 0.2);
}

.ant-btn-primary:hover,
.ant-btn-primary:focus {
  border-color: var(--primary-hover);
  background: linear-gradient(135deg, var(--primary-hover), #5f50ca);
  box-shadow: 0 10px 24px rgba(91, 92, 226, 0.28);
}

.ant-btn[disabled] {
  border-color: #e3e4eb;
  background: #eeeff3;
  box-shadow: none;
  color: #a0a3af;
}

#searchCourseBtn {
  height: 44px !important;
}

#resetBtn {
  height: 44px !important;
  border-color: #f0d9d9;
  background: #fff5f5;
  color: #ce4c50;
}

#courseResults,
.order-heading + .ant-card,
.order-heading + .ant-card + .ant-card {
  border-color: #e8e9f1;
  border-radius: 14px;
  background: #fcfcfe;
  overflow: visible;
}

#courseResults .ant-card-head {
  border-radius: 14px 14px 0 0;
  background: #f7f7fb !important;
}

.ant-multiple-select {
  height: auto !important;
  min-height: 46px;
  padding: 7px 38px 7px 10px;
}

.ant-select-selection-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 7px 4px 9px;
  border: 1px solid #d8d8f8;
  border-radius: 7px;
  background: #f0f0ff;
  color: #4c4dab;
  font-size: 12px;
}

.ant-select-selection-item-remove {
  display: inline-flex;
  padding: 2px;
  cursor: pointer;
}

.ant-descriptions-item {
  padding: 8px 2px;
}

#totalPrice {
  color: var(--primary-color) !important;
  font-size: 20px !important;
}

.payment-options {
  gap: 10px;
}

.payment-options .ant-radio-wrapper {
  flex: 1 1 180px;
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 11px;
  background: #fff;
  transition: all 0.2s ease;
}

.payment-options .ant-radio-wrapper-checked {
  border-color: rgba(91, 92, 226, 0.48);
  background: #f7f7ff;
  box-shadow: 0 5px 14px rgba(91, 92, 226, 0.09);
}

#submitOrderBtn {
  height: 50px !important;
  margin-top: 4px;
  border-radius: 12px;
  font-size: 15px;
}

.message-container {
  top: 28px !important;
  width: auto !important;
  min-width: 260px;
  max-width: min(420px, calc(100vw - 32px)) !important;
  padding: 12px 15px !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 38px rgba(30, 33, 63, 0.18) !important;
  animation: messageEnter 0.25s ease-out;
}

@keyframes messageEnter {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.ant-modal-mask {
  background: rgba(24, 25, 44, 0.55) !important;
  backdrop-filter: blur(5px);
}

.ant-modal {
  overflow: hidden;
  border-radius: 16px !important;
  box-shadow: 0 24px 70px rgba(22, 23, 47, 0.28) !important;
}

.ant-modal-header {
  padding: 20px 22px !important;
}

.ant-modal-body {
  padding: 22px !important;
}

.ant-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px !important;
}

.ant-modal-footer .ant-btn {
  margin: 0 !important;
}

.site-footer {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 16px 34px;
  color: #85889a;
  font-size: 12px;
  text-align: center;
}

.site-footer p {
  margin: 0 0 4px;
  color: #666a7e;
  font-weight: 600;
}

@media (max-width: 640px) {
  .site-layout-content {
    margin-top: 0;
    padding: 0;
  }

  .ant-page-header {
    padding: 38px 18px 36px;
    border-radius: 0;
  }

  .ant-page-header-heading {
    gap: 10px;
  }

  .hero-features {
    gap: 12px;
    margin-top: 6px;
  }

  .site-card {
    margin-top: -10px !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: none;
  }

  .site-card > .ant-card-body {
    padding: 22px 16px 28px !important;
  }

  .service-notice {
    font-size: 12px;
  }

  .form-section-heading {
    margin-top: 24px;
  }

  .ant-input,
  .ant-search-input,
  .ant-dropdown-trigger {
    font-size: 16px;
  }

  #categoryGroup .ant-radio-button-wrapper {
    flex: 0 1 auto;
    min-width: 76px;
    height: 40px !important;
    padding: 0 12px;
    line-height: 38px !important;
    text-align: center;
    white-space: nowrap;
  }

  .payment-options .ant-radio-wrapper {
    flex-basis: calc(50% - 5px);
    padding: 10px;
  }

  .ant-modal-footer .ant-btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
