/* Animated Post Row – post detail block */

.apd {
	--apd-base: #0d0d12;
	--apd-card: #17171f;
	--apd-line: rgba(255, 255, 255, .09);
	--apd-text: #ececf1;
	--apd-mute: #9d9db0;
	--apd-accent: #ffb020;
	--apd-accent-2: #ff4d6d;
	--apd-ease: cubic-bezier(.2, .8, .2, 1);
	position: relative;
	margin: 0 0 32px;
	overflow: hidden;
	border-radius: 16px;
	background: var(--apd-base);
	color: var(--apd-text);
	font-size: 16px;
	line-height: 1.65;
	box-sizing: border-box;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.apd *, .apd *::before, .apd *::after { box-sizing: border-box; }

/* ---------- hero ---------- */
.apd__hero {
	position: relative;
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 34px;
	padding: 36px;
	isolation: isolate;
	overflow: hidden;
}
.apd__hero::before {
	content: "";
	position: absolute;
	inset: -40px;
	z-index: -2;
	background: var(--apd-bg, none) center / cover no-repeat;
	filter: blur(34px) saturate(1.3);
	opacity: .42;
}
.apd__hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(13, 13, 18, .25), var(--apd-base) 96%);
}
.apd__hero:not(:has(.apd__poster)) { grid-template-columns: 1fr; }

.apd__poster {
	margin: 0;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, .2);
	box-shadow: 0 24px 50px rgba(0, 0, 0, .55);
	transform: rotate(-1.5deg);
	transition: transform .5s var(--apd-ease);
}
.apd__poster:hover { transform: rotate(0) scale(1.03); }
.apd__poster img { display: block; width: 100%; height: 100%; object-fit: cover; }

.apd__main { align-self: center; min-width: 0; }
.apd__title {
	margin: 0 0 14px;
	padding: 0;
	color: #fff;
	font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.01em;
}
.apd__year { margin-left: 10px; color: var(--apd-mute); font-size: .55em; font-weight: 500; vertical-align: .35em; }

