:root {
  --primary-color: #8a4bff;
  --primary-light: #b39ddb;
  --primary-dark: #6c3ce0;
  --accent-color: #ffd7e4;
  --success-color: #67c23a;
  --warning-color: #e6a23c;
  --danger-color: #f56c6c;
  --bg-gradient: linear-gradient(135deg, #ffd7e4 0%, #c8f1ff 100%);
  --card-bg: rgba(255, 255, 255, 0.88);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
  color: #333;
  margin: 0;
  padding: 0;
}

.header-content {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 999;
  height: clamp(48px, 8vh, 64px);
  display: flex;
  align-items: center;
  padding: 12px 24px;
  background-color: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  border-radius: 16px;
  will-change: transform;
}

.header-content:hover {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 20px rgba(138, 75, 255, 0.1);
}

.title {
  font-size: clamp(1.2em, 2vw, 1.8em);
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  margin-right: 4px;
  color: #333;
}

.title:hover {
  color: #B39DDB; /* 使用柔和的淡紫色 */
}

.search-card {
  margin-left: auto;
  margin-right: 16px;
}

.stats {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: clamp(0.9em, 1.5vw, 1.2em);
  background: rgba(255, 255, 255, 0.9);
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  color: #333;
}

.stats:hover {
  background-color: #f0eaf8; /* 柔和的淡紫色 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: scale(1.02);
  color: #B39DDB;
}

.upload-icon {
  margin-right: 10px;
  font-size: clamp(1.2em, 1.5vw, 1.6em);
  transition: color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  color: inherit;
  cursor: pointer;
  border-radius: 50%;
  padding: 8px;
  background-color: rgba(179, 157, 219, 0.15);
  border: 1px solid transparent;
}

.header-content .actions {
  display: flex;
  align-items: center;
}

.header-content .actions i {
  font-size: clamp(1.2em, 1.5vw, 1.6em);
  cursor: pointer;
  transition: color 0.3s, transform 0.3s;
  color: #333;
  margin: 0 8px;
}

.header-content .actions i:hover {
  color: #B39DDB;
  transform: scale(1.1);
}

.header-content .actions .el-dropdown-link i {
  color: #333;
}

.header-content .actions .disabled {
  color: #bbb;
  pointer-events: none;
}

.header-content .actions .enabled {
  color: #B39DDB; /* 使用柔和的淡紫色 */
}

.search-card .el-input__inner {
  border-radius: 20px;
  width: clamp(200px, 25vw, 300px);
  height: clamp(30px, 5vh, 40px);
  font-size: 1.2em;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: width 0.3s;
}

.search-card .el-input__inner:focus {
  width: clamp(250px, 30vw, 400px);
}

.main-container {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  padding: 20px;
  min-height: calc(100vh - 80px);
}

.content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 10px;
  flex-grow: 1;
}

/* 图片卡片样式 */
.image-card {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--card-bg) !important;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  position: relative;
  object-fit: cover;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  will-change: transform;
  contain: layout style paint;
}

.image-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(138, 75, 255, 0.12);
  cursor: pointer;
}

.image-card .el-checkbox {
  position: absolute;
  top: 10px;
  right: 10px;
  transform: scale(1.5);
  z-index: 10;
  margin: 0; /* 重要：移除默认边距 */
  padding: 0; /* 重要：移除默认内边距 */
}

.el-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: opacity 0.3s ease;
}
.el-image:hover {
  opacity: 0.8;
}

.card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 10px;
  background: rgba(0, 0, 0, 0.6);
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.el-card, .el-card__body{
  border: none !important;
}
.el-card__body{
  padding: 14px !important;
}
.el-card:hover .image-overlay {
  opacity: 1;
}

