/* ===== 1. 基础布局 ===== */
.resource-detail {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== 2. 加载状态 ===== */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 0;
}

.spinner-border {
  width: 4rem;
  height: 4rem;
  color: var(--primary-color);
  border-width: 0.25rem;
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.4));
  animation: spin 1.2s linear infinite, pulse 2s ease-in-out infinite alternate;
}

/* ===== 3. 动画定义 ===== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== 4. 资源标题区域 ===== */
.resource-header {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--card-radius);
  padding: 2.5rem;
  margin-bottom: 2rem;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-header::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  z-index: -1;
  background: 
    radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
  animation: rotateSlow 25s infinite linear;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.titles {
  flex: 1;
  min-width: 280px;
}

.title-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
  line-height: 1.2;
  letter-spacing: -0.03em;
  position: relative;
  display: inline-block;
  text-shadow: 2px 2px 0 rgba(124, 58, 237, 0.1);
  margin-right: 0;
}

.title::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60%;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.subtitle {
  font-size: 1.5rem;
  color: var(--gray-color);
  font-weight: 500;
  margin-top: 1.25rem;
  font-style: italic;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ===== 5. 资源类型标签 ===== */
.resource-type-badge {
  position: relative;
  display: inline-block;
  background: var(--primary-gradient);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
  z-index: 2;
  transition: all 0.3s ease;
}

.resource-type-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(124, 58, 237, 0.4);
}

.resource-types-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* ===== 6. 资源内容区域 ===== */
.resource-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 2.5rem;
  margin-top: 2.5rem;
}

/* ===== 7. 媒体区域 ===== */
.media-section {
  background: var(--glass-background);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  height: fit-content;
}

.main-image-container {
  position: relative;
  width: 100%;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  cursor: zoom-in;
}

.resource-poster {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
  transition: transform 0.5s ease;
  cursor: zoom-in;
}

.main-image-container:hover .resource-poster {
  transform: scale(1.04);
}

/* 缩略图容器 */
.thumbnails-container {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.5);
  width: 100%;
  overflow-x: hidden;
}

.thumbnails-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.5);
  -webkit-overflow-scrolling: touch;
  width: 100%;
  flex-wrap: nowrap;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.thumbnails-scroll::-webkit-scrollbar {
  height: 5px;
}

.thumbnails-scroll::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 100px;
}

.thumbnails-scroll::-webkit-scrollbar-track {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 100px;
}

.thumbnail {
  flex: 0 0 80px;
  height: 80px;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  opacity: 0.7;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
}

.thumbnail:hover {
  opacity: 1;
  transform: translateY(-4px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
}

.thumbnail.active {
  opacity: 1;
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.25);
  border: 2px solid var(--primary-color);
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 图片导航按钮 */
.image-navigation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.nav-button {
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  margin: 0 10px;
}

.nav-button:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

.nav-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-button i {
  font-size: 1.5rem;
}

/* ===== 8. 信息区域 ===== */
.info-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.description-card,
.links-card {
  background: var(--glass-background);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.description-card:hover,
.links-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--deep-shadow);
}

.description-content {
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;
}

.description-content.collapsed {
  max-height: 4.5em;
  overflow: hidden;
  position: relative;
}

.description-content.collapsed:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.5em;
  background: linear-gradient(transparent, var(--bg-color));
}

.description-toggle-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.description-toggle-btn:hover {
  text-decoration: underline;
  background-color: rgba(var(--primary-color-rgb), 0.1);
}

/* ===== 9. 卡片样式 ===== */
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  position: relative;
  overflow: visible; /* 修改为visible，确保不会截断header-actions中的按钮 */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(124, 58, 237, 0.07), transparent);
  opacity: 0.8;
  z-index: 1; /* 添加z-index，确保在按钮下层 */
}

.card-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark-color);
  position: relative;
  display: flex;
  align-items: center;
  z-index: 2; /* 确保标题在背景上层 */
}

.card-header h3::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--primary-gradient);
  margin-right: 0.75rem;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.card-body {
  padding: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--dark-color);
}

.description-card .card-body {
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.2);
}

.description-card .card-body::-webkit-scrollbar {
  width: 6px;
}

.description-card .card-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.description-card .card-body::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 10px;
}