/* chips */
.apd__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.apd__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 5px 13px;
	border: 1px solid var(--apd-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, .06);
	color: var(--apd-text);
	font-size: .82rem;
	line-height: 1.4;
	list-style: none;
	backdrop-filter: blur(6px);
}
.apd__chip--rate { border-color: rgba(255, 176, 32, .5); background: rgba(255, 176, 32, .14); color: var(--apd-accent); }
.apd__chip--rate strong { color: #fff; }
.apd__chip--rate span { color: var(--apd-mute); font-size: .9em; }
.apd__chip--soft { color: var(--apd-mute); }

/* specs */
.apd__specs { display: grid; gap: 0; margin: 0 0 26px; max-width: 560px; border-top: 1px solid var(--apd-line); }
.apd__specs > div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--apd-line); }
.apd__specs dt { margin: 0; color: var(--apd-mute); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; align-self: center; }
.apd__specs dd { margin: 0; color: #fff; font-size: .95rem; }

.apd__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- buttons ---------- */
.apd .apd__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 22px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, #ffcb52, var(--apd-accent));
	color: #1b1200;
	font-size: .92rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 8px 20px rgba(255, 176, 32, .25);
	transition: transform .25s var(--apd-ease), box-shadow .25s, filter .25s;
}
.apd .apd__btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255, 176, 32, .4); filter: brightness(1.06); color: #1b1200; }
.apd .apd__btn--watch { background: linear-gradient(135deg, #ff7a8e, var(--apd-accent-2)); color: #fff; box-shadow: 0 8px 20px rgba(255, 77, 109, .28); }
.apd .apd__btn--watch:hover { color: #fff; box-shadow: 0 12px 26px rgba(255, 77, 109, .45); }
.apd .apd__btn--other, .apd .apd__btn--ghost { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.apd .apd__btn--other:hover, .apd .apd__btn--ghost:hover { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }

/* ---------- sections ---------- */
.apd__sec { padding: 6px 36px 30px; }
.apd__h {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	padding: 0;
	color: #fff;
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: .01em;
}
.apd__h::before { content: ""; width: 4px; height: 1.15em; border-radius: 4px; background: linear-gradient(var(--apd-accent), var(--apd-accent-2)); }
.apd__text p, .apd__review p { margin: 0 0 .9em; color: #d2d2de; }
.apd__text p:last-child, .apd__review p:last-child { margin-bottom: 0; }

.apd__video { overflow: hidden; border-radius: 12px; border: 1px solid var(--apd-line); background: #000; }
.apd__video iframe, .apd__video video { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }

/* screenshots */
.apd__shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.apd__shot { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; border: 1px solid var(--apd-line); background: #111; cursor: zoom-in; }
.apd__shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--apd-ease), filter .4s; }
.apd__zoom { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .3s; }
.apd__shot:hover img { transform: scale(1.08); filter: brightness(.8); }
.apd__shot:hover .apd__zoom { opacity: 1; }

/* links */
.apd__links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.apd__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 14px 18px;
	border: 1px solid var(--apd-line);
	border-left: 3px solid var(--apd-accent);
	border-radius: 12px;
	background: var(--apd-card);
	list-style: none;
	transition: transform .3s var(--apd-ease), border-color .3s, background .3s;
}
.apd__link--watch { border-left-color: var(--apd-accent-2); }
.apd__link--other { border-left-color: #6c7bff; }
.apd__link:hover { transform: translateX(4px); background: #1d1d27; border-color: rgba(255, 255, 255, .2); }
.apd__link-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.apd__link-label { color: #fff; font-weight: 600; }
.apd__link-note { padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--apd-mute); font-size: .78rem; }

/* review */
.apd__review { margin: 0; padding: 18px 22px; border: 1px solid var(--apd-line); border-radius: 12px; background: var(--apd-card); font-style: italic; }

/* ---------- entrance animation ---------- */
@keyframes apd-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.apd.is-in .apd__main > *, .apd.is-in .apd__poster, .apd.is-in .apd__sec { animation: apd-rise .8s var(--apd-ease) both; }
.apd.is-in .apd__main > :nth-child(2) { animation-delay: .08s; }
.apd.is-in .apd__main > :nth-child(3) { animation-delay: .16s; }
.apd.is-in .apd__main > :nth-child(4) { animation-delay: .24s; }
.apd.is-in .apd__sec:nth-of-type(1) { animation-delay: .15s; }
.apd.is-in .apd__sec:nth-of-type(2) { animation-delay: .22s; }
.apd.is-in .apd__sec:nth-of-type(3) { animation-delay: .29s; }
.apd:not(.is-in) .apd__main > *, .apd:not(.is-in) .apd__poster, .apd:not(.is-in) .apd__sec { opacity: 0; }

/* ---------- lightbox ---------- */
.apd-lb { position: fixed; inset: 0; z-index: 999999; display: grid; place-items: center; background: rgba(5, 5, 8, .92); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.apd-lb.is-open { opacity: 1; visibility: visible; }
.apd-lb img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); transform: scale(.96); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.apd-lb.is-open img { transform: none; }
.apd-lb button { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; transition: background .2s; }
.apd-lb button:hover { background: rgba(255, 255, 255, .25); }
.apd-lb__close { top: 18px; right: 18px; }
.apd-lb__prev { left: 18px; top: 50%; margin-top: -23px; }
.apd-lb__next { right: 18px; top: 50%; margin-top: -23px; }

/* ---------- responsive ---------- */
@media (max-width: 780px) {
	.apd__hero { grid-template-columns: 1fr; padding: 24px 20px; gap: 24px; justify-items: center; text-align: center; }
	.apd__poster { width: min(58%, 240px); }
	.apd__main { width: 100%; }
	.apd__chips, .apd__actions { justify-content: center; }
	.apd__specs { margin-inline: auto; text-align: left; }
	.apd__sec { padding: 4px 20px 26px; }
	.apd__shots { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.apd__link { flex-direction: column; align-items: stretch; text-align: center; }
	.apd__link-info { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	.apd *, .apd-lb, .apd-lb img { animation: none !important; transition: none !important; }
	.apd:not(.is-in) .apd__main > *, .apd:not(.is-in) .apd__poster, .apd:not(.is-in) .apd__sec { opacity: 1; }
}
