:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #66717a;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #dde3e7;
  --accent: #d9472f;
  --accent-dark: #a83224;
  --teal: #126a66;
  --gold: #d79c32;
  --shadow: 0 20px 50px rgba(23, 32, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  min-height: 88vh;
  background:
    radial-gradient(circle at 78% 24%, rgba(215, 156, 50, 0.28), transparent 23%),
    radial-gradient(circle at 68% 70%, rgba(18, 106, 102, 0.36), transparent 26%),
    linear-gradient(90deg, #11171b, #22333b 52%, #4c2f2a);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.site-header::before {
  width: 48vw;
  max-width: 680px;
  min-width: 320px;
  aspect-ratio: 1;
  right: -8vw;
  top: 96px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px) 0 0 / 54px 54px,
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 54px 54px;
  transform: rotate(-8deg);
}

.site-header::after {
  width: 34vw;
  max-width: 520px;
  min-width: 260px;
  height: 110px;
  right: 9vw;
  bottom: 82px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 18px, transparent 18px 36px),
    rgba(0, 0, 0, 0.12);
  transform: rotate(6deg);
}

.topbar {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
}

.top-actions,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-button,
.secondary-button,
.primary-button,
.trailer-button,
.similar-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.ghost-button {
  min-height: 38px;
  padding: 8px 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.ghost-button:hover,
.ghost-button.active {
  background: rgba(255, 255, 255, 0.25);
}

.hero {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
  padding: 72px 0 108px;
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: #f2b457;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7.4rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.subtitle {
  max-width: 560px;
  margin: 22px 0 30px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.22rem;
  line-height: 1.55;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 12px 18px;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--accent);
}

.secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.primary-button:hover,
.secondary-button:hover,
.trailer-button:hover,
.similar-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 14px auto 80px;
}

.seo-intro,
.popular-searches {
  margin: 0 0 28px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 23, 27, 0.88), rgba(34, 51, 59, 0.78)),
    rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.seo-intro h2,
.popular-searches h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
}

.seo-intro p {
  max-width: 900px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.65;
}

.filters-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.must-watch-shell {
  margin: 54px 0 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.popular-searches {
  margin: 44px 0 0;
}

.popular-search-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.popular-search-list button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease;
}

.popular-search-list button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.must-watch-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.must-watch-header h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.must-watch-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ghost-light-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #334049;
  background: #f7f7f3;
  cursor: pointer;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.ghost-light-button:hover,
.ghost-light-button.active {
  border-color: var(--teal);
  background: #e1f1ef;
  color: #0d514e;
  transform: translateY(-1px);
}

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.filter-group {
  min-width: 0;
  margin: 0;
  padding: 30px 22px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.filter-group:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.filter-group h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 850;
}

.segmented,
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented label,
.chip-grid label {
  min-width: 0;
}

.segmented input,
.chip-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span,
.chip-grid span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f3;
  color: #334049;
  padding: 8px 12px;
  cursor: pointer;
  line-height: 1.2;
}

.segmented input:checked + span,
.chip-grid input:checked + span {
  border-color: var(--teal);
  background: #e1f1ef;
  color: #0d514e;
  font-weight: 800;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 44px 0 18px;
}

.results-header h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

#resultCount {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.compact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recommendation-card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 32, 38, 0.08);
}

.poster {
  min-height: 220px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, var(--poster-a), var(--poster-b));
}

.poster::before,
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.poster::before {
  opacity: 0.62;
}

.poster::after {
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.poster.pattern-bilimkurgu::before {
  background:
    radial-gradient(circle at 70% 24%, transparent 0 34px, rgba(255, 255, 255, 0.45) 35px 36px, transparent 37px 70px),
    radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.85) 0 5px, transparent 6px),
    linear-gradient(115deg, transparent 48%, rgba(255, 255, 255, 0.28) 49% 51%, transparent 52%);
}

.poster.pattern-suc::before {
  background:
    linear-gradient(28deg, transparent 0 44%, rgba(255, 255, 255, 0.28) 44% 46%, transparent 46%),
    linear-gradient(154deg, transparent 0 53%, rgba(255, 255, 255, 0.22) 53% 55%, transparent 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.15) 0 1px, transparent 1px 24px);
}

.poster.pattern-savas::before {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0 12px, transparent 12px 24px),
    linear-gradient(90deg, transparent 0 18%, rgba(0, 0, 0, 0.25) 18% 24%, transparent 24% 100%);
}

.poster.pattern-korku::before {
  background:
    linear-gradient(84deg, transparent 0 48%, rgba(255, 255, 255, 0.24) 48% 50%, transparent 50%),
    linear-gradient(96deg, transparent 0 58%, rgba(0, 0, 0, 0.32) 58% 60%, transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 3px, transparent 3px 16px);
}

.poster.pattern-fantastik::before {
  background:
    conic-gradient(from 45deg at 25% 28%, transparent 0 12.5%, rgba(255, 255, 255, 0.34) 12.5% 15%, transparent 15% 100%),
    conic-gradient(from 0deg at 72% 66%, transparent 0 12.5%, rgba(255, 255, 255, 0.28) 12.5% 15%, transparent 15% 100%);
}

