/* =============================================================
   detail.css — anime detail page (/anime/{slug}/)
   Builds on style.css (shared header/footer/cards/tokens).
   ============================================================= */

/* ---- Breadcrumb ---------------------------------------------- */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; color: rgba(255,255,255,.55); margin-bottom: 18px; }
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb svg { width: 12px; height: 12px; opacity: .5; }
.breadcrumb [aria-current] { color: var(--accent); }

/* ---- Hero ---------------------------------------------------- */
.detail-hero { position: relative; overflow: hidden; margin-bottom: 2rem; }
.detail-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; filter: blur(2px); transform: scale(1.08); z-index: 0; }
.detail-hero-bg--flat { background: linear-gradient(135deg, #2a2942, #1e1d2f); filter: none; transform: none; }
.detail-hero::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(30,29,47,.72) 0%, rgba(30,29,47,.88) 55%, var(--bg) 100%); }
.detail-hero-inner { position: relative; z-index: 2; padding: 24px 20px 8px; }
.detail-hero-body { display: flex; gap: 28px; align-items: flex-start; }
@media (max-width: 768px) { .detail-hero-body { flex-direction: column; align-items: center; text-align: center; gap: 18px; } }

.detail-poster { position: relative; flex-shrink: 0; width: 200px; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.detail-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.detail-poster .badge-type { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); color: #fff; }
@media (max-width: 768px) { .detail-poster { width: 150px; } }

.detail-info { flex: 1; min-width: 0; padding-top: 6px; }
.detail-title { font-size: 2rem; font-weight: 700; margin: 0 0 6px; line-height: 1.2; }
@media (max-width: 768px) { .detail-title { font-size: 1.4rem; } }
.detail-jp { font-size: 13px; color: rgba(255,255,255,.5); margin-bottom: 16px; }
.detail-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,.75); margin-bottom: 16px; }
@media (max-width: 768px) { .detail-stats { justify-content: center; } }
.detail-stats .quality { background: var(--accent); color: #111; font-weight: 700; padding: 3px 8px; border-radius: 4px; font-size: 10px; }
.detail-stats .tick-item { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #111; height: 20px; font-family: Arial, sans-serif; }
.detail-stats .tick-item svg { width: 12px; height: 12px; }
.detail-stats .tick-sub { background: var(--sub); }
.detail-stats .tick-dub { background: var(--dub); }
.detail-stats .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.4); }
.detail-stats .stat-rating { display: inline-flex; align-items: center; gap: 3px; color: var(--star); font-weight: 600; }
.detail-stats .stat-rating svg { width: 12px; height: 12px; fill: currentColor; }
.detail-stats .stat-status { color: var(--sub); font-weight: 600; }

.detail-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
@media (max-width: 768px) { .detail-genres { justify-content: center; } }
.genre-chip { padding: 5px 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; color: rgba(255,255,255,.8); font-size: 12px; font-weight: 500; transition: all .2s ease; }
.genre-chip:hover { background: rgba(255,186,222,.16); border-color: rgba(255,186,222,.4); color: var(--accent); }

.detail-actions { display: flex; gap: 10px; margin-bottom: 18px; }
@media (max-width: 768px) { .detail-actions { justify-content: center; } }
.detail-synopsis { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.7); max-width: 760px; margin: 0; }
@media (max-width: 768px) { .detail-synopsis { text-align: left; } }

/* ---- Layout: main + sidebar ---------------------------------- */
.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 30px; align-items: start; }
@media (max-width: 992px) { .detail-layout { grid-template-columns: minmax(0,1fr); } }
.detail-main { min-width: 0; }

