:root {
  --bg: #0d1117;
  --panel: #151b23;
  --panel-2: #1f2630;
  --ink: #f4f7fb;
  --muted: #9aa7b5;
  --line: #2b3440;
  --brand: #2dd4bf;
  --hot: #f97316;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(220px, 520px) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 34px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(16px);
}

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

.brand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--brand);
  color: #06130f;
}

.quick-search {
  display: flex;
  gap: 8px;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0f141b;
  color: var(--ink);
  padding: 11px 12px;
}

textarea { resize: vertical; line-height: 1.55; }

.quick-search button,
.button,
nav button {
  border: 0;
  border-radius: 7px;
  min-height: 42px;
  padding: 0 15px;
  cursor: pointer;
  font-weight: 800;
}

.quick-search button,
.button.primary {
  background: var(--brand);
  color: #06130f;
}

.button.ghost {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
}

.button.full { width: 100%; }

nav {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: end;
}

nav a,
nav button {
  color: var(--muted);
  background: transparent;
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 60px;
}

.hero,
.detail-hero {
  position: relative;
  min-height: 460px;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-image: linear-gradient(90deg, rgba(13,17,23,.98) 0%, rgba(13,17,23,.72) 46%, rgba(13,17,23,.2) 100%), var(--backdrop);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.hero-content {
  max-width: 620px;
  padding: 70px 54px;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--brand);
  font-weight: 900;
}

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

.hero h1,
.detail-copy h1 {
  margin-bottom: 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
}

.hero p,
.summary {
  color: #d7dee7;
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 24px 0 10px;
}

.filters a,
.tags a {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--panel);
}

.filters a.active,
.filters a:hover,
.tags a:hover {
  border-color: rgba(45, 212, 191, .6);
  color: var(--brand);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}

.section-head h2 { margin-bottom: 6px; font-size: 34px; }
.section-head p { margin-bottom: 0; color: var(--muted); }

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background-color: #202833;
  background-position: center;
  background-size: cover;
}

.poster span {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--hot);
  color: #fff;
  font-weight: 900;
}

.movie-info { padding: 14px; }
.movie-info h3 { margin-bottom: 8px; font-size: 19px; }
.movie-info p { margin-bottom: 8px; color: var(--muted); }
.rating { color: #fde68a; font-weight: 900; }

.detail-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 30px;
  padding: 46px;
}

.detail-poster {
  min-height: 420px;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.back,
.source-note,
.original {
  color: var(--muted);
}

.meta,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0;
}

.meta span {
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(255,255,255,0.08);
  color: #d7dee7;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(360px, 520px) 1fr;
  gap: 20px;
  padding-top: 30px;
}

.panel,
.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

.split {
  display: flex;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  color: #d8e0e9;
  font-weight: 800;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 7px;
  background: var(--panel-2);
}

.admin-row span { color: var(--muted); }
.admin-row button { border: 0; background: transparent; color: #fb7185; cursor: pointer; }

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 110px);
}

.auth-card {
  width: min(420px, 100%);
}

.notice {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 7px;
  background: rgba(249, 115, 22, 0.15);
  color: #fed7aa;
}

.empty {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .topbar,
  .detail-hero,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  nav { justify-content: start; }
  .hero-content { padding: 48px 28px; }
  .detail-hero { padding: 24px; }
}

@media (max-width: 620px) {
  main { width: min(100% - 20px, 1280px); }
  .topbar { padding: 14px; }
  .quick-search,
  .split {
    flex-direction: column;
  }
}