/* ===== 10. 链接区域 ===== */
.links-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.2);
  position: relative;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  flex-wrap: wrap;
}

.links-tabs::-webkit-scrollbar {
  height: 6px;
}

.links-tabs::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.links-tabs::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 10px;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(124, 58, 237, 0.15);
  color: var(--dark-color);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(124, 58, 237, 0.15);
}

.tab-btn.active {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 15px rgba(124, 58, 237, 0.3);
}

.tab-badge {
  background: rgba(255, 255, 255, 0.3);
  color: inherit;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-weight: 700;
}

.tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* 链接表格 */
.links-table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(124, 58, 237, 0.1);
  background: rgba(255, 255, 255, 0.6);
}

.table-header {
  display: grid;
  grid-template-columns: 5fr 2fr 3fr;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(124, 58, 237, 0.08);
  font-weight: 700;
  color: var(--dark-color);
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.table-body {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.table-row {
  display: grid;
  grid-template-columns: 5fr 2fr 3fr;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.05);
  transition: background-color 0.2s ease;
}

.table-row:last-child {
  border-bottom: none;
}

.table-row:hover {
  background-color: rgba(124, 58, 237, 0.03);
}

.col-link, .col-password, .col-note {
  display: flex;
  align-items: center;
}

.col-link {
  overflow: hidden;
}

.link-url {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 100%;
}

.link-url:hover {
  color: var(--secondary-color);
  transform: translateY(-2px);
}

.url-text {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* 密码容器 */
.password-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(124, 58, 237, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  position: relative;
}

.password-container:hover {
  background: rgba(124, 58, 237, 0.15);
  transform: translateY(-2px);
}

.password-container i {
  color: var(--primary-color);
}

.password-container.copied {
  background: rgba(124, 58, 237, 0.08);
  border: none;
  animation: subtle-pulse 1s ease;
}

.password-container::selection,
.password-container *::selection {
  background: transparent;
}

.password-container::-moz-selection,
.password-container *::-moz-selection {
  background: transparent;
}

.note-text {
  font-style: italic;
  color: var(--gray-color);
}

/* ===== 11. 模态框 ===== */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal-dialog {
  width: 100%;
  max-width: 500px;
  margin: auto;
}

.modal-content {
  background: var(--glass-background);
  border-radius: var(--card-radius);
  border: var(--glass-border);
  box-shadow: var(--deep-shadow);
  overflow: hidden;
  animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-weight: 700;
  color: var(--dark-color);
  margin: 0;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.btn-close:hover {
  color: var(--dark-color);
  background: rgba(124, 58, 237, 0.1);
  transform: rotate(90deg);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(124, 58, 237, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* 图片预览模态框 */
.modal-image-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.preview-large-image {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--card-radius);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  border: 3px solid rgba(255, 255, 255, 0.8);
}

.image-close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  background: white;
  color: var(--dark-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.image-close-btn:hover {
  opacity: 1;
  transform: rotate(90deg);
}

/* ===== 12. 按钮样式 ===== */
.btn-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius);
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  white-space: nowrap;
}

.btn-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn-custom:hover::before {
  left: 100%;
}

.btn-custom:hover {
  transform: translateY(-3px);
  box-shadow: var(--deep-shadow);
}

.btn-custom:active {
  transform: scale(0.95);
}

.btn-text {
  margin-left: 0.5rem;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
  background: var(--secondary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-danger {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

/* 喜欢按钮样式 */
.btn-like {
  background: rgba(255, 255, 255, 0.85);
  color: var(--dark-color);
  border: 1px solid rgba(244, 63, 94, 0.2);
  position: relative;
  overflow: visible;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-like:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(244, 63, 94, 0.4);
  transform: translateY(-3px);
}

.btn-like i {
  color: var(--accent-color);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-like:hover i {
  transform: scale(1.2);
}

.btn-like.liked {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
}

.btn-like.liked i {
  color: var(--accent-color);
}

.like-count {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-color);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 100px;
  margin-left: 0.5rem;
  min-width: 22px;
  text-align: center;
}

/* 分享按钮样式 */
.btn-share {
  background-color: #3a86ff;
  color: white;
  border: none;
  box-shadow: 0 2px 5px rgba(58, 134, 255, 0.3);
}

.btn-share:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
}

/* 点播按钮样式 */
.stream-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: var(--primary-gradient, linear-gradient(45deg, #7c3aed, #8b5cf6));
  color: white;
  border: none;
  box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.stream-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(124, 58, 237, 0.4);
}

.stream-button i {
  font-size: 1.2rem;
  margin-right: 0.25rem;
}

/* 剧集按钮样式 */
.btn-episode {
  background: linear-gradient(145deg, #4f46e5, #7c3aed);
  color: white;
}

.btn-episode:hover {
  background: linear-gradient(145deg, #4338ca, #6d28d9);
  color: white;
}

.btn-episode.active {
  background: linear-gradient(145deg, #059669, #10b981);
  color: white;
}

.btn-episode.active:hover {
  background: linear-gradient(145deg, #047857, #0d9488);
  color: white;
}

.btn-episode i,
.btn-episode .btn-text {
  color: white;
}

/* ===== 13. 表单样式 ===== */
.edit-form-container {
  margin-bottom: 3rem;
}

.edit-card {
  background: var(--glass-background);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUpScale 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.edit-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--deep-shadow);
}

.edit-card-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.edit-card-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(124, 58, 237, 0.07), transparent);
  opacity: 0.8;
}

.edit-card-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-color);
  position: relative;
  display: flex;
  align-items: center;
}

.edit-card-header h3::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--primary-gradient);
  margin-right: 0.75rem;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.edit-card-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.75rem;
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  display: block;
}

.custom-input, .custom-textarea {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  color: var(--dark-color);
  transition: all 0.3s ease;
  width: 100%;
  font-size: 1rem;
}

.custom-input:focus, .custom-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
  background: rgba(255, 255, 255, 0.85);
}

.custom-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: center;
  padding-top: 1.5rem;
}

.save-btn {
  min-width: 200px;
}

/* ===== 14. 上传区域 ===== */
.upload-section {
  margin-top: 2rem;
}

.dropzone-container {
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed rgba(124, 58, 237, 0.3);
  border-radius: var(--card-radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.dropzone-container.active-dropzone {
  background: rgba(124, 58, 237, 0.08);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.dropzone-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
  opacity: 0.8;
}

.dropzone-content p {
  margin-bottom: 1.25rem;
  color: var(--gray-color);
}

.file-upload-btn {
  width: auto;
  height: auto;
  border-radius: var(--border-radius);
  padding: 0.6rem 1.2rem;
  white-space: nowrap;
}

.file-upload-btn .file-btn-text {
  display: inline;
}

.dropzone-content .file-upload-btn {
  width: auto !important; 
  min-width: 120px !important;
  height: auto !important;
  border-radius: var(--border-radius) !important;
  padding: 0.6rem 1.2rem !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.dropzone-content .file-upload-btn .file-btn-text {
  display: inline !important;
  visibility: visible !important;
  margin-left: 0.5rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

/* ===== 15. TMDB ID 显示样式 ===== */
.tmdb-id-info {
  display: flex;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.tmdb-id-label {
  font-weight: 500;
  color: var(--text-color-secondary);
}

.tmdb-id-value {
  font-weight: 600;
  color: var(--text-color);
  background-color: rgba(var(--primary-color-rgb), 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.95rem;
}

.tmdb-link {
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.tmdb-link:hover {
  background-color: rgba(var(--primary-color-rgb), 0.1);
}

/* ===== 16. 响应式样式 ===== */
@media (max-width: 992px) {
  .resource-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .resource-header .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .titles {
    flex: 1 1 100%;
  }

  .action-buttons {
    justify-content: space-around;
    margin-top: 1rem;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.25rem;
  }

  .link-inputs {
    grid-template-columns: 1fr;
  }
  
  .media-section {
    max-height: none;
    display: flex;
    flex-direction: column;
  }
  
  .main-image-container {
    max-height: 500px;
    display: flex;
    justify-content: center;
  }
  
  .resource-poster {
    object-fit: contain;
    max-height: 100%;
    width: auto;
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .resource-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .media-section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin-bottom: 1rem;
  }
  
  .info-section {
    width: 100%;
  }
  
  .main-image-container {
    max-height: 350px;
  }
  
  .thumbnails-container {
    padding: 0.5rem;
    margin-top: 1rem;
    overflow-x: hidden;
    background: rgba(255, 255, 255, 0.2);
  }
  
  .thumbnails-scroll {
    gap: 0.5rem;
    padding-bottom: 0.25rem;
    overflow-x: auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 768px) {
  .resource-header {
    padding: 1.5rem;
  }

  .title-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .title {
    font-size: 1.8rem;
    -webkit-line-clamp: 3;
    margin-right: 0.5rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
    margin-top: 0.75rem;
    -webkit-line-clamp: 2;
  }
  
  .thumbnails-container {
    padding: 0.5rem;
    margin-top: 1rem;
    overflow-x: hidden;
  }
  
  .thumbnails-scroll {
    gap: 0.5rem;
    padding-bottom: 0.25rem;
    overflow-x: auto !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }
  
  .thumbnail {
    flex: 0 0 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    width: 60px;
    flex: 0 0 auto;
    border-radius: 4px;
  }
  
  .card-header {
    padding: 1rem;
    overflow: visible; /* 确保不会截断按钮 */
  }
  
  .card-header h3 {
    font-size: 1.25rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .description-card .card-body {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.2);
  }
  
  .table-header,
  .table-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  
  .table-header {
    display: none;
  }
  
  .table-body {
    max-height: 250px; /* 设置合适的高度，而不是none */
    overflow-y: auto; /* 保留自动滚动 */
    scrollbar-width: thin; /* 保留细滚动条 */
    -webkit-overflow-scrolling: touch; /* 增加iOS流畅滚动 */
  }
  
  .col-link, .col-password, .col-note {
    width: 100%;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
  }
  
  .col-password, .col-note {
    padding-left: 0.25rem;
    border-top: 1px dashed rgba(124, 58, 237, 0.05);
  }
  
  .col-password::before {
    content: "提取码: ";
    font-weight: 600;
    color: var(--gray-color);
    margin-right: 0.5rem;
    min-width: 60px;
  }
  
  .col-note::before {
    content: "备注: ";
    font-weight: 600;
    color: var(--gray-color);
    margin-right: 0.5rem;
    min-width: 60px;
  }
  
  .link-url {
    flex-wrap: wrap;
  }
  
  .url-text {
    width: 100%;
    margin: 0.25rem 0;
    white-space: normal;
    word-break: break-all;
    line-height: 1.4;
  }
  
  .links-tabs {
    padding: 0.75rem;
    justify-content: flex-start;
    overflow-x: auto;
  }
  
  .tab-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    flex-shrink: 0;
  }
  
  .password-container {
    max-width: 100%;
    overflow: hidden;
  }
  
  .image-grid {
    gap: 0.75rem;
  }
  
  .image-preview-container {
    height: 120px;
  }
  
  .resource-header .header-content {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .action-buttons {
    justify-content: space-around;
    margin-top: 1rem;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .btn-text {
    display: none;
  }
  
  .btn-custom {
    padding: 0.5rem 0.75rem;
    min-width: 42px;
    height: 42px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .action-buttons .btn-custom i {
    font-size: 1.25rem;
    margin: 0;
  }
  
  .btn-like {
    padding: 0.5rem 0.75rem;
    min-width: 42px;
    border-radius: var(--border-radius);
  }
  
  .like-count {
    position: absolute;
    top: -5px;
    right: -5px;
    margin-left: 0;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    background: var(--accent-color);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  
  .sticker-preview-area {
    height: 250px;
  }
  
  .tmdb-id-info {
    margin-top: 8px;
  }
  
  .draggable-grid {
    gap: 0.75rem;
  }
  
  .url-input-group {
    flex-direction: column;
  }
  
  .add-url-btn {
    width: auto !important;
    margin: 0 auto;
    padding: 0.75rem 1.25rem !important;
    border-radius: var(--border-radius) !important;
    height: auto !important;
    min-width: 150px;
  }
  
  .dropzone-content .btn-custom {
    width: auto !important;
    height: auto !important;
    border-radius: var(--border-radius) !important;
  }
  
  .dropzone-content .btn-text,
  .dropzone-content .file-btn-text {
    display: inline !important;
  }

  .dropzone-content .btn-custom i {
    margin-right: 0.5rem !important;
  }
  
  /* 特别针对添加网盘链接和保存修改按钮的覆盖样式 */
  .btn-custom.add-url-btn,
  .add-url-btn,
  .btn-custom.add-link-btn,
  .add-link-btn,
  .btn-custom.btn-outline.add-link-btn,
  button[class*="add-url-btn"],
  button[class*="add-link-btn"] {
    width: auto !important;
    min-width: 150px !important;
    height: auto !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: var(--border-radius) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* 确保按钮内的文本可见 */
  .btn-custom.add-url-btn .btn-text,
  .add-url-btn .btn-text,
  .btn-custom.add-link-btn .btn-text,
  .add-link-btn .btn-text,
  .btn-custom.btn-outline.add-link-btn .btn-text,
  button[class*="add-url-btn"] .btn-text,
  button[class*="add-link-btn"] .btn-text {
    display: inline-block !important;
    margin-left: 0.5rem !important;
  }
}

@media (max-width: 576px) {
  .resource-header {
    padding: 1.25rem;
  }
  
  .title-wrapper {
    align-items: flex-start;
    gap: 0.5rem;
  }

  .title {
    font-size: 1.5rem;
    line-height: 1.3;
    max-width: calc(100% - 85px);
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .title::after {
    width: 60px;
  }
  
  .media-section {
    padding: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .main-image-container {
    max-height: 380px;
    border-radius: 8px;
  }
  
  .thumbnail {
    flex: 0 0 50px;
    height: 50px;
    min-width: 50px;
  }
  
  .table-row {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .col-link, .col-password, .col-note {
    padding: 0.35rem 0;
  }
  
  .description-card, .links-card {
    margin-bottom: 1.5rem;
  }
  
  .card-header {
    padding: 0.75rem;
    overflow: visible; /* 确保不会截断按钮 */
  }
  
  .card-header h3 {
    font-size: 1.1rem;
  }
  
  .card-body {
    padding: 0.75rem;
  }
  
  .resource-detail {
    padding: 0 0.5rem;
  }

  .links-tabs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .tab-btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }
  
  .thumbnails-container {
    margin-bottom: 1rem;
  }
  
  .thumbnails-scroll {
    padding: 0.25rem 0;
    margin: 0;
    min-height: 80px;
  }
  
  .resource-content {
    gap: 1rem;
    margin-top: 1rem;
  }
  
  .main-image-container {
    max-height: 300px;
  }
  
  .thumbnails-container {
    padding: 0.3rem;
  }
  
  .resource-info h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .info-section .meta-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .description-section, 
  .resource-links-section {
    padding: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .description-section h3,
  .resource-links-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .link-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .file-upload-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .sticker-preview-area {
    height: 200px;
  }
  
  .save-btn {
    min-width: 150px;
    width: auto;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius) !important;
    height: auto !important;
  }
  
  /* 特别针对添加网盘链接按钮的覆盖样式 */
  .btn-custom.add-url-btn,
  .add-url-btn,
  .btn-custom.add-link-btn,
  .add-link-btn,
  .btn-custom.btn-outline.add-link-btn,
  button[class*="add-url-btn"],
  button[class*="add-link-btn"] {
    width: auto !important;
    min-width: 140px !important;
    height: auto !important;
    padding: 0.6rem 1rem !important;
    border-radius: var(--border-radius) !important;
    display: inline-flex !important;
    align-items: center !important;
    border-radius: 50%;
    justify-content: center !important;
  }
  
  .link-item {
    padding: 0.5rem;
  }
} 

/* ===== 17. 贴纸容器样式 ===== */
.stickers-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  pointer-events: none; /* 允许点击穿透到下层元素 */
  z-index: 1000; /* 确保贴纸显示在其他元素之上，包括顶栏 */
}

/* 确保贴纸本身可以接收交互事件 */
.stickers-container .draggable-sticker {
  pointer-events: auto;
}

/* ===== 18. 编辑模式样式 ===== */
/* 资源类型选项 */
.resource-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.resource-type-option {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(124, 58, 237, 0.1);
  border-radius: 100px;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.resource-type-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  opacity: 0.7;
}

.resource-type-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.3);
}

.resource-type-option.selected {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.option-text {
  position: relative;
  z-index: 1;
}

.check-icon {
  margin-left: 0.25rem;
  color: white;
  font-size: 0.9rem;
}

.selected-types-preview {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.selected-type-text {
  font-weight: 600;
  color: var(--primary-color);
}

/* 小节标题 */
.section-subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark-color);
  display: flex;
  align-items: center;
}

.section-subtitle::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--primary-gradient);
  margin-right: 0.5rem;
  border-radius: 50%;
}

/* 图片管理部分 */
.image-management-section {
  margin-bottom: 1.5rem;
}

.image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  margin-bottom: 1rem;
}

.image-item {
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 150px;
  margin-bottom: 0.75rem;
}

.image-item:hover {
  transform: translateY(-5px);
}

.image-item.is-poster {
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
}

.image-preview-container {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.image-preview-container:hover .image-preview {
  transform: scale(1.1);
}

.image-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 0.75rem;
}

.image-preview-container:hover .image-overlay {
  opacity: 1;
}

.image-action-btn {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-action-btn:hover {
  background: white;
  transform: translateY(-2px);
}

.image-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.set-poster-btn {
  color: var(--primary-color);
}

.remove-btn {
  color: var(--accent-color);
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary-gradient);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.drag-hint {
  font-size: 0.85rem;
  color: var(--gray-color);
  text-align: center;
  margin-top: 0.5rem;
}

/* 上传方式切换 */
.upload-method-tabs {
  display: flex;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.method-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--gray-color);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.method-tab:first-child {
  border-right: 1px solid rgba(99, 102, 241, 0.1);
}

.method-tab:hover {
  background: rgba(99, 102, 241, 0.05);
  color: var(--primary-color);
}

.method-tab.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  font-weight: 600;
}

.method-tab i {
  font-size: 1.1rem;
}

/* URL上传容器 */
.url-upload-container {
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.url-input-group {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.url-hints {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.url-error {
  color: var(--accent-color);
}

.url-tip {
  color: var(--gray-color);
}

.add-url-btn {
  white-space: nowrap;
  width: auto;
  min-width: 200px;
  height: auto;
  border-radius: var(--border-radius);
}

/* 上传进度 */
.upload-progress {
  margin-top: 1.5rem;
}

.progress-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--gray-color);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(124, 58, 237, 0.3);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.progress-bar-container {
  height: 8px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 100px;
  transition: width 0.3s ease;
  text-align: center;
  font-size: 0.7rem;
  color: white;
  line-height: 8px;
}

/* 拖拽相关 */
.image-item .drag-handle {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 24px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-item:hover .drag-handle {
  opacity: 0.9;
}

.image-item .drag-handle i {
  color: var(--dark-color);
  font-size: 14px;
}

.image-ghost {
  opacity: 0.6;
  background: rgba(124, 58, 237, 0.1);
  border: 2px dashed var(--primary-color);
}

/* 修复拖拽排序的布局 */
.draggable-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

/* 链接编辑相关 */
.links-edit-card {
  background: var(--glass-background);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  margin-bottom: 1.5rem;
}

.link-info-text {
  margin-bottom: 1.25rem;
  color: var(--gray-color);
  font-size: 0.95rem;
}

.drag-tip {
  display: block;
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--primary-color);
}

.empty-links {
  text-align: center;
  padding: 2rem 0;
  color: var(--gray-color);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.links-list {
  margin-bottom: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* 为链接列表添加滚动条样式 */
.links-list::-webkit-scrollbar {
  width: 6px;
}

.links-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.links-list::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 10px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
}

.link-inputs {
  display: grid;
  grid-template-columns: 5fr 2fr 3fr;
  gap: 1rem;
  flex: 1;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.input-prefix {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-color);
  margin-bottom: 0.25rem;
}

.remove-link-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  transition: all 0.2s ease;
}

.remove-link-btn:hover {
  transform: scale(1.2);
  color: var(--accent-color-dark);
}

.add-link-container {
  text-align: center;
}

/* 确保添加网盘链接按钮始终具有正确的形状 */
.add-link-btn,
.add-url-btn {
  width: auto;
  min-width: 200px;
  border-radius: var(--border-radius);
  height: auto;
  white-space: nowrap;
}

.link-ghost {
  opacity: 0.6;
  background: rgba(124, 58, 237, 0.05);
  border: 2px dashed var(--primary-color);
}

/* 保存错误提示 */
.save-error {
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-color);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 确保在不同屏幕尺寸下保持合适的间距 */
@media (max-width: 768px) {
  .image-grid, .draggable-grid {
    gap: 0.5rem;
    justify-content: space-between;
  }
  
  .image-item {
    width: calc(33.33% - 10px);
    margin-bottom: 10px;
  }
  
  .link-item {
    flex-direction: column;
    padding: 0.75rem;
  }
  
  .links-list {
    max-height: 350px; /* 移动端稍微减小高度 */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* 增强移动端滚动体验 */
  }
  
  .link-inputs {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  .input-group {
    margin-bottom: 8px;
  }
  
  .save-btn {
    min-width: 180px;
    width: auto;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius) !important;
    height: auto !important;
  }
  
  .form-actions {
    display: flex;
    justify-content: center;
    padding-top: 1.5rem;
  }
  
  .add-url-btn {
    width: auto !important;
    margin: 0 auto;
    padding: 0.75rem 1.25rem !important;
    border-radius: var(--border-radius) !important;
    height: auto !important;
    min-width: 150px;
  }
}

@media (max-width: 576px) {
  .image-grid, .draggable-grid {
    gap: 0.5rem;
    justify-content: space-between;
  }
  
  .image-item {
    width: calc(50% - 5px);
    margin-bottom: 10px;
  }
  
  .save-btn {
    min-width: 150px;
    width: auto;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius) !important;
    height: auto !important;
  }
  
  .link-item {
    padding: 0.5rem;
  }
} 

/* ===== 19. 网盘搜索功能样式 ===== */
/* 标题栏中的操作按钮容器 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 10; /* 确保按钮在最上层 */
}

/* 网盘搜索按钮 */
.pan-search-button {
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 15px;
  display: flex;
  align-items: center;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
  z-index: 20; /* 确保按钮在最上层 */
}

.pan-search-button:hover {
  background-color: #5a6268;
}

.pan-search-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.pan-search-button i {
  margin-right: 5px;
}

/* 搜索结果指示器 */
.search-results-indicator {
  background-color: #f8f9fa;
  border-left: 3px solid #007bff;
  padding: 8px 15px;
  font-size: 14px;
  color: #6c757d;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center; /* 改为居中显示 */
  position: relative; /* 添加相对定位 */
}

/* 搜索结果数量样式 */
.search-results-count {
  font-weight: bold;
  color: #007bff;
  margin-left: 5px;
  display: inline-block; /* 确保内联显示 */
}

/* 异步更新指示器 */
.async-update-indicator {
  font-size: 12px;
  color: #007bff;
  display: flex;
  align-items: center;
  gap: 5px;
  position: absolute; /* 绝对定位 */
  right: 15px; /* 固定在右侧 */
}

/* 旋转动画 */
.spin {
  animation: spin 1.5s linear infinite;
}

/* 空搜索结果提示 */
.empty-search-results {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 20px;
  text-align: center;
  color: #6c757d;
  margin: 15px 0;
}

.empty-search-results i {
  font-size: 24px;
  margin-right: 10px;
  color: #dc3545;
}

/* 搜索错误消息 */
.search-error-message {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 10px 15px;
  margin-bottom: 15px;
  color: #721c24;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-error-message i {
  font-size: 18px;
  color: #dc3545;
}

/* 网盘搜索功能的响应式适配 */
@media (max-width: 768px) {
  /* .header-actions {
    flex-direction: row;
    gap: 8px;
  } */
  
  .pan-search-button, .stream-button {
    padding: 4px 10px;
    font-size: 0.9rem;
  }
  
  .links-list {
    max-height: 350px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 576px) {
  /* .header-actions {
    flex-direction: row; 
    width: 100%;
    gap: 6px;
    margin-top: 8px; 
  } */
  
  .pan-search-button, .stream-button {
    width: auto; /* 不要占满整行 */
    justify-content: center;
    padding: 4px 8px;
    font-size: 0.85rem;
  }
} 