/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
  --bg: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-tab: #0a0a15;
  --text: #fff;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --accent: #e94560;
  --tab-height: 50px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ============================================
   Bottom Tab Bar
   ============================================ */
#tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tab-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-tab);
  display: flex;
  align-items: stretch;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 900;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
}

.tab-item.active {
  color: var(--accent);
}

.tab-item:active {
  opacity: 0.7;
}

.tab-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.tab-label {
  font-size: 10px;
  line-height: 1;
  font-weight: 500;
}

/* ============================================
   Page Containers
   ============================================ */
.page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.page-content {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 8px);
}

/* ============================================
   Category Tabs (Home Page)
   ============================================ */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 12px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.category-tabs::-webkit-scrollbar { display: none; }

/* 右侧渐变遮罩提示可滚动 */
.category-tabs-shell {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}
.category-tabs-shell::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 0;
  width: 40px;
  height: 28px;
  background: linear-gradient(90deg, transparent, var(--bg) 80%);
  pointer-events: none;
  transition: opacity 0.3s;
}
.category-tabs-shell.scrolled::after { opacity: 0; }

.category-tab {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-tab.active {
  color: #fff;
  background: var(--accent);
}

.category-tab:active {
  transform: scale(0.95);
}

/* ============================================
   Section Title
   ============================================ */
.section-title {
  font-size: 16px;
  font-weight: 600;
  padding: 16px 12px 10px;
}

/* ============================================
   Video Card Grid
   ============================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 8px;
}

.video-card {
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.video-card:active {
  transform: scale(0.97);
}

.video-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.video-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  transition: opacity 0.3s ease;
}

.video-card-cover img.loading {
  opacity: 0;
}

/* Duration badge */
.duration-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* VIP badge */
.vip-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: linear-gradient(135deg, #f5af19, #f12711);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.3;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.video-card-body {
  padding: 8px 10px 10px;
}

.video-card-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.video-card-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ============================================
   Video Detail Overlay
   ============================================ */
.detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.detail-overlay.visible,
.detail-overlay.active {
  transform: translateY(0);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}

.back-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.back-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

.detail-header-title {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Video player area */
.video-player-area {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
}

.video-player-area video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Detail info */
.detail-info {
  padding: 14px 14px 0;
}

.detail-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.detail-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Detail player wrap */
.detail-player-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.detail-player-wrap video,
.detail-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.detail-close-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}
.detail-close-btn:active { background: rgba(255,255,255,0.1); }
.detail-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 40px;
}
.detail-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.detail-section-title {
  font-size: 15px;
  font-weight: 600;
  padding: 14px 12px 8px;
}
.detail-type {
  font-size: 12px;
  color: var(--accent);
  padding: 4px 0;
}

/* Recommend section in detail */
.detail-recommend {
  padding-bottom: 20px;
}

.detail-recommend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 8px;
}
.detail-recommend-grid .video-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
}
.detail-recommend-grid .video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-recommend-grid .video-card-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 3px;
}
.detail-recommend-grid .video-card-vip {
  position: absolute;
  top: 4px;
  left: 4px;
  background: linear-gradient(135deg, #f5af19, #f12711);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}
.detail-recommend-grid .video-card-title {
  font-size: 12px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-recommend-grid .video-card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================
   Comic Tabs
   ============================================ */
.comic-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 12px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.comic-tabs::-webkit-scrollbar { display: none; }
.comic-tab {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  white-space: nowrap;
  transition: all 0.2s ease;
}
.comic-tab.active {
  color: #fff;
  background: var(--accent);
}

.comic-card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.comic-page-inner {
  min-height: 100%;
}

.loading-spinner {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 13px;
}
.loading-spinner::after {
  content: '加载中...';
}

.scroll-sentinel {
  height: 1px;
}

/* ============================================
   Mine Page
   ============================================ */
.mine-page {
  padding-top: 20px;
}
.mine-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
}
.mine-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.mine-name { font-size: 18px; font-weight: 600; }
.mine-desc { font-size: 13px; color: var(--text-secondary); }
.mine-stats {
  display: flex;
  justify-content: space-around;
  padding: 16px 0;
  margin: 0 16px;
  background: var(--bg-card);
  border-radius: 12px;
}
.mine-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.mine-stat-num { font-size: 20px; font-weight: 700; }
.mine-stat-label { font-size: 12px; color: var(--text-secondary); }
.mine-menu { margin: 16px; }
.mine-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
}
.mine-menu-item:active { background: rgba(255,255,255,0.08); }
.mine-arrow { margin-left: auto; color: var(--text-secondary); font-size: 18px; }
.mine-footer {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.short-poster {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
  pointer-events: none;
  background: #000;
}

.short-tap-area {
  position: absolute;
  top: 0;
  left: 0;
  right: 60px;
  bottom: 0;
}

/* ============================================
   Comic Card Grid
   ============================================ */
.comic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 10px;
  overflow: hidden;
}

.comic-card {
  cursor: pointer;
  transition: transform 0.15s ease;
  min-width: 0;
  overflow: hidden;
}

.comic-card:active {
  transform: scale(0.96);
}

.comic-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
}

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

