@import './player/player.css';
@import './catalog/catalog.css';
@import './ads/ads.css';

/* 暗夜紫 (Midnight Purple) 主題色票系統 */
:root {
  --bg: #0e0b14;
  --surface: #171222;
  --surface-elevated: #211a30;
  --border: #2a1f3d;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #8b5cf6;
  --accent-hover: #d946ef;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  --badge-amateur-gradient: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-stack);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 頂部導航列 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(14, 11, 20, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}

.header-container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 38px;
  width: auto;
}

.search-box {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  border-color: var(--accent);
  background-color: var(--surface-elevated);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  stroke: var(--muted);
}

/* 快捷標籤列 */
.filter-bar {
  background-color: #120e1b;
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  overflow-x: auto;
  white-space: nowrap;
}

.filter-container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background-color: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  color: var(--text);
  border-color: var(--accent);
}

.filter-chip.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.filter-chip.chip-priority {
  border-color: rgba(139, 92, 246, 0.55);
}

/* 主內容區 */
.main-layout {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* 播放器英雄區 */
.hero-player-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.player-info-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-video-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.player-video-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.player-seller-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.45);
  color: #ddd6fe;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-tag {
  padding: 4px 10px;
  background-color: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: #e9d5ff;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.player-tag:hover {
  border-color: var(--accent-hover);
  background-color: rgba(217, 70, 239, 0.16);
}

/* 區塊標題 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* 頁尾 */
.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background-color: #0b0810;
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* 靜態 SEO 連結 */
.seo-static-links {
  border-top: 1px solid var(--border);
  padding: 24px;
  font-size: 12px;
  color: #6b7280;
  background-color: #09070e;
}

.seo-static-links h3 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.seo-static-links a {
  color: #8b7aa8;
  text-decoration: none;
  margin-right: 14px;
  display: inline-block;
  line-height: 2;
}

.seo-static-links a:hover {
  color: var(--accent-hover);
}

/* 18+ 年齡驗證彈窗 */
.age-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(8, 5, 14, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.age-gate-content {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 460px;
  width: 100%;
  padding: 32px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.85);
}

.age-gate-icon {
  margin-bottom: 16px;
  color: var(--accent-hover);
}

.age-gate-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.age-gate-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.age-gate-btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  background: var(--accent-gradient);
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.age-gate-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.age-gate-btn-secondary {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.age-gate-btn-secondary:hover {
  color: var(--text);
  border-color: var(--accent);
  background-color: var(--surface-elevated);
}

/* ==========================================================================
   版型 2~5 視覺系統（源自 Google Stitch MCP 生成設計系統整合）
   ========================================================================== */

/* 版型 2：FC2-HUB 私拍精選 (fc2hub / Deep Forest Emerald + Solid Brand Header) */
body[data-site-code="fc2hub"] {
  --bg: #071a14;
  --surface: #0d281f;
  --surface-elevated: #13382b;
  --border: #1e4d3b;
  --text: #ecfdf5;
  --muted: #a7f3d0;
  --accent: #10b981;
  --accent-hover: #facc15;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #facc15 100%);
  --font-stack: "Inter", system-ui, sans-serif;
}

body[data-site-code="fc2hub"] .site-header {
  background: linear-gradient(90deg, #063022 0%, #094531 100%);
  backdrop-filter: none;
  border-bottom: 2px solid #10b981;
}

body[data-site-code="fc2hub"] .header-container {
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 760px) {
  body[data-site-code="fc2hub"] .header-container {
    flex-direction: row;
  }
}

body[data-site-code="fc2hub"] .search-input {
  border-radius: 6px;
  border-color: #1e4d3b;
  background-color: #05140f;
}

body[data-site-code="fc2hub"] .search-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.28);
}

body[data-site-code="fc2hub"] .filter-bar {
  background-color: #061510;
}

body[data-site-code="fc2hub"] .filter-chip {
  font-family: "Space Grotesk", sans-serif;
  border-radius: 4px;
  transform: skewX(-8deg);
  border-color: #1e4d3b;
}

body[data-site-code="fc2hub"] .filter-chip.active {
  background: #10b981;
  color: #04120d;
  font-weight: 700;
  border-color: #34d399;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.42);
}

body[data-site-code="fc2hub"] .site-footer {
  background-color: #05120e;
  border-top-color: #13382b;
}

body[data-site-code="fc2hub"] .seo-static-links {
  background-color: #040e0b;
  border-top-color: #0d281f;
}

