@charset "utf-8";

/* =========================================
   1. 共通変数定義 (:root)
   ========================================= */
:root {
  --bg-color: #1a1a1a;
  --bg-card: #252525;
  --text-main: #e0e0e0;
  --text-sub: #aaa;
  --color-primary: #8ab4f8;
  --color-accent: #ff4081;
  --color-border: #444;
  --color-border-hover: #666;
}

/* =========================================
   2. 共通: 基本設定 (Base)
   ========================================= */
body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Helvetica Neue', Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  margin: 0;
  padding: 40px 16px;
  display: flex;
  justify-content: center;
}

.container {
  max-width: 1880px; /* FHD (1920px) 対応: 1920 - 32px (body padding) = 1888px */
  width: 100%;
}

/* WQHD (2560px) 以上での拡張 */
@media (min-width: 2400px) {
  .container {
    max-width: 2480px; /* 2560 - 32px = 2528px から余白を考慮 */
  }
}

h1 {
  text-align: center;
  font-size: 2rem;
  margin: 20px 0 40px;
  width: 100%;
  display: block;
}

.section-title {
  font-size: 1.5rem;
  margin: 20px 0 20px;
  padding-left: 10px;
  border-left: 5px solid var(--color-primary);
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-divider {
  border: 0;
  height: 1px;
  background: #333;
  margin: 10px 0;
}

.no-data-msg {
  text-align: center;
  color: #888;
  margin: 20px 0;
}

.date-section {
  margin-bottom: 5px;
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
  padding: 10px;
  margin: -10px -10px -5px -10px;
}

.date-divider {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 10px;
  font-weight: bold;
}

.date-divider::after {
  content: "";
  flex-grow: 1;
  height: 1px;
  background: #333;
  margin-left: 20px;
}

/* =========================================
   3. 共通: ヘッダー (Header)
   ========================================= */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background-color: var(--bg-color);
  gap: 20px;
}

@media (min-width: 1350px) {
  body {
    padding-top: 0;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
  }

  .header-left {
    flex: 0 0 250px;
    display: flex;
    justify-content: flex-start;
  }

  .header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .header-center h1 {
    display: none;
  }

  .header-right {
    flex: 0 0 340px;
    display: flex;
    justify-content: flex-end;
  }
}

.header-left,
.header-right {
  flex-shrink: 0;
}

.title-logo {
  height: 60px;
  width: auto;
  display: block;
}

.header-center {
  flex-grow: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-page-title {
  margin: 0;
  font-size: 1.5rem;
  color: #ffffff;
  font-weight: bold;
}

.site-summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid #333;
}

.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 55px;
}

.summary-item:last-child {
  min-width: 130px;
}

.summary-item:not(:last-child) {
  border-right: 1px solid #444;
}

.summary-label {
  font-size: 12px;
  color: #888;
  font-weight: bold;
  margin-bottom: 2px;
  text-align: center;
}

.summary-value {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  text-align: center;
}

.summary-value.live-color {
  color: #ff4d4f;
}

.summary-value.soon-color {
  color: #ffa940;
}

.summary-value.update-time {
  font-size: 14px;
  color: #aaa;
}

/* =========================================
   4. 共通: フッター (Footer)
   ========================================= */
.root-footer {
  margin-top: 60px;
  padding: 40px 20px;
  border-top: 1px solid #333;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sns-links a {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 14px;
}

.x-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.free-comment {
  font-size: 13px;
  color: #ccc;
  margin: 5px 0;
}

.disclaimer {
  font-size: 11px;
  color: #666;
  max-width: 600px;
  margin: 0;
  line-height: 1.5;
}

.copyright {
  font-size: 12px;
  margin-top: 10px;
  color: #888;
}

.important-link {
  color: var(--color-primary);
  text-decoration: underline;
  word-break: break-all;
}

/* =========================================
   5. 共通: ナビゲーション (Navigation)
   ========================================= */
