/**
 * @author: 阿瑞
 * @功能: Ant Design 毛玻璃风格样式覆盖
 * @版本: 1.0.0
 */

/* Card 组件毛玻璃效果 */
.ant-card {
  backdrop-filter: blur(12px) !important;
  border-radius: 24px !important;
  transition: all 0.3s ease, background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease !important;
}

/* 明亮主题下的毛玻璃卡片 */
.light-theme .ant-card {
  background: var(--glass-bg-light) !important;
  border: 1px solid var(--glass-border-light) !important;
  box-shadow: 0 8px 32px 0 var(--glass-shadow-light) !important;
}

.light-theme .ant-card:hover {
  box-shadow: 0 12px 48px 0 var(--glass-shadow-light) !important;
  border-color: var(--glass-highlight) !important;
  transform: translateY(-2px);
}

/* 深色主题下的毛玻璃卡片 */
.dark-theme .ant-card {
  background: var(--glass-bg-dark) !important;
  border: 1px solid var(--glass-border-dark) !important;
  box-shadow: 0 8px 32px 0 var(--glass-shadow-dark) !important;
}

.dark-theme .ant-card:hover {
  box-shadow: 0 12px 48px 0 var(--glass-shadow-dark) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px);
}

/* 模态框内卡片样式增强 */
.ant-modal-body .ant-card {
  border-radius: 16px !important;
}