.brand-hero-spotlight {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  min-height: 260px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.16);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
}

@media (min-width: 760px) {
  .brand-hero-spotlight {
    min-height: 360px;
  }
}

.spotlight-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.68);
  transition: transform 0.6s ease;
}

.brand-hero-spotlight:hover .spotlight-backdrop {
  transform: scale(1.04);
}

.spotlight-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 26, 20, 0.96) 0%, rgba(13, 40, 31, 0.72) 55%, rgba(16, 185, 129, 0.16) 100%);
}

.spotlight-content {
  position: relative;
  z-index: 1;
  padding: 28px;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spotlight-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: #facc15;
  color: #05140f;
}

.spotlight-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #059669;
  box-shadow: 0 0 8px #10b981;
}

.spotlight-title {
  font-family: "Syne", "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  color: #ecfdf5;
}

@media (min-width: 760px) {
  .spotlight-title {
    font-size: 28px;
  }
}

.spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.spotlight-id {
  font-family: "Space Grotesk", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #facc15;
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.45);
  padding: 2px 8px;
  border-radius: 4px;
}

.spotlight-tag {
  font-size: 12px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
}

.spotlight-play-btn {
  align-self: flex-start;
  margin-top: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #05140f;
  background: #10b981;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spotlight-play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.55);
}