.site-navigation {
  box-sizing: border-box;
  margin: 20px auto;
  background: rgba(18, 18, 22, 0.5);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 30px;
  padding: 5px 10px;
  box-shadow:
    0 12px 40px 0 rgba(0, 0, 0, 0.4),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.2);
  width: max-content;
  max-width: calc(100% - 40px);
  display: block;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
  z-index: 1000;
}

@media (min-width: 1350px) {
  .site-navigation.integrated {
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
  }
}

.nav-container {
  display: flex;
  flex-direction: row;
  gap: 4px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 20px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  white-space: nowrap;
  text-align: center;
  position: relative;
}

.nav-link .material-symbols-outlined {
  font-size: 18px;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.25s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-link:hover .material-symbols-outlined {
  transform: translateY(-2px);
  color: var(--color-primary);
}

.nav-link.active {
  background: rgba(138, 180, 248, 0.06);
  color: var(--color-primary);
  font-weight: 600;
}

@media (min-width: 769px) {
  .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 30%;
    right: 30%;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(138, 180, 248, 0.8), 0 0 4px rgba(138, 180, 248, 0.5);
    transition: all 0.25s ease;
  }
}

.nav-mobile-only,
.nav-submenu-popup {
  display: none;
}

.breadcrumb-nav {
  max-width: 100%;
  margin: 0 auto 10px;
  padding: 0 10px;
  font-size: 14px;
  color: #aaa;
}

.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
  content: '›';
  margin: 0 8px;
  color: #666;
  font-size: 16px;
}

.breadcrumb-item a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
  color: #fff;
}

.breadcrumb-item.active {
  color: #eee;
  font-weight: bold;
}

/* =========================================
   6. 共通: コントロール (Controls / Search / Filters)
   ========================================= */
.controls {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.controls-row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
}

.search-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 280px;
  max-width: 900px;
}

.search-filter-row .search-box {
  flex: 1;
  min-width: 0;
}

.search-filter-row .toggle-filter-btn,
.search-filter-row .filter-tag {
  flex-shrink: 0;
}

.view-options-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.bottom-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-box {
  height: 38px;
  padding: 0 16px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--bg-card);
  color: #fff;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  font-size: 0.9rem;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.filter-tag {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  height: 30px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.filter-tag:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.filter-tag.active,
.filter-tag.active:hover {
  background-color: #10b981 !important;
  color: #000000 !important;
  border-color: #10b981 !important;
  font-weight: bold;
}

#favFilterBtn {
  margin-left: 0px;
  border: 1px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
  border-radius: 20px;
  height: 30px;
  padding: 0 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#favFilterBtn:hover {
  background: rgba(255, 64, 129, 0.1);
}

#favFilterBtn.fav-mode-active {
  background-color: #10b981 !important;
  color: #000000 !important;
  border-color: #10b981 !important;
  font-weight: bold;
}

/* フィルタートグルアコーディオンボタン (サイズを表示切替ボタンと統一) */
.toggle-filter-btn,
.view-switcher button {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  line-height: 1 !important;
  padding: 0 14px !important;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: bold;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  transition: all 0.2s ease;
  box-sizing: border-box !important;
  outline: none;
  white-space: nowrap;
  vertical-align: middle;
  margin: 0 !important;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
}

.toggle-filter-btn:hover,
.view-switcher button:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.toggle-filter-btn.is-active {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #10b981;
}

.view-switcher button.active {
  background: var(--color-primary);
  color: #1a1a1a;
  border-color: var(--color-primary);
}

.toggle-filter-btn .filter-active-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  margin-left: 2px;
}

