/* AniComp — アニメを意識したポップな配色 */

:root {
  --pink:   #ff4fa3;
  --pink-d: #e62e88;
  --cyan:   #22d3ee;
  --cyan-d: #06b6d4;
  --yellow: #ffd84f;
  --purple: #a855f7;
  --purple-d: #7c3aed;
  --lime:   #a3e635;
  --ink:    #2b2140;
  --ink-mid:#5b4b7a;
  --paper:  #fffdf8;
  --card:   #ffffff;
  --line:   #f0e6fb;
  --shadow: 0 4px 0 rgba(43, 33, 64, 0.13);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 79, 163, .16), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(34, 211, 238, .18), transparent 40%),
    radial-gradient(circle at 60% 96%, rgba(168, 85, 247, .14), transparent 45%),
    var(--paper);
  background-attachment: fixed;
  line-height: 1.7;
}

.container { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }

/* ---------- ヘッダー ---------- */
header { text-align: center; padding: 28px 12px 20px; }

h1 {
  margin: 0;
  font-size: 2.6em;
  font-weight: 900;
  letter-spacing: .02em;
  background: linear-gradient(100deg, var(--pink) 0%, var(--purple) 45%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
h1 .dot { color: var(--yellow); -webkit-text-fill-color: var(--yellow); }

.subtitle {
  margin: 6px 0 0;
  font-weight: 700;
  color: var(--ink-mid);
  font-size: 1em;
}

/* ---------- VPN切替・サービス選択 ---------- */
.control-bar {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.control-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.control-row + .control-row { margin-top: 14px; padding-top: 14px; border-top: 2px dashed var(--line); }
.control-row .label { font-weight: 800; font-size: .92em; min-width: 84px; }

.vpn-btn, .svc-btn {
  border: 3px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: .92em;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
  box-shadow: 0 3px 0 var(--ink);
  font-family: inherit;
}
.vpn-btn:hover, .svc-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.vpn-btn:active, .svc-btn:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--ink); }

.vpn-btn.active { background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff; }
.svc-btn.active { background: var(--cyan); color: var(--ink); }
.svc-btn:not(.active) { opacity: .5; }

.free-tag {
  display: inline-block; margin-left: 5px; font-size: .78em;
  background: var(--lime); color: var(--ink);
  border-radius: 6px; padding: 1px 6px; font-weight: 900;
}

/* ---------- お知らせ ---------- */
.notice {
  background: linear-gradient(135deg, #fff9e6, #fff0f8);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
  font-size: .9em;
}
.notice h3 { margin: 0 0 8px; font-size: 1em; font-weight: 900; }
.notice h3 + * { margin-top: 0; }
.notice ul { margin: 0 0 12px; padding-left: 1.2em; }
.notice li { margin-bottom: 3px; }
.notice .sep { border: 0; border-top: 2px dashed var(--line); margin: 14px 0; }

/* ---------- フィルタ ---------- */
.filters {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.filters h2 {
  font-size: .95em; font-weight: 900; margin: 0 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.filter-block + .filter-block { margin-top: 18px; padding-top: 16px; border-top: 2px dashed var(--line); }

.toggle-jp {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #fff5fa, #f2fbff);
  border: 3px solid var(--ink); border-radius: 14px;
  padding: 12px 16px; cursor: pointer; font-weight: 800;
}
.toggle-jp input { width: 20px; height: 20px; accent-color: var(--pink); cursor: pointer; }
.toggle-jp .count { margin-left: auto; font-weight: 900; color: var(--pink-d); }

.chip {
  display: inline-block; border: 2px solid var(--ink); background: #fff;
  border-radius: 999px; padding: 5px 13px; margin: 0 6px 6px 0;
  font-size: .85em; font-weight: 700; cursor: pointer; user-select: none;
  transition: transform .1s;
}
.chip:hover { transform: translateY(-1px); }
.chip.on { background: var(--yellow); }

.decade-row { display: flex; flex-wrap: wrap; }
.decade-chip {
  font-weight: 800;
  border-width: 2.5px;
}
.decade-chip.on {
  background: linear-gradient(120deg, var(--cyan), var(--purple));
  color: #fff;
  border-color: var(--ink);
}
.custom-range-label {
  font-size: .8em; font-weight: 800; color: var(--ink-mid);
  margin-right: 4px;
}

/* オリジナル配信チップ: Netflix/Prime Videoそれぞれで選択中の色を変え、
   カード上の帯（.original-tag）とも色を揃える */
.chip.original-netflix.on { background: linear-gradient(120deg, #ff4fa3, #ff8a5b); color: #fff; }
.chip.original-prime.on   { background: linear-gradient(120deg, #22d3ee, #0ea5e9); color: #fff; }

.original-tag {
  position: absolute; top: 8px; right: 8px;
  border: 2px solid var(--ink); border-radius: 999px;
  padding: 2px 9px; font-size: .68em; font-weight: 900; color: #fff;
  white-space: nowrap;
}
.original-tag.netflix { background: linear-gradient(120deg, #ff4fa3, #ff8a5b); }
.original-tag.prime   { background: linear-gradient(120deg, #22d3ee, #0ea5e9); }

.search-box, select {
  border: 3px solid var(--ink); border-radius: 12px;
  padding: 9px 13px; font-size: .95em; font-family: inherit;
  background: #fff; color: var(--ink); font-weight: 600;
}
.search-box { width: 100%; }
.search-box:focus, select:focus { outline: 3px solid var(--cyan); outline-offset: 1px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row label { font-size: .85em; font-weight: 700; }

/* ---------- 結果 ---------- */
.results-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 22px 0 14px;
}
.results-head h2 { font-size: 1.3em; font-weight: 900; margin: 0; }
.results-head .n {
  background: var(--pink); color: #fff; border-radius: 999px;
  padding: 2px 14px; font-weight: 900; border: 3px solid var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .14s, box-shadow .14s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 9px 0 rgba(43,33,64,.15); }

.card-img { aspect-ratio: 2 / 3; background: var(--line); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 800; font-size: .9em; line-height: 1.35; }
.card-meta { font-size: .76em; color: var(--ink-mid); font-weight: 600; }

.badges { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.badge {
  font-size: .72em; font-weight: 800; border-radius: 7px;
  padding: 3px 7px; border: 2px solid var(--ink); line-height: 1.3;
}
.badge.jp      { background: var(--lime); }
.badge.hideme  { background: var(--cyan); }
.badge.nordvpn { background: var(--purple); color: #fff; }
.badge.off     { background: #eee; color: #999; border-color: #ccc; }

.card-img-wrap { position: relative; }

.load-more, .btn {
  display: block; margin: 22px auto 0; padding: 11px 30px;
  border: 3px solid var(--ink); border-radius: 999px;
  background: var(--yellow); font-weight: 900; font-size: .95em;
  cursor: pointer; box-shadow: 0 4px 0 var(--ink); font-family: inherit;
}
.load-more:hover, .btn:hover { transform: translateY(-2px); }

.empty {
  text-align: center; padding: 44px 20px;
  background: var(--card); border: 3px dashed var(--ink); border-radius: 18px;
  font-weight: 700;
}
.empty .big { font-size: 1.15em; font-weight: 900; margin-bottom: 10px; display: block; }

/* ---------- モーダル ---------- */
.modal {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(43, 33, 64, .62); padding: 20px;
  overflow-y: auto;
}
.modal.open { display: block; }
.modal-inner {
  background: var(--paper); max-width: 620px; margin: 30px auto;
  border: 4px solid var(--ink); border-radius: 20px;
  box-shadow: 0 8px 0 rgba(0,0,0,.25); padding: 22px; position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  border: 3px solid var(--ink); background: var(--pink); color: #fff;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 1.1em; font-weight: 900; cursor: pointer; line-height: 1;
}
.modal-action-btn {
  color: var(--ink); text-decoration: none;
  transition: transform .1s, background .15s ease, color .15s ease;
}
.modal-action-btn:hover { background: var(--purple); color: #fff; border-color: var(--purple); }

.modal-codoc {
  margin-top: 12px; padding-top: 10px; border-top: 2px dashed #e5e5e5;
  text-align: center;
}
.modal-inner h2 { margin: 0 0 4px; font-size: 1.3em; font-weight: 900; }
.modal-poster { width: 170px; border-radius: 12px; border: 3px solid var(--ink); float: left; margin: 0 16px 12px 0; }
.svc-block {
  clear: both; border: 3px solid var(--ink); border-radius: 14px;
  padding: 12px 14px; margin-top: 12px; background: #fff;
}
.svc-block h4 { margin: 0 0 8px; font-size: .95em; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.country-badge {
  display: inline-block; font-size: .76em; font-weight: 700;
  border: 2px solid var(--ink); border-radius: 6px;
  padding: 1px 7px; margin: 0 4px 4px 0; background: #fff;
}
.country-badge.free { background: var(--lime); }
.country-badge.adng { background: #ffd9d9; }
.more-link { font-size: .8em; font-weight: 800; color: var(--purple-d); cursor: pointer; text-decoration: underline; }

/* ---------- 個別ページ ---------- */
.work-page {
  background: var(--card); border: 3px solid var(--ink);
  border-radius: 18px; box-shadow: var(--shadow); padding: 24px;
}
.work-poster { width: 200px; border-radius: 12px; border: 3px solid var(--ink); float: left; margin: 0 18px 14px 0; }
.work-meta { color: var(--ink-mid); font-weight: 700; }
.work-back { display: inline-block; margin-top: 14px; font-weight: 900; color: var(--purple-d); }

.steps-box {
  clear: both; border: 3px solid var(--ink); border-radius: 14px;
  padding: 14px 16px; margin-top: 18px; background: #fff;
}
.steps-box summary {
  cursor: pointer; list-style: none; font-weight: 900;
  display: flex; align-items: center; justify-content: space-between;
}
.steps-box summary::-webkit-details-marker { display: none; }
.steps-box summary .arrow { color: var(--ink-mid); transition: transform .15s; }
.steps-box[open] summary .arrow { transform: rotate(180deg); }
.steps-list { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.step-row { display: flex; gap: 10px; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--purple); color: #fff; font-weight: 900; font-size: .85em;
  display: flex; align-items: center; justify-content: center;
}
.step-title { font-weight: 800; font-size: .92em; }
.step-desc { font-size: .82em; color: var(--ink-mid); margin-top: 2px; }
.vpn-links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.vpn-link-btn {
  display: inline-block; padding: 8px 16px; border: 3px solid var(--ink);
  border-radius: 999px; font-weight: 900; font-size: .85em; text-decoration: none;
  color: var(--ink); background: #fff; box-shadow: 0 3px 0 var(--ink);
  transition: transform .1s;
}
.vpn-link-btn:hover { transform: translateY(-2px); }
.vpn-link-btn.primary { background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff; }

.work-cta {
  display: block; text-align: center; margin: 22px auto 0; padding: 13px 30px;
  border: 3px solid var(--ink); border-radius: 999px;
  background: var(--yellow); font-weight: 900; font-size: .95em;
  color: var(--ink); text-decoration: none; box-shadow: 0 4px 0 var(--ink);
  transition: transform .1s;
}
.work-cta:hover { transform: translateY(-2px); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 640px) {
  h1 { font-size: 1.85em; }
  .container { padding: 14px 12px 48px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .control-row .label { min-width: 100%; }
  .modal-poster, .work-poster { float: none; display: block; margin: 0 auto 14px; }
}
