@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;900&family=Cormorant+Garamond:ital,wght@0,600;1,600&display=swap");

:root {
  --bg: #0c0c11;
  --bg-card: #16161d;
  --bg-card-hover: #1c1c25;
  --border: #26262f;
  --border-soft: #1d1d25;
  --text: #f1f0f4;
  --text-dim: #8b899b;
  --text-faint: #55536a;
  --accent: #e3b256;
  --accent-bright: #f0c877;
  --accent-dim: #6d5726;
  --accent-soft: rgba(227, 178, 86, 0.1);
  --danger: #ef6767;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.55);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(227, 178, 86, 0.07), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(120, 90, 200, 0.05), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Noto Sans KR", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- header ---------- */

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  background: rgba(12, 12, 17, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10;
}

header.site .logo {
  font-family: "Cormorant Garamond", "Noto Sans KR", serif;
  font-style: italic;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(120deg, var(--accent-bright), var(--accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.15s ease;
}

header.site .logo:hover {
  opacity: 0.85;
}

header.site nav {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 0.88rem;
}

header.site nav button,
header.site nav a {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 500;
  padding: 0;
  position: relative;
  transition: color 0.15s ease;
}

header.site nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

header.site nav a:hover,
header.site nav button:hover {
  color: var(--accent-bright);
}

header.site nav a:hover::after {
  transform: scaleX(1);
}

header.site nav span {
  color: var(--text);
  font-weight: 600;
}

/* ---------- layout ---------- */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}

/* ---------- box office ---------- */

.boxoffice {
  margin-bottom: 36px;
}

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

.section-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.boxoffice-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.boxoffice-item {
  flex: 0 0 auto;
  width: 148px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bo-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.boxoffice-item:hover .bo-poster-wrap {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.bo-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bo-poster.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--text-faint);
}

.bo-rank-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #211705;
  font-weight: 800;
  font-size: 0.82rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.bo-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bo-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bo-meta {
  font-size: 0.72rem;
  color: var(--text-faint);
}

.rank-change {
  position: absolute;
  top: 7px;
  right: 7px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rank-change.up {
  color: #6fd18a;
  background: rgba(111, 209, 138, 0.12);
}

.rank-change.down {
  color: #ef6767;
  background: rgba(239, 103, 103, 0.12);
}

.rank-change.flat {
  color: var(--text-faint);
  background: var(--border-soft);
}

.rank-change.new {
  color: var(--accent-bright);
  background: var(--accent-soft);
}

/* ---------- post list ---------- */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.post-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent-dim);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow);
}

.post-item .title {
  font-weight: 600;
  font-size: 1.02rem;
}

.post-item .meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.empty {
  color: var(--text-faint);
  padding: 64px 0;
  text-align: center;
  font-size: 0.92rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #211705;
  border: none;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 4px 14px -4px rgba(227, 178, 86, 0.5);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 8px 20px -6px rgba(227, 178, 86, 0.55);
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.secondary:hover {
  border-color: var(--accent-dim);
  filter: none;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

/* ---------- forms ---------- */

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

form > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 500;
}

input,
textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.error-msg {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 1.2em;
}

/* ---------- badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 3px 10px;
  margin-left: 8px;
  vertical-align: middle;
}

.post-detail .badge {
  margin-left: 0;
  margin-bottom: 14px;
}

/* ---------- ranking ---------- */

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ranking-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.ranking-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent-dim);
}

.ranking-item .rank {
  color: var(--text-faint);
  width: 30px;
  display: inline-block;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ranking-item:nth-child(1) .rank {
  color: #f4d06f;
}

.ranking-item:nth-child(2) .rank {
  color: #cfd3da;
}

.ranking-item:nth-child(3) .rank {
  color: #d3915a;
}

.ranking-item .score {
  color: var(--accent-bright);
  font-weight: 800;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- movie detail ---------- */

.movie-detail {
  margin: -40px -24px 32px;
}

.movie-backdrop {
  height: 220px;
  background-size: cover;
  background-position: center 20%;
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  opacity: 0.55;
}

.movie-header {
  display: flex;
  gap: 20px;
  padding: 0 24px;
  margin-top: -64px;
  align-items: flex-end;
}

.movie-poster {
  width: 140px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.movie-poster.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  font-size: 2.4rem;
  color: var(--text-faint);
}

.movie-meta {
  padding-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.movie-meta h1 {
  margin: 0;
  font-size: 1.4rem;
}

.movie-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.genre-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.genre-tags .badge {
  margin-left: 0;
}

.crew-line {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.crew-label {
  color: var(--text-faint);
  margin-right: 8px;
}

.movie-overview {
  padding: 0 24px;
  margin-top: 20px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
}

.movie-videos,
.movie-community {
  padding: 0 24px;
  margin-top: 8px;
  margin-bottom: 32px;
}

.movie-videos h1,
.movie-community h1 {
  font-size: 1.1rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
}

.play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
}

.video-name {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- post detail ---------- */

.post-detail .title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.post-detail .meta {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.post-detail .content {
  white-space: pre-wrap;
  margin-bottom: 28px;
  font-size: 0.98rem;
}

/* ---------- comments ---------- */

.comments {
  margin-top: 32px;
}

.comments h1 {
  font-size: 1.1rem;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.comment {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
}

.comment .meta {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 4px;
  font-weight: 500;
}

.comment-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-form textarea {
  min-height: 56px;
  flex: 1;
}