/* 共通アコーディオンボックス */
.controls-filter-box,
.filter-sort-bar {
  width: 100%;
  display: none;
  flex-direction: column;
  gap: 12px;
  background-color: rgba(18, 18, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 16px;
  border-radius: 10px;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.controls-filter-box.is-open,
.filter-sort-bar.is-open {
  display: flex !important;
}

.filter-group-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-group-label {
  font-size: 12px;
  color: #a1a1aa;
  font-weight: 600;
  min-width: 65px;
  margin-right: 4px;
}

/* 共通グループ・キーワードタグ・オプションボタン */
.agency-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap !important;
  min-width: 0;
}

.agency-tag,
.filter-tag,
.tag-filter-btn {
  background-color: rgba(255, 255, 255, 0.04) !important;
  color: #aaa !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  height: 30px !important;
  padding: 0 14px !important;
  cursor: pointer;
  font-size: 0.8rem !important;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  flex-shrink: 0;
  outline: none;
}

#shareFavBtn[style*="display: none"] {
  display: none !important;
}

.agency-tag:hover,
.filter-tag:hover,
.tag-filter-btn:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.agency-tag.active {
  background: rgba(139, 92, 246, 0.15) !important;
  color: #d8b4fe !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
  font-weight: bold;
}

.filter-tag.active,
.tag-filter-btn.active,
.filter-tag.active:hover,
.tag-filter-btn.active:hover {
  background-color: #10b981 !important;
  color: #000000 !important;
  border-color: #10b981 !important;
  font-weight: bold;
}

#favFilterBtn.fav-mode-active {
  background: rgba(244, 63, 94, 0.15) !important;
  color: #fda4af !important;
  border-color: rgba(244, 63, 94, 0.4) !important;
  font-weight: bold;
}

/* 共通プルダウンコントロール */
.select-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.select-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #aaaaaa;
  font-size: 0.82rem;
}

.filter-select {
  background-color: #18181b;
  border: 1px solid #3f3f46;
  color: #f4f4f5;
  height: 30px;
  padding: 0 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.filter-select:hover {
  border-color: #3b82f6;
}

.filter-select:focus,
.filter-select:active,
.filter-select.is-active {
  border-color: #10b981;
}

.filter-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-result-count {
  color: #888888;
  font-size: 12px;
  margin-left: 4px;
}

.filter-result-count span {
  color: #ffffff;
  font-weight: bold;
}

#noSearchResults {
  display: none;
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-top: 20px;
}

.view-switcher {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

/* =========================================
   7. 共通: チャンネル情報バー (.channel-info-bar)
   ========================================= */
.channel-info-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  background-color: #212121;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 10px 0 15px 0;
  gap: 12px;
  font-size: 1.0rem;
  color: #e0e0e0;
}

.info-primary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.yt-profile-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
}

.yt-profile-link:hover {
  opacity: 0.8;
}

.bar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #555;
}

.external-icon {
  margin-top: 2px;
  opacity: 0.7;
}

.stats-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #aaa;
}

.stat-value {
  color: #fff;
  margin-left: 2px;
}

.stat-divider {
  color: #444;
}

.info-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: bold;
  background-color: #333;
  color: #ccc;
  border: 1px solid #444;
  transition: all 0.2s ease;
  height: 26px;
  box-sizing: border-box;
}

.link-btn svg {
  margin-right: 4px;
  vertical-align: middle;
}

.link-btn:hover {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #888 !important;
}

.link-btn-accent {
  background-color: #444;
  border-color: #666;
}


/* =========================================
   8. 共通: 動画カード & グリッドシステム (Base: Desktop)
   ========================================= */
.video-flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.video-card-vertical {
  background-color: var(--bg-card);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  overflow: visible;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: calc((100% - 60px) / 7);
  min-width: 140px;
}

.video-card-vertical:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-hover);
  z-index: 10;
}

.video-link-area {
  text-decoration: none;
  color: inherit;
  display: block;
  flex-grow: 1;
}

.thumbnail-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-info-compact {
  padding: 6px;
  flex-grow: 1;
}

