:root {
  color-scheme: dark;
  --bg: #101014;
  --panel: #181820;
  --panel-2: #20202a;
  --text: #f4eef0;
  --muted: #b8a6ad;
  --line: #342832;
  --accent: #e0475d;
  --accent-2: #ff7a57;
  --accent-dark: #8f2638;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(224, 71, 93, 0.16), transparent 34rem),
    linear-gradient(180deg, #151219 0%, #101014 42rem, #0c0c10 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 14, 18, 0.92);
  backdrop-filter: blur(14px);
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1480px, calc(100% - 28px));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 28px rgba(224, 71, 93, 0.25);
}

.brand-text {
  overflow-wrap: anywhere;
}

.desktop-nav {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.desktop-nav a,
.mobile-nav-panel a,
.site-footer nav a {
  border-radius: 7px;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease;
}

.desktop-nav a {
  flex: 0 0 auto;
  padding: 10px 12px;
  font-size: 14px;
  white-space: nowrap;
}

.desktop-nav a:hover,
.mobile-nav-panel a:hover,
.site-footer nav a:hover {
  background: rgba(224, 71, 93, 0.12);
  color: #fff;
}

.mobile-nav {
  display: none;
  margin-left: auto;
  position: relative;
}

.mobile-nav summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  cursor: pointer;
  list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 2px 0;
  background: var(--text);
}

.mobile-nav-panel {
  position: absolute;
  top: 54px;
  right: 0;
  display: grid;
  width: min(82vw, 320px);
  max-height: calc(100vh - 86px);
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17171f;
  box-shadow: var(--shadow);
}

.mobile-nav-panel a {
  padding: 11px 12px;
}

.page-shell {
  width: min(1480px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.content-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.sidebar-nav,
.sidebar-text {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 24, 32, 0.88);
  box-shadow: var(--shadow);
}

.sidebar-nav {
  display: grid;
  padding: 14px;
}

.sidebar-nav h2,
.sidebar-text h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 17px;
}

.sidebar-nav a {
  display: block;
  padding: 10px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
  transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-nav a:hover {
  background: rgba(224, 71, 93, 0.12);
  color: #fff;
}

.sidebar-text {
  padding: 16px;
}

.sidebar-text p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.mobile-bottom-text {
  display: none;
  margin-top: 40px;
}

.content-main {
  min-width: 0;
}

.page-title {
  max-width: 920px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.14;
}

.lead {
  margin-bottom: 0;
  color: var(--muted);
}

.post-grid,
.related-grid {
  display: grid;
  gap: 16px;
}

.post-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.related-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.post-card,
.detail-card,
.related-block,
.empty-state,
.not-found {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 24, 32, 0.86);
  box-shadow: var(--shadow);
}

.post-card {
  overflow: hidden;
}

.poster-frame {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111116;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.post-card:hover .poster-frame img {
  transform: scale(1.035);
  opacity: 0.92;
}

.post-card-body {
  display: flex;
  align-items: center;
  min-height: 66px;
  padding: 10px 11px 12px;
}

.post-title {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.32;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-title:hover {
  color: #ff9a86;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.page-link {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
}

.page-link.active {
  border-color: transparent;
  background: var(--accent);
}

.page-link.disabled {
  color: #776a70;
  cursor: default;
}

.post-detail {
  display: grid;
  gap: 18px;
}

.detail-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 16px;
  overflow: hidden;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: #111116;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
}

.spec-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.spec-list div {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.spec-list dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.spec-list dd {
  min-width: 0;
  margin: 0;
  color: #fff;
  overflow-wrap: anywhere;
}

.spec-list dd img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  margin: 8px 8px 8px 0;
  border-radius: 7px;
}

.download-panel {
  margin-top: auto;
  padding-top: 22px;
}

.magnet-link,
.not-found a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(224, 71, 93, 0.22);
}

.download-missing {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.related-block {
  padding: 16px;
}

.related-block h2,
.empty-state h2,
.not-found h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.compact .post-card-body {
  min-height: 58px;
}

.empty-state,
.not-found {
  padding: 42px 18px;
  text-align: center;
}

.empty-state p,
.not-found p {
  color: var(--muted);
}

.not-found {
  max-width: 640px;
  margin: 0 auto;
}

.not-found span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0b0b0f;
  padding: 28px 14px 32px;
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: min(1180px, 100%);
  margin: 0 auto 16px;
}

.site-footer nav a {
  padding: 8px 10px;
  font-size: 14px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer p a {
  color: #fff;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .content-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 16px;
  }

  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .topline {
    min-height: 64px;
  }

  .page-shell {
    padding-top: 26px;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: 1fr;
  }

  .sidebar-nav {
    display: none;
  }

  .sidebar-text-desktop {
    display: none !important;
  }

  .mobile-bottom-text {
    display: block !important;
  }

  h1 {
    font-size: 28px;
  }

  .detail-card {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(190px, 60vw);
  }

  .spec-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 520px) {
  .topline,
  .page-shell {
    width: min(100% - 20px, 1480px);
  }

  .brand-text {
    max-width: 190px;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .post-card-body {
    min-height: 62px;
    padding: 9px;
  }

  .post-title {
    font-size: 13px;
  }

  .detail-body,
  .related-block {
    padding: 14px;
  }

  .page-link {
    min-width: 36px;
    height: 36px;
  }
}
