/* DeepSeek 表情包页样式（复用 style.css 的变量与基础组件） */

/* 通用：hidden 属性必须真的隐藏（.btn 的 display 会覆盖 UA 样式） */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.memes-hero {
  padding: 3.5rem 0 1rem;
}

.memes-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  margin: 0.25rem 0 0.75rem;
}

.memes-hero .lede {
  max-width: 40rem;
  color: var(--muted, #5b5b56);
}

.memes-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted, #5b5b56);
  font-variant-numeric: tabular-nums;
}

.notice-banner {
  margin: 1rem 0;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  border: 1px solid #e6c07b;
  background: #fdf6e3;
  color: #6b4e00;
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  .notice-banner {
    background: #2a2417;
    border-color: #6b5a32;
    color: #f0d9a0;
  }
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 1.25rem;
}

.tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--surface-2, #efeee8);
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--muted, #5b5b56);
  cursor: pointer;
}

.tab.is-active {
  background: var(--surface, #fff);
  color: var(--text, #17171a);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.search input {
  width: min(16rem, 60vw);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border, #dedcd4);
  background: var(--surface, #fff);
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
}

.memes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}

.meme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e7e5dd);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.meme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.meme-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--surface-2, #f3f2ec);
  cursor: zoom-in;
}

.meme-body {
  padding: 0.6rem 0.7rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.meme-title {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted, #5b5b56);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.3em;
  margin: 0;
}

.meme-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  row-gap: 0.4rem;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border, #dedcd4);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  color: inherit;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.like-btn[aria-pressed="true"] {
  background: #ffe8e8;
  border-color: #ffb3b3;
  color: #b3261e;
}

@media (prefers-color-scheme: dark) {
  .like-btn[aria-pressed="true"] {
    background: #3a1e1e;
    border-color: #7a3838;
    color: #ff9b9b;
  }
}

.icon-btn {
  margin-left: auto;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  white-space: nowrap;
}

.icon-btn button {
  appearance: none;
  white-space: nowrap;
  border: 1px solid var(--border, #dedcd4);
  background: transparent;
  color: inherit;
  border-radius: 8px;
  padding: 0.28rem 0.5rem;
  font-size: 0.72rem;
  cursor: pointer;
  line-height: 1.2;
}

.icon-btn button:hover {
  background: var(--surface-2, #f3f2ec);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 2rem 0 1rem;
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.empty {
  padding: 3rem 0;
  text-align: center;
  color: var(--muted, #5b5b56);
}

.disclaimer {
  margin: 3rem 0 4rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--surface-2, #f3f2ec);
  font-size: 0.88rem;
  line-height: 1.8;
}

.disclaimer h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.disclaimer ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted, #5b5b56);
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: rgba(10, 10, 12, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(92vw, 900px);
  max-height: 74vh;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.lightbox-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  color: #eaeaea;
  font-size: 0.85rem;
  max-width: 900px;
  width: 100%;
  justify-content: space-between;
}

.lightbox-actions {
  display: flex;
  gap: 0.5rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 40rem) {
  .memes-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }

  .memes-hero {
    padding-top: 2.5rem;
  }
}

/* 来源链接（和下载/复制同风格） */
.icon-btn .src-link {
  appearance: none;
  white-space: nowrap;
  border: 1px solid var(--border, #dedcd4);
  background: transparent;
  color: inherit;
  border-radius: 8px;
  padding: 0.28rem 0.5rem;
  font-size: 0.72rem;
  line-height: 1.2;
  text-decoration: none;
}

.icon-btn .src-link:hover {
  background: var(--surface-2, #f3f2ec);
}