.video-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.video-title-compact {
  font-size: 13px;
  margin: 0;
  line-height: 1.4;
  color: #eee;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.time-badge {
  display: inline-block;
  font-size: 12px;
  line-height: 1.2;
  padding: 2px 5px;
  border-radius: 4px;
  background: #444;
  color: #ddd;
  white-space: nowrap;
  flex-shrink: 0;
  vertical-align: middle;
  box-sizing: border-box;
}

.video-channel-row {
  padding: 6px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.channel-link-compact {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #aaa;
  font-size: 11.5px;
}

.channel-link-compact:hover {
  color: #fff;
}

.channel-icon-mini {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-right: 6px;
}

.channel-name-mini {
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-mini-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  background: rgba(0, 188, 212, 0.1);
  border: 1px solid rgba(0, 188, 212, 0.3);
  border-radius: 4px;
  color: #00bcd4;
  font-size: 11px;
  line-height: 1.2;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  vertical-align: middle;
  box-sizing: border-box;
}

.stats-mini-link:hover {
  background: rgba(0, 188, 212, 0.2);
  color: #fff;
  border-color: #00bcd4;
}

object:has(.stats-mini-link),
.meta-right-group object {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  vertical-align: middle;
}

.video-meta-row.flex-between {
  justify-content: space-between;
  margin-bottom: 4px;
}

.meta-left-group,
.meta-right-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* =========================================
   9. 共通: List View (リスト表示 - 動画カード用)
   ========================================= */
#displayArea.list-view .video-flex-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

#displayArea.list-view .archive-row {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px;
}

#displayArea.list-view .video-card-vertical {
  width: 100% !important;
  box-sizing: border-box;
  padding: 6px;
  gap: 2px 6px;
  position: relative;
  display: flex;
  flex-direction: column;
}

#displayArea.list-view .video-link-area {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  text-decoration: none;
}

#displayArea.list-view .thumbnail-container {
  width: 135px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 0;
  position: relative;
}

#displayArea.list-view .archive-row .thumbnail-container {
  width: 120px;
}

#displayArea.list-view .thumbnail-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

#displayArea.list-view .video-info-compact {
  flex-grow: 1;
  min-width: 0;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

#displayArea.list-view .card-tooltip {
  display: none !important;
}

#displayArea.list-view .live-badge-top-left,
#displayArea.list-view .member-badge-top-left,
#displayArea.list-view .upcoming-badge-top-left,
#displayArea.list-view .today-badge-top-left,
#displayArea.list-view .future-badge-top-left {
  top: 7px !important;
  left: 7px !important;
  z-index: 10;
}

#displayArea.list-view .fav-btn {
  position: absolute !important;
  right: 10px !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 10;
}

#displayArea.list-view .video-meta-row {
  min-height: 20px;
  margin-bottom: 4px;
  padding-right: 32px !important;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

#displayArea.list-view .video-title-compact {
  font-size: 13px;
  line-height: 1.4;
  margin-top: 0;
  margin-bottom: 4px;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

#displayArea.list-view .video-channel-row {
  margin-top: auto;
  padding: 0 !important;
  border: none;
  background: transparent;
}

#displayArea.list-view .channel-link-compact {
  justify-content: flex-start;
}

/* =========================================
   10. 共通: バッジ & ステータス装飾
   ========================================= */
.avatar {
  border-radius: 50%;
  border: 3px solid #333;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.is-live-card {
  border-color: #ff4d4f !important;
  box-shadow: 0 0 10px rgba(255, 77, 79, 0.2) !important;
  animation: none !important;
}

.is-member-card {
  border-color: #2ecc71 !important;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.2) !important;
  animation: none !important;
}

.video-card-vertical.is-member-card .video-thumbnail {
  filter: brightness(0.7) saturate(0.8);
  transition: filter 0.3s ease;
}

.video-card-vertical.is-member-card:hover .video-thumbnail {
  filter: brightness(0.9) saturate(1.0);
}

.is-upcoming-card {
  border-color: #00bcd4 !important;
  box-shadow: 0 0 8px rgba(0, 188, 212, 0.15) !important;
}