/* ---- Episodes ------------------------------------------------- */
.ep-tools { display: flex; align-items: center; gap: 12px; }
.ep-count { font-size: 12px; color: rgba(255,255,255,.5); }
.ep-search { width: 90px; height: 32px; padding: 0 12px; background: var(--surface-2); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; color: #fff; font-size: 13px; outline: none; transition: all .2s ease; }
.ep-search:focus { border-color: rgba(255,186,222,.5); box-shadow: 0 0 0 3px rgba(255,186,222,.1); }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.ep-tile { display: flex; align-items: center; justify-content: center; height: 44px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: rgba(255,255,255,.8); font-size: 13px; font-weight: 600; transition: all .2s ease; }
.ep-tile:hover { background: var(--accent); border-color: var(--accent); color: #111; transform: translateY(-2px); }
.ep-tile.ep-filler { color: var(--star); border-color: rgba(255,170,44,.25); }
.ep-tile.ep-filler:hover { background: var(--star); border-color: var(--star); color: #111; }
.ep-tile.is-hidden { display: none; }
.ep-more-note { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 12px; }

/* ---- Sidebar info card --------------------------------------- */
.detail-side { align-self: start; }
.detail-info-card { background: var(--surface); border-radius: var(--radius); padding: 20px; }
.detail-info-card .side-h { font-size: 1rem; font-weight: 600; color: #fff; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-list li { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.8); }
.info-list .il-key { color: rgba(255,255,255,.5); font-weight: 500; margin-right: 4px; }
.info-list a { color: var(--accent); }
.info-list a:hover { text-decoration: underline; }

/* ---- Listing pages (genre/catalog/category/browse/az/search) - */
.listing-page { padding-top: 1.5rem; padding-bottom: 1rem; }
.listing-page .breadcrumb { margin-bottom: 16px; }
.listing-page .section-header h1 { font-size: 1.6rem; font-weight: 700; color: var(--accent); margin: 0; }
@media (max-width: 768px) { .listing-page .section-header h1 { font-size: 1.25rem; } }
.page-indicator { font-size: 13px; color: rgba(255,255,255,.45); font-weight: 500; }
.empty-state { text-align: center; padding: 3rem 1rem; background: var(--surface); border-radius: var(--radius); }
.empty-state p { color: rgba(255,255,255,.6); margin: 0 0 1.25rem; font-size: 14px; }

/* ---- Search page --------------------------------------------- */
.search-page-form { margin: 0 0 14px; }
.search-page-form input { width: 100%; max-width: 560px; height: 48px; padding: 0 20px; background: var(--surface-2); border: 1px solid rgba(255,255,255,.1); border-radius: 24px; color: #fff; font-size: 15px; outline: none; transition: all .2s ease; }
.search-page-form input:focus { border-color: rgba(255,186,222,.5); box-shadow: 0 0 0 3px rgba(255,186,222,.1); }
.search-status { font-size: 13px; color: rgba(255,255,255,.5); margin: 0 0 18px; }
.search-item { display: contents; }

/* ---- News ---------------------------------------------------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 18px; }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: all .2s ease; }
.news-card:hover { border-color: rgba(255,186,222,.35); transform: translateY(-3px); }
.news-tagrow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.news-tag { color: var(--accent); font-weight: 600; }
.news-date { color: rgba(255,255,255,.4); }
.news-title { font-size: 1rem; font-weight: 600; color: #fff; margin: 0 0 8px; line-height: 1.4; }
.news-card:hover .news-title { color: var(--accent); }
.news-excerpt { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,.6); margin: 0 0 12px; }
.news-more { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent); font-weight: 500; }
.news-more svg { width: 12px; height: 12px; }

/* ---- Static / legal pages ------------------------------------ */
.static-page { max-width: 860px; background: var(--surface); border-radius: 12px; padding: 2rem 2.25rem; color: #adb5bd; }
@media (max-width: 768px) { .static-page { padding: 1.5rem 1.25rem; } }
.static-page h1 { font-size: 1.6rem; font-weight: 700; color: #fff; margin: 0 0 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.static-page h2 { font-size: 1.15rem; font-weight: 600; color: #fff; margin: 1.75rem 0 .6rem; }
.static-page p { font-size: 14px; line-height: 1.75; margin: 0 0 1rem; }
.static-page ul { margin: 0 0 1rem 1.25rem; }
.static-page li { font-size: 14px; line-height: 1.7; margin-bottom: .35rem; }
.static-page a { color: var(--accent); }
.static-page a:hover { text-decoration: underline; }
.contact-form .form-group { margin-bottom: 1.1rem; }
.contact-form label { display: block; font-size: 13px; font-weight: 500; color: #fff; margin-bottom: 6px; }
.contact-form .form-control { width: 100%; padding: 10px 14px; background: var(--surface-2); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; color: #fff; font-size: 14px; outline: none; }
.contact-form .form-control:focus { border-color: rgba(255,186,222,.5); box-shadow: 0 0 0 3px rgba(255,186,222,.1); }
.contact-form textarea { resize: vertical; }

/* ---- 404 ----------------------------------------------------- */
.notfound { text-align: center; padding: 3rem 1rem 4rem; }
.notfound-code { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; line-height: 1;
  background: linear-gradient(90deg, var(--accent), #d7b8ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.notfound h1 { font-size: 1.5rem; font-weight: 700; color: #fff; margin: .5rem 0 .75rem; }
.notfound p { font-size: 14px; color: rgba(255,255,255,.6); max-width: 480px; margin: 0 auto 1.5rem; }
.notfound .search-page-form { display: flex; justify-content: center; }
.notfound-actions { display: flex; gap: 10px; justify-content: center; margin-top: 1.25rem; }

/* ---- SEO block ----------------------------------------------- */
.detail-seo { margin-top: 1rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.06); }
.detail-seo h2 { font-size: 1.15rem; font-weight: 600; color: #fff; margin: 0 0 .75rem; }
.detail-seo p { font-size: 13px; line-height: 1.75; color: #adb5bd; margin: 0 0 1rem; }
.detail-seo strong { color: #fff; }
.detail-seo a { color: var(--accent); }
.detail-seo a:hover { text-decoration: underline; }
