/* ドリパクラブ — hololive Dreams 非公式ファンサイト
   テーマパークらしい、明るく体温のある配色。 */

:root {
  --bg: #f6f9fc;
  --surface: #ffffff;
  --surface-alt: #eef4fa;
  --border: #dce6f0;
  --text: #1c2b3a;
  --text-dim: #5d7185;
  --accent: #1e9be0;
  --accent-warm: #ff8fb1;
  --shadow: 0 1px 3px rgba(28, 43, 58, .08), 0 8px 24px rgba(28, 43, 58, .06);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10171f;
    --surface: #182330;
    --surface-alt: #1f2c3b;
    --border: #2b3b4d;
    --text: #e8eff6;
    --text-dim: #9db0c4;
    --accent: #4fb8f5;
    --accent-warm: #ff9dbb;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans",
               "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.75;
  font-size: 16px;
}

a { color: var(--accent); }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- ヘッダ */

.site-header {
  position: relative;
  overflow: hidden;
  /* 光がにじんでいるように見せるため、グラデーションの上に淡い光をいくつか重ねる */
  background:
    radial-gradient(60% 120% at 12% 0%, rgba(255, 255, 255, .38), transparent 60%),
    radial-gradient(45% 100% at 78% 10%, rgba(255, 236, 179, .35), transparent 62%),
    radial-gradient(70% 140% at 95% 100%, rgba(255, 158, 200, .45), transparent 60%),
    linear-gradient(135deg, var(--accent) 0%, #6f7ce0 55%, var(--accent-warm) 100%);
  color: #fff;
  padding: 30px 0 26px;
}

/* テーマパークの装飾。権利物は使わず自前で描いたSVGを敷いている */
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: url("/header-art.svg?v=112f885f") repeat-x bottom left;
  background-size: auto 160px;
  pointer-events: none;
}

/* 背景を少し沈めて文字を読めるようにする膜。
   きらめきはこの上に出したいので、装飾より下に敷いている。 */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg,
              rgba(10, 18, 32, .30) 0%,
              rgba(10, 18, 32, .10) 50%,
              rgba(10, 18, 32, .26) 100%);
  pointer-events: none;
}

.site-header .wrap { position: relative; z-index: 2; }

.site-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: .02em;
  /* 背景の模様と重なっても輪郭が消えないようにする */
  text-shadow: 0 2px 10px rgba(8, 14, 26, .45);
}