.is-today-card {
  border-color: rgba(255, 152, 0, 0.3) !important;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.03) !important;
}

.is-live-card:hover {
  border-color: #ff4d4f !important;
  box-shadow: 0 0 15px rgba(255, 77, 79, 0.45) !important;
}

.is-member-card:hover {
  border-color: #2ecc71 !important;
  box-shadow: 0 0 15px rgba(46, 204, 113, 0.45) !important;
}

.is-upcoming-card:hover {
  border-color: #00bcd4 !important;
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.4) !important;
}

.is-today-card:hover {
  border-color: #ff9800 !important;
  box-shadow: 0 8px 24px rgba(255, 152, 0, 0.2) !important;
}

.video-card-vertical.is-future-card .video-thumbnail {
  filter: brightness(0.8) grayscale(10%);
  transition: filter 0.3s ease;
}

.video-card-vertical.is-future-card:hover .video-thumbnail {
  filter: brightness(0.95) grayscale(0%);
}

.video-card-vertical:not(.is-live-card):not(.is-member-card):not(.is-upcoming-card):not(.is-future-card):not(.is-recommend-card) .video-thumbnail {
  filter: brightness(0.9) saturate(0.9);
  opacity: 0.9;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.video-card-vertical:not(.is-live-card):not(.is-member-card):not(.is-upcoming-card):not(.is-future-card):not(.is-recommend-card):hover .video-thumbnail {
  filter: brightness(0.95) grayscale(0%);
  opacity: 1;
}

.archive-row .video-card-vertical:not(.is-live-card):not(.is-member-card):not(.is-upcoming-card) .video-thumbnail {
  filter: brightness(0.9) saturate(0.9);
  opacity: 0.9;
}

.archive-row .video-card-vertical:not(.is-live-card):not(.is-member-card):not(.is-upcoming-card):hover .video-thumbnail {
  filter: brightness(0.95) saturate(1.0);
  opacity: 1;
}

.archive-row .video-card-vertical.is-member-card .video-thumbnail {
  filter: brightness(0.9) saturate(0.9);
  opacity: 0.9;
}

.archive-row .video-card-vertical.is-member-card:hover .video-thumbnail {
  filter: brightness(0.95) saturate(1.0);
  opacity: 1;
}

.live-badge-top-left,
.member-badge-top-left,
.upcoming-badge-top-left,
.today-badge-top-left,
.future-badge-top-left {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: rgba(20, 20, 20, 0.85) !important;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.live-badge-top-left {
  border: 1px solid #ff4d4f !important;
}

.live-badge-top-left::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ff4d4f;
  animation: pulse-dot 1.5s infinite ease-in-out;
}

.member-badge-top-left {
  border: 1px solid #2ecc71 !important;
}

.member-badge-top-left::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #2ecc71;
  animation: pulse-dot 1.5s infinite ease-in-out;
}

.upcoming-badge-top-left {
  border: 1px solid #00bcd4 !important;
}

.upcoming-badge-top-left::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #00bcd4;
}

.today-badge-top-left {
  border: 1px solid #ff9800 !important;
}

.today-badge-top-left::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ff9800;
}

.future-badge-top-left {
  border: 1px solid #777777 !important;
}

.future-badge-top-left::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #888;
}

.viewer-count {
  font-size: 14px;
  font-weight: bold;
  color: #ff4d4f;
}

.viewer-count-text {
  font-size: 12px;
  color: #ff4d4f;
  font-weight: bold;
}

.member-status-text {
  font-size: 12px;
  color: #2ecc71;
  font-weight: bold;
  white-space: nowrap;
}

.member-only-text {
  color: #2ecc71 !important;
  font-weight: bold;
}

/* =========================================
   11. 共通: 推しボタン (Fav Button)
   ========================================= */
.fav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  transition: all 0.2s ease;
  z-index: 10;
}

.fav-btn:hover {
  transform: scale(1.1);
  color: #fff;
}

