/* ============================
   抖音续火花 - 界面美化样式
   ============================ */

/* --- 全局基础 --- */
:root {
  --page-bg: #f0f4f8;
  --card-bg: #ffffff;
  --card-hover-shadow: 0 8px 32px rgba(0,0,0,0.08);
  --gradient-primary: linear-gradient(135deg, #3b82f6, #6366f1);
  --gradient-warm: linear-gradient(135deg, #f59e0b, #f97316);
  --gradient-cool: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-success: linear-gradient(135deg, #10b981, #34d399);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 页面背景优化 */
.layout-main {
  background: linear-gradient(180deg, #f0f4f8 0%, #f8fafc 40%, #f0f4f8 100%) !important;
  background-attachment: fixed !important;
}

/* --- 卡片美化 --- */
.el-card {
  border-radius: var(--radius-lg) !important;
  border: 1px solid #e8ecf1 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03) !important;
  transition: all var(--transition-smooth) !important;
  overflow: hidden;
}

.el-card:hover {
  box-shadow: var(--card-hover-shadow) !important;
  border-color: #dce2e8 !important;
  transform: translateY(-2px);
}

/* 统计卡片特殊样式 */
.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--el-color-primary-light-9) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover::after {
  opacity: 1;
}

/* --- 表格美化 --- */
.el-table {
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  --el-table-border-color: #edf1f7;
}

.el-table th.el-table__cell {
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  letter-spacing: 0.02em;
  border-bottom: 2px solid #e8ecf1 !important;
  padding: 14px 12px !important;
}

.el-table tr {
  transition: background-color 0.2s ease;
}

.el-table tbody tr:hover > td.el-table__cell {
  background: #f8fafc !important;
}

.el-table td.el-table__cell {
  padding: 14px 12px !important;
  font-size: 13.5px;
}

.el-table__row--striped td.el-table__cell {
  background: #fafbfc !important;
}

/* 表格内标签美化 */
.el-table .el-tag {
  border-radius: 6px !important;
  padding: 2px 10px !important;
  font-weight: 500 !important;
  border: none !important;
}

/* --- 按钮美化 --- */
.el-button {
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
  transition: all var(--transition-smooth) !important;
  position: relative;
  overflow: hidden;
}

.el-button--primary {
  background: var(--gradient-primary) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35) !important;
}

.el-button--primary:hover {
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.45) !important;
  transform: translateY(-1px);
}

.el-button--primary:active {
  transform: translateY(0) scale(0.98);
}

.el-button--success {
  background: var(--gradient-success) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

.el-button--success:hover {
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4) !important;
  transform: translateY(-1px);
}

.el-button--warning {
  background: var(--gradient-warm) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

.el-button--danger {
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25) !important;
}

.el-button--default {
  border: 1px solid #e2e8f0 !important;
}

.el-button--default:hover {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
}

/* 小按钮组间距 */
.el-button + .el-button {
  margin-left: 8px;
}

/* --- 表单输入美化 --- */
.el-input__wrapper {
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
  transition: all var(--transition-smooth) !important;
}

.el-input__wrapper:hover {
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.1) !important;
}

.el-input.is-focus .el-input__wrapper {
  box-shadow: 0 0 0 1px #3b82f6 inset, 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.el-select .el-input__wrapper {
  border-radius: var(--radius-sm) !important;
}

.el-textarea__inner {
  border-radius: var(--radius-sm) !important;
  transition: all var(--transition-smooth) !important;
}

.el-textarea__inner:focus {
  box-shadow: 0 0 0 1px #3b82f6 inset, 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* --- 标签/Tag 美化 --- */
.el-tag {
  border-radius: 6px !important;
  font-weight: 500 !important;
  border: none !important;
  padding: 0 10px !important;
}

.el-tag--primary {
  background: #eff6ff !important;
  color: #3b82f6 !important;
}

.el-tag--success {
  background: #f0fdf4 !important;
  color: #10b981 !important;
}

.el-tag--warning {
  background: #fffbeb !important;
  color: #f59e0b !important;
}

.el-tag--danger {
  background: #fef2f2 !important;
  color: #ef4444 !important;
}

.el-tag--info {
  background: #f8fafc !important;
  color: #64748b !important;
}

/* --- 对话框美化 --- */
.el-dialog {
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25) !important;
  overflow: hidden;
}

.el-dialog__header {
  background: #fafbfc;
  border-bottom: 1px solid #edf1f7;
  padding: 20px 24px !important;
  margin: 0 !important;
}

.el-dialog__title {
  font-weight: 700 !important;
  font-size: 16px !important;
  color: #0f172a !important;
}

.el-dialog__body {
  padding: 24px !important;
}

.el-dialog__footer {
  padding: 16px 24px !important;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

/* --- 抽屉美化 --- */
.el-drawer {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg) !important;
}

.el-drawer__header {
  padding: 20px 24px !important;
  border-bottom: 1px solid #edf1f7;
  margin-bottom: 0 !important;
}

/* --- 分页美化 --- */
.el-pagination {
  margin-top: 20px;
  justify-content: center;
}

.el-pagination .el-pager li {
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.el-pagination .el-pager li.is-active {
  background: var(--gradient-primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.el-pagination button {
  border-radius: 8px !important;
}

/* --- 开关美化 --- */
.el-switch.is-checked .el-switch__core {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

/* --- 菜单美化增强 --- */
.el-menu {
  border-right: none !important;
}

.el-menu-item {
  border-radius: 10px !important;
  margin: 2px 8px !important;
  transition: all var(--transition-smooth) !important;
}

.el-menu-item:hover {
  background-color: #f1f5f9 !important;
}

.el-menu-item.is-active {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(59,130,246,0.04)) !important;
  color: #3b82f6 !important;
}

/* --- 页面标题美化 --- */
.page-title, h1, h2, h3, h4 {
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}

/* --- 通知/消息提示美化 --- */
.el-notification {
  border-radius: var(--radius-md) !important;
  border: 1px solid #edf1f7 !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12) !important;
  backdrop-filter: blur(10px);
}

.el-message {
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
  font-weight: 500;
}

/* --- Tabs 标签页美化 --- */
.el-tabs__nav-wrap::after {
  height: 1px !important;
  background: #edf1f7 !important;
}

.el-tabs__item {
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.el-tabs__item.is-active {
  color: #3b82f6 !important;
  font-weight: 600 !important;
}

.el-tabs__active-bar {
  background: var(--gradient-primary) !important;
  height: 3px !important;
  border-radius: 3px 3px 0 0 !important;
}

/* --- 下拉菜单美化 --- */
.el-dropdown-menu {
  border-radius: var(--radius-md) !important;
  border: 1px solid #edf1f7 !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1) !important;
  padding: 6px !important;
}

.el-dropdown-menu__item {
  border-radius: 8px !important;
  transition: all 0.15s ease !important;
  font-weight: 500;
}

/* --- Popover 美化 --- */
.el-popover {
  border-radius: var(--radius-md) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
  border: 1px solid #edf1f7 !important;
}

/* --- Tooltip 美化 --- */
.el-tooltip__popper {
  border-radius: 8px !important;
  font-weight: 500;
}

/* --- 步骤条美化 --- */
.el-step__head.is-process {
  color: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

.el-step__title.is-process {
  color: #3b82f6 !important;
  font-weight: 600 !important;
}

.el-step__head.is-finish {
  color: #10b981 !important;
  border-color: #10b981 !important;
}

.el-step__title.is-finish {
  color: #10b981 !important;
}

/* --- 全局滚动条美化 --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

/* --- 空状态美化 --- */
.el-empty__image {
  opacity: 0.6;
}

.el-empty__description {
  color: #94a3b8 !important;
  font-weight: 500;
}

/* --- 加载动画美化 --- */
.el-loading-spinner .circular {
  animation: loading-rotate 2s linear infinite;
}

.el-loading-spinner .path {
  stroke: #3b82f6;
  stroke-linecap: round;
  animation: loading-dash 1.5s ease-in-out infinite;
}

/* --- 头像美化 --- */
.el-avatar {
  font-weight: 600 !important;
}

/* --- 链接美化 --- */
a {
  transition: color 0.2s ease;
}

a:hover {
  color: #3b82f6;
}

/* --- 进度条美化 --- */
.el-progress-bar__outer {
  border-radius: 10px !important;
  background: #e8ecf1 !important;
}

.el-progress-bar__inner {
  border-radius: 10px !important;
  background: var(--gradient-primary) !important;
}

/* --- 分割线美化 --- */
.el-divider {
  border-color: #edf1f7 !important;
}

.el-divider__text {
  color: #94a3b8 !important;
  font-weight: 600 !important;
  background: #f8fafc !important;
  padding: 0 16px !important;
}

/* --- 面包屑美化 --- */
.el-breadcrumb__inner {
  font-weight: 500 !important;
  transition: color 0.2s !important;
}

/* --- 折叠面板美化 --- */
.el-collapse-item__header {
  font-weight: 600 !important;
  border-radius: var(--radius-sm) !important;
  transition: all 0.2s !important;
}

.el-collapse-item__wrap {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
}

/* --- 时间线美化 --- */
.el-timeline-item__node {
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* --- Badge 美化 --- */
.el-badge__content {
  border: 2px solid #fff !important;
  font-weight: 600 !important;
}

/* --- Checkbox/Radio 美化 --- */
.el-checkbox__input.is-checked .el-checkbox__inner {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

.el-radio__input.is-checked .el-radio__inner {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
}

/* --- 图片预览 --- */
.el-image-viewer__close {
  color: #fff !important;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  width: 40px !important;
  height: 40px !important;
}

/* --- 页面过渡动画 --- */
.fade-transform-enter-active,
.fade-transform-leave-active {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.fade-transform-enter-from {
  opacity: 0;
  transform: translateY(12px);
}

.fade-transform-leave-to {
  opacity: 0;
  transform: translateY(-6px);
}

/* --- 搜索区域美化 --- */
.el-form-item__label {
  font-weight: 600 !important;
  color: #475569 !important;
}

/* --- 统计数据条美化 --- */
.stat-item .stat-value {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- 移动端优化 --- */
@media (max-width: 768px) {
  .el-dialog {
    width: 92% !important;
    border-radius: var(--radius-md) !important;
  }

  .el-message {
    min-width: auto !important;
    width: 90% !important;
  }

  .el-card {
    border-radius: var(--radius-md) !important;
  }
}

/* --- 悬停效果增强 --- */
.el-table__body tr,
.el-card,
.el-button,
.el-menu-item,
.feature-card {
  will-change: transform;
}

/* --- 选中状态光晕 --- */
::selection {
  background: rgba(59, 130, 246, 0.2);
  color: #1e40af;
}

/* --- 顶部导航栏光效 --- */
.modern-header {
  position: relative;
}

.modern-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #3b82f640, #6366f140, #3b82f640, transparent);
  pointer-events: none;
}

/* --- 渐入动画 --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.el-card {
  animation: fadeInUp 0.5s ease backwards;
}

.el-card:nth-child(1) { animation-delay: 0s; }
.el-card:nth-child(2) { animation-delay: 0.05s; }
.el-card:nth-child(3) { animation-delay: 0.1s; }
.el-card:nth-child(4) { animation-delay: 0.15s; }

/* --- 脉冲指示点 --- */
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.status-online {
  animation: pulse-dot 2s infinite;
}

/* --- 骨架屏美化 --- */
.el-skeleton__item {
  border-radius: 8px !important;
}
