@charset "utf-8";

/* =========================================
    カレンダー表示設定
   ========================================= */
#calendar {
  width: 100%; margin: 0 auto; background: #242424; padding: 10px;
  border-radius: 8px; border: 1px solid #333; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.calendar-notice {
  max-width: 1400px; margin: 0 auto 5px; font-size: 14px; color: #aaaaaa; padding-left: 20px;
}

.fc.fc-loading { position: relative; }
.fc.fc-loading .fc-view-harness { opacity: 0; }
.fc.fc-loading::after {
  content: "loading..."; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8); color: #fff; padding: 12px 24px; border-radius: 30px;
  z-index: 999; font-size: 14px; font-weight: bold; border: 1px solid #555;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.fc-list-empty { display: none !important; }
.fc-theme-standard td, .fc-theme-standard th { border: 1px solid #3d3d3d !important; }

.fc-button {
  background-color: #444 !important; border-color: #555 !important;
  color: #fff !important; text-transform: capitalize !important;
}
.fc-button-active { background-color: #0066cc !important; border-color: #0077ee !important; }
.fc-day-sun { background-color: #3d2b2b !important; }
.fc-day-sat { background-color: #2b323d !important; }

.fc-daygrid-day-events {
  margin: 0 !important; padding: 4px !important; display: flex !important;
  flex-direction: column !important; gap: 8px !important;
}

.fc-daygrid-day-bottom { display: none !important; }
.fc-daygrid-event-harness { position: static !important; display: block !important; margin: 0 !important; }
.fc-event { background: transparent !important; border: none !important; padding: 0 !important; }

.event-link { text-decoration: none !important; color: inherit !important; display: block; width: 100%; cursor: pointer !important; }
.event-card {
  overflow: hidden; width: 100%; background: #2d2d2d; border: 1px solid #444;
  border-radius: 6px; padding: 4px; box-sizing: border-box; transition: background 0.2s, border-color 0.2s;
}
.event-card-body { padding: 4px 8px 8px !important; }
.event-link:hover .event-card { background: #3d3d3d !important; border-color: #0088ff !important; }
.event-link:hover .event-title { color: #4da6ff !important; text-decoration: underline !important; }

.event-header-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.thumb-wrapper {
  width: 100%; aspect-ratio: 16 / 9; position: relative; overflow: hidden; 
  border-radius: 6px 6px 0 0; background-color: #000;
}
.thumb-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; border-radius: inherit; }

.event-info-container { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.event-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 2px; line-height: 1; }
.event-title {
  display: -webkit-box !important; -webkit-line-clamp: 3 !important; line-clamp: 3 !important;
  -webkit-box-orient: vertical !important; overflow: hidden !important; margin: 6px 0 0 0 !important;
  padding: 0 !important; line-height: 1.5 !important; height: 4.5em;
  font-size: 14px; color: #ffffff; font-weight: bold; word-break: break-all; white-space: normal;
}
.event-time { font-size: 12px; font-weight: bold; color: #ffaa00; white-space: nowrap; }
.event-time::before { content: '🕒'; margin-right: 4px; font-size: 10px; }

.event-card.is-live { border: 2px solid #ff0000 !important; box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); }
.event-card.is-member-only { border: 2px solid rgba(40, 167, 69, 0.4) !important; background-color: #2a2d2a; }
.event-card.is-member-only .thumb-img { filter: brightness(0.7) saturate(0.8); transition: filter 0.3s; }
.event-card.is-member-only:hover .thumb-img { filter: brightness(0.9) saturate(1.0); }

.live-badge {
  position: absolute; top: 5px; left: 5px; background: #f79f9fff; color: #fff;
  font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 3px; z-index: 2;
}
.viewers-badge.is-live-status {
  position: absolute; top: 5px; right: 5px; left: auto; z-index: 10;
  background: rgba(0, 0, 0, 0.7); color: #fff; padding: 2px 6px; border-radius: 4px;
  font-size: 10px; white-space: nowrap;
}

.is-mem-card { border: 1px solid #2e7d32 !important; background: linear-gradient(180deg, #252525 0%, #1b2e1c 100%) !important; }
.mem-ribbon {
    position: absolute; top: 5px; right: -25px; background: #2e7d32; color: white;
    padding: 2px 25px; font-size: 10px; font-weight: bold; transform: rotate(45deg);
    z-index: 10; box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.member-only-label {
  background-color: rgba(40, 167, 69, 0.8) !important; color: #fff;
  font-weight: bold; text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.platform-badge {
  font-size: 10px; padding: 2px 5px; border-radius: 3px; display: inline-flex; align-items: center;
}
.platform-label {
  font-size: 9px; color: #FFFFFF; padding: 1px; border-radius: 3px; margin-top: 2px;
  text-transform: uppercase; border: 1px solid rgba(255, 255, 255, 0.1);
}
.platform-youtube { background: #FF0000; }
.platform-twitch { background: #9146FF; }
.platform-member { background: #2ba640; }

.fc-list { background: #242424 !important; }
.fc-header-toolbar, .fc-footer-toolbar {
  display: flex !important; justify-content: space-between !important; align-items: center !important; padding: 5px 0;
}
.fc-list-event { background: #2d2d2d !important; cursor: pointer; }
.fc-list-event:hover td { background: #3d3d3d !important; }
.fc-list-event td { background: transparent !important; border: none !important; padding: 0 !important; }
.fc-list-event-time, .fc-list-event-graphic { display: none !important; }

.fc-list-event .event-card {
  display: flex !important; flex-direction: row !important; gap: 15px; margin: 4px;
  width: auto !important; padding: 8px !important; align-items: flex-start; min-width: 0;
}
.fc-list-event .thumb-wrapper { 
  width: 160px !important; min-width: 160px !important; height: 90px !important; flex-shrink: 0 !important;
}

.fc-list-day-sun .fc-list-day-cushion { background-color: #4d3535 !important; }
.fc-list-day-sat .fc-list-day-cushion { background-color: #353d4d !important; }
.fc-list-day-cushion { background-color: #333333 !important; display: block; scroll-margin-top: 20px; }
.fc-list-day-text, .fc-list-day-side-text { color: #fff !important; font-weight: bold; text-decoration: none; }

/* =========================================
    タイル表示・コントロールバー設定
   ========================================= */
#tile-view { margin-top: 20px; }
#tile-loading { text-align: center; padding: 20px; color: #aaa; }
.load-more-wrapper { text-align: center; margin-top: 20px; }
.tile-load-more-btn { padding: 10px 40px; font-size: 1rem; cursor: pointer; }
.channel-section-divider { margin-top: 40px; margin-bottom: 20px; }

/* =========================================
    フロートボタンの設定
   ========================================= */
#today-float-btn {
  position: fixed !important; bottom: 85px !important; right: 15px !important;
  padding: 0 16px !important; height: 44px !important; border-radius: 22px !important; 
  background: linear-gradient(135deg, #0088ff 0%, #0066cc 100%) !important;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  color: white !important; border: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-size: 13px; font-weight: 600; display: flex !important;
  visibility: visible !important; opacity: 1 !important;
  align-items: center !important; justify-content: center !important; gap: 4px; 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
  cursor: pointer; z-index: 9999 !important; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#today-float-btn:hover {
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 136, 255, 0.3); filter: brightness(1.1);
}
#today-float-btn:active { transform: translateY(1px); }
#today-float-btn svg { flex-shrink: 0; }

/* =========================================
    チャンネル情報バー
   ========================================= */
.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:hover { background-color: #000 !important; color: #fff !important; border-color: #888 !important; }

/* =========================================
   統計ページ (Stats Page) 専用スタイル
   ========================================= */
.stats-page-container { width: 100%; margin: 0 auto; padding: 20px 0; color: #eee; }

.stats-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 30px;
}
.stats-summary-item {
  background: #252525; padding: 15px; border-radius: 12px; border: 1px solid #444;
  text-align: center; box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  display: flex; flex-direction: column; justify-content: center; min-height: 100px;
}
.stats-summary-label { font-size: 0.85rem; color: #aaa; margin-bottom: 8px; }
.stats-val-container { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.stats-summary-val {
  font-size: 1.5rem; font-weight: bold; color: #fff; font-family: 'Helvetica Neue', Arial, sans-serif; line-height: 1;
}
.stats-summary-val.val-small { font-size: 1.3rem; }
.stats-unit { font-size: 0.85rem; color: #888; font-weight: normal; }
.stats-summary-diff { font-size: 0.85rem; margin-top: 6px; }
.stats-diff-plus { color: #ff4081; }
.stats-diff-minus { color: #2196f3; }

.stats-section-title {
  font-size: 1.1rem; color: #e0e0e0; margin: 30px 0 15px 0;
  padding-left: 10px; border-left: 4px solid #666; font-weight: bold; letter-spacing: 0.05em;
}
.stats-section-title:first-of-type { margin-top: 10px; }
.stats-title-note { font-size: 0.7em; font-weight: normal; color: #aaa; margin-left: 10px; }

.stats-charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 30px; }
.stats-chart-card {
  background: #252525; border-radius: 12px; padding: 15px; border: 1px solid #444;
  margin-bottom: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.3); display: flex; flex-direction: column;
}
.stats-charts-grid .stats-chart-card { margin-bottom: 0; }
.stats-chart-title {
  margin: 0 0 10px 0; font-size: 1.1rem; border-left: 4px solid #ff4081; padding-left: 10px; color: #fff;
}
.stats-chart-area { width: 100%; height: 320px; }
.stats-chart-card.full-width { grid-column: 1 / -1; }

.stats-back-nav { text-align: center; margin-top: 20px; margin-bottom: 40px; }
.stats-back-btn {
  display: inline-block; padding: 10px 20px; background: #333; color: #fff;
  text-decoration: none; border-radius: 30px; transition: background 0.3s; border: 1px solid #555;
}
.stats-back-btn:hover { background: #555; }

@media (max-width: 900px) {
  .stats-charts-grid { grid-template-columns: 1fr; }
  .stats-chart-area { height: 280px; }
}

@media (max-width: 768px) {
  #calendar { padding: 5px 2px; }
  .fc-list-event .event-card { gap: 10px; padding: 4px !important; }
  .fc-list-event .thumb-wrapper { width: 160px !important; min-width: 160px !important; }
  .fc-toolbar-title { font-size: 1.0em !important }
  .chart-area { height: 350px; }
  .summary-val { font-size: 1.5rem; }
}

@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 {
    width: 100%; display: flex; flex-wrap: nowrap; overflow-x: auto;
    gap: 8px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; margin-left: 0; 
  }
  .info-links::-webkit-scrollbar { display: none; }
  .link-btn { flex: 0 0 auto; font-size: 0.75rem; padding: 6px 10px; }
}