.fav-btn.is-active {
  color: var(--color-accent);
}

.fav-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.fav-btn.is-active svg {
  fill: var(--color-accent);
  stroke: none;
  animation: popHeart 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}

.video-card-vertical .fav-btn {
  background: var(--bg-card);
  border-radius: 50%;
}

/* =========================================
   11-2. 共通: カレンダー予定登録ボタン
   ========================================= */
.cal-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  transition: all 0.2s ease;
  z-index: 10;
  width: 24px;
  height: 24px;
  padding: 0;
}

.cal-btn:hover {
  transform: scale(1.1);
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.cal-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.video-card-vertical .cal-btn {
  margin-left: auto;
  background: transparent;
  width: 24px;
  height: 24px;
  padding: 0;
}

.video-card-vertical .cal-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.video-card-vertical .list-view-fav {
  margin-left: auto;
  background: transparent;
  width: 24px;
  height: 24px;
  padding: 0;
}

.video-card-vertical .list-view-fav:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

#shareFavBtn {
  display: none;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  color: #333;
}

#shareFavBtn:hover {
  background-color: #e0e0e0;
  border-color: #bbb;
  color: #000;
}

/* =========================================
   12. ツールチップ（フキダシ） & その他
   ========================================= */
.card-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  margin: -45px 0 0 0;
  background-color: #383838;
  color: #f0f0f0;
  border: 1px solid #555;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
  width: max-content;
  max-width: 240px;
  padding: 10px 14px;
  font-size: 0.8rem;
  line-height: 1.5;
  border-radius: 6px;
  z-index: 20;
  pointer-events: none;
  white-space: normal;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.video-card-vertical:hover .card-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.video-channel-row+.card-tooltip {
  margin-top: -90px;
}

#common-back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 55px;
  height: 55px;
  background-color: rgba(30, 30, 35, 0.9);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(138, 180, 248, 0.4);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#common-back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (hover: hover) {
  #common-back-to-top:hover {
    background-color: var(--color-primary);
    color: #1a1a1a;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(138, 180, 248, 0.6);
  }
}

#common-back-to-top:active {
  background-color: var(--color-primary);
  color: #1a1a1a;
  transform: scale(0.95);
}

@keyframes pulse-opacity {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }

  100% {
    opacity: 1;
  }
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.85);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 4px currentColor;
  }

  100% {
    transform: scale(0.85);
    opacity: 0.5;
  }
}

@keyframes pulse-shadow-red {
  0% {
    box-shadow: 0 0 8px rgba(255, 77, 79, 0.3);
  }

  50% {
    box-shadow: 0 0 18px rgba(255, 77, 79, 0.6);
  }

  100% {
    box-shadow: 0 0 8px rgba(255, 77, 79, 0.3);
  }
}

@keyframes pulse-shadow-green {
  0% {
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
  }

  50% {
    box-shadow: 0 0 18px rgba(46, 204, 113, 0.6);
  }

  100% {
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
  }
}

@keyframes popHeart {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.4);
  }

  100% {
    transform: scale(1);
  }
}


/* ==========================================================
   13. レスポンシブ設定一括定義 (Responsive Design)
   ========================================================== */

/* WQHD (2400px以上): 8列表示・リスト5列/6列表示 */
@media (min-width: 2400px) {
  .video-card-vertical {
    width: calc((100% - 70px) / 8);
  }

  .video-flex-row {
    gap: 10px;
  }

  .archive-row .video-card-vertical {
    width: calc((100% - 90px) / 10);
  }

  #displayArea.list-view .video-flex-row {
    grid-template-columns: repeat(5, 1fr);
  }

  #displayArea.list-view .thumbnail-container {
    width: 150px;
  }

  #displayArea.list-view .archive-row {
    grid-template-columns: repeat(6, 1fr) !important;
  }

  #displayArea.list-view .archive-row .thumbnail-container {
    width: 120px;
  }
}

