*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #0d0d0d;
  color: #e0e0e0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
}

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

/* ---- Layout ---- */
.page-header {
  padding: 40px 20px 24px;
  max-width: 900px;
  margin: 0 auto;
  border-bottom: 1px solid #222;
}

.page-header .kicker {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: #00ffaa;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.page-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.page-header .description {
  font-size: 0.8rem;
  color: #888;
  max-width: 560px;
}

/* ---- Controls ---- */
.controls {
  max-width: 900px;
  margin: 24px auto 0;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-input {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 8px 12px;
  color: #e0e0e0;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: #00ffaa; }
.search-input::placeholder { color: #555; }

.sort-select {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 8px 10px;
  color: #aaa;
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.sort-select:focus { border-color: #00ffaa; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-label {
  font-size: 0.7rem;
  color: #555;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.chip {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  color: #aaa;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.chip:hover { border-color: #555; color: #ddd; }
.chip.active {
  background: rgba(0,255,170,0.12);
  border-color: #00ffaa;
  color: #00ffaa;
}

/* ---- Result count ---- */
.result-meta {
  max-width: 900px;
  margin: 20px auto 0;
  padding: 0 20px;
  font-size: 0.72rem;
  color: #555;
}

/* ---- Grid ---- */
.video-grid {
  max-width: 900px;
  margin: 16px auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ---- Card ---- */
.video-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid #222;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.15s;
}
.video-card:hover {
  border-color: #444;
  transform: translateY(-2px);
}

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
}
.card-thumb .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  background: rgba(0,0,0,0.35);
}
.video-card:hover .play-overlay { opacity: 1; }
.play-overlay svg {
  width: 40px;
  height: 40px;
  fill: #fff;
  filter: drop-shadow(0 0 6px rgba(0,0,0,0.8));
}

.card-thumb .featured-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #00ffaa;
  color: #000;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 3px;
}

.card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-summary {
  font-size: 0.82rem;
  color: #ccc;
  line-height: 1.65;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.card-tag {
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.68rem;
  color: #888;
}

.card-clubs {
  font-size: 0.72rem;
  color: #666;
}

.card-footer {
  margin-top: auto;
  padding-top: 4px;
}
.watch-btn {
  display: inline-block;
  background: rgba(0,255,170,0.1);
  border: 1px solid rgba(0,255,170,0.3);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.75rem;
  color: #00ffaa;
  transition: background 0.15s;
  cursor: pointer;
}
.watch-btn:hover { background: rgba(0,255,170,0.2); }

/* ---- Empty state ---- */
.empty-state {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
  color: #444;
  font-size: 0.85rem;
  display: none;
}
.empty-state.visible { display: block; }

/* ---- Mobile ---- */
@media (max-width: 500px) {
  .page-header h1 { font-size: 1.2rem; }
  .video-grid { grid-template-columns: 1fr; }
  .search-row { flex-direction: column; align-items: stretch; }
  .sort-select { width: 100%; }
}
