/*
Theme Name: Dro Cinema
Description: A modern, poster-first theme for a personal film, TV and book review blog. Reads the poster and "x/10" rating from each post automatically.
Version: 1.3.1
Author: Dro
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: dro-cinema
*/

:root {
	--bg: #0e1013;
	--bg-2: #161a20;
	--line: #262b33;
	--text: #e9e6df;
	--muted: #8d939c;
	--accent: #f2b544;
	--top: #f2b544;
	--good: #7cc4a0;
	--mid: #8fa7c7;
	--low: #a1857a;
	--mat: #f4efe6;
	--radius: 4px;
	--max: 1240px;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	--serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.75 var(--sans);
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 20;
	background: rgba(14, 16, 19, .88);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: .02em; }
.brand__mark { color: var(--accent); font-size: 14px; }
.nav { flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.nav__list a { display: block; padding: 6px 12px; border-radius: 999px; color: var(--muted); font-size: 14px; }
.nav__list a:hover { color: var(--text); background: var(--bg-2); }
.nav__list a.is-active, .nav__list .current-menu-item a { color: #111; background: var(--accent); }
.search input {
	width: 220px; padding: 8px 14px; border-radius: 999px;
	border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; font-size: 14px;
}
.search input:focus { outline: none; border-color: var(--accent); }

/* Page head */
.page-head { padding: 56px 24px 32px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(32px, 4vw, 48px); font-weight: 600; margin: 4px 0 8px; line-height: 1.2; }
.page-head__sub { color: var(--muted); margin: 0; }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin: 0; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 40px 28px; }
.grid--6 { grid-template-columns: repeat(6, 1fr); }

/* Poster frame — the "mat" around every poster */
.frame {
	background: var(--mat);
	padding: 8px 8px 8px;
	border-radius: var(--radius);
	box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 14px 30px -12px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.4);
	transition: transform .25s ease, box-shadow .25s ease;
}
.frame img {
	width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
	border-radius: 2px; background: #ddd;
}
.frame__empty {
	aspect-ratio: 2 / 3; display: grid; place-items: center;
	background: linear-gradient(160deg, #2a2f38, #15181d); color: #6b717b;
	font-family: var(--serif); font-size: 48px; border-radius: 2px;
}
.frame--lg { padding: 12px; }
.card__link:hover .frame { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 22px 40px -14px rgba(0,0,0,.9), 0 0 0 1px rgba(242,181,68,.55); }
.card__link:hover .card__title { color: var(--accent); }

/* Rating */
.rating { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.rating__num { font-weight: 700; font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; min-width: 2.6em; }
.rating__num small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.rating__bar { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.rating__bar span { display: block; height: 100%; border-radius: 4px; }
.rating--top .rating__num { color: var(--top); }   .rating--top .rating__bar span { background: var(--top); }
.rating--good .rating__num { color: var(--good); } .rating--good .rating__bar span { background: var(--good); }
.rating--mid .rating__num { color: var(--mid); }   .rating--mid .rating__bar span { background: var(--mid); }
.rating--low .rating__num { color: var(--low); }   .rating--low .rating__bar span { background: var(--low); }
.rating--none .rating__num { color: var(--muted); }
.rating--lg { margin-top: 20px; padding: 16px 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; }
.rating--lg .rating__num { font-size: 40px; }
.rating--lg .rating__num small { font-size: 16px; }
.rating--lg .rating__bar { height: 6px; }

.card__title { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 8px 0 2px; transition: color .2s; }
.card__meta { font-size: 13px; color: var(--muted); margin: 0; }

/* Single review */
.review { display: grid; grid-template-columns: 320px 1fr; gap: 56px; padding-top: 48px; padding-bottom: 32px; align-items: start; }
.review__poster { position: sticky; top: 96px; }
.review__title { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 44px); font-weight: 600; line-height: 1.2; margin: 8px 0 6px; }
.review__year { color: var(--muted); font-weight: 400; font-family: var(--sans); font-size: .6em; }
.review__date { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.prose { font-size: 17px; line-height: 1.9; max-width: 720px; }
.prose p { margin: 0 0 1.1em; }
.prose a { color: var(--accent); }
.prose img { margin: 16px 0; border-radius: var(--radius); }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: #cfcac1; }
.alt-title-label {
	display: inline-block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
	color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; margin-right: 6px; vertical-align: 2px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; max-width: 720px; }
.chip { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); }
.chip:hover { color: var(--text); border-color: var(--accent); }
.post-nav { display: flex; justify-content: space-between; gap: 24px; margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); max-width: 720px; }
.related { padding-top: 32px; padding-bottom: 64px; }
.section-title { font-size: 18px; font-weight: 600; margin: 0 0 24px; }

/* Comments */
.comments { margin-top: 48px; max-width: 720px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment__head { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.comment__head img { border-radius: 50%; }
.comment__head time { display: block; color: var(--muted); font-size: 12px; }
.comment__body { margin: 8px 0 0 52px; }
.comment-reply-link { margin-left: 52px; font-size: 13px; color: var(--muted); }
.comment-respond input[type=text], .comment-respond input[type=email], .comment-respond input[type=url], .comment-respond textarea {
	width: 100%; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font: inherit;
}
.comment-respond label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.comment-respond p { margin: 0 0 14px; }
.comment-respond .submit { background: var(--accent); color: #111; border: 0; border-radius: 999px; padding: 10px 24px; font-weight: 600; cursor: pointer; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 56px 0 72px; }
.pagination .page-numbers { min-width: 40px; padding: 8px 14px; text-align: center; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.pagination .current { background: var(--accent); color: #111; border-color: var(--accent); }
.pagination a.page-numbers:hover { color: var(--text); border-color: var(--text); }
.empty { color: var(--muted); padding: 40px 0 80px; }
.page-article { max-width: 760px; padding-top: 48px; padding-bottom: 64px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer__inner { display: flex; justify-content: space-between; padding-top: 28px; padding-bottom: 28px; }

/* WordPress alignment classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* Responsive */
@media (max-width: 960px) {
	.review { grid-template-columns: 240px 1fr; gap: 36px; }
	.grid--6 { grid-template-columns: repeat(3, 1fr); }
	.search input { width: 160px; }
}
@media (max-width: 700px) {
	.header__inner { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 10px; gap: 10px 16px; }
	.nav { order: 3; flex-basis: 100%; }
	.search { margin-left: auto; }
	.search input { width: 150px; }
	.grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
	.review { grid-template-columns: 1fr; padding-top: 28px; }
	.review__poster { position: static; max-width: 260px; margin: 0 auto; width: 100%; }
	.page-head { padding-top: 32px; }
}

/* ================================================================== */
/* v1.2 — atmosphere, glass, hero, sidebar, tag cloud                 */
/* ================================================================== */
:root {
	--glass: rgba(255, 255, 255, .045);
	--glass-2: rgba(255, 255, 255, .08);
	--glass-line: rgba(255, 255, 255, .09);
}
body {
	background:
		radial-gradient(1100px 600px at 8% -10%, rgba(242, 181, 68, .16), transparent 60%),
		radial-gradient(900px 600px at 100% 0%, rgba(96, 120, 255, .14), transparent 60%),
		radial-gradient(900px 700px at 60% 110%, rgba(124, 196, 160, .10), transparent 60%),
		linear-gradient(180deg, #101318 0%, #0b0d10 100%);
	background-attachment: fixed;
	min-height: 100vh;
}
body::before { /* film grain */
	content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.site-main, .site-footer { position: relative; z-index: 1; }

/* Header */
.site-header {
	background: linear-gradient(180deg, rgba(16, 19, 24, .82), rgba(16, 19, 24, .62));
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	border-bottom: 1px solid var(--glass-line);
}
.site-header::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
	background: linear-gradient(90deg, transparent, rgba(242, 181, 68, .8) 30%, rgba(96, 120, 255, .6) 70%, transparent);
}
.site-header__glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.site-header__glow::before {
	content: ""; position: absolute; width: 420px; height: 120px; left: -80px; top: -60px;
	background: radial-gradient(closest-side, rgba(242, 181, 68, .25), transparent); filter: blur(10px);
}
.header__inner { height: 72px; position: relative; }
.brand__mark {
	width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #111;
	background: linear-gradient(135deg, #ffd27a, #f2b544 55%, #d98b2b);
	box-shadow: 0 6px 18px -6px rgba(242, 181, 68, .7), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--serif); font-size: 22px; letter-spacing: .01em; }
.brand__tag { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-top: 3px; }
.nav__list a { border: 1px solid transparent; }
.nav__list a:hover { background: var(--glass-2); border-color: var(--glass-line); }
.nav__list a.is-active, .nav__list .current-menu-item a { box-shadow: 0 6px 16px -8px rgba(242, 181, 68, .9); }
.search input { background: var(--glass); border-color: var(--glass-line); padding-left: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238d939c' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: 13px 50%; }

/* Hero panel */
.hero {
	position: relative; overflow: hidden; margin: 36px 0 36px; border-radius: 20px;
	border: 1px solid var(--glass-line);
	background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.hero__backdrop {
	position: absolute; inset: -40px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px;
	filter: blur(18px) saturate(130%); opacity: .45; transform: rotate(-4deg) scale(1.1);
}
.hero__backdrop span { background-size: cover; background-position: center; border-radius: 8px; min-height: 320px; }
.hero::after {
	content: ""; position: absolute; inset: 0;
	background:
		linear-gradient(90deg, rgba(12, 14, 18, .92) 0%, rgba(12, 14, 18, .72) 45%, rgba(12, 14, 18, .35) 100%),
		radial-gradient(600px 200px at 0% 0%, rgba(242, 181, 68, .18), transparent);
}
.hero__inner { position: relative; z-index: 1; padding: 44px 48px 40px; }
.hero--slim .hero__inner { padding: 28px 36px; }
.hero__badge {
	display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
	font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
	padding: 5px 14px 5px 6px; border-radius: 999px; background: rgba(242, 181, 68, .1); border: 1px solid rgba(242, 181, 68, .3);
}
.hero__badge-icon {
	width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
	background: var(--accent); color: #111; font-size: 13px; font-weight: 700; letter-spacing: 0;
}
.hero__title {
	font-family: var(--serif); font-weight: 600; margin: 0; line-height: 1.1;
	font-size: clamp(36px, 5vw, 64px);
	background: linear-gradient(180deg, #fff 30%, #d9d3c6); -webkit-background-clip: text; background-clip: text; color: transparent;
	text-shadow: 0 2px 30px rgba(0, 0, 0, .3);
}
.hero--slim .hero__title { font-size: clamp(26px, 3vw, 36px); }
.hero__desc { color: #c4c0b8; margin: 12px 0 0; max-width: 620px; }
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 26px 0 0; }
.stats li, .stats li a {
	display: flex; flex-direction: column; gap: 2px; padding: 10px 18px; border-radius: 12px;
	background: rgba(255, 255, 255, .06); border: 1px solid var(--glass-line); backdrop-filter: blur(6px);
}
.stats li.stats__wide { padding: 0; background: none; border: 0; }
.stats li a:hover { border-color: rgba(242, 181, 68, .6); color: inherit; }
.stats strong { font-size: 22px; font-weight: 700; line-height: 1.1; color: #fff; }
.stats span { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.stats__wide strong { font-size: 16px; font-family: var(--serif); }

/* Layout with sidebar */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.layout .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.sidebar { position: static; display: flex; flex-direction: column; gap: 20px; padding-bottom: 40px; }
.panel {
	padding: 20px 20px 18px; border-radius: 16px;
	background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
	border: 1px solid var(--glass-line); backdrop-filter: blur(10px);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.panel__title { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 14px; color: var(--text); font-weight: 600; }
.panel__title small { display: block; letter-spacing: .02em; text-transform: none; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 4px; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 8px; font-size: 14px; color: #cfcac1; }
.cat-list a:hover, .cat-list a.is-active { background: var(--glass-2); color: var(--accent); }
.cat-list em { font-style: normal; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; line-height: 1.5; }
.tag-cloud__item { position: relative; color: #9aa1ab; transition: color .15s, text-shadow .15s; }
.tag-cloud__item.lvl-2 { color: #c9c4ba; }
.tag-cloud__item.lvl-3 { color: #f3e3c0; font-weight: 600; }
.tag-cloud__item:hover, .tag-cloud__item.is-active { color: var(--accent); text-shadow: 0 0 18px rgba(242, 181, 68, .45); }
.tag-cloud__item::after {
	content: attr(data-count); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translate(-50%, 4px);
	white-space: nowrap; font-size: 12px; font-weight: 600; color: #111; background: var(--accent);
	padding: 3px 9px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
	text-shadow: none; z-index: 5;
}
.tag-cloud__item:hover::after { opacity: 1; transform: translate(-50%, 0); }

/* Cards & single — glass touches */
.rating--lg { background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border-color: var(--glass-line); backdrop-filter: blur(8px); }
.chip { background: var(--glass); border-color: var(--glass-line); }
.pagination .page-numbers { background: var(--glass); border-color: var(--glass-line); }
.pagination .current { background: var(--accent); }
.site-footer { background: rgba(10, 12, 15, .6); border-top-color: var(--glass-line); }

@media (max-width: 1100px) {
	.layout { grid-template-columns: 1fr; }
	.sidebar { position: static; display: grid; grid-template-columns: 1fr 2fr; }
}
@media (max-width: 700px) {
	.hero { margin: 20px 0 24px; border-radius: 14px; }
	.hero__inner { padding: 28px 22px; }
	.sidebar { grid-template-columns: 1fr; }
	.brand__tag { display: none; }
}

/* ================================================================== */
/* v1.3 — genres, film series                                         */
/* ================================================================== */
.genre-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.genre-bar--sub { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--glass-line); }
.genre-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; padding: 5px 12px; border-radius: 999px;
	background: var(--glass); border: 1px solid var(--glass-line); color: #d6d1c8; transition: border-color .15s, color .15s, background .15s; }
.genre-chip em { font-style: normal; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.genre-chip:hover { border-color: rgba(242, 181, 68, .6); color: #fff; }
.genre-chip.is-active { background: var(--accent); border-color: var(--accent); color: #111; }
.genre-chip.is-active em { color: rgba(17, 17, 17, .65); }
.genre-chip--sub { font-size: 12px; padding: 4px 10px; }
.series { margin: 0 0 56px; scroll-margin-top: 96px; }
.series__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--glass-line); }
.series__title { font-size: 22px; font-weight: 700; margin: 0; }
.series__title a:hover { color: var(--accent); }
.series__meta { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.grid--series { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 32px 22px; }

/* v1.3.1 — header stays fully pinned (clears the WordPress admin bar) */
.site-header { position: sticky; top: 0; z-index: 50;
	background: linear-gradient(180deg, rgba(16, 19, 24, .96), rgba(16, 19, 24, .92)); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
