/* =============================================================================
   Hydros.TV — shared styles for the ratings pages (game-ratings.php, anime-ratings.php).
   Loaded after /css/site.css. Helpers: ratings-ui.php. Motion: /js/ratings.js.
   ========================================================================== */
/* =============================================================================
   Hero — breadcrumb, title, logo/icon stage, banner
   ========================================================================== */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; list-style: none; margin: 0; padding: 0; color: var(--ink-3); }
.crumbs li + li::before { content: '/'; margin-right: 10px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); transition: color .25s; }
.crumbs a:hover { color: var(--cyan); }
.crumbs [aria-current] { color: var(--ink); }
.hero-grid { display: grid; gap: clamp(24px, 4vw, 48px); align-items: center; }
@media (min-width: 900px) { .hero-grid--art { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); } }
.page-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.8rem, 10vw, 8.6rem); line-height: .92; letter-spacing: -.055em; text-wrap: balance; }
.page-title .t-line { display: block; overflow: clip; padding: .02em .04em .08em .02em; margin: 0 -.04em -.08em -.02em; }
.page-title .accent { color: var(--cyan); }
.page-title--sm { font-size: clamp(2.4rem, 7vw, 6rem); }
.hero-intro { margin-top: clamp(18px, 2.6vw, 28px); max-width: 52ch; }
.art-stage { position: relative; display: grid; place-items: center; aspect-ratio: 1; width: min(100%, 300px); justify-self: center; border-radius: 28px; background: radial-gradient(circle at 50% 45%, rgba(94, 231, 255, .16), transparent 65%), var(--bg-1); border: 1px solid var(--line-2); }
.art-stage img { width: 74%; height: 74%; object-fit: contain; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .55)); }
.art-stage--icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 27px; filter: none; }
.banner { position: relative; overflow: hidden; margin-bottom: clamp(22px, 3vw, 36px); border-radius: 16px; aspect-ratio: 1600 / 225; background: var(--bg-2); border: 1px solid var(--line); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 599px) { .banner { aspect-ratio: 16 / 5; } }
.media-cover { display: none; position: absolute; inset: 0; z-index: 2; background: var(--bg); transform-origin: right center; }

/* =============================================================================
   Platforms, consoles, leaderboard
   ========================================================================== */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { position: relative; display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 18px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--bg-1); transition: border-color .35s, translate .5s var(--ease), box-shadow .35s; }
.tile:hover { border-color: var(--cyan-35); translate: 0 -3px; box-shadow: 0 24px 48px -32px rgba(94, 231, 255, .5); }
.tile-art { display: grid; place-items: center; aspect-ratio: 16 / 11; border-radius: 12px; background: radial-gradient(circle at 50% 45%, rgba(94, 231, 255, .12), transparent 65%), var(--bg-2); overflow: hidden; }
.tile-art img { width: 62%; height: 72%; object-fit: contain; transition: transform .8s var(--ease); }
.tile:hover .tile-art img { transform: scale(1.06); }
.tile-art--icon img { width: 100%; height: 100%; object-fit: cover; }
.tile-art .ico { font-size: 34px; color: var(--ink-3); }
.tile-name { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.05rem, 1.6vw, 1.3rem); letter-spacing: -.03em; line-height: 1.15; }
.tile-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; color: var(--ink-3); }
.tile-meta b { color: var(--cyan); font-weight: 500; }
.tile-go { position: absolute; right: 16px; top: 16px; z-index: 1; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(7, 8, 12, .6); color: var(--ink-2); font-size: 14px; transition: transform .5s var(--ease), color .3s, border-color .3s; }
.tile:hover .tile-go { transform: rotate(45deg); color: var(--cyan); border-color: var(--cyan); }
.tile.is-empty { opacity: .55; }
.tile.is-empty:hover { opacity: .85; }

