/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0d0d;
  --surface:   #161616;
  --surface2:  #1f1f1f;
  --gold:      #e8b923;
  --gold-dim:  #b8901a;
  --green:     #2dbe6c;
  --text:      #f0f0f0;
  --muted:     #888;
  --locked:    #555;
  --border:    #2a2a2a;
  --blue:      #3a7bd5;
  --red:       #e84545;
  --font-serif:'Georgia', 'Times New Roman', serif;
  --font-sans: 'Segoe UI', system-ui, sans-serif;
  --radius:    10px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
}

/* ── Page Layout ──────────────────────────────────────── */
.page-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 36px;
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ── Poster Card ──────────────────────────────────────── */
.poster-card {
  flex-shrink: 0;
  width: 178px;
  min-height: 265px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(180,30,30,0.25), 0 2px 12px rgba(0,0,0,0.8);
  border: 1px solid #3a1010;
}

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

/* ── Content Panel ────────────────────────────────────── */
.content-panel {
  flex: 1;
  min-width: 0;
}

/* ── Title & Tagline ──────────────────────────────────── */
.show-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.tagline {
  font-style: italic;
  color: var(--gold);
  font-size: 0.9rem;
  margin-top: 6px;
  font-family: var(--font-serif);
}

/* ── Meta Row ─────────────────────────────────────────── */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.stars { display: flex; gap: 2px; }
.star { font-size: 15px; }
.star.filled  { color: var(--gold); }
.star.half    { color: var(--gold); opacity: 0.55; }
.star.empty   { color: #333; }

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}
.meta-item svg { opacity: 0.6; }

.returning { color: var(--muted); }

.badge-hd {
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 20px;
}

/* ── Selectors ────────────────────────────────────────── */
.selectors-row {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.selector-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.selector-label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.custom-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.88rem;
  padding: 9px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  min-width: 148px;
  transition: border-color 0.18s;
  user-select: none;
}

.custom-select:hover:not(.disabled-select) {
  border-color: var(--blue);
}

.custom-select.open {
  border-color: var(--blue);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.disabled-select {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* Dropdown list */
.dropdown-list {
  display: none;
  position: absolute;
  top: calc(100%);
  left: 0;
  right: 0;
  background: var(--surface2);
  border: 1.5px solid var(--blue);
  border-top: none;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  z-index: 100;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}

.dropdown-list.open { display: block; }

.dropdown-item {
  padding: 10px 14px;
  font-size: 0.87rem;
  cursor: pointer;
  transition: background 0.12s;
  color: var(--text);
}

.dropdown-item:hover { background: #2a2a2a; }

.dropdown-item.free { color: #fff; }

.dropdown-item.locked {
  color: var(--locked);
  font-style: normal;
}
.dropdown-item.locked:hover { background: #1e1e1e; }

/* ── Unlock Button ────────────────────────────────────── */
.unlock-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  padding: 13px 32px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: #0d0d0d;
  font-weight: 700;
  font-size: 0.97rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px rgba(232,185,35,0.28);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.unlock-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(232,185,35,0.4);
  filter: brightness(1.08);
}
.unlock-btn:active { transform: translateY(0); }

/* ── Overview ─────────────────────────────────────────── */
.overview-section { margin-top: 30px; }

.overview-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.overview-text {
  font-size: 0.875rem;
  color: #999;
  line-height: 1.72;
}

/* ── Modal ────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal-box {
  background: var(--surface);
  border: 1px solid #2e2e2e;
  border-radius: 16px;
  padding: 36px 32px 30px;
  max-width: 420px;
  width: calc(100% - 32px);
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.8);
  animation: modalIn 0.22s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.12s;
}
.modal-close:hover { color: #fff; }

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.modal-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 12px;
  font-family: var(--font-serif);
}

.modal-instruction {
  font-size: 0.845rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
}
.modal-instruction strong { color: #fff; }
.chain-list {
  font-size: 0.78rem;
  color: #666;
  letter-spacing: 0.02em;
}

/* Wallet box */
.wallet-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-bottom: 4px;
}

.wallet-address {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  color: #c0c0c0;
  word-break: break-all;
  flex: 1;
}

.copy-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.76rem;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}
.copy-btn:hover { background: #2a2a2a; }

.copy-confirm {
  font-size: 0.74rem;
  color: var(--green);
  display: none;
  margin-left: 2px;
}
.copy-confirm.show { display: inline; }

/* TX Input */
.tx-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
}

.tx-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.tx-input {
  background: #111;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  padding: 11px 14px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s;
}
.tx-input:focus { border-color: var(--blue); }
.tx-input::placeholder { color: #444; }

/* Verify button */
.verify-btn {
  width: 100%;
  margin-top: 16px;
  padding: 13px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: #0d0d0d;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: filter 0.15s, transform 0.12s;
}
.verify-btn:hover { filter: brightness(1.1); }
.verify-btn:active { transform: scale(0.98); }
.verify-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

/* Status message */
.status-msg {
  min-height: 28px;
  margin-top: 14px;
  font-size: 0.84rem;
  text-align: center;
  line-height: 1.5;
  border-radius: 8px;
  padding: 0 6px;
}
.status-msg.success { color: #2dbe6c; }
.status-msg.error   { color: #e84545; }
.status-msg.loading { color: #aaa; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
  .page-wrapper {
    flex-direction: column;
    align-items: center;
    padding: 28px 16px 48px;
    gap: 24px;
  }
  .poster-card {
    width: 100%;
    max-width: 280px;
    min-height: 380px;
  }
  .show-title { font-size: 1.6rem; text-align: center; }
  .tagline { text-align: center; }
  .meta-row { justify-content: center; }
  .selectors-row { flex-direction: column; }
  .custom-select { min-width: 100%; }
  .unlock-btn { width: 100%; justify-content: center; }
}
