/**
 * top.css
 * TOPページ専用スタイル
 */

/* ロゴセクション */
.top-hero-logo {
  text-align: center;
  padding: 30px 20px;
  background: #fff;
  margin-bottom: 30px;
}

.top-hero-logo img {
  max-width: 400px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* コンテナ */
.top-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 共通セクションスタイル */
.top-container section {
  margin-bottom: 50px;
}

.top-container h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #007bff;
  color: #333;
}

/* ========================================
   最新ランキング（ファーストビュー）
======================================== */
.latest-rankings {
  margin-bottom: 60px;
}

.ranking-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
}

/* ランキングカード */
.ranking-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.ranking-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.ranking-card .card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* サムネイル */
.card-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  background: #f0f0f0;
  overflow: hidden;
}

.card-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #999;
  font-size: 0.9rem;
}

/* カード情報 */
.card-info {
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-label {
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
}

.card-number {
  font-size: 0.9rem;
  color: #007bff;
  font-weight: 600;
}

/* 週刊カード */
.weekly-card {
  border-top: 3px solid #007bff;
}

/* SPカード */
.sp-card {
  border-top: 3px solid #ff1493;
}

.sp-card .card-number {
  color: #ff1493;
}

/* ========================================
   インフォメーション
======================================== */
.info-section {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 12px;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  border-bottom: 1px solid #e0e0e0;
  padding: 15px 0;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list a {
  display: flex;
  gap: 15px;
  align-items: center;
  text-decoration: none;
  color: #333;
  transition: color 0.2s;
}

.info-list a:hover {
  color: #007bff;
}

.info-date {
  flex-shrink: 0;
  color: #999;
  font-size: 0.9rem;
  width: 90px;
}

.info-title {
  flex: 1;
  font-size: 1rem;
}

.new-badge {
  display: inline-block;
  background: #ff4444;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 8px;
  font-weight: bold;
  vertical-align: middle;
}

.info-more {
  margin-top: 20px;
  text-align: right;
}

.btn-link {
  display: inline-block;
  padding: 10px 20px;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: background 0.3s;
}

.btn-link:hover {
  background: #0056b3;
}

.no-data {
  color: #999;
  text-align: center;
  padding: 20px;
}

/* ========================================
   過去ランキング一覧
======================================== */
.archive-section {
  margin-bottom: 60px;
}

.archive-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}

.archive-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.archive-icon {
  font-size: 2.5rem;
}

.archive-text {
  display: flex;
  flex-direction: column;
}

.archive-title {
  font-size: 1.3rem;
  font-weight: bold;
}

/* ========================================
   動画ID検索
======================================== */
.search-section {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.search-input {
  flex: 1;
  padding: 12px 15px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: #007bff;
}

.search-btn {
  padding: 12px 30px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.search-btn:hover {
  background: #0056b3;
}

.search-error {
  color: #dc3545;
  font-size: 0.9rem;
  margin-bottom: 10px;
  min-height: 20px;
}

.search-note {
  color: #666;
  font-size: 0.85rem;
  margin: 0;
}

/* ========================================
   レスポンシブ対応
======================================== */
@media (max-width: 768px) {
  /* ロゴ */
  .top-hero-logo {
    padding: 20px 15px;
  }
  
  .top-hero-logo img {
    max-width: 300px;
  }
  
  .top-container {
    padding: 15px;
  }

  .top-container h2 {
    font-size: 1.5rem;
  }

  /* ランキングカード：スマホでも横並び維持 */
  .ranking-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card-title {
    font-size: 0.9rem;
  }
  
  .card-label {
    font-size: 0.7rem;
  }
  
  .card-number {
    font-size: 0.8rem;
  }

  /* インフォ */
  .info-section {
    padding: 20px;
  }

  .info-list a {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .info-date {
    width: auto;
  }

  /* 過去一覧 */
  .archive-card {
    padding: 20px;
  }

  .archive-icon {
    font-size: 2rem;
  }

  .archive-title {
    font-size: 1.1rem;
  }

  /* 検索 */
  .search-section {
    padding: 20px;
  }

  .search-form {
    flex-direction: column;
  }

  .search-btn {
    width: 100%;
  }
}

/* PC：2カラムでゆったり */
@media (min-width: 769px) {
  .ranking-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}