@charset "utf-8";

/* =========================================
   統計ページ固有設定 (Stats Page)
   ========================================= */

.stats-container { max-width: 1500px; margin: 0 auto; padding: 0 10px; }
.rankings-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.ranking-section { width: 49%; margin-bottom: 0; }

.stats-header-row {
  display: flex; align-items: baseline; margin-bottom: 20px; padding-left: 10px; border-left: 5px solid var(--color-primary);
}
.stats-title-main { font-size: 1.5rem; font-weight: bold; color: #fff; margin-right: 15px; white-space: nowrap; }
.stats-subtitle { font-size: 0.9rem; color: #aaa; }
.stat-separator { margin: 0 6px; color: #555; }

.month-header { text-align: center; margin-bottom: 40px; margin-top: 10px; }
.month-title {
  font-size: 2rem; font-weight: bold; display: inline-block; padding-bottom: 10px;
  border-bottom: 3px solid #ff4081; color: #fff;
}
.update-info { margin-top: 10px; color: #aaa; font-size: 0.85rem; }

.rank-card {
  display: flex; flex-direction: column; background-color: #252525; margin-bottom: 12px;
  padding: 15px; border-radius: 12px; border: 1px solid #444;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2); transition: transform 0.2s, border-color 0.2s;
}
.rank-card:hover { transform: translateY(-2px); border-color: #666; background-color: #2a2a2a; }

.rank-card-header { display: flex; align-items: center; width: 100%; }
.rank-num { font-size: 1.5rem; font-weight: bold; width: 50px; text-align: center; color: #888; flex-shrink: 0; }
.rank-num.top1 { color: #ffd700; font-size: 2rem; text-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.rank-num.top2 { color: #c0c0c0; font-size: 1.8rem; }
.rank-num.top3 { color: #cd7f32; font-size: 1.8rem; }

.ch-info { display: flex; align-items: center; flex: 1; min-width: 0; margin-right: 15px; text-decoration: none; color: inherit; }
.ch-icon { width: 48px; height: 48px; border-radius: 50%; margin-right: 15px; object-fit: cover; border: 2px solid #333; flex-shrink: 0; }
.ch-name { font-weight: bold; font-size: 1rem; color: #eee; line-height: 1.4; white-space: normal; word-wrap: break-word; overflow-wrap: break-word; }

.stat-value-box { text-align: right; min-width: 90px; flex-shrink: 0; }
.stat-value-main { font-size: 1.4rem; font-weight: bold; color: #fff; font-family: 'Helvetica Neue', Arial, sans-serif; }
.stat-unit { font-size: 0.8rem; color: #bbb; margin-left: 4px; }

.stat-data-area { width: 100%; margin-top: 10px; display: flex; flex-direction: column; justify-content: center; }
.stat-bar-bg { background: #444; height: 10px; border-radius: 5px; overflow: hidden; width: 100%; margin-bottom: 6px; }
.stat-bar-fill { height: 100%; border-radius: 5px; transition: width 0.5s ease-out; }

.theme-time .stat-bar-fill { background: linear-gradient(90deg, #ff4081, #ff80ab); }
.theme-count .stat-bar-fill { background: linear-gradient(90deg, #2196f3, #64b5f6); }

.stat-sub-info { font-size: 0.85rem; color: #aaa; display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.highlight-val { color: #fff; font-weight: bold; margin-left: 4px; }

.theme-growth .rank-num { background-color: #2e7d32; color: #fff; }
.theme-growth .stat-bar-fill { background-color: rgba(76, 175, 80, 0.8); }
.theme-growth .stat-value-main { color: #81c784; }

@media screen and (max-width: 768px) {
  .stats-container { padding: 0 5px; width: 100%; }
  .rankings-grid { display: block; }
  .ranking-section { width: 100%; margin-bottom: 50px; }
  .stats-header-row { flex-wrap: wrap; }
  .stats-subtitle { display: block; width: 100%; margin-top: 4px; }
  .rank-card { padding: 12px 10px; }
  .rank-card-header { align-items: flex-start; }
  .rank-num { width: 30px; font-size: 1.2rem; margin-right: 8px; margin-top: 10px; }
  .rank-num.top1, .rank-num.top2, .rank-num.top3 { font-size: 1.4rem; }
  .ch-icon { width: 36px; height: 36px; margin-right: 10px; }
  .ch-name { font-size: 0.9rem; }
  .stat-value-box { min-width: auto; margin-left: 5px; }
  .stat-value-main { font-size: 1.1rem; }
  .stat-unit { font-size: 0.7rem; }
}