/*!
Theme Name: AnimeHub
Theme URI: https://animehub.dev/
Author: AnimeHub Team
Author URI: https://animehub.dev/
Description: A modern anime streaming platform theme for WordPress. Features include anime/episode/video management, AniList integration, ESV video support, and beautiful dark UI. Requires the animehub-core companion plugin.
Version: 3.1.2
Tested up to: 6.4
Requires PHP: 7.4
Requires Plugins: animehub-core
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: animehub
Tags: dark, entertainment, video, streaming, anime, custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

AnimeHub v2 - Anime Streaming Platform Theme
v3.1.2: embed-only player box collapsed to 0px (skin.css resets the 16:9 padding for <media-player>, which embed pages do not have); wrapper gets .is-embed-host with aspect-ratio 16/9.
v3.1.1: embed hosts outside the provider list (fembedx.top, videokatsu.top) were loaded into <media-player> as video and failed ("Failed to load resource"); Resolver and /video-url now share animehub_detect_source_type(), and the encrypted-primary resolve opens embeds in an iframe. Requires animehub-core 2.2.1.
v3.1.0 (audit 2026-10): Player - ULID servers flagged as ESV, signed ESV URL no longer in server-button markup, embed-primary pages wired (encrypted embed placeholder resolves, server switcher works, direct servers get a player), URL obfuscation decodable by the player, "Use API URLs" no longer strips server URLs, theme/core encryption de-duplicated. Stale nonces on cached pages: AnimeHub.Utils.request() renews via animehub/v1/nonces and retries once. Cache - no public caching or 304 for logged-in/search/404/non-GET, weak ETags matched, autosave/revision saves no longer purge Cloudflare, dead per-post cache readers/handlers removed. animehub_get_option() reads the live option before the consolidated copy. Guest ratings are not rendered into shared HTML (kept in localStorage). Video archive filters validated before reaching title/description/canonical. Requires animehub-core 2.2.0.
v3.0.0 (release): closes the 3.0 release-candidate cycle. No code change from 3.0.0-rc3 - the candidates ran on production throughout, so this tag marks the release, not a new build. Version synced across style.css, package.json, functions.php and readme.txt, which had drifted to rc3/rc2/rc1/1.0.0 respectively.
Phase 10 (v3.0.0-rc3): Player link protection reworked - Tier-4 referer auth removed, `animehub/v1/player-nonce` hands the player a live nonce so a nonce baked into 30-day-cached HTML no longer 403s, and the resolve call retries once on 403. Origin nginx now drops non-Cloudflare calls to the player REST routes (444). One resolve per page load instead of two (the server switcher was re-resolving the ULID the player had already asked for). Resource hints deduped across header.php, the SEO helper and core's wp_resource_hints(); CDN preconnects read from the ESV settings, and jsDelivr/vidstack.io are hinted only on pages that load a player or an HLS trailer.
Phase 9 (v3.0.0-rc2): Sidebar layout consolidated into base.css (single source for grid/sticky/responsive; reflows to a card grid below 1200px instead of being hidden). Sidebar enabled on anime/episode/video archives and taxonomies. Unified widget row renderer (.ah-wrow) replaces three parallel class families; one-line meta with a chip budget, cached term lookups, sidebar-sized image crops, schedule renders one day + JSON.
Phase 6 (v2.5.0): Webhook log custom table (replaces autoloaded option), bulk SQL JOIN webhook updates, async ThumbnailFetcher (wp_cron + negative cache), hidden esv_video CPT UI, admin dashboard widget + stuck-processing banner, PHPUnit + Brain Monkey, GitHub Actions CI. Requires animehub-core ≥ 1.3.0.
Phase 5 (v2.5.0-rc1): Templates split (single-{episode,video,anime}.php → template-parts/*-block.php), ESV\Resolver class, dart-sass + wp-scripts@30, Node 20.
Phase 4 (v2.4.0-rc1): Meta key + settings consolidation. Canonical key `animehub_esv_ulid` + consolidated `animehub_settings`. Legacy keys preserved (kept until v2.6).
*/html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0;font-family:var(--animehub-font);font-size:1rem;line-height:1.6;color:var(--animehub-text-soft);background-color:var(--animehub-bg)}main{display:block}h1,h2,h3,h4,h5,h6{clear:both;margin-top:0;margin-bottom:.5em;font-weight:700;line-height:1.3;color:var(--animehub-text)}h1{font-size:2.5rem}h2{font-size:2rem}h3{font-size:1.5rem}h4{font-size:1.25rem}h5{font-size:1rem}h6{font-size:.875rem}p{margin-top:0;margin-bottom:1em}a{color:var(--animehub-primary);text-decoration:none;transition:color var(--animehub-transition)}a:focus,a:hover{color:var(--animehub-primary-hover)}img{max-width:100%;height:auto;border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input[type=button],input[type=reset],input[type=submit]{display:inline-flex;align-items:center;justify-content:center;padding:.75em 1.5em;background-color:var(--animehub-primary);border:none;border-radius:var(--radius-2);color:var(--animehub-text);font-weight:600;cursor:pointer;transition:all var(--animehub-transition)}button:hover,input[type=button]:hover,input[type=reset]:hover,input[type=submit]:hover{background-color:var(--animehub-primary-hover);transform:translateY(-1px)}input[type=date],input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{padding:.75em 1em;background-color:var(--gray-800);border:1px solid var(--animehub-border-light);border-radius:var(--radius-2);color:var(--animehub-text-soft);transition:border-color var(--animehub-transition)}input[type=date]:focus,input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=url]:focus,select:focus,textarea:focus{outline:0;border-color:var(--animehub-primary)}.container{max-width:var(--animehub-container);margin:0 auto;padding:0 20px}.card{background-color:var(--animehub-bg-elevated);border-radius:var(--animehub-radius-sm);overflow:hidden;transition:transform var(--animehub-transition),box-shadow var(--animehub-transition)}.card:hover{transform:translateY(-5px);box-shadow:var(--animehub-shadow-primary)}.card-poster{position:relative;width:100%;padding-top:140%;background-color:var(--gray-800);overflow:hidden}.card-poster img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}.card-info{padding:12px}.card-title{font-size:14px;font-weight:600;color:var(--animehub-text);margin-bottom:6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.4}.card-meta{display:flex;justify-content:space-between;font-size:12px;color:var(--animehub-text-secondary)}.badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:var(--radius-1);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px}.grid{display:grid;gap:var(--animehub-card-gap)}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.alignleft{float:left;margin-right:1.5em;margin-bottom:1.5em}.alignright{float:right;margin-left:1.5em;margin-bottom:1.5em}.aligncenter{clear:both;display:block;margin-left:auto;margin-right:auto;margin-bottom:1.5em}@media screen and (max-width:1024px){h1{font-size:2rem}h2{font-size:1.5rem}}@media screen and (max-width:768px){.container{padding:0 15px}}