:root {
  --bg: #07090b;
  --panel: #111417;
  --panel-2: #171b20;
  --line: #252b31;
  --text: #f5f5f5;
  --muted: #9ca3ad;
  --soft: #c3c8ce;
  --red: #e8292e;
  --red-2: #b91820;
  --gold: #ffb02e;
  --green: #2bd06f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  background: radial-gradient(circle at 30% 0%, #14191d 0, #080a0c 42%, #050607 100%);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  letter-spacing: 0;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 34px;
  border-bottom: 1px solid #1d2228;
  background: rgba(2, 3, 4, 0.96);
  box-shadow: 0 0 0 1px rgba(232, 41, 46, 0.08);
}

.brand,
.footer-brand strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 900;
}

.brand span span,
.footer-brand strong span {
  color: var(--red);
}

.brand-mark {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 4px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-size: 7px;
  line-height: 1;
}

.brand-mark i,
.brand-mark b {
  position: absolute;
  font-style: normal;
  font-weight: 400;
}

.brand-mark i {
  left: 5px;
  bottom: 5px;
}

.brand-mark b {
  right: 5px;
  top: 5px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: 26px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.main-nav a {
  position: relative;
  color: #e5e8eb;
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -23px;
  height: 2px;
  background: var(--red);
}

.search-bar {
  margin-left: auto;
  width: 330px;
  height: 36px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101215;
  overflow: hidden;
}

.search-bar input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 14px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.search-bar button {
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  color: #d4d7dc;
  cursor: pointer;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.ghost,
.red-btn,
.dark-btn,
.chip,
.page-btn {
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #07090b;
  color: #f4f4f4;
  cursor: pointer;
}

.ghost {
  height: 34px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 800;
}

.ghost:hover,
.ghost.active,
.chip.active,
.page-btn.active {
  border-color: var(--red);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(232, 41, 46, 0.18);
}

.red-btn {
  background: linear-gradient(180deg, #ef3036, #c61920);
  border-color: #f23a3f;
  font-weight: 900;
}

.dark-btn {
  background: #101216;
}

#app {
  min-height: calc(100vh - 150px);
}

.page {
  padding: 32px 34px 64px;
}

.home {
  padding: 0 0 64px;
}

.hero {
  position: relative;
  height: 360px;
  display: flex;
  align-items: center;
  padding: 0 68px;
  border-bottom: 1px solid #181c20;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0,0,0,.93) 0%, rgba(0,0,0,.72) 30%, rgba(0,0,0,.12) 65%, rgba(0,0,0,.82) 100%),
    radial-gradient(circle at 77% 24%, rgba(255, 102, 18, .95), rgba(182, 37, 11, .3) 30%, transparent 54%),
    linear-gradient(120deg, #120805 0%, #331106 55%, #050607 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(ellipse at 74% 50%, transparent 0 22px, rgba(255,173,62,.35) 23px 25px, transparent 26px 50px),
    linear-gradient(180deg, transparent 70%, rgba(0,0,0,.88));
  opacity: .55;
}

.hero-person {
  position: absolute;
  right: 250px;
  bottom: -8px;
  width: 255px;
  height: 315px;
  z-index: 1;
  background:
    linear-gradient(#1b0f0a 0 0) center 92px / 82px 150px no-repeat,
    linear-gradient(#111 0 0) center 210px / 152px 130px no-repeat,
    radial-gradient(circle at 50% 70px, #1d1612 0 44px, transparent 45px),
    linear-gradient(90deg, transparent 24%, #18100c 25% 74%, transparent 75%);
  filter: drop-shadow(0 16px 28px rgba(0,0,0,.7));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 440px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #ff3036;
  font-weight: 900;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: 48px;
  line-height: 1;
}

.hero-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  color: #e8e8e8;
  font-weight: 800;
}

.hero p {
  margin: 0 0 24px;
  color: #d4d8dd;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 14px;
}

.hero-actions button {
  height: 42px;
  padding: 0 24px;
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  color: #e8ebef;
  font-size: 46px;
  opacity: .85;
}

.hero-arrow.left {
  left: 24px;
}

.hero-arrow.right {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d9dde0;
}

.hero-dots span:first-child {
  background: var(--red);
}

.section {
  padding: 28px 34px;
  border-bottom: 1px solid #171b20;
  background: linear-gradient(180deg, rgba(17,20,23,.78), rgba(8,10,12,.95));
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 21px;
}

.tabs {
  display: flex;
  gap: 18px;
  margin-left: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tabs button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.tabs .active,
.tabs button.active {
  color: var(--red);
}

.more {
  color: #dce0e4;
  font-size: 13px;
}

.boxoffice-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
}

.rank-item {
  display: grid;
  grid-template-columns: 38px 72px 1fr;
  gap: 14px;
  align-items: center;
}

.rank {
  color: var(--red);
  font-size: 38px;
  font-weight: 900;
}

.poster,
.poster-art {
  border-radius: 4px;
  background: #11161b;
  box-shadow: inset 0 0 32px rgba(0,0,0,.25), 0 16px 26px rgba(0,0,0,.24);
  overflow: hidden;
}

.poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.poster.broken {
  object-fit: contain;
  padding: 16px;
  background: linear-gradient(145deg, #24313d, #07090b);
}

.rank-info strong,
.movie-card strong,
.mini-movie strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.3;
}

.rank-info span,
.movie-card span,
.mini-movie span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.score {
  color: var(--red);
  font-weight: 900;
}

.movie-row,
.cast-row,
.related-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 24px;
}

.movie-strip-card .poster {
  margin-bottom: 10px;
}

.layout-search {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
}

.filter-panel,
.profile-card,
.side-menu,
.info-panel,
.review-panel,
.related-panel,
.save-note {
  border: 1px solid #20262c;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23,27,32,.96), rgba(12,14,16,.94));
}

.filter-panel {
  padding: 16px;
  height: fit-content;
}

.filter-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  font-weight: 900;
}

.filter-group {
  padding: 12px 0;
  border-top: 1px solid #22282f;
}

.filter-group:first-of-type {
  border-top: 0;
}

.filter-group h3 {
  margin: 0 0 9px;
  font-size: 13px;
}

.filter-panel label {
  display: block;
  margin: 7px 0;
  color: #b9c0c8;
  font-size: 13px;
}

.filter-panel input {
  accent-color: var(--red);
}

.data-note {
  margin: 14px 0 0;
  color: #8f98a3;
  font-size: 12px;
  line-height: 1.45;
}

.api-panel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #22282f;
}

.api-panel h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

.api-panel input {
  width: 100%;
  height: 34px;
  margin-bottom: 8px;
  padding: 0 10px;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #0b0e11;
  color: #fff;
}

.api-panel button {
  width: 100%;
  height: 34px;
}

.api-panel p {
  margin: 9px 0 0;
  color: #8f98a3;
  font-size: 11px;
  line-height: 1.45;
}

.reset {
  width: 100%;
  height: 37px;
  margin-top: 16px;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 24px;
}

.result-head h1 {
  margin: 0 0 16px;
  font-size: 19px;
}

.result-head h1 span {
  color: var(--red);
}

.chips {
  display: flex;
  gap: 10px;
}

.chip {
  height: 34px;
  min-width: 116px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 900;
}

.select {
  height: 36px;
  padding: 0 16px;
  border: 1px solid #242a30;
  border-radius: 6px;
  background: #101317;
  color: #dce0e4;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 28px;
}

.movie-card {
  position: relative;
  padding: 10px 10px 14px;
  border: 1px solid #242b32;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(26,30,35,.92), rgba(12,14,16,.96));
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.movie-card:hover,
.movie-strip-card:hover,
.rank-item:hover {
  transform: translateY(-3px);
}

.movie-card:hover {
  border-color: rgba(232, 41, 46, .55);
  box-shadow: 0 16px 34px rgba(0,0,0,.34);
}

.movie-card .poster {
  margin-bottom: 12px;
}

.save-x,
.bookmark {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 18px;
}

.bookmark {
  border-radius: 5px;
}

.bookmark.saved {
  background: rgba(232, 41, 46, .92);
  color: #fff;
}

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

.page-btn {
  min-width: 34px;
  height: 34px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 260px 1fr 470px;
  gap: 34px;
  align-items: start;
}

.detail-poster .poster {
  height: 280px;
}

.detail-copy h1 {
  margin: 8px 0 8px;
  font-size: 44px;
}

.detail-copy .english {
  color: var(--muted);
  font-size: 16px;
}

.meta-line {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  color: #d5d9de;
  font-size: 14px;
}

.tag-row {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.tag {
  padding: 7px 14px;
  border-radius: 16px;
  background: #1b2025;
  color: #e3e6e9;
  font-size: 13px;
  font-weight: 800;
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

.detail-actions button {
  height: 42px;
  padding: 0 22px;
}

.synopsis {
  max-width: 600px;
  color: #c8cdd3;
  line-height: 1.75;
}

.info-panel {
  padding: 22px 28px;
}

.info-list {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 13px 24px;
  margin: 0;
  font-size: 14px;
}

.info-list dt {
  color: #d6d9df;
  font-weight: 900;
}

.info-list dd {
  margin: 0;
  color: #f0f2f4;
  line-height: 1.45;
}

.rating-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 22px -28px -22px;
  border-top: 1px solid #272d34;
  background: #272d34;
}

.rating-box {
  padding: 18px;
  background: rgba(13,16,18,.8);
  text-align: center;
}

.rating-box strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.detail-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 34px;
}

.video-box {
  position: relative;
  height: 185px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.8)),
    radial-gradient(circle at 52% 38%, #c59362, #3b1d0c 36%, #080909 72%);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.real-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.48));
}

.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}

.play span {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: rgba(0,0,0,.32);
  font-size: 25px;
}

.cast-row {
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.cast-card {
  min-height: 158px;
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent, rgba(0,0,0,.86)),
    radial-gradient(circle at 50% 30%, #b5a198, #262a30 36%, #101215 68%);
  display: flex;
  align-items: flex-end;
}

.cast-card strong {
  display: block;
}

.cast-card span {
  color: var(--muted);
  font-size: 12px;
}

.review-panel,
.related-panel {
  padding: 18px;
}

.review-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
}

.big-score {
  font-size: 36px;
  font-weight: 900;
}

.bars label {
  display: grid;
  grid-template-columns: 30px 1fr 42px;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  color: #c8cdd3;
  font-size: 12px;
}

.bar {
  height: 8px;
  border-radius: 20px;
  background: #22272d;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--red);
}

.review {
  padding: 10px 0;
  border-bottom: 1px solid #242a30;
  color: #d5d9de;
  font-size: 13px;
}

.review strong {
  color: #fff;
  margin-right: 12px;
}

.source-line {
  margin: 0 0 10px;
  color: #9ea6af;
  font-size: 12px;
}

.real-empty {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px dashed #343b44;
  border-radius: 8px;
  color: #c7cdd4;
  background: rgba(10, 12, 14, .55);
  line-height: 1.6;
  font-size: 13px;
}

.rate-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #252b31;
}

.rate-box p {
  margin: 0 0 8px;
  color: #d5d9de;
  font-size: 13px;
  font-weight: 900;
}

.rating-control {
  display: flex;
  gap: 5px;
}

.rating-control button {
  border: 0;
  background: transparent;
  color: #555d66;
  font-size: 25px;
  cursor: pointer;
}

.rating-control button.active,
.rating-control button:hover {
  color: var(--red);
}

.related-row {
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.recent-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 10px 34px 26px;
}

.recent-title h1,
.library-title h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.recent-title p,
.library-title p {
  margin: 0;
  color: #b9c0c8;
  line-height: 1.6;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin: 0 34px;
}

.recent-grid .movie-card {
  padding: 12px;
}

.save-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 24px 34px 0;
  padding: 22px;
  color: #d6dbe0;
}