.board { border-top: 1px solid var(--line); }
.board-row { position: relative; display: grid; align-items: center; gap: 4px 16px; grid-template-columns: 44px 52px minmax(0, 1fr); grid-template-areas: "rank img title" "rank img score"; padding: 16px 0; border-bottom: 1px solid var(--line); }
.board-row::before { content: ''; position: absolute; inset: 0 -12px; z-index: -1; border-radius: 12px; background: linear-gradient(90deg, rgba(94, 231, 255, .08), transparent 80%); opacity: 0; transition: opacity .4s; }
.board-row:hover::before { opacity: 1; }
.board-rank { grid-area: rank; font-family: var(--f-display); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.2rem); letter-spacing: -.05em; color: var(--ink-3); }
.board-row:first-child .board-rank { color: var(--cyan); }
.board-img { grid-area: img; width: 52px; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--bg-2); box-shadow: 0 0 0 1px var(--line-2); }
.board-img img, .board-img .poster-img { width: 100%; height: 100%; object-fit: cover; }
.board-title { grid-area: title; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.board-title a { font-family: var(--f-display); font-weight: 600; font-size: clamp(1rem, 1.6vw, 1.3rem); letter-spacing: -.03em; line-height: 1.2; }
.board-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.board-title a:focus-visible { outline: none; }
.board-title a:focus-visible::after { outline: 2px solid var(--cyan); outline-offset: -2px; border-radius: 10px; }
.board-sub { color: var(--ink-3); }
.board-row .score { grid-area: score; }
@media (min-width: 760px) {
    .board-row { grid-template-columns: 64px 60px minmax(0, 1fr) 240px; grid-template-areas: "rank img title score"; gap: 20px; padding: 18px 0; }
    .board-img { width: 60px; }
}

/* Compact score (cards, leaderboard, DLC) */
.score { display: flex; align-items: center; gap: 12px; }
.score-num { font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; line-height: 1; letter-spacing: -.04em; color: var(--cyan); font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-num small { margin-left: 2px; font-weight: 500; font-size: .55em; color: var(--ink-3); letter-spacing: 0; }
.score-bar { position: relative; flex: 1; min-width: 60px; height: 6px; background: rgba(94, 231, 255, .1); -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 calc(10% - 2px), transparent calc(10% - 2px) 10%); mask-image: repeating-linear-gradient(90deg, #000 0 calc(10% - 2px), transparent calc(10% - 2px) 10%); }
.score-bar i { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, rgba(94, 231, 255, .5), var(--cyan)); }
.score.is-unrated { color: var(--ink-3); font-size: 10.5px; }
.board-row .score-num { font-size: clamp(1.4rem, 2.4vw, 2rem); }

/* Status + recommended chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(7, 8, 12, .75); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--ink-2); font-size: 9.5px; white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--completed { color: var(--cyan); border-color: var(--cyan-35); }
.chip--playing { color: #7dffb0; border-color: rgba(125, 255, 176, .35); }
.chip--backlog, .chip--not-playing { color: var(--ink-2); }
.chip--dropped { color: #ff8a98; border-color: rgba(255, 138, 152, .35); }
.chip--unreleased { color: #ffc56b; border-color: rgba(255, 197, 107, .35); }
.chip--end-of-service { color: var(--ink-3); }
.chip--rec { color: var(--cyan-ink); background: var(--cyan); border-color: var(--cyan); }
.chip--rec::before { display: none; }
.chip--plain::before { display: none; }

/* =============================================================================
   Library controls — status filters + sort
   ========================================================================== */
.lib-controls { display: grid; gap: 12px; margin-bottom: 22px; }
@media (min-width: 1000px) { .lib-controls { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .lib-status { grid-column: 1 / -1; } }
html:not(.js) .lib-controls .filters, html:not(.js) .sorts, .reveal-all .lib-controls .filters, .reveal-all .sorts { display: none; }
.filters, .sorts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter, .sort { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink-2); font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: color .25s, border-color .25s, background-color .25s; }
.filter b { font-weight: 500; color: var(--ink-3); }
.filter:hover, .sort:hover { color: var(--ink); border-color: var(--ink-3); }
.filter[aria-pressed="true"], .sort[aria-pressed="true"] { color: var(--cyan-ink); background: var(--cyan); border-color: var(--cyan); }
.filter[aria-pressed="true"] b { color: rgba(3, 20, 27, .65); }
.sorts-label { color: var(--ink-3); margin-right: 4px; }
.lib-status { color: var(--ink-3); }
/* anime statuses share the game palette */
.chip--in-progress { color: #7dffb0; border-color: rgba(125, 255, 176, .35); }
.chip--not-watched { color: var(--ink-3); }

/* =============================================================================
   Motion: pre-animation states for the shared pieces (js/ratings.js reveals them)
   ========================================================================== */
@media screen {
    html.js:not(.reveal-all) :is(.crumbs, .page-title, .art-stage, .banner) { opacity: 0; }
    html.js:not(.reveal-all) .score-fill { transform: scaleX(0); }
    html.js:not(.reveal-all) .banner .media-cover { display: block; }
}
.force-reveal .score-fill { transform: scaleX(var(--p, 0)) !important; }
@media print {
    html.js :is(.crumbs, .page-title, .art-stage, .banner) { opacity: 1 !important; transform: none !important; }
    .score-fill { transform: scaleX(var(--p, 0)) !important; }
    .lib-controls { display: none !important; }
}