@media (max-width: 1400px) {
  .video-card-vertical {
    width: calc((100% - 40px) / 5);
    min-width: 0;
  }
}

@media (max-width: 1000px) {
  .video-card-vertical {
    width: calc((100% - 30px) / 4);
    min-width: 0;
  }

  #displayArea.list-view .video-flex-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #displayArea.list-view .thumbnail-container {
    width: 130px;
  }

  #displayArea.list-view .archive-row .thumbnail-container {
    width: 120px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 15px 10px 80px 10px;
  }

  .site-header {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    gap: 10px;
  }

  .title-logo {
    height: 36px;
    width: auto;
  }

  .header-center {
    display: none;
  }

  .site-summary {
    padding: 4px 8px;
    gap: 6px;
    border-radius: 8px;
  }

  .summary-item {
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    min-width: auto;
  }

  .summary-item:not(:last-child) {
    border-right: 1px solid #444;
    padding-right: 6px;
  }

  .summary-label {
    font-size: 10px;
    margin-bottom: 0;
    line-height: 1;
  }

  .summary-value {
    font-size: 11px;
    line-height: 1;
  }

  .summary-value.update-time {
    font-size: 10px;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    border: none;
    border-top: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 2000;
    padding: 8px 10px;
    background: #1e1e23;
    box-sizing: border-box;
    display: block;
    transform: translateZ(0);
    will-change: transform;
  }

  .nav-container {
    display: flex;
    justify-content: space-around;
    gap: 0;
    width: 100%;
  }

  .nav-link {
    flex: 1;
    max-width: 80px;
    flex-direction: column;
    gap: 2px;
    font-size: 9px;
    padding: 4px 2px;
    background: transparent;
    border: none;
    color: #888;
  }

  .nav-link.active {
    background: transparent;
    color: var(--color-primary);
    font-weight: bold;
  }

  .nav-link .material-symbols-outlined {
    font-size: 18px;
  }

  .nav-desktop-only {
    display: none !important;
  }

  .nav-mobile-only {
    display: inline-flex !important;
  }

  .nav-submenu-popup {
    position: absolute;
    bottom: 58px;
    right: 10px;
    background: rgba(25, 25, 30, 0.95);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    padding: 6px;
    z-index: 2050;
    min-width: 160px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-sizing: border-box;
  }

  .nav-submenu-popup[style*="display: flex"] {
    display: flex !important;
  }

  .submenu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #bbb;
    text-decoration: none;
    font-size: 12px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box;
  }

  .submenu-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
  }

  .submenu-link.active {
    background: var(--color-primary);
    color: #1a1a1a;
    font-weight: bold;
  }

  .submenu-link .material-symbols-outlined {
    font-size: 18px;
  }

  .breadcrumb-nav {
    font-size: 12px;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
    box-sizing: border-box;
  }

  .quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }

  .filter-tag {
    flex: 0 1 auto;
    width: auto;
    white-space: nowrap;
  }

  #favFilterBtn {
    margin-left: 0;
    align-self: flex-start;
  }

  .view-switcher {
    justify-content: flex-start;
  }

  .video-card-vertical {
    width: calc((100% - 20px) / 3);
    min-width: 0;
  }

  .video-title-compact {
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
    color: #eee;
  }

  .time-badge,
  .viewer-count-text,
  .member-status-text {
    font-size: 12px;
    padding: 2px 4px;
  }

  .stats-mini-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .stats-mini-link svg {
    display: inline-block !important;
    flex-shrink: 0;
  }

  .channel-link-compact {
    font-size: 11px;
  }

  .channel-icon-mini {
    width: 20px;
    height: 20px;
    margin-right: 6px;
  }

  .card-tooltip {
    display: none !important;
  }

  #common-back-to-top {
    width: 50px;
    height: 50px;
    bottom: 155px;
    right: 20px;
  }

  #displayArea.list-view .video-flex-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #displayArea.list-view .thumbnail-container {
    width: 125px;
  }

  #displayArea.list-view .archive-row .thumbnail-container {
    width: 100px;
  }

  #displayArea.list-view .video-title-compact {
    font-size: 12px;
    margin-bottom: 4px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  #displayArea.list-view .video-card-vertical {
    padding: 4px;
  }

  #displayArea.list-view .video-link-area {
    gap: 10px;
  }

  #displayArea.list-view .live-badge-top-left,
  #displayArea.list-view .member-badge-top-left,
  #displayArea.list-view .upcoming-badge-top-left,
  #displayArea.list-view .today-badge-top-left,
  #displayArea.list-view .future-badge-top-left {
    top: 7px !important;
    left: 7px !important;
  }

  #displayArea.list-view .fav-btn {
    top: 5px !important;
    right: 5px !important;
  }

  #displayArea.list-view .video-meta-row {
    margin-bottom: 4px;
  }
}