.light-theme .ant-modal-body .ant-card {
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

.dark-theme .ant-modal-body .ant-card {
  background: rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

/* 模态框内卡片标题 */
.ant-modal-body .ant-card-head {
  border-bottom: 1px solid transparent !important;
  padding-bottom: 8px !important;
}

.light-theme .ant-modal-body .ant-card-head {
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}

.dark-theme .ant-modal-body .ant-card-head {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

/* 按钮样式 */
.ant-btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(45, 127, 249, 0.25) !important;
  border-radius: 50px !important;
  transition: all 0.3s ease !important;
}

.ant-btn-primary:hover {
  box-shadow: 0 8px 20px rgba(45, 127, 249, 0.35) !important;
  transform: translateY(-2px) !important;
}

.ant-btn-default {
  border-radius: 50px !important;
  transition: all 0.3s ease !important;
}

.light-theme .ant-btn-default {
  background: rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

.dark-theme .ant-btn-default {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: var(--text-light) !important;
}

.ant-btn-default:hover {
  transform: translateY(-2px) !important;
}

.light-theme .ant-btn-default:hover {
  background: rgba(255, 255, 255, 0.35) !important;
}

.dark-theme .ant-btn-default:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

/* 表单输入框毛玻璃效果 */
.ant-input, 
.ant-select .ant-select-selector, 
.ant-picker {
  backdrop-filter: blur(8px) !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
}

.light-theme .ant-input, 
.light-theme .ant-select .ant-select-selector, 
.light-theme .ant-picker {
  background: rgba(255, 255, 255, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

.dark-theme .ant-input, 
.dark-theme .ant-select .ant-select-selector, 
.dark-theme .ant-picker {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  color: var(--text-light) !important;
}

/* 模态框内输入框增强样式 */
.ant-modal-body .ant-input, 
.ant-modal-body .ant-select .ant-select-selector, 
.ant-modal-body .ant-picker {
  border-radius: 8px !important;
}

.light-theme .ant-modal-body .ant-input, 
.light-theme .ant-modal-body .ant-select .ant-select-selector, 
.light-theme .ant-modal-body .ant-picker {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
}

.dark-theme .ant-modal-body .ant-input, 
.dark-theme .ant-modal-body .ant-select .ant-select-selector, 
.dark-theme .ant-modal-body .ant-picker {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

/* 模态框内Card组件中的输入框特殊样式 */
.ant-modal-body .ant-card .ant-input, 
.ant-modal-body .ant-card .ant-select .ant-select-selector, 
.ant-modal-body .ant-card .ant-picker {
  border-radius: 6px !important;
}

.light-theme .ant-modal-body .ant-card .ant-input, 
.light-theme .ant-modal-body .ant-card .ant-select .ant-select-selector, 
.light-theme .ant-modal-body .ant-card .ant-picker {
  background: #ffffff !important;
  border: 1px solid rgba(220, 230, 240, 0.8) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

.dark-theme .ant-modal-body .ant-card .ant-input, 
.dark-theme .ant-modal-body .ant-card .ant-select .ant-select-selector, 
.dark-theme .ant-modal-body .ant-card .ant-picker {
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(70, 80, 100, 0.5) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.ant-input:hover, 
.ant-select:hover .ant-select-selector, 
.ant-picker:hover {
  border-color: var(--accent-blue) !important;
  box-shadow: 0 2px 8px rgba(45, 127, 249, 0.1) !important;
}

.ant-input:focus, 
.ant-input-focused,
.ant-select-focused .ant-select-selector, 
.ant-picker-focused {
  border-color: var(--accent-blue) !important;
  box-shadow: 0 0 0 2px rgba(45, 127, 249, 0.15) !important;
}

/* 模态框内输入框聚焦效果增强 */
.ant-modal-body .ant-input:focus, 
.ant-modal-body .ant-input-focused,
.ant-modal-body .ant-select-focused .ant-select-selector, 
.ant-modal-body .ant-picker-focused {
  border-color: var(--accent-blue) !important;
  box-shadow: 0 0 0 3px rgba(45, 127, 249, 0.15) !important;
}

/* 表格毛玻璃效果 */
.ant-table {
  backdrop-filter: blur(12px) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

.light-theme .ant-table {
  background: var(--glass-bg-light) !important;
}

.dark-theme .ant-table {
  background: var(--glass-bg-dark) !important;
}

.dark-theme .ant-table-thead > tr > th {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-light) !important;
}

.dark-theme .ant-table-tbody > tr > td {
  color: var(--text-secondary) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.dark-theme .ant-table-tbody > tr:hover > td {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Tag 标签毛玻璃效果 */
.ant-tag {
  backdrop-filter: blur(8px) !important;
  border-radius: 50px !important;
  padding: 4px 12px !important;
  border: none !important;
}

/* 分割线样式 */
.dark-theme .ant-divider {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.dark-theme .ant-divider-inner-text {
  color: var(--text-light) !important;
}

/* 日期选择器深色模式适配 */
.dark-theme .ant-picker-panel {
  background: var(--glass-bg-dark) !important;
  border: 1px solid var(--glass-border-dark) !important;
}

.dark-theme .ant-picker-header,
.dark-theme .ant-picker-header button,
.dark-theme .ant-picker-cell {
  color: var(--text-light) !important;
}

.dark-theme .ant-picker-content th {
  color: var(--text-secondary) !important;
}

/* Modal 模态框毛玻璃效果 */
.ant-modal {
  /* 动画过渡效果 */
  transition: all 0.3s ease-in-out !important;
}

.ant-modal-content {
  backdrop-filter: blur(16px) !important;
  border-radius: 24px !important;
  padding: 24px !important;
  transition: all 0.3s ease, background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease !important;
  overflow: hidden !important;
}

/* 明亮主题下的毛玻璃模态框 */
.light-theme .ant-modal-content {
  background: var(--glass-bg-light) !important;
  border: 1px solid var(--glass-border-light) !important;
  box-shadow: 0 12px 48px 0 var(--glass-shadow-light) !important;
}

/* 深色主题下的毛玻璃模态框 */
.dark-theme .ant-modal-content {
  background: var(--glass-bg-dark) !important;
  border: 1px solid var(--glass-border-dark) !important;
  box-shadow: 0 12px 48px 0 var(--glass-shadow-dark) !important;
}

/* 模态框标题 */
.ant-modal-header {
  background: transparent !important;
  border-bottom: none !important;
  padding: 0 0 16px 0 !important;
  margin-bottom: 16px !important;
}

.light-theme .ant-modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.dark-theme .ant-modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.ant-modal-title {
  font-size: 20px !important;
  font-weight: 600 !important;
}

.light-theme .ant-modal-title {
  color: var(--text-primary) !important;
}

.dark-theme .ant-modal-title {
  color: var(--text-light) !important;
}

/* 模态框内容区域 */
.ant-modal-body {
  padding: 0 !important;
  max-height: calc(100vh - 280px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}

/* 模态框页脚 */
.ant-modal-footer {
  background: transparent !important;
  border-top: none !important;
  padding: 16px 0 0 0 !important;
  margin-top: 16px !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

.light-theme .ant-modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.dark-theme .ant-modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* 模态框关闭按钮 */
.ant-modal-close {
  color: var(--accent-blue) !important;
  top: 16px !important;
  right: 16px !important;
  transition: all 0.3s ease !important;
}

.light-theme .ant-modal-close:hover {
  color: var(--accent-purple) !important;
  transform: rotate(90deg) !important;
}

.dark-theme .ant-modal-close:hover {
  color: var(--accent-purple) !important;
  transform: rotate(90deg) !important;
}

/* 模态框遮罩层 */
.light-theme .ant-modal-mask {
  backdrop-filter: blur(8px) !important;
  background-color: rgba(255, 255, 255, 0.3) !important;
}

.dark-theme .ant-modal-mask {
  backdrop-filter: blur(8px) !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
}

/* 模态框动画效果 */
.ant-modal-enter, 
.ant-modal-appear {
  transform: scale(0.9) !important;
  opacity: 0 !important;
}

.ant-modal-enter-active, 
.ant-modal-appear-active {
  transform: scale(1) !important;
  opacity: 1 !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
} 