@charset "utf-8";

/* =========================================
   動画一覧/アーカイブ用スタイル (style_root.css)
   ========================================= */
.archive-row .video-card-vertical { 
  width: calc((100% - 70px) / 8);
  min-width: 0;
}
.archive-row .video-title-compact { font-size: 13px; }
.archive-row .time-badge, .archive-row .channel-name-mini, .member-status-text { font-size: 12px; }

@media (max-width: 1200px) { 
  .archive-row .video-card-vertical { 
    width: calc((100% - 50px) / 6); 
  } 
}
@media (max-width: 1000px) { 
  .archive-row .video-card-vertical { 
    width: calc((100% - 40px) / 5); 
  } 
}

@media (max-width: 768px) { 
  .viewer-count-text { font-size: 11px; color: #ff4d4f; font-weight: bold; }
  .archive-row .video-card-vertical { 
    width: calc((100% - 30px) / 4); 
    min-width: 0;
  }
  .archive-row .section-title { font-size: 1.3rem; }
  .archive-row .video-info-compact { padding: 8px; }
  .archive-row .video-title-compact { font-size: 11px; line-height: 1.4; }
  .archive-row .video-meta-row {
    position: relative;
    padding-right: 24px !important;
    margin-bottom: 4px;
    min-width: 0;
    display: flex;
    align-items: center;
  }
  .archive-row .fav-btn {
    position: absolute !important;
    top: 50% !important;
    right: 0 !important;
    transform: translateY(-50%);
    margin: 0 !important;
    width: 20px !important;
    height: 20px !important;
    z-index: 10;
  }
  .archive-row .fav-btn svg { width: 16px !important; height: 16px !important; }
  .archive-row .time-badge { font-size: 10px; padding: 2px 5px; flex-shrink: 0; }
  .archive-row .viewer-count-text { font-size: 10px; }
}

@media (max-width: 580px) { 
  .archive-row .video-card-vertical { 
    width: calc((100% - 20px) / 3); 
  } 
}

@media (max-width: 450px) {
  .archive-row .video-card-vertical { 
    width: calc((100% - 10px) / 2);
  }
  .archive-row .channel-link-compact { font-size: 10px; }
  .archive-row .channel-icon-mini { width: 18px; height: 20px; margin-right: 4px; }

  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .video-card-vertical {
    width: 100%;
  }
  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .video-info-compact {
    padding: 12px;
  }
  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .video-title-compact {
    font-size: 14px;
    line-height: 1.5;
  }
  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .time-badge {
    font-size: 13px;
    padding: 2px 8px;
  }
  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .viewer-count-text,
  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .member-status-text {
    font-size: 13px;
    display: inline-block !important;
  }
  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .video-meta-row {
    gap: 10px;
    margin-bottom: 8px;
    padding-right: 0 !important;
  }
  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .video-channel-row {
    padding: 10px 12px;
  }
  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .channel-link-compact {
    font-size: 10px;
  }
  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .channel-icon-mini {
    width: 18px;
    height: 18px;
    margin-right: 10px;
  }
  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .fav-btn {
    position: static !important;
    transform: none;
    width: auto !important;
    height: auto !important;
  }
  .date-section:not(.ai-category-wrapper) .video-flex-row:not(.archive-row) .fav-btn svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* =========================================
   List View (リスト表示 - 3列ベース)
   ========================================= */
#displayArea.list-view .video-flex-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr); /* ★ここを 3 から 4 に変更 */
  gap: 15px;
}

#displayArea.list-view .video-card-vertical {
  width: 100% !important;
  box-sizing: border-box;
  padding: 8px;
  gap: 3px 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: 12px;
  width: 100%;
  text-decoration: none;
}

#displayArea.list-view .thumbnail-container {
  width: 160px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 0;
  position: relative;
}

#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 {
  top: -6px !important;
  left: -6px !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: 6px;
  padding-right: 32px !important;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

#displayArea.list-view .video-title-compact {
  font-size: 14px;
  line-height: 1.4;
  margin-top: 0;
  margin-bottom: 8px;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -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;
}

/* =========================================
   List View レスポンシブ表示の修正
   ========================================= */
@media (max-width: 1000px) {
  #displayArea.list-view .video-flex-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  #displayArea.list-view .thumbnail-container {
    width: 140px;
  }
}

@media (max-width: 768px) {
    #displayArea.list-view .video-flex-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  #displayArea.list-view .thumbnail-container {
    width: 100px;
  }
    #displayArea.list-view .video-title-compact {
    font-size: 10px;
    -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 {
    top: -6px !important;
    left: -6px !important;
  }
  #displayArea.list-view .fav-btn {
    top: 1px !important;
    right: 5px !important;
  }
  #displayArea.list-view .video-title-compact {
    font-size: 12px;
    margin-bottom: 4px;
  }
  #displayArea.list-view .video-meta-row {
    margin-bottom: 4px;
  }
}

@media (max-width: 450px) {
  #displayArea.list-view .video-flex-row {
    grid-template-columns: repeat(1, 1fr) !important;
  }
  #displayArea.list-view .thumbnail-container {
    width: 120px;
  }
  #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: 10px;
  }
}

/* ==================
   Birthday Pickup
   ================== */
