
:root {
  --cream: #f8f1e7;
  --cream-deep: #f0e5d7;
  --oat: #e8d9c8;
  --latte: #c3a58a;
  --brown: #8b6b55;
  --espresso: #49372f;
  --muted: #87776b;
  --white: #fffdf9;
  --border: #e7d9ca;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
}

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

button,
input,
select {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 3px;
}

button {
  cursor: pointer;
}

.site-header {
  min-height: 76px;
  padding: 14px clamp(18px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(248, 241, 231, 0.95);
  border-bottom: 1px solid var(--border);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -1px;
  white-space: nowrap;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: var(--espresso);
  color: var(--cream);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 20px;
}

.brand-dot,
.footer-brand span {
  color: var(--brown);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 35px);
}

.nav-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--espresso);
}

.header-cta,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--espresso);
  color: var(--cream);
  border-radius: 9px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-cta:hover,
.primary-button:hover {
  background: var(--brown);
  transform: translateY(-2px);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 490px;
  padding: 90px 20px 75px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(ellipse at 15% 25%, #e8d9c8 0%, transparent 35%),
    radial-gradient(ellipse at 85% 75%, #eadac8 0%, transparent 33%),
    var(--cream);
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--brown);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.1px;
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
}

.eyebrow-line {
  display: inline-block;
  width: 25px;
  height: 1px;
  background: var(--brown);
}

.hero h1,
.section-heading h2,
.about-section h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 500;
  line-height: 1.13;
  letter-spacing: -1.8px;
}

h1 em,
h2 em {
  color: var(--brown);
  font-weight: 400;
}

.hero-description {
  max-width: 450px;
  margin: 20px 0 26px;
  color: var(--muted);
  font-size: 14px;
}

.hero-note {
  margin-top: 25px;
  color: var(--muted);
  font-size: 11px;
}

.hero-note span {
  margin-right: 5px;
}

.hero-decoration {
  position: absolute;
  z-index: -1;
  color: #c3a58a;
  opacity: 0.65;
  pointer-events: none;
}

.decoration-one {
  top: 17%;
  left: 13%;
  font-size: 45px;
}

.decoration-two {
  right: 13%;
  bottom: 18%;
  font-size: 39px;
}

.discover-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 85px clamp(18px, 5vw, 60px);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 31px;
}

.section-heading h2,
.about-section h2 {
  font-size: clamp(32px, 5vw, 47px);
  letter-spacing: -1px;
}

.section-description {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.heading-flower {
  color: var(--brown);
  font-size: 38px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--brown);
}

.search-icon {
  color: var(--brown);
  font-size: 27px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--espresso);
  font-size: 13px;
}

.search-box input::placeholder {
  color: #a99a8d;
}

.clear-search {
  border: 0;
  background: transparent;
  color: var(--brown);
  font-size: 12px;
  font-weight: 700;
}

.filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 35px;
}

.filter-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.result-count {
  color: var(--muted);
  font-size: 11px;
}

.country-filters {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 14px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--oat) transparent;
}

.filter-chip {
  flex: 0 0 auto;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--espresso);
  background: var(--espresso);
  color: var(--cream);
}

.genre-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 12px;
}

.genre-filters select {
  max-width: 190px;
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--espresso);
}

.drama-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 20px;
}

.drama-card {
  min-width: 0;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: var(--oat);
  box-shadow: 0 4px 15px #49372f0a;
}

.poster-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.drama-card:hover .poster-wrap img {
  transform: scale(1.045);
}

.poster-placeholder {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  background: linear-gradient(145deg, #e8d9c8, #c3a58a);
  color: var(--espresso);
  font-family: var(--serif);
  font-size: 23px;
}

.country-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 20px;
  background: #fffdf9ed;
  color: var(--espresso);
  font-size: 10px;
  font-weight: 700;
}

.drama-info {
  padding: 12px 2px 0;
}

.drama-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.drama-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.drama-genres {
  margin-top: 8px;
  color: var(--brown);
  font-size: 11px;
}

.empty-state {
  padding: 50px 15px;
  text-align: center;
}

.empty-state > span {
  color: var(--brown);
  font-size: 38px;
}

.empty-state h3 {
  margin: 6px 0;
  font-family: var(--serif);
  font-size: 26px;
}

.empty-state p {
  color: var(--muted);
  font-size: 13px;
}

.secondary-button {
  padding: 10px 16px;
  border: 1px solid var(--brown);
  border-radius: 9px;
  background: transparent;
  color: var(--espresso);
}

.sample-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.loading-message {
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
}

.about-section {
  padding: 75px 20px;
  text-align: center;
  background: var(--cream-deep);
}

.about-star {
  color: var(--brown);
  font-size: 31px;
}

.about-section .eyebrow {
  margin-top: 15px;
}

.about-section > p:not(.eyebrow) {
  max-width: 490px;
  margin: 20px auto;
  color: var(--muted);
  font-size: 13px;
}

.text-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--brown);
  font-size: 12px;
  font-weight: 700;
}

.site-footer {
  padding: 40px 20px;
  text-align: center;
}

.footer-brand {
  font-size: 24px;
}

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

.site-footer .footer-small {
  margin-top: 16px;
  font-size: 10px;
}

.noscript-message {
  padding: 15px;
  text-align: center;
  background: var(--oat);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

@media (min-width: 1000px) {
  .drama-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 18px;
  }

  .brand {
    font-size: 24px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .header-cta {
    padding: 10px 12px;
    font-size: 11px;
  }

  .hero {
    min-height: 420px;
    padding: 75px 22px;
  }

  .decoration-one {
    left: 5%;
    font-size: 30px;
  }

  .decoration-two {
    right: 6%;
    font-size: 28px;
  }

  .discover-section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

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

  .drama-title {
    font-size: 16px;
  }

  .section-heading {
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .header-cta {
    gap: 5px;
    padding: 9px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .drama-grid {
    gap: 20px 10px;
  }

  .drama-meta {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  }
