/* database.css */
.db-body { background: var(--bg); color: var(--ink); min-height: 100vh; }
.db-body .container { max-width: 1320px; padding: 0 5vw; }
@media (max-width: 720px) { .db-body .container { padding: 0 20px; } }

.db-hero {
  background: var(--paper);
  border-bottom: 3px solid var(--line);
  padding: 32px 0 28px;
  position: relative;
  overflow: hidden;
}
.db-hero-inner { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.db-back-link {
  font-family: 'DotGothic16'; font-size: 12px; letter-spacing: 0.1em;
  color: var(--ink); text-decoration: none;
  border: 2px solid var(--line); padding: 8px 14px; background: #fff;
  display: inline-block; box-shadow: 3px 3px 0 var(--line); margin-bottom: 16px;
}
.db-back-link:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--line); }
.db-title { font-family: 'Zen Antique'; font-size: 44px; line-height: 1.15; margin: 0; }
.db-title small { display: block; font-family: 'DotGothic16'; font-size: 13px; letter-spacing: 0.15em; color: var(--accent-orange); margin-bottom: 4px; }
.db-stats { font-family: 'DotGothic16'; font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.db-stats b { color: var(--accent-orange); font-size: 22px; font-family: 'Zen Antique'; vertical-align: -2px; margin: 0 4px; }

.db-toolbar {
  background: #fff; border-bottom: 2px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  padding: 14px 0;
}
.db-toolbar-inner { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.db-search {
  flex: 1; min-width: 240px;
  display: flex; align-items: center; gap: 8px;
  border: 2px solid var(--line); background: var(--paper);
  padding: 8px 12px; box-shadow: 3px 3px 0 var(--line);
}
.db-search input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-family: 'Zen Kaku Gothic New'; font-size: 14px; color: var(--ink);
}
.db-search-icon { font-family: 'DotGothic16'; color: var(--muted); }
.db-sort { display: flex; gap: 6px; }
.db-sort button {
  font-family: 'DotGothic16'; font-size: 11px; letter-spacing: 0.05em;
  border: 2px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 12px; cursor: pointer;
}
.db-sort button.active { background: var(--ink); color: var(--paper); }

.db-section { padding: 36px 0 80px; }

.db-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px;
}
@media (max-width: 1100px) { .db-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
@media (max-width: 720px) { .db-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (max-width: 480px) { .db-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.db-cell { aspect-ratio: 5 / 7; }
.db-empty {
  text-align: center; padding: 80px 20px;
  font-family: 'DotGothic16'; color: var(--muted); letter-spacing: 0.1em;
}

.db-pagination {
  margin-top: 48px; display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap;
}
@media (max-width: 720px) { .db-pagination { margin-top: 72px; } }
@media (max-width: 480px) { .db-pagination { margin-top: 88px; } }
.db-pagination button {
  min-width: 38px; height: 38px;
  border: 2px solid var(--line); background: #fff; color: var(--ink);
  font-family: 'DotGothic16'; font-size: 13px; cursor: pointer;
  padding: 0 12px;
}
.db-pagination button:hover:not(:disabled) { background: var(--paper); }
.db-pagination button.active { background: var(--accent-orange); color: #fff; border-color: var(--accent-orange); }
.db-pagination button:disabled { opacity: 0.35; cursor: not-allowed; }
.db-pagination .ellipsis { padding: 0 6px; color: var(--muted); font-family: 'DotGothic16'; }
.db-page-info { text-align: center; margin-top: 12px; font-family: 'DotGothic16'; font-size: 11px; color: var(--muted); letter-spacing: 0.1em; }

/* Video card (special promo) */
.card-video-face { position: relative; overflow: hidden; }
.card-video-face video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.card-video-frame {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 8px 10px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.7) 100%);
  color: #FFF6E0;
}
.card-video-no {
  font-family: 'DotGothic16', monospace;
  font-size: 10px; letter-spacing: 0.08em;
  align-self: flex-start;
  background: rgba(15,11,7,0.7);
  border: 1px solid rgba(255,246,224,0.35);
  padding: 2px 6px;
}
.card-video-tag {
  position: absolute; top: 8px; right: 10px;
  font-family: 'DotGothic16', monospace;
  font-size: 10px; letter-spacing: 0.1em;
  background: var(--accent-orange);
  color: #FFF6E0;
  padding: 2px 6px;
  border: 1px solid rgba(255,246,224,0.6);
}
.card-video-name {
  font-family: 'Zen Antique', serif;
  font-size: 14px;
  line-height: 1.2;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  margin: 0;
}