/* 版型 3：SIRO-CLUB 初撮素人 (siroclub / Velvet Wine Red & Rose Gold) */
body[data-site-code="siroclub"] {
  --bg: #1d0a10;
  --surface: #291018;
  --surface-elevated: #381722;
  --border: #63293a;
  --text: #fff1f2;
  --muted: #fda4af;
  --accent: #fb7185;
  --accent-hover: #fde047;
  --accent-gradient: linear-gradient(135deg, #fb7185 0%, #f59e0b 100%);
  --font-stack: "Hanken Grotesk", system-ui, sans-serif;
}

body[data-site-code="siroclub"] .site-header {
  background: rgba(29, 10, 16, 0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #63293a;
}

body[data-site-code="siroclub"] .search-input {
  border-radius: 2px;
  border-color: #63293a;
  background-color: #16070c;
}

body[data-site-code="siroclub"] .filter-bar {
  background-color: #17080d;
}

body[data-site-code="siroclub"] .filter-chip {
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 12px;
}

body[data-site-code="siroclub"] .filter-chip.active {
  background: transparent;
  color: #fda4af;
  border-bottom: 2px solid #fb7185;
  font-weight: 700;
}

body[data-site-code="siroclub"] .site-footer {
  background-color: #16070c;
  border-top-color: #4a1c2a;
}

body[data-site-code="siroclub"] .seo-static-links {
  background-color: #120509;
  border-top-color: #381722;
}

.brand-vip-ranking {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vip-ranking-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid #63293a;
  padding-bottom: 10px;
}

.vip-ranking-heading {
  font-family: "Bodoni Moda", Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffe4e6, #fb7185, #fde047);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.vip-ranking-sub {
  font-size: 11px;
  letter-spacing: 2px;
  color: #fda4af;
}

.vip-ranking-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scrollbar-width: thin;
}

.vip-rank-card {
  position: relative;
  flex: 0 0 230px;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
}

@media (min-width: 760px) {
  .vip-rank-card {
    flex: 0 0 280px;
  }
}

.vip-rank-number {
  font-family: "Bodoni Moda", Georgia, serif;
  font-style: italic;
  font-size: 62px;
  font-weight: 900;
  line-height: 0.8;
  margin-right: -14px;
  z-index: 2;
  background: linear-gradient(180deg, #ffe4e6 0%, #fb7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.92));
  user-select: none;
}

.vip-rank-poster {
  position: relative;
  flex: 1;
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid #63293a;
  background: #291018;
}

.vip-rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.vip-rank-card:hover .vip-rank-poster img {
  transform: scale(1.06);
}

.vip-rank-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px 10px 8px;
  background: linear-gradient(180deg, transparent, rgba(29, 10, 16, 0.96));
}

.vip-rank-code {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #fde047;
  margin-bottom: 2px;
}

.vip-rank-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff1f2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 版型 4：素人誌 (suromook / Kraft Sand Paper Daylight Editorial) */
body[data-site-code="suromook"] {
  --bg: #ede7dc;
  --surface: #f7f3eb;
  --surface-elevated: #e3dbc9;
  --border: #1e293b;
  --text: #1e293b;
  --muted: #475569;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-gradient: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  --font-stack: "Geist", system-ui, sans-serif;
}

body[data-site-code="suromook"] .site-header {
  background: rgba(237, 231, 220, 0.96);
  border-bottom: 2px solid #1e293b;
}

body[data-site-code="suromook"] .search-input {
  border-radius: 0;
  border-color: #94a3b8;
  background-color: #ffffff;
  color: #1e293b;
}

body[data-site-code="suromook"] .filter-bar {
  background-color: #e3dbc9;
  border-bottom: 1px solid #cbd5e1;
}

body[data-site-code="suromook"] .filter-chip {
  border-radius: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  background-color: #f7f3eb;
  border-color: #94a3b8;
  color: #334155;
}

body[data-site-code="suromook"] .filter-chip.active {
  background-color: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
  font-weight: 700;
  box-shadow: none;
}

body[data-site-code="suromook"] .player-tag {
  background-color: #e3dbc9;
  color: #1e293b;
}

body[data-site-code="suromook"] .player-recovery-bar {
  background-color: #e3dbc9;
  border-color: #94a3b8;
  color: #334155;
}

body[data-site-code="suromook"] .player-btn {
  background-color: #ffffff;
  border-color: #94a3b8;
  color: #1e293b;
}

body[data-site-code="suromook"] .site-footer {
  background-color: #e3dbc9;
  border-top: 2px solid #1e293b;
  color: #334155;
}

body[data-site-code="suromook"] .seo-static-links {
  background-color: #dad0bc;
  color: #475569;
}

body[data-site-code="suromook"] .seo-static-links a {
  color: #1e293b;
}

/* 版型 5：FC2 Lite (fc2lite / Cool Fog Light Quick Index) */
body[data-site-code="fc2lite"] {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-elevated: #e2e8f0;
  --border: #cbd5e1;
  --text: #0f172a;
  --muted: #475569;
  --accent: #ea580c;
  --accent-hover: #c2410c;
  --accent-gradient: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  --font-stack: "Geist", system-ui, sans-serif;
}

body[data-site-code="fc2lite"] .site-header {
  padding: 8px 20px;
  background: rgba(241, 245, 249, 0.96);
  border-bottom: 1px solid #cbd5e1;
}

body[data-site-code="fc2lite"] .search-input {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body[data-site-code="fc2lite"] .filter-bar {
  padding: 6px 20px;
  background-color: #e2e8f0;
}

body[data-site-code="fc2lite"] .filter-chip {
  border-radius: 3px;
  padding: 4px 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

body[data-site-code="fc2lite"] .filter-chip.active {
  background-color: #ea580c;
  color: #ffffff;
  border-color: #ea580c;
  font-weight: 700;
  box-shadow: none;
}

body[data-site-code="fc2lite"] .player-tag {
  background-color: #e2e8f0;
  color: #0f172a;
}

body[data-site-code="fc2lite"] .player-recovery-bar {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}

body[data-site-code="fc2lite"] .player-btn {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body[data-site-code="fc2lite"] .site-footer {
  background-color: #e2e8f0;
  border-top-color: #cbd5e1;
  color: #475569;
}

body[data-site-code="fc2lite"] .seo-static-links {
  background-color: #e8eef5;
  color: #475569;
}

body[data-site-code="fc2lite"] .seo-static-links a {
  color: #334155;
}

/* 雜誌編輯精選雙欄區塊 (Kraft Editorial Hero) */
.brand-magazine-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mag-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 2px solid var(--text);
  border-bottom: 1px solid #94a3b8;
  padding: 10px 0;
}

.mag-heading {
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.mag-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
}

.mag-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 760px) {
  .mag-grid {
    grid-template-columns: 1.45fr 1fr;
  }
}

.mag-lead-card,
.mag-side-card {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid #1e293b;
  cursor: pointer;
  background: var(--surface);
  aspect-ratio: 16 / 9;
  transition: border-color 0.2s ease;
}

.mag-lead-card:hover,
.mag-side-card:hover {
  border-color: #0d9488;
}

.mag-side-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}

.mag-lead-card img,
.mag-side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mag-card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.92));
}

.mag-card-code {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  background-color: #0d9488;
  color: #ffffff;
  padding: 1px 6px;
  margin-bottom: 6px;
}

.mag-card-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  color: #f8fafc;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