@media (max-width: 600px) {
  .channel-info-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    gap: 10px;
  }

  .info-primary {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .yt-profile-link {
    width: 100%;
    font-size: 1.1rem;
  }

  .stats-group {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.8rem;
    color: #bbb;
    line-height: 1.4;
    border-top: 1px solid #333;
    padding-top: 8px;
  }

  .stat-divider {
    opacity: 0.5;
  }

  .info-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-left: 0;
  }

  .info-links::-webkit-scrollbar {
    display: none;
  }

  .link-btn {
    flex: 0 0 auto;
    font-size: 0.75rem;
    padding: 6px 10px;
  }
}

@media (max-width: 580px) {
  .video-card-vertical {
    width: calc((100% - 10px) / 2);
    min-width: 0;
  }

  .summary-item:last-child {
    display: none;
  }

  .summary-item:nth-child(3) {
    border-right: none;
    padding-right: 0;
  }
}

@media (max-width: 450px) {
  .video-card-vertical {
    width: calc((100% - 10px) / 2);
    min-width: 0;
  }

  .video-info-compact {
    padding: 8px;
  }

  .video-title-compact {
    font-size: 11px;
    line-height: 1.4;
  }

  .time-badge,
  .viewer-count-text,
  .member-status-text {
    font-size: 12px;
    line-height: 1.2;
    padding: 2px 4px;
  }

  .stats-mini-link {
    font-size: 11px;
    line-height: 1.2;
    padding: 2px 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .stats-mini-link svg {
    display: inline-block !important;
    flex-shrink: 0;
  }

  .video-meta-row {
    gap: 3px;
    margin-bottom: 4px;
  }

  .video-channel-row {
    padding: 6px 8px;
  }

  .channel-link-compact {
    font-size: 10px;
  }

  .channel-icon-mini {
    width: 18px;
    height: 18px;
    margin-right: 4px;
  }

  .fav-btn svg {
    width: 15px;
    height: 15px;
  }

  .video-card-vertical .list-view-fav {
    width: 20px;
    height: 20px;
  }

  #displayArea.list-view .video-flex-row {
    grid-template-columns: repeat(1, 1fr) !important;
  }

  #displayArea.list-view .thumbnail-container {
    width: 110px;
  }

  #displayArea.list-view .archive-row .thumbnail-container {
    width: 95px;
  }

  #displayArea.list-view .video-title-compact {
    font-size: 12px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  #displayArea.list-view .time-badge,
  #displayArea.list-view .viewer-count-text {
    font-size: 11px;
  }
}

/* =========================================
   共通: トースト通知 (custom-toast)
   ========================================= */
.custom-toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #2a2a2a;
  color: #fff;
  text-align: center;
  border-radius: 30px;
  padding: 12px 24px;
  position: fixed;
  z-index: 3000;
  left: 50%;
  top: 40px;
  bottom: auto;
  transform: translateX(-50%) translateY(-20px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 64, 129, 0.3);
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
}

.custom-toast.show {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}