.save-note b {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #30343a;
  font-size: 25px;
}

.mypage-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 34px;
}

.profile-card {
  padding: 22px;
  text-align: center;
}

.avatar {
  width: 104px;
  height: 104px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #232529 0 19px, transparent 20px),
    radial-gradient(circle at 50% 92%, #232529 0 43px, transparent 44px),
    linear-gradient(#aaa, #777);
}

.profile-card h2 {
  margin: 0 0 8px;
}

.profile-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.profile-card button {
  width: 130px;
  height: 32px;
}

.side-menu {
  margin-top: 18px;
  overflow: hidden;
}

.side-menu button {
  width: 100%;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border: 0;
  border-bottom: 1px solid #242a30;
  background: transparent;
  color: #dce0e4;
  font-size: 16px;
  font-weight: 800;
  text-align: left;
}

.side-menu button.active {
  color: var(--red);
}

.library-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 10px 0 28px;
}

.library-tabs {
  display: flex;
  gap: 34px;
  margin-top: 24px;
  font-size: 16px;
  font-weight: 900;
}

.library-tabs span {
  cursor: pointer;
}

.library-tabs span.active {
  color: var(--red);
  border-bottom: 2px solid var(--red);
  padding-bottom: 12px;
}

.view-tools {
  display: flex;
  gap: 10px;
}

.view-tools button,
.view-tools select {
  height: 36px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 34px 24px;
}

.library-grid .movie-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.library-grid .poster {
  margin-bottom: 10px;
}

.site-footer {
  height: 86px;
  display: flex;
  align-items: center;
  gap: 58px;
  padding: 0 40px;
  border-top: 1px solid #20252b;
  background: #050607;
  color: #d2d6db;
  font-size: 13px;
}

.empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed #30363d;
  border-radius: 8px;
  color: #aeb5bd;
  background: rgba(17, 20, 23, .72);
}

