/* ================= 资源页（番剧 / 小说） ================= */

/* 添加资源入口 */
.resource-addbar {
  margin: 1rem 0 0.6rem;
  text-align: right;
}

.resource-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 11px;
  font-size: 13px;
  color: #fff !important;
  text-decoration: none;
  background: linear-gradient(135deg, #49b1f5, #3b9fe0);
  box-shadow: 0 4px 12px rgba(73, 177, 245, 0.28);
  transition: box-shadow 0.2s, transform 0.2s;
}

.resource-add-btn:hover {
  box-shadow: 0 6px 16px rgba(73, 177, 245, 0.42);
  transform: translateY(-1px);
  color: #fff !important;
}

.resource-search {
  display: block;
  width: 100%;
  margin: 1rem 0 1.2rem;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(128, 128, 128, 0.3);
  background: rgba(255, 255, 255, 0.7);
  color: var(--font-color);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.resource-search:focus {
  outline: none;
  border-color: #49b1f5;
  box-shadow: 0 0 0 3px rgba(73, 177, 245, 0.18);
}

[data-theme='dark'] .resource-search {
  background: rgba(0, 0, 0, 0.25);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85) 0%, rgba(238, 247, 255, 0.7) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 6px 20px rgba(64, 128, 180, 0.14);
  transition: transform 0.25s, box-shadow 0.25s;
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(64, 128, 180, 0.24);
}

[data-theme='dark'] .resource-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, rgba(30, 33, 40, 0.9) 0%, rgba(24, 32, 44, 0.85) 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 封面区 */
.resource-cover {
  height: 128px;
  background-size: cover;
  background-position: center;
  flex: none;
}

.resource-cover.no-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #a8d8f5, #7cb8e8);
}

.resource-cover.no-cover span {
  font-size: 40px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 卡片内容 */
.resource-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
  flex: 1;
}

.resource-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resource-tag {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(73, 177, 245, 0.14);
  color: #2f7fc1;
}

[data-theme='dark'] .resource-tag {
  color: #7cc4f8;
}

.resource-descr {
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.72;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 链接按钮 */
.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 9px;
  font-size: 12px;
  text-decoration: none;
  color: #fff !important;
  background: linear-gradient(135deg, #49b1f5, #3b9fe0);
  transition: box-shadow 0.2s, transform 0.2s;
}

.resource-link:hover {
  box-shadow: 0 4px 12px rgba(73, 177, 245, 0.4);
  transform: translateY(-1px);
  color: #fff !important;
}

.resource-nolink {
  font-size: 12px;
  opacity: 0.5;
}

.resource-empty {
  padding: 28px 0;
  text-align: center;
  font-size: 13px;
  opacity: 0.65;
}

.hidden {
  display: none !important;
}
