:root {
  color-scheme: dark;
  --bg: #101113;
  --panel: #17191d;
  --panel-strong: #20242a;
  --text: #f4f0e8;
  --muted: #a8a095;
  --line: #333942;
  --gold: #f7c744;
  --gold-strong: #ffdc63;
  --blue: #78a7ff;
  --red: #ff796d;
  --green: #8edb9a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(247, 199, 68, 0.16), transparent 30%),
    linear-gradient(135deg, #101113 0%, #16191d 48%, #0e1013 100%);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(100% - 32px, 980px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 52px 0;
}

.workspace {
  width: 100%;
  display: grid;
  gap: 18px;
}

.masthead {
  padding: 10px 2px 18px;
}

.eyebrow,
.label {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.summary {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.search-card,
.result-card,
.recent-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 25, 29, 0.92);
  box-shadow: var(--shadow);
}

.search-card {
  padding: 24px;
}

label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input {
  min-width: 0;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 16px;
  color: var(--text);
  background: #0d0f12;
  outline: none;
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(247, 199, 68, 0.18);
}

button,
.open-link {
  min-height: 54px;
  border: 0;
  border-radius: 6px;
  padding: 0 20px;
  display: inline-grid;
  place-items: center;
  color: #14110a;
  background: var(--gold);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.open-link:hover {
  background: var(--gold-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
}

.status[data-tone="success"] {
  color: var(--green);
}

.status[data-tone="error"] {
  color: var(--red);
}

.result-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.result-card h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.movie-card {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 20px;
  align-items: stretch;
}

.poster-frame {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #0d0f12;
}

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

.movie-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-row span {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  background: #0d0f12;
}

.detail-link {
  width: fit-content;
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
}

.detail-link:hover {
  color: var(--gold-strong);
}

.search-link-block {
  display: grid;
  gap: 8px;
}

.secondary-link {
  width: fit-content;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.secondary-link:hover {
  color: var(--blue);
}

.generated-link {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-wrap: anywhere;
  color: var(--blue);
  background: #0d0f12;
  text-decoration: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.recent-card {
  padding: 22px 24px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

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

.section-title span,
.empty {
  color: var(--muted);
}

.empty {
  margin: 16px 0 0;
}

.recent-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.recent-list button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  font-weight: 700;
}

.recent-list button:hover {
  border-color: var(--gold);
  background: #282c33;
}

.deerflow {
  position: fixed;
  right: 16px;
  bottom: 14px;
  color: rgba(244, 240, 232, 0.48);
  font-size: 12px;
  text-decoration: none;
}

.deerflow:hover {
  color: var(--gold);
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 24px, 980px);
    padding: 28px 0 52px;
    place-items: start center;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  button,
  .open-link {
    width: 100%;
  }

  .movie-card {
    grid-template-columns: 104px 1fr;
    gap: 14px;
  }

  .result-card h2 {
    font-size: 23px;
  }

  .section-title {
    display: block;
  }
}
