/**
 * BSI Crypto Payment - 全局样式
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 渐变按钮 */
.gradient-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
}

.gradient-button:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  color: white;
}

/* 卡片阴影效果 */
.card-shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.card-shadow:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 表格样式增强 */
.ant-table-thead > tr > th {
  background: #fafafa;
  font-weight: 600;
}

/* 标签样式 */
.status-tag {
  border-radius: 12px;
  padding: 2px 12px;
}

/* 响应式 */
@media (max-width: 768px) {
  .ant-layout-sider {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 999;
  }

  .ant-layout-content {
    margin-left: 0 !important;
  }
}

/* ========== 动画效果库 ========== */

/* 1. 基础淡入动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 2. 从上方淡入 */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 3. 从右侧滑入 */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 4. 缩放淡入 */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 5. 渐变闪烁（用于加载状态） */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* ========== 组件动画应用 ========== */

/* 卡片淡入动画 - 只在首次加载时触发 */
.ant-card.card-initial-load {
  animation: fadeInScale 0.4s ease-out;
}

/* 表格行淡入 - 只在首次加载时触发 */
.ant-table-tbody > tr.row-initial-load {
  animation: fadeIn 0.3s ease-out;
  animation-fill-mode: both;
}

/* 表格行渐进延迟 - 只用于首次加载 */
.ant-table-tbody > tr.row-initial-load:nth-child(1) { animation-delay: 0.05s; }
.ant-table-tbody > tr.row-initial-load:nth-child(2) { animation-delay: 0.08s; }
.ant-table-tbody > tr.row-initial-load:nth-child(3) { animation-delay: 0.11s; }
.ant-table-tbody > tr.row-initial-load:nth-child(4) { animation-delay: 0.14s; }
.ant-table-tbody > tr.row-initial-load:nth-child(5) { animation-delay: 0.17s; }
.ant-table-tbody > tr.row-initial-load:nth-child(n+6) { animation-delay: 0.2s; }

/* 表格行悬停效果 - 优化版（无缩放） */
.ant-table-tbody > tr {
  transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
}

.ant-table-tbody > tr:hover > td {
  background-color: #f0f8ff !important;
}

.ant-table-tbody > tr:hover {
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08) !important;
}

/* 按钮悬停效果 - 优化版（无 bounce） */
.ant-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.ant-btn:hover:not(:disabled) {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.ant-btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

/* 标签悬停效果 */
.ant-tag {
  transition: all 0.2s ease !important;
}

.ant-tag:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

/* 输入框聚焦效果 */
.ant-input:focus,
.ant-select-focused .ant-select-selector,
.ant-picker:focus {
  border-color: #667eea !important;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2) !important;
  transition: all 0.3s ease;
}

/* 状态标签增强 - 带图标和渐变 */
.enhanced-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  transition: all 0.2s ease;
}

