:root {
  --ink: #080808;
  --paper: #100909;
  --coral: #ef2b35;
  --yellow: #ff5660;
  --line: #572126;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: #fff4f4;
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
}

.container { width: min(1100px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 80px; }
header { max-width: 530px; }
.eyebrow, .card-label { margin: 0 0 12px; color: #ff6b72; font-weight: 700; font-size: .76rem; letter-spacing: .14em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; font: 700 4.35rem/.9 "Chakra Petch", sans-serif; letter-spacing: -.065em; text-transform: uppercase; }
h1 em { color: var(--coral); font-style: italic; }
.intro { margin-bottom: 40px; color: #d9bcbd; font-size: 1.1rem; line-height: 1.55; }

.draw-card { position: relative; overflow: hidden; padding: 34px 38px; border: 1px solid #7e252b; border-radius: 18px; color: #fff4f4; background: #050505; box-shadow: 8px 8px 0 var(--coral); }
.draw-card::after { content: "✦"; position: absolute; right: 34px; top: 22px; color: var(--coral); font-size: 5rem; opacity: .9; }
.draw-card h2 { position: relative; z-index: 1; margin-bottom: 6px; font: 700 2.25rem/1 "Chakra Petch", sans-serif; letter-spacing: -.055em; }
.draw-card p:not(.card-label) { position: relative; z-index: 1; margin-bottom: 24px; color: #d9bcbd; }
button { cursor: pointer; border: 0; font: inherit; font-weight: 700; transition: transform .15s ease, background .15s ease; }
button:hover { transform: translateY(-2px); }
#draw-button { position: relative; z-index: 1; padding: 12px 18px; border-radius: 8px; background: var(--coral); color: #fff; }
#draw-button span { margin-left: 8px; font-size: 1.2rem; }

.columns { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; margin-top: 44px; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: #1a0d0e; }
.panel h2 { margin-bottom: 20px; font: 700 1.65rem/1 "Chakra Petch", sans-serif; letter-spacing: -.045em; }
label { display: block; margin-bottom: 7px; font-size: .84rem; font-weight: 700; }
label span { color: #7e887f; font-weight: 400; }
input, select { width: 100%; margin-bottom: 18px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; color: #fff4f4; background: #090606; font: inherit; }
input:focus, select:focus { outline: 2px solid var(--coral); border-color: #ff8990; }
.secondary-button { width: 100%; padding: 12px; border-radius: 8px; color: white; background: var(--coral); }
.list-heading { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.list-heading h2 { margin-bottom: 3px; }
#movie-count { margin-bottom: 18px; color: #d9a6a9; font-size: .85rem; }
.filter-label { width: 125px; font-size: .72rem; }
.filter-label select { margin: 3px 0 0; padding: 7px; font-size: .83rem; }
.movie-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.movie-item { display: flex; justify-content: space-between; align-items: center; padding: 13px 12px 13px 16px; border-radius: 9px; background: #090606; }
.movie-item h3 { margin-bottom: 2px; font-size: 1rem; }
.movie-item p { margin: 0; color: #d9a6a9; font-size: .84rem; }
.remove-button { width: 30px; height: 30px; border-radius: 50%; color: #ff6870; background: transparent; font-size: 1.45rem; line-height: 1; }
.remove-button:hover { background: #4b1519; }
.empty-state { color: #d9a6a9; line-height: 1.5; }

.catalog-panel { margin-top: 28px; }
.catalog-heading { display: flex; justify-content: space-between; gap: 28px; align-items: start; }
.catalog-heading .eyebrow { margin-bottom: 8px; }
.catalog-heading h2 { margin-bottom: 8px; }
.catalog-intro { margin: 0; color: #d9a6a9; }
.catalog-actions { min-width: min(100%, 355px); }
.token-row { display: flex; gap: 8px; }
.token-row input { margin: 0; }
.token-row button { width: auto; padding: 0 16px; white-space: nowrap; }
.catalog-controls { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 24px 0 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.catalog-controls p { margin: 0; color: #d9a6a9; font-size: .92rem; }
.search-label { flex: 1; margin: 0; font-size: .76rem; }
.search-label input { margin: 4px 0 0; }
.catalog-search-actions { display: flex; gap: 10px; align-items: end; }
.catalog-controls button, .more-button { padding: 11px 15px; border-radius: 8px; color: #fff; background: var(--coral); white-space: nowrap; }
.catalog-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 0; padding: 0; list-style: none; }
.selected-count { margin: 8px 0 0; color: #ff777e; font-weight: 700; }
.selectable { min-height: 112px; }
.selectable label { display: flex; height: 100%; min-height: 112px; align-items: center; gap: 12px; padding: 16px; cursor: pointer; }
.selectable input { position: absolute; opacity: 0; }
.selectable span { flex: 1; }
.selectable strong { display: block; margin-bottom: 5px; font-size: .98rem; line-height: 1.2; }
.selectable small { color: #d9a6a9; font-size: .8rem; }
.selectable b { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #a72b32; border-radius: 50%; color: transparent; }
.selectable input:checked ~ b { color: #fff; background: var(--coral); border-color: var(--coral); }
.selectable:has(input:checked) { border-color: var(--coral); background: #341014; }
.catalog-item { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #090606; }
.catalog-poster { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: #311317; }
.catalog-content { padding: 12px; }
.catalog-content h3 { min-height: 2.45em; margin: 0 0 5px; font-size: .96rem; line-height: 1.2; }
.catalog-content p { min-height: 1.3em; margin: 0 0 11px; color: #d9a6a9; font-size: .78rem; }
.catalog-content span { display: block; padding: 7px; border: 1px solid #a72b32; border-radius: 6px; color: #ff777e; text-align: center; font-size: .8rem; font-weight: 700; }
.catalog-content button { width: 100%; padding: 8px; border: 1px solid #a72b32; border-radius: 6px; color: #ff777e; background: transparent; font-size: .8rem; }
.catalog-content button:hover { color: #fff; background: #741f25; }
.more-button { display: block; margin: 20px auto 0; }
.attribution { margin: 24px 0 0; color: #b58688; font-size: .74rem; }
.attribution a { color: #ff6b72; }

@media (max-width: 720px) {
  .container { width: min(100% - 28px, 560px); padding-top: 42px; }
  h1 { font-size: 3.65rem; }
  .draw-card { padding: 27px 24px; }
  .draw-card::after { display: none; }
  .columns { grid-template-columns: 1fr; }
  .catalog-heading, .catalog-controls { flex-direction: column; }
  .catalog-search-actions { width: 100%; align-items: end; }
  .catalog-actions { width: 100%; }
  .catalog-list { grid-template-columns: repeat(2, 1fr); }
}