.poster.pattern-dram::before {
  background:
    linear-gradient(180deg, transparent 0 42%, rgba(255, 255, 255, 0.22) 42% 43%, transparent 43%),
    radial-gradient(ellipse at 28% 78%, rgba(255, 255, 255, 0.24), transparent 42%);
}

.poster.pattern-komedi::before {
  background:
    radial-gradient(circle at 24% 28%, rgba(255, 255, 255, 0.34) 0 12px, transparent 13px),
    radial-gradient(circle at 70% 36%, rgba(255, 255, 255, 0.26) 0 18px, transparent 19px),
    radial-gradient(circle at 48% 72%, rgba(255, 255, 255, 0.22) 0 10px, transparent 11px);
}

.poster.pattern-gerilim::before {
  background:
    linear-gradient(118deg, transparent 0 42%, rgba(255, 255, 255, 0.34) 42% 43%, transparent 43%),
    linear-gradient(118deg, transparent 0 58%, rgba(0, 0, 0, 0.22) 58% 62%, transparent 62%);
}

.poster.pattern-gizem::before {
  background:
    radial-gradient(circle at 28% 28%, transparent 0 26px, rgba(255, 255, 255, 0.32) 27px 28px, transparent 29px),
    radial-gradient(circle at 68% 70%, transparent 0 40px, rgba(255, 255, 255, 0.24) 41px 42px, transparent 43px);
}

.poster.pattern-macera::before {
  background:
    linear-gradient(135deg, transparent 0 32%, rgba(255, 255, 255, 0.3) 32% 34%, transparent 34%),
    linear-gradient(45deg, transparent 0 58%, rgba(255, 255, 255, 0.22) 58% 60%, transparent 60%),
    radial-gradient(circle at 76% 22%, rgba(255, 255, 255, 0.28) 0 7px, transparent 8px);
}

.poster-type {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.poster-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 2.15rem);
  line-height: 1;
  font-weight: 900;
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.poster-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  position: relative;
  z-index: 1;
}

.poster-stat {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.poster-stat strong,
.poster-stat span {
  display: block;
}

.poster-stat strong {
  font-size: 1.15rem;
}

.poster-stat span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 800;
}

.match-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #d8e4e2;
  border-radius: 8px;
  background: #f2faf8;
}

.match-score {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background:
    conic-gradient(var(--teal) calc(var(--match) * 1%), #d7e5e2 0),
    var(--teal);
  font-size: 0.95rem;
  font-weight: 900;
}

.match-score span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
}

.match-text {
  min-width: 0;
}

.match-text strong,
.match-text span {
  display: block;
}

.match-text strong {
  margin-bottom: 3px;
}

.match-text span {
  color: #4f6265;
  font-size: 0.88rem;
  line-height: 1.35;
}

.card-body h3 {
  margin: 8px 0 10px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 6px 9px;
  border-radius: 8px;
  background: #edf0f1;
  color: #334049;
  font-size: 0.8rem;
  font-weight: 800;
}

.description,
.reason {
  color: #40505a;
  line-height: 1.55;
}

.description {
  margin: 0 0 14px;
}

.reason {
  margin: 0 0 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.reason strong {
  color: var(--ink);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.trailer-button,
.similar-button {
  min-height: 42px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  font-weight: 850;
}

.trailer-button {
  color: var(--teal);
  background: #e1f1ef;
  border: 1px solid #b8d9d4;
}

.similar-button {
  color: #fff;
  background: var(--teal);
}

.empty-message {
  margin: 28px 0 0;
  padding: 22px;
  border: 1px dashed #c7cfd4;
  border-radius: 8px;
  color: #53616a;
  background: #fff;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
}

.info-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 44px 0 0;
}

.info-panel {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.info-panel h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.info-panel p {
  margin: 0;
  color: #40505a;
  line-height: 1.6;
}

.info-panel a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--teal);
  font-weight: 850;
  text-decoration: none;
}

.info-panel a:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: #40505a;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 900px) {
  .topbar,
  .results-header,
  .must-watch-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters,
  .cards-grid,
  .compact-grid,
  .info-sections {
    grid-template-columns: 1fr;
  }

  .filter-group:nth-child(odd) {
    border-right: 0;
  }

  .site-header {
    min-height: 82vh;
  }
}

@media (max-width: 560px) {
  .topbar,
  .hero,
  main,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .top-actions,
  .hero-actions,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .ghost-button,
  .primary-button,
  .secondary-button {
    flex: 1 1 100%;
  }

  .must-watch-shell {
    padding: 18px;
  }

  .must-watch-controls {
    width: 100%;
  }

  .popular-search-list button {
    flex: 1 1 100%;
  }

  .ghost-light-button {
    flex: 1 1 auto;
  }

  h1 {
    font-size: clamp(2.6rem, 18vw, 4.3rem);
  }

  .filter-group {
    padding: 28px 18px 18px;
  }

  .segmented span,
  .chip-grid span {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .poster {
    min-height: 190px;
  }
}
