:root {
  --bg: #07070a;
  --panel: #12121a;
  --card: #181822;
  --line: rgba(255, 255, 255, 0.08);
  --gold: #e8c07a;
  --gold-2: #f3d9a4;
  --muted: #9a97a8;
  --text: #f4f1ea;
  --ok: #7dcea0;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0.01em;
}

.hero {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  padding: 48px 7vw 36px;
  background:
    linear-gradient(180deg, rgba(7,7,10,0.15) 0%, rgba(7,7,10,0.92) 78%, var(--bg) 100%),
    radial-gradient(ellipse at 20% 20%, #3a2a18 0%, transparent 50%),
    radial-gradient(ellipse at 80% 0%, #1a1528 0%, #07070a 55%);
}
.steps {
  margin-top: 18px;
  padding-left: 18px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  color: var(--gold-2);
  line-height: 1.7;
}
.hero-inner { max-width: 1100px; }
.kicker {
  font-family: system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 12px;
}
h1 {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 500;
  line-height: 0.95;
}
.sub {
  margin-top: 14px;
  max-width: 560px;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 7vw 28px;
  align-items: center;
}
.search {
  flex: 1;
  min-width: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 12px 18px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  outline: none;
}
.search:focus { border-color: var(--gold); }
.hint {
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  padding: 0 7vw 80px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(232,192,122,0.35); }

.poster {
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.88)),
    linear-gradient(160deg, #2a2438, #121018 60%, #3a2a16);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.poster img {
  display: none;
}
.poster.has-img {
  background-image: none;
  padding: 0;
}
.poster.has-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.poster-title {
  font-size: 22px;
  line-height: 1.1;
}

.meta { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.title { font-size: 20px; }
.tags {
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: var(--muted);
}
.desc {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: #c9c6d4;
  line-height: 1.45;
  flex: 1;
}
.url-box {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: var(--gold-2);
  background: #0d0d14;
  border-radius: 8px;
  padding: 8px 10px;
  word-break: break-all;
}
.actions { display: flex; gap: 8px; margin-top: 6px; }
button {
  font-family: system-ui, sans-serif;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
}
.copy {
  background: var(--gold);
  color: #1a1408;
  flex: 1;
}
.copy.done { background: var(--ok); color: #062014; }
.open {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  padding: 40px 0;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1c1c28;
  border: 1px solid rgba(232,192,122,0.4);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-family: system-ui, sans-serif;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 20;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