.real-hero {
  background-size: cover;
  background-position: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 40px;
  background: rgba(0, 0, 0, .82);
}

.modal-card {
  position: relative;
  width: min(980px, 92vw);
  aspect-ratio: 16 / 9;
  border: 1px solid #323941;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.65);
}

.modal-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}

.trailer-card {
  overflow: hidden;
}

.trailer-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: .58;
}

.trailer-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 36px;
  text-align: center;
  background: radial-gradient(circle, rgba(0,0,0,.18), rgba(0,0,0,.72));
}

.trailer-overlay h2 {
  margin: 0;
  font-size: 30px;
}

.trailer-overlay p {
  max-width: 580px;
  margin: 0;
  color: #d2d8df;
  line-height: 1.6;
}

.trailer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
}

.modal-close {
  position: absolute;
  right: -14px;
  top: -14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid #484f58;
  border-radius: 50%;
  background: #101216;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 110;
  transform: translateX(-50%);
  padding: 13px 18px;
  border: 1px solid rgba(232, 41, 46, .55);
  border-radius: 999px;
  background: rgba(10, 12, 14, .96);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  font-weight: 900;
}

.footer-brand {
  margin-right: auto;
}

.footer-brand strong {
  font-size: 22px;
}

.footer-brand small {
  display: block;
  margin: 5px 0 0 44px;
  color: #b4bbc3;
}

.site-footer p {
  color: #9aa1aa;
}

.socials {
  display: flex;
  gap: 18px;
  color: #c8cdd2;
  font-weight: 900;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .site-header {
    position: static;
    height: auto;
    flex-wrap: wrap;
    padding: 16px;
  }

  .main-nav,
  .header-actions {
    gap: 12px;
    overflow-x: auto;
  }

  .search-bar {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .hero {
    height: auto;
    min-height: 420px;
    padding: 50px 24px;
  }

  .hero-person {
    right: 0;
    opacity: .35;
  }

  .boxoffice-grid,
  .movie-row,
  .movie-grid,
  .recent-grid,
  .library-grid,
  .related-row,
  .cast-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .layout-search,
  .detail-hero,
  .detail-sections,
  .mypage-layout {
    grid-template-columns: 1fr;
  }

  .site-footer {
    height: auto;
    flex-wrap: wrap;
    padding: 22px;
  }
}