.site-title a { color: #fff; text-decoration: none; }

.site-tagline {
  margin: 5px 0 0;
  font-size: .85rem;
  opacity: .95;
  text-shadow: 0 1px 8px rgba(8, 14, 26, .5);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.nav a {
  color: #fff;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 999px;
  /* 背景の模様が透けると読みにくいので、少し濃いめに敷いて縁を付ける */
  background: rgba(14, 24, 42, .32);
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(2px);
}

.nav a:hover { background: rgba(14, 24, 42, .5); border-color: #fff; }

.nav a[aria-current="page"] {
  background: #fff;
  color: #3a3f8f;
  font-weight: 700;
  border-color: #fff;
}

/* ------------------------------------------------------------------ 本文 */

main { padding: 32px 0 56px; }

.page-title {
  font-size: 1.55rem;
  margin: 0 0 24px;
  line-height: 1.4;
}

h2 {
  font-size: 1.3rem;
  margin: 2.2em 0 .8em;
  padding-left: 12px;
  border-left: 5px solid var(--accent);
  line-height: 1.4;
}

h2:first-child { margin-top: 0; }
h3 { font-size: 1.05rem; margin: 1.8em 0 .6em; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.notice {
  background: var(--surface-alt);
  border-left: 4px solid var(--accent-warm);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: .9rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.notice strong { color: var(--text); }

/* --------------------------------------------------------------- グリッド */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.tile:hover { border-color: var(--accent); }
.tile-title { font-weight: 700; display: block; }
.tile-sub { font-size: .78rem; color: var(--text-dim); display: block; }



/* 期生が多いので、上部から各セクションへ飛べるようにしている */
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.jump a {
  font-size: .8rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  text-decoration: none;
}

.jump a:hover { border-color: var(--accent); }

/* アンカーで飛んだとき、見出しがヘッダーの下に隠れないようにする */
h2[id] { scroll-margin-top: 16px; }

.badge {
  display: inline-block;
  font-size: .68rem;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-dim);
  border: 1px solid var(--border);
  vertical-align: middle;
}

/* --------------------------------------------------------------- ガチャ */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

button {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  background: var(--accent);
  color: #fff;
}

button:hover { filter: brightness(1.08); }
button.secondary { background: var(--surface-alt); color: var(--text); border: 1px solid var(--border); }

select {
  font: inherit;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.pull {
  border-radius: 10px;
  padding: 12px 6px;
  text-align: center;
  font-size: .74rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.pull .rar { display: block; font-size: .95rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.stat {
  background: var(--surface-alt);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}

.stat-value { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .72rem; color: var(--text-dim); }

/* ------------------------------------------------------------------ 表 */

.table-scroll { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { border-bottom: 1px solid var(--border); padding: 9px 12px; text-align: left; }
th { background: var(--surface-alt); font-size: .82rem; white-space: nowrap; }

/* -------------------------------------------------------------- ニュース */

.news-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.news-item:last-child { border-bottom: none; }
.news-title { font-weight: 700; margin: 0 0 4px; }
.news-meta { font-size: .76rem; color: var(--text-dim); }
.news-why { font-size: .88rem; color: var(--text-dim); margin-top: 6px; }

/* ---------------------------------------------------------------- 楽曲 */

.filter-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

#song-search {
  flex: 1 1 220px;
  font: inherit;
  font-size: .9rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  /* 54人分あるので、畳んでおいて必要なら伸ばせるようにする */
  max-height: 132px;
  overflow-y: auto;
}

.chip {
  font: inherit;
  font-size: .78rem;
  font-weight: 400;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
}

.chip:hover { border-color: var(--accent); }

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.chip-count {
  margin-left: 6px;
  opacity: .65;
  font-size: .72rem;
}

#song-result:empty { display: none; }

/* 「オリジナル」が折り返して2行になるのを防ぐ */
#song-table td:nth-child(3) { white-space: nowrap; font-size: .82rem; }

.song-listen {
  display: inline-block;
  white-space: nowrap;
  font-size: .78rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  text-decoration: none;
}

.song-listen:hover { border-color: var(--accent); }

/* ------------------------------------------------------------ 配信カード */

/* サムネイルと再生アイコンで、押すとYouTubeへ行くと分かるようにしている */

.stream-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stream {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.stream:hover { border-color: var(--accent); }

.stream-thumb-wrap {
  position: relative;
  flex: 0 0 128px;
  align-self: flex-start;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-alt);
  aspect-ratio: 16 / 9;
}

.stream-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CSSだけの再生ボタン。画像を1枚も増やさずに動画だと伝えるため */
.stream-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 24px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .65);
}

.stream-play::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent #fff;
}

.stream:hover .stream-play { background: #ff0000; }

.stream-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.stream-title {
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.45;
  /* 長いタイトルでカードの高さがばらつかないよう3行で打ち切る */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stream-meta { font-size: .74rem; color: var(--text-dim); }

.stream-tag {
  align-self: flex-start;
  font-size: .68rem;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.stream-source {
  font-size: .72rem;
  color: var(--text-dim);
  margin-top: auto;
}

.stream-source::before {
  content: "▶";
  color: #ff0000;
  margin-right: 4px;
}

.stream-source::after {
  content: " ↗";
  opacity: .7;
}

/* ---------------------------------------------------------------- 広告 */

/* 枠に収まらない広告タグが横スクロールを起こさないようにする */
.ad {
  margin: 24px 0;
  text-align: center;
  overflow-x: auto;
}

.ad img { max-width: 100%; height: auto; }

.ad-disclosure {
  font-size: .74rem;
  color: var(--text-dim);
  margin: 0 0 16px;
}

/* -------------------------------------------------------------- フッタ */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 26px 0;
  font-size: .8rem;
  color: var(--text-dim);
}

.site-footer p { margin: 0 0 8px; }
.site-footer p:last-child { margin-bottom: 0; }
.footer-nav a { color: var(--text-dim); }