.chapter-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  text-align: right;
}

.comic-card-title {
  font-size: 12px;
  font-weight: 500;
  margin-top: 6px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   Comic Detail Overlay
   ============================================ */
.comic-detail-cover {
  position: relative;
  width: 100%;
  padding: 16px;
  display: flex;
  gap: 14px;
}

.comic-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comic-detail-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 0;
}

.comic-detail-info {
  padding: 0 14px;
}

.comic-chapter-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.comic-chapter-btn {
  padding: 8px 4px;
  background: var(--bg-card);
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.comic-chapter-btn.active,
.comic-chapter-btn:active {
  color: var(--accent);
  background: rgba(233, 69, 96, 0.12);
}

/* Comic detail overlay */
.comic-detail-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.comic-detail-overlay.active {
  transform: translateY(0);
}
.comic-detail-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.comic-detail-close-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; flex-shrink: 0;
}
.comic-detail-close-btn:active { background: rgba(255,255,255,0.1); }
.comic-detail-bar-title {
  font-size: 15px;
  font-weight: 600;
}
.comic-detail-cover-img {
  width: 100px;
  aspect-ratio: 3/4;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.comic-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.comic-detail-stats {
  font-size: 12px;
  color: var(--text-secondary);
}
.comic-detail-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
}
.comic-detail-view {}
.comic-detail-header {
  display: flex;
  gap: 14px;
  padding: 0 14px 14px;
}
.comic-detail-header img {
  width: 100px;
  aspect-ratio: 3/4;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.comic-detail-header-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.comic-detail-header-info h1 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}
