/* ===========================================================
   REEL · 年度观影纪念海报
   预览弹层与按钮样式（海报本体由 canvas 绘制）
   =========================================================== */

.poster-modal {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: 24px;
  background: radial-gradient(ellipse at 50% 30%, rgba(12,15,22,.72), rgba(3,4,6,.94));
  backdrop-filter: blur(6px);
  animation: poster-fade .25s ease-out;
}
.poster-modal[hidden] { display: none !important; }
@keyframes poster-fade { from { opacity: 0; } to { opacity: 1; } }

.poster-sheet {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, #16181d, #0c0d10);
  border: 1px solid rgba(255,255,255,.1); border-radius: 16px;
  box-shadow: 0 40px 90px rgba(0,0,0,.7);
  animation: poster-rise .32s cubic-bezier(.2,.9,.25,1.03);
}
@keyframes poster-rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.poster-tabs {
  display: inline-flex; padding: 3px; border-radius: 9px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}
.poster-tabs button {
  padding: 6px 16px; border: 0; border-radius: 6px; cursor: pointer;
  background: transparent; color: rgba(210,208,200,.6);
  font-size: 11.5px; letter-spacing: .08em; transition: background .2s, color .2s;
}
.poster-tabs button:hover { color: #fff; }
.poster-tabs button.active { background: rgba(216,172,106,.18); color: var(--gold-soft); }

.poster-hero-row {
  display: flex; align-items: center; gap: 8px; width: 100%; flex-wrap: wrap;
}
.poster-hero-cap {
  font-size: 10px; letter-spacing: .12em; color: rgba(210,208,200,.55); white-space: nowrap;
}
.poster-combo { position: relative; width: 190px; }
.poster-combo input {
  width: 100%; padding: 5px 24px 5px 9px; border-radius: 6px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.11);
  color: var(--text); font-size: 11.5px; letter-spacing: .02em;
}
.poster-combo input::placeholder { color: rgba(150,152,160,.5); }
.poster-combo input:focus { outline: none; border-color: rgba(236,210,164,.5); }
.poster-combo-toggle {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; padding: 0; border: 0; background: transparent;
  color: rgba(210,208,200,.6); cursor: pointer; display: grid; place-items: center;
}
.poster-combo-toggle svg { width: 14px; height: 14px; }
.poster-combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 5px); z-index: 6;
  max-height: 210px; overflow-y: auto; margin: 0; padding: 4px; list-style: none;
  background: #16181d; border: 1px solid rgba(255,255,255,.12); border-radius: 8px;
  box-shadow: 0 18px 36px rgba(0,0,0,.6);
}
.poster-combo-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px; border-radius: 5px; font-size: 11.5px;
  color: rgba(230,226,216,.86); cursor: pointer; white-space: nowrap;
}
.poster-combo-list li b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.poster-combo-list li i { font-style: normal; font-size: 10px; color: rgba(150,152,160,.75); flex: none; }
.poster-combo-list li:hover, .poster-combo-list li.on { background: rgba(216,172,106,.16); color: var(--gold-soft); }
.poster-combo-list li.empty { justify-content: center; color: rgba(150,152,160,.6); cursor: default; font-size: 10.5px; }
.poster-mini {
  padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 10.5px; letter-spacing: .04em;
  border: 1px solid rgba(216,172,106,.28); background: rgba(216,172,106,.1); color: var(--gold-soft);
  transition: background .2s, color .2s;
}
.poster-mini:hover { background: rgba(216,172,106,.2); color: #fff; }
.poster-hd-tip { margin-left: auto; font-size: 9.5px; color: rgba(150,152,160,.55); white-space: nowrap; }

.poster-picker {
  position: absolute; inset: 0; z-index: 8;
  display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border-radius: 16px; background: rgba(10,11,15,.985);
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.poster-picker[hidden] { display: none !important; }
.poster-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.poster-picker-head b { font-size: 12px; font-weight: 500; color: var(--text); letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster-picker-head button { width: 24px; height: 24px; flex: none; border: 0; background: transparent; color: rgba(210,208,200,.6); cursor: pointer; display: grid; place-items: center; padding: 0; }
.poster-picker-head button:hover { color: #fff; }
.poster-picker-head svg { width: 16px; height: 16px; }
.poster-picker-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 8px; background: rgba(255,255,255,.05); align-self: flex-start; }
.poster-picker-tabs button { padding: 5px 11px; border: 0; border-radius: 6px; background: transparent; color: rgba(210,208,200,.6); font-size: 10.5px; cursor: pointer; }
.poster-picker-tabs button.active { background: rgba(216,172,106,.18); color: var(--gold-soft); }
.poster-picker-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
#poster-picker-online { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.poster-thumb { padding: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; overflow: hidden; background: #000; cursor: pointer; aspect-ratio: 2 / 3; transition: border-color .2s, opacity .2s; }
.poster-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-thumb:hover { border-color: rgba(236,210,164,.65); }
.poster-thumb.loading { opacity: .45; }
.poster-picker-status { margin: 16px 0; font-size: 10.5px; line-height: 1.8; color: rgba(150,152,160,.65); text-align: center; }
.poster-url-row { display: flex; gap: 8px; }
.poster-url-row input { flex: 1; min-width: 0; padding: 7px 9px; border-radius: 6px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: var(--text); font-size: 11px; }
.poster-url-row input:focus { outline: none; border-color: rgba(236,210,164,.5); }
.poster-picker-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 9.5px; color: rgba(150,152,160,.55); }
.poster-picker-foot a { color: rgba(216,172,106,.8); text-decoration: none; white-space: nowrap; }
.poster-picker-foot a:hover { color: var(--gold-soft); text-decoration: underline; }

.poster-preview {
  width: 100%; flex: 1; min-height: 0;
  display: grid; place-items: center;
  border-radius: 10px; overflow: hidden;
  background: #08090c;
}
.poster-preview canvas {
  display: block; width: 100%; height: auto;
  max-height: calc(100vh - 210px); object-fit: contain;
  border-radius: 10px;
}
.poster-loading {
  padding: 90px 20px; text-align: center; color: rgba(210,208,200,.55);
  font-size: 12px; letter-spacing: .12em;
}
.poster-loading i {
  display: block; width: 26px; height: 26px; margin: 0 auto 14px;
  border: 2px solid rgba(216,172,106,.25); border-top-color: var(--gold);
  border-radius: 50%; animation: poster-spin .8s linear infinite;
}
@keyframes poster-spin { to { transform: rotate(360deg); } }

.poster-actions { display: flex; gap: 10px; width: 100%; }
.poster-actions button {
  flex: 1; padding: 11px 14px; border-radius: 9px; cursor: pointer;
  font-size: 12.5px; letter-spacing: .06em;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: var(--text-dim); transition: background .2s, color .2s, border-color .2s;
}
.poster-actions button:hover { background: rgba(255,255,255,.1); color: #fff; }
.poster-actions .primary {
  flex: 1.4; border-color: transparent; font-weight: 600;
  background: linear-gradient(180deg, #f0d7ab, #d8ac6a); color: #1b150c;
}
.poster-actions .primary:hover { background: linear-gradient(180deg, #f7e3bf, #e0b878); color: #1b150c; }
.poster-tip { margin: 0; font-size: 10px; letter-spacing: .05em; color: rgba(150,152,160,.5); text-align: center; }
.poster-tip a { color: rgba(216,172,106,.75); text-decoration: none; margin-left: 6px; border-bottom: 1px solid rgba(216,172,106,.3); }
.poster-tip a:hover { color: var(--gold-soft); }

.btn-poster { position: relative; }
.btn-poster::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(236,210,164,.35);
}

@media (max-width: 560px) {
  .poster-modal { padding: 12px; }
  .poster-sheet { padding: 12px 12px 12px; gap: 10px; }
  .poster-preview canvas { max-height: calc(100vh - 190px); }
}