.pickup-section {
  background: linear-gradient(135deg, #2d2025 0%, #2d2815 100%);
  border: 2px solid #ffca28;
  border-radius: 12px;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  padding: 20px;
  padding-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.close-pickup-btn {
  position: absolute; top: 10px; right: 10px; z-index: 20;
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.7);
  font-size: 18px; backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s ease;
}
.close-pickup-btn:hover {
  background: rgba(255, 64, 129, 0.9); color: #fff;
  transform: scale(1.1); box-shadow: 0 0 8px rgba(255, 64, 129, 0.6);
}

.pickup-section::before {
  content: "✨"; position: absolute; top: 10px; left: 10px; font-size: 1.5rem;
  opacity: 0.5; animation: spin 8s linear infinite; pointer-events: none;
}
.pickup-section::after {
  content: "🎁"; position: absolute; bottom: 5px; right: 5px; font-size: 1.5rem;
  opacity: 0.3; transform: rotate(15deg); z-index: 0; pointer-events: none;
}

.pickup-header {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  margin-bottom: 15px; position: relative; z-index: 2;
}

.pickup-title-wrapper h3 {
  background: linear-gradient(to right, #ff4081, #ffab40);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800; text-shadow: 0px 2px 4px rgba(0,0,0,0.3);
}
.pickup-title-wrapper p { color: #ddd; font-size: 0.9rem; margin-top: 5px; }

.pickup-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;
  position: relative; z-index: 2; width: 100%;
}

.pickup-card {
  display: block; width: 100%; max-width: 300px; background: #222;
  border-radius: 10px; text-decoration: none; color: #eee;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3); transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden; border: 1px solid #444;
}
.pickup-card:hover {
  transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); border-color: #ffca28;
}

.pickup-thumb { position: relative; aspect-ratio: 16 / 9; background: #000; }
.pickup-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pickup-badge {
  position: absolute; bottom: 5px; right: 5px; padding: 3px 6px;
  border-radius: 4px; font-size: 0.75rem; font-weight: bold; color: #fff; z-index: 5;
}
.pickup-badge.live { background: #f00; }
.pickup-badge.time { background: rgba(0,0,0,0.85); border: 1px solid rgba(255,255,255,0.2); }

.pickup-info { padding: 10px; display: flex; gap: 10px; text-align: left; }
.pickup-avatar img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #ffca28; }
.pickup-text { flex: 1; overflow: hidden; min-width: 0; }

.pickup-stream-title {
  font-weight: bold; font-size: 0.9rem; margin-bottom: 2px; color: #fff;
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3;
}
.pickup-channel-name { font-size: 0.8rem; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ribbon {
  position: absolute; top: -10px; right: -10px; width: 75px; height: 75px;
  overflow: hidden; z-index: 10; pointer-events: none;
}
.ribbon span {
  position: absolute; top: 19px; right: -21px; width: 100px;
  transform: rotate(45deg); background-color: var(--color-accent);
  color: #fff; text-align: center; font-size: 10px; font-weight: bold;
  line-height: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

@media (min-width: 960px) {
  .pickup-section { padding: 20px 40px; gap: 15px; }
  .pickup-section::before { font-size: 2rem; top: 15px; left: 15px; }
  .pickup-section::after { font-size: 2.5rem; bottom: 10px; right: 20px; }
  .close-pickup-btn { top: 15px; right: 15px; }
  .pickup-header { flex-direction: row; margin-bottom: 0; position: relative; gap: 40px; }
  .pickup-header::before { content: "🎉"; font-size: 2rem; display: block; animation: bounce 2s infinite; }
  .pickup-header::after { content: "🎂"; font-size: 2rem; display: block; animation: bounce 2s infinite reverse; }
  .pickup-title-wrapper { display: flex; flex-direction: column; align-items: center; }
  .pickup-title-wrapper h3 { font-size: 1.8rem; margin: 0; line-height: 1.2; }
  .pickup-title-wrapper p { font-size: 0.9rem; opacity: 0.9; color: #ddd; }
  .pickup-grid { width: 100%; display: flex; justify-content: center; }
  
  .pickup-card {
    width: 680px !important; max-width: 95% !important; background: #222;
    display: flex; flex-direction: row; align-items: stretch; height: 160px;
    padding: 0; border: 1px solid #444; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    position: relative !important; border-radius: 12px; overflow: hidden;
  }
  .pickup-thumb { width: 285px; height: 100%; flex-shrink: 0; position: relative; z-index: 1; aspect-ratio: auto; }
  .ribbon { display: block !important; position: absolute; top: -8px; left: 210px; right: auto; width: 75px; height: 75px; z-index: 20; overflow: hidden; pointer-events: none; }
  .ribbon span { display: block !important; position: absolute; top: 19px; right: -21px; left: auto; width: 100px; transform: rotate(45deg); background-color: var(--color-accent); color: #fff; text-align: center; font-size: 10px; font-weight: bold; line-height: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
  .pickup-badge { bottom: 6px; right: 6px; font-size: 0.8rem; pointer-events: none; }
  .pickup-info { flex: 1; min-width: 0; padding: 15px 25px; position: relative; display: flex; flex-direction: column; justify-content: flex-start; }
  .pickup-text { width: 100%; margin-bottom: auto; }
  .pickup-stream-title { font-size: 1.1rem; color: #fff; margin: 0; white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; text-align: left; }
  .pickup-avatar { display: block; position: absolute; bottom: 15px; left: 25px; width: 40px; height: 40px; z-index: 2; }
  .pickup-channel-name { position: absolute; bottom: 15px; left: 75px; right: 25px; height: 40px; display: flex; align-items: center; font-size: 0.9rem; color: #aaa; white-space: nowrap; overflow: hidden; }
}