.overlay-buttons {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.collect-icon {
  position: absolute;
  top: -1.3px;
  left: 10px;
  cursor: pointer;
  font-size: 1.5em;
  z-index: 10;
  transition: color 0.3s ease, transform 0.3s ease;
}
.collect-icon:hover {transform: scale(1.2);}
.liked {color: #FFD7E4;}
.not-liked {color: #b39edb80;}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  font-size: 0.9em;
  color: #555; /* 字体颜色改为黑色 */
}

.footer a {
  color: #555; /* 链接颜色 */
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #333; /* 悬停时的链接颜色改为黑色 */
}

.footer i {
  color: #333; /* 图标颜色改为黑色 */
}

/* 适配移动端 */
@media (max-width: 768px) {
  .header-content {
    top: 8px;
    left: 8px;
    right: 8px;
    padding: 10px 14px;
    border-radius: 14px;
  }
  .content {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }
  .stats-text{display: none;}
  .stats{margin: 0 4px;}
  .stats, .actions i{margin: 0;}
  .el-card{aspect-ratio: unset; min-height: 180px;}
  .el-card__body{padding: 0;}
  .search-card {display: none;}
  .header-content .actions i{margin: 0 4px;}
  .main-container {
    margin-top: 76px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .content {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .header-content .actions i {
    font-size: 1em;
    margin: 0 3px;
  }
}

/* 音视频卡片基础样式 */
.video-card, .audio-card, .file-card {
  background: linear-gradient(135deg, rgba(138, 75, 255, 0.9) 0%, rgba(109, 130, 255, 0.9) 100%);
  border: none;
  border-radius: 20px !important;
  overflow: hidden;
  position: relative;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 24px rgba(138, 75, 255, 0.15);
  transition: var(--transition);
}

.video-card {
  background: linear-gradient(135deg, #8EC5FC 0%, #E0C3FC 100%);
}

.video-card .el-card__body{
  padding: 0 !important;
}

.audio-card.selected, .video-card.selected, .file-card.selected {
  background: linear-gradient(135deg, rgba(138, 75, 255, 0.85) 0%, rgba(255, 215, 228, 0.85) 100%);
}

.video-card:hover, .audio-card:hover, .file-card:hover {
  transform: scale(1.02);
}

.video-content, .audio-content, .file-content {
  padding: 12px;
  color: white;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-content{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.audio-header, .file-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.audio-avatar, .file-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px;
  margin-right: 15px;
}

.file-avatar{
  background: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.audio-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.audio-info, .file-info {
  flex: 1;
  min-width: 0;
}

.video-title, .audio-title, .file-title {
  font-size: 16px;
  font-weight: 500;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.video-title{
  margin: 6px 0;
  font-size: 0.9em;
}

.audio-subtitle, .file-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* 自定义audio元素样式 */
.custom-audio-player {
  width: 100%;
  height: 42px;
  margin: 15px 0;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.2);
}

.video-controls, .audio-controls, .file-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.like-btn i, .select-btn i {
  font-size: 1.2em;
}

.like-btn .liked, .select-btn .selected {
  color: #FFD7E4;
}

.control-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  z-index: 1; /* 确保按钮可点击 */
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 状态面板 - 带标签的状态指示器 */
.status-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 0 8px;
}

.status-panel:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.status-item i {
  font-size: 8px !important;
  margin: 0 !important;
}

.status-item span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 返回首页按钮 */
.home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #8a4bff 0%, #b39ddb 100%);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 12px;
  box-shadow: 0 2px 8px rgba(138, 75, 255, 0.3);
}

.home-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(138, 75, 255, 0.4);
}

.home-btn i {
  color: white;
  font-size: 16px;
}

/* 批量操作工具栏 */
.batch-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  background: linear-gradient(135deg, rgba(138, 75, 255, 0.1) 0%, rgba(255, 215, 228, 0.2) 100%);
  border: 1px solid rgba(138, 75, 255, 0.2);
  border-radius: 20px;
  margin-left: auto;
  margin-right: 12px;
  animation: slideIn 0.3s ease;
}

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

.batch-count {
  font-size: 13px;
  font-weight: 600;
  color: #8a4bff;
  white-space: nowrap;
}

.batch-toolbar .el-button-group .el-button {
  border-radius: 0;
}

.batch-toolbar .el-button-group .el-button:first-child {
  border-radius: 16px 0 0 16px;
}

.batch-toolbar .el-button-group .el-button:last-child {
  border-radius: 0 16px 16px 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .audio-card { max-height: none; }
  .custom-audio-player { height: 32px; }
  .status-panel {
    padding: 4px 10px;
    gap: 8px;
  }
  .status-item span {
    display: none;
  }
  .batch-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  }
  .home-btn {
    width: 32px;
    height: 32px;
    margin-right: 8px;
  }
  .title {
    font-size: 1em;
    margin-right: 0;
  }
  .header-content .actions {
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
  }
  .el-dropdown-link {
    padding: 4px;
  }
}

@media (max-width: 480px) {
  .header-content {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 10px;
    gap: 8px;
  }
  .title {
    font-size: 0.9em;
    order: 1;
  }
  .home-btn {
    order: 0;
    width: 28px;
    height: 28px;
  }
  .stats {
    order: 2;
    font-size: 0.8em;
    padding: 4px 8px;
  }
  .header-content .actions {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 2px;
    padding-top: 6px;
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: 4px;
  }
  .header-content .actions i {
    font-size: 0.95em;
    margin: 0 2px;
    padding: 4px;
  }
  .main-container {
    margin-top: 100px;
    padding: 8px;
  }
  .content {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .image-card {
    border-radius: 12px;
  }
  .card-footer {
    font-size: 0.75em;
    padding: 6px 8px;
  }
  .overlay-buttons {
    flex-direction: column;
    gap: 6px;
  }
  .overlay-buttons .el-button {
    padding: 4px 10px;
    font-size: 12px;
  }
  .control-btn {
    width: 32px;
    height: 32px;
  }
  .video-controls, .audio-controls, .file-controls {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .pagination-container {
    padding: 0 8px;
  }
  .el-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .batch-toolbar {
    max-width: 95%;
    padding: 4px 10px;
  }
  .batch-toolbar .el-button {
    padding: 6px 10px;
    font-size: 12px;
  }
  .batch-count {
    font-size: 11px;
  }
  
  /* 移动端禁用高消耗效果 */
  .header-content {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-color: rgba(255, 255, 255, 0.98);
  }
  
  .image-card:hover {
    transform: none;
  }
  
  .image-card:hover img {
    transform: none;
  }
}

/* 用户偏好减少动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.website-edit-dialog .el-textarea__inner{
  height: 240px !important;
}