.comic-detail-header-info .detail-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.comic-detail-header-info .detail-stats { font-size: 12px; color: var(--text-secondary); }
.comic-detail-summary {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 0 14px 14px;
  line-height: 1.5;
}
.comic-read-btn {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.comic-read-btn:active { opacity: 0.8; }

.comic-related-section { padding: 0 14px; }
.comic-related-section h2 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.comic-related-card {
  flex-shrink: 0;
  width: 90px;
  cursor: pointer;
}
.comic-related-cover {
  aspect-ratio: 3/4;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
}
.comic-related-cover img { width: 100%; height: 100%; object-fit: cover; }
.comic-related-title {
  font-size: 11px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Comic reader */
.comic-reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  position: sticky;
  top: 0;
  background: rgba(0,0,0,0.85);
  z-index: 10;
  backdrop-filter: blur(8px);
}
.comic-reader-back-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.comic-reader-back-btn:active { background: rgba(255,255,255,0.1); }
.comic-reader-progress {
  font-size: 13px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.comic-reader-body {
  background: #000;
}
.comic-reader-page {
  width: 100%;
}
.comic-reader-page img {
  width: 100%;
  height: auto;
  display: block;
  min-height: 200px;
  background: #111;
}

/* Comic related horizontal scroll */
.comic-related-scroll {
  display: flex;
  gap: 10px;
  padding: 0 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.comic-related-scroll::-webkit-scrollbar {
  display: none;
}

.comic-related-scroll .comic-card {
  flex-shrink: 0;
  width: 100px;
}

/* Comic reader */
.comic-reader {
  background: #000;
}

.comic-reader-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.comic-reader-pages img {
  width: 100%;
  height: auto;
}

/* ============================================
   Short Video Page (Vertical Snap)
   ============================================ */
.short-video-item {
  scroll-snap-align: start;
  width: 100%;
  height: calc(100vh - var(--tab-height) - var(--safe-bottom));
  position: relative;
  background: #000;
  flex-shrink: 0;
}

.short-video-item video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.short-video-info {
  position: absolute;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 16px);
  left: 0;
  right: 60px;
  padding: 0 14px;
  z-index: 2;
}

.short-video-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 6px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.short-video-author {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Side action bar for short video */
.short-video-actions {
  position: absolute;
  right: 10px;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 3;
}

.short-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
}

.short-action-btn svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

.short-action-btn span {
  font-size: 11px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Tag Pills
   ============================================ */
/* Search bar */
.search-bar {
  padding: 10px 12px 0;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 8px 14px;
  border: none;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  outline: none;
  -webkit-appearance: none;
}
.search-input::placeholder { color: var(--text-secondary); }
.search-input:focus { box-shadow: 0 0 0 1px var(--accent); }
.search-results {
  position: absolute;
  top: 100%;
  left: 12px;
  right: 12px;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 20;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}
.search-result-item {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.search-result-item:active { background: rgba(255,255,255,0.06); }
.search-count { font-size: 12px; color: var(--text-secondary); }
.search-empty { padding: 16px; text-align: center; color: var(--text-secondary); font-size: 13px; }

/* Video card tags */
.video-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.video-card-tag {
  font-size: 10px;
  padding: 1px 6px;
  background: rgba(233, 69, 96, 0.15);
  color: var(--accent);
  border-radius: 8px;
  white-space: nowrap;
}

/* Tag navigation bar */
.tag-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(233, 69, 96, 0.12);
  border-radius: 8px;
  margin: 0 8px 8px;
}
.tag-nav-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.tag-nav-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  color: var(--text-secondary);
}
.tag-nav-close:active { background: rgba(255,255,255,0.1); }

.tag-pill {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: background 0.2s ease;
}

.tag-pill:active {
  background: rgba(255, 255, 255, 0.14);
}

/* ============================================
   Mine Page
   ============================================ */
.mine-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 16px 20px;
}

.mine-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mine-avatar svg {
  width: 28px;
  height: 28px;
  color: var(--text-secondary);
}

.mine-name {
  font-size: 18px;
  font-weight: 600;
}

.mine-stats {
  display: flex;
  justify-content: space-around;
  padding: 16px 0;
  margin: 0 16px;
  background: var(--bg-card);
  border-radius: 12px;
}

.mine-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mine-stat-value {
  font-size: 20px;
  font-weight: 700;
}

.mine-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.mine-menu {
  margin: 16px;
}

.mine-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  transition: background 0.15s ease;
}

.mine-menu-item:active {
  background: rgba(255, 255, 255, 0.08);
}

.mine-menu-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

/* ============================================
   Skeleton Loading
   ============================================ */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border-radius: 8px;
}

.skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent 100%
  );
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.skeleton-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.skeleton-title {
  height: 14px;
  margin: 10px 10px 0;
  width: 80%;
  border-radius: 4px;
}

.skeleton-meta {
  height: 10px;
  margin: 6px 10px 10px;
  width: 50%;
  border-radius: 4px;
}

.skeleton-comic-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
}

.skeleton-comic-title {
  height: 12px;
  margin-top: 6px;
  width: 70%;
  border-radius: 4px;
}

/* Skeleton card wrapper */
.skeleton-card {
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
}

/* ============================================
   Transitions
   ============================================ */
.fade-in {
  animation: fadeIn 0.25s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-up {
  animation: slideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
.page-content::-webkit-scrollbar {
  width: 0;
  display: none;
}

.page-content {
  scrollbar-width: none;
}

/* ============================================
   Responsive: Tablet / wider phones
   ============================================ */
@media (min-width: 480px) {
  .video-grid {
    gap: 10px;
    padding: 0 12px;
  }

  .comic-grid {
    gap: 10px;
    padding: 0 12px;
  }

  .video-card-title {
    font-size: 14px;
  }
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 16px;
  }

  .comic-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 16px;
  }

  .comic-chapter-list {
    grid-template-columns: repeat(6, 1fr);
  }

  .category-tabs {
    padding: 14px 16px 10px;
  }

  .section-title {
    padding: 18px 16px 12px;
  }
}