.enhanced-status-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 状态：待支付 */
.enhanced-status-tag.status-pending {
  background: linear-gradient(135deg, #93c5fd, #60a5fa);
  color: #1e40af;
}

/* 状态：确认中 */
.enhanced-status-tag.status-confirming {
  background: linear-gradient(135deg, #fcd34d, #fbbf24);
  color: #92400e;
}

/* 状态：成功 */
.enhanced-status-tag.status-success {
  background: linear-gradient(135deg, #86efac, #4ade80);
  color: #14532d;
}

/* 状态：失败 */
.enhanced-status-tag.status-failed,
.enhanced-status-tag.status-expired {
  background: linear-gradient(135deg, #fca5a5, #f87171);
  color: #7f1d1d;
}

/* 表格样式增强 - 带渐变表头 */
.ant-table-thead > tr > th {
  background: linear-gradient(135deg, #f0f2f5, #fafafa) !important;
  border-bottom: 2px solid #e6f7ff !important;
  font-weight: 600 !important;
  color: #667eea !important;
  font-size: 13px !important;
  transition: all 0.2s ease;
}

/* 表格行斑马纹 */
.ant-table-tbody > tr.even-row > td {
  background-color: #fafafa !important;
}

.ant-table-tbody > tr.odd-row > td {
  background-color: #ffffff !important;
}

/* 分页美化 */
.ant-pagination-item {
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
}

.ant-pagination-item:hover:not(.ant-pagination-item-active) {
  border-color: #667eea !important;
  transform: translateY(-1px) !important;
}

.ant-pagination-item-active {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  border-color: #667eea !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
}

.ant-pagination-item-active a {
  color: #fff !important;
}

/* Modal 弹窗 - 禁用动画防止闪烁，但保留正常功能 */
.ant-modal,
.ant-modal-mask,
.ant-modal-wrap {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}

/* zoom动画禁用 */
.ant-zoom-enter,
.ant-zoom-appear,
.ant-zoom-leave {
  animation-duration: 0s !important;
}

.ant-fade-enter,
.ant-fade-appear,
.ant-fade-leave {
  animation-duration: 0s !important;
}

/* 通用淡入类 */
.fade-in {
  animation: fadeIn 0.3s ease;
}

/* 页面内容wrapper动画 - 每次切换页面都触发 */
.page-content-wrapper {
  animation: fadeIn 0.3s ease-out;
  animation-fill-mode: both;
}

/* Tab切换动画 - 当Tab激活时播放 */
.ant-tabs-tabpane-active {
  animation: fadeIn 0.3s ease-out !important;
}

/* 确保Tab内容有动画 */
.ant-tabs-tabpane {
  transition: opacity 0.3s ease-out;
}

.fade-in-down {
  animation: fadeInDown 0.3s ease;
}

.slide-in-right {
  animation: slideInRight 0.3s ease;
}

/* 加载效果 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* 骨架屏加载效果 */
.skeleton-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* 图表容器 */
.chart-container {
  position: relative;
  height: 300px;
  padding: 20px;
}

/* 统计卡片 */
.stat-card {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 卡片标题动画 */
.ant-card-head {
  transition: background-color 0.2s ease;
}

.ant-card:hover .ant-card-head {
  background-color: #f8f9fa;
}

/* 徽章动画 */
.ant-badge {
  transition: all 0.2s ease;
}

.ant-badge:hover {
  transform: scale(1.05);
}

/* 开关组件动画 */
.ant-switch {
  transition: all 0.3s ease;
}

.ant-switch:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 提示框 - 禁用动画防止闪烁 */
.ant-tooltip {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}

/* 下拉菜单 - 禁用动画防止闪烁 */
.ant-dropdown {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}

/* Popconfirm/Popover - 禁用动画防止闪烁 */
.ant-popconfirm,
.ant-popover {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}

/* Slide动画禁用 */
.ant-slide-up-enter,
.ant-slide-up-appear,
.ant-slide-up-leave,
.ant-slide-down-enter,
.ant-slide-down-appear,
.ant-slide-down-leave {
  animation-duration: 0s !important;
}

/* 抽屉动画优化 */
.ant-drawer-content-wrapper {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 消息提示动画 */
.ant-message-notice-content {
  animation: fadeInDown 0.3s ease;
}

/* 通知动画 */
.ant-notification-notice {
  animation: slideInRight 0.3s ease;
}

/* ========== 响应式优化 ========== */
@media (max-width: 768px) {
  /* 移动端禁用部分动画以提升性能 */
  .ant-card.card-initial-load,
  .ant-table-tbody > tr.row-initial-load {
    animation: none;
  }

  /* 简化悬停效果 */
  .ant-btn:hover,
  .ant-tag:hover,
  .stat-card:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ========== 强制样式（确保覆盖 Ant Design 默认样式）========== */

/* 卡片增强效果 */
.ant-card {
  transition: all 0.3s ease !important;
  border-radius: 8px !important;
}

.ant-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

/* 统计卡片特殊效果 */
.ant-statistic-card,
.ant-card .ant-statistic {
  transition: all 0.3s ease !important;
}

/* 按钮渐变效果增强 */
.ant-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
}

.ant-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

/* 输入框增强 */
.ant-input,
.ant-select-selector,
.ant-picker {
  transition: all 0.2s ease !important;
}

/* 表格整体美化 */
.ant-table {
  border-radius: 8px !important;
  overflow: hidden !important;
}

/* 确保状态标签有圆角 */
.ant-tag {
  border-radius: 12px !important;
  padding: 2px 12px !important;
}

/* ========== 暗色登录页面样式 ========== */

/* 暗色主题输入框 */
.login-input.ant-input,
.login-input .ant-input,
.login-input.ant-input-affix-wrapper,
.login-input .ant-input-affix-wrapper {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.login-input .ant-input::placeholder,
.login-input.ant-input::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

.login-input:hover,
.login-input .ant-input:hover,
.login-input.ant-input-affix-wrapper:hover {
  border-color: rgba(0, 212, 255, 0.5) !important;
}

.login-input:focus,
.login-input .ant-input:focus,
.login-input.ant-input-affix-wrapper-focused {
  border-color: #00d4ff !important;
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2) !important;
}

/* 密码输入框眼睛图标 */
.login-input .ant-input-password-icon {
  color: rgba(255, 255, 255, 0.4) !important;
}

.login-input .ant-input-password-icon:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* 暗色复选框 */
.ant-checkbox-wrapper {
  color: rgba(255, 255, 255, 0.6);
}

/* 登录按钮悬停效果 */
.login-btn.ant-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.4) !important;
}

/* 响应式适配 - 登录页面 */
@media (max-width: 1200px) {
  .login-page-left-panel {
    padding: 40px 50px !important;
  }

  .login-page-headline {
    font-size: 36px !important;
  }
}

@media (max-width: 992px) {
  .login-page-left-panel {
    display: none !important;
  }

  .login-page-right-panel {
    width: 100% !important;
    border-left: none !important;
  }
}

/* ========== 安全提醒跑马灯效果 ========== */

/* 跑马灯动画 */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* 跑马灯容器 */
.security-notice-marquee {
  display: inline-flex;
  animation: marquee 25s linear infinite;
}

/* 悬停时暂停滚动 */
.security-notice-marquee:hover {
  animation-play-state: paused;
}

/* 通知栏样式增强 */
.security-notice-bar {
  background: linear-gradient(135deg, #fffbe6 0%, #fff7cc 100%);
  border-bottom: 1px solid #ffe58f;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  overflow: hidden;
}

.security-notice-bar.info {
  background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
  border-color: #91d5ff;
}

.security-notice-bar.success {
  background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
  border-color: #b7eb8f;
}

.security-notice-bar.warning {
  background: linear-gradient(135deg, #fffbe6 0%, #fff1b8 100%);
  border-color: #ffe58f;
}

/* 关闭按钮样式 */
.security-notice-close {
  cursor: pointer;
  color: #999;
  font-size: 12px;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.security-notice-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}
