/* Random movie generator */
.rm { --tile: 120px }
.rm button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; font-family: var(--body) }
.rm-modes { display: flex; gap: 6px; padding: 5px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); width: max-content; max-width: 100%; margin: 0 auto 18px; overflow-x: auto; scrollbar-width: none }
.rm-modes::-webkit-scrollbar { display: none }
.rm-modes button { flex: none; border: 0; background: none; color: var(--mute); font-weight: 600; font-size: 15px; padding: 10px 18px; border-radius: 99px; cursor: pointer; min-height: 42px; white-space: nowrap; transition: color .2s, background .25s }
.rm-modes button[aria-selected="true"] { background: var(--accent); color: #fff; box-shadow: 0 8px 24px -10px var(--accent) }
.rm-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 22px; align-items: start }

/* stage */
.rm-stage { position: relative; background: radial-gradient(80% 60% at 50% 0%, rgba(255, 70, 110, .16), transparent 65%), radial-gradient(70% 60% at 100% 100%, rgba(255, 181, 71, .12), transparent 60%), radial-gradient(70% 60% at 0% 100%, rgba(107, 138, 255, .14), transparent 60%), var(--card); border: 1px solid var(--line); border-radius: 26px; padding: clamp(16px, 2.4vw, 28px) }

/* the slot machine */
.rm-slot { --wh: 320px; position: relative; padding: 0 58px 0 0; user-select: none; -webkit-user-select: none }
.rm-marquee { position: relative; display: flex; align-items: center; justify-content: center; margin: 0 6px -6px; padding: 12px 52px 18px; border-radius: 22px 22px 8px 8px;
  background: radial-gradient(120% 140% at 50% 0%, #c21d4b, #6e0b2a 60%, #3a0617); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), inset 0 -10px 20px rgba(0, 0, 0, .35), 0 0 0 2px #e8c36a, 0 0 0 4px #6b4512, 0 18px 40px -18px rgba(255, 40, 90, .6) }
.rm-sign { font: 800 clamp(24px, 3.4vw, 34px)/1 var(--display); letter-spacing: -.01em; color: #fff3cf; text-transform: uppercase; text-shadow: 0 0 2px #fff, 0 0 12px rgba(255, 210, 120, .9), 0 0 28px rgba(255, 120, 60, .7), 0 3px 0 #7a1630 }
.rm-sign b { color: #ffd46b }
.rm-mute { position: absolute; right: 12px; top: 50%; transform: translateY(-60%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 230, 170, .4); background: rgba(0, 0, 0, .25); color: #ffe7a8; display: grid; place-items: center; cursor: pointer; padding: 0 }
.rm-mute svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.rm-mute svg path:first-child { fill: currentColor }
.rm-mute .off, .rm-mute[aria-pressed="true"] .on { display: none }
.rm-mute[aria-pressed="true"] .off { display: inline }
.rm-cab { position: relative; padding: 16px; border-radius: 24px;
  background: linear-gradient(145deg, #fff0bf, #c4973c 22%, #fff5d4 42%, #a1721f 62%, #f1d27a 82%, #8d6118); box-shadow: 0 0 0 2px #5a3a0e, 0 30px 60px -24px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .7) }
.rm-bulbs { position: absolute; inset: 0; pointer-events: none; z-index: 3 }
.rm-bulbs i { position: absolute; width: 8px; height: 8px; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 35% 35%, #fff, #ffe08a 45%, #ffb21f); box-shadow: 0 0 6px 2px rgba(255, 196, 70, .85); animation: rm-chase 1.2s steps(1) infinite; animation-delay: calc(var(--n) * -.4s) }
@keyframes rm-chase { 0% { opacity: 1 } 33% { opacity: .2; box-shadow: none } }
.rm-slot.spinning .rm-bulbs i { animation-duration: .42s; animation-delay: calc(var(--n) * -.14s) }
.rm-slot.win .rm-bulbs i { animation: rm-flash .22s steps(1) 9 }
@keyframes rm-flash { 50% { opacity: .15; box-shadow: none } }
.rm-window { position: relative; height: var(--wh); display: grid; grid-template-columns: 1fr 2.2fr 1fr; gap: 7px; padding: 8px; border-radius: 16px; background: #120a12; box-shadow: inset 0 0 0 2px #000, inset 0 8px 24px rgba(0, 0, 0, .9) }
.rm-reelv { position: relative; overflow: hidden; border-radius: 9px; background: linear-gradient(90deg, #bdb6a5, #fffaf0 24%, #fffdf6 50%, #fffaf0 76%, #bdb6a5) }
.rm-reelv.main { background: linear-gradient(90deg, #1b1424, #2d2238 30%, #2d2238 70%, #1b1424) }
/* curved drum: dark at top and bottom */
.rm-reelv::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .18) 22%, transparent 38%, transparent 62%, rgba(0, 0, 0, .18) 78%, rgba(0, 0, 0, .78)) }
.rm-rs { position: absolute; left: 0; right: 0; top: 0; will-change: transform; transition: filter .18s }
.rm-reelv.fast .rm-rs { filter: blur(2.6px) }
.rm-reelv.stop { animation: rm-jolt .35s ease-out }
@keyframes rm-jolt { 30% { transform: translateY(3px) } }
.rm-sym { height: calc((var(--wh) - 16px) / 3); display: grid; place-content: center; justify-items: center; gap: 2px; color: #3b1020 }
.rm-sym b { font-size: clamp(30px, 4.2vw, 44px); line-height: 1; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .25)) }
.rm-sym span { font: 700 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #6a3a3a; white-space: nowrap }
.rm-sym.yr b { font: 800 clamp(22px, 3vw, 32px)/1 var(--display); color: #b3123c; letter-spacing: -.02em; filter: none; text-shadow: 0 2px 0 rgba(0, 0, 0, .12) }
.rm-pt { height: calc((var(--wh) - 16px) * .82); display: grid; place-items: center; padding: 8px 0 }
.rm-pf { position: relative; height: 100%; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: linear-gradient(160deg, #3a3f72, #171a2c); box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08) }
.rm-pf img { width: 100%; height: 100%; object-fit: cover; display: block }
.rm-pf span { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 8px; font: 700 14px/1.2 var(--body); color: var(--fg) }
.rm-pt:not(.nop) .rm-pf span { display: none }
.rm-payline { position: absolute; left: 0; right: 0; top: 50%; height: 0; z-index: 2; pointer-events: none; border-top: 2px solid rgba(255, 60, 90, .55); box-shadow: 0 0 10px rgba(255, 60, 90, .6) }
.rm-payline i { position: absolute; top: -9px; border: 8px solid transparent }
.rm-payline i:first-child { left: -2px; border-left: 11px solid #ff2f5e }
.rm-payline i:last-child { right: -2px; border-right: 11px solid #ff2f5e }
.rm-slot.win .rm-payline { border-top-color: #ffd46b; box-shadow: 0 0 18px 3px rgba(255, 212, 107, .9); animation: rm-flash .22s steps(1) 6 }
.rm-glass { position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 16px; background: linear-gradient(115deg, rgba(255, 255, 255, .14), transparent 30%, transparent 70%, rgba(255, 255, 255, .05)) }
.rm-slot.win .rm-window { box-shadow: inset 0 0 0 2px #000, inset 0 8px 24px rgba(0, 0, 0, .9), 0 0 0 3px #ffd46b, 0 0 40px 6px rgba(255, 196, 70, .55) }
.rm-slot.win .rm-reelv.main .rm-pt:nth-child(2) .rm-pf { animation: rm-pop .6s var(--ease) }
@keyframes rm-pop { 40% { transform: scale(1.07); box-shadow: 0 0 0 3px #ffd46b, 0 0 40px rgba(255, 212, 107, .8) } }

/* lever */
.rm-lever { --p: 0; --len: 92px; position: absolute; right: 0; top: 70px; width: 52px; height: calc(var(--len) * 2 + 40px); cursor: grab; touch-action: none; outline: none }
.rm-lever:active { cursor: grabbing }
.rm-lever .base { position: absolute; left: 4px; top: calc(var(--len) + 6px); width: 30px; height: 46px; border-radius: 0 12px 12px 0; background: linear-gradient(90deg, #8d6118, #f6dd8f 45%, #b98a2c); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .6) }
.rm-lever .rod { position: absolute; left: 21px; top: 30px; width: 8px; height: var(--len); border-radius: 4px; transform-origin: 50% 100%; transform: scaleY(calc(1 - 2 * var(--p))); background: linear-gradient(90deg, #8a8f99, #f5f7fa 45%, #9aa0aa) }
.rm-lever .knob { position: absolute; left: 7px; top: 4px; width: 36px; height: 36px; border-radius: 50%; transform: translateY(calc(var(--p) * var(--len) * 2)); background: radial-gradient(circle at 34% 30%, #ff9cb0, #ff1f4f 40%, #9a0726 85%); box-shadow: 0 8px 16px -6px rgba(0, 0, 0, .8), inset 0 -3px 6px rgba(0, 0, 0, .3) }
.rm-lever:focus-visible .knob { outline: 3px solid var(--accent); outline-offset: 3px }
.rm-slot:not(.spinning) .rm-lever .knob { animation: rm-nudge 3.2s ease-in-out infinite }
@keyframes rm-nudge { 0%, 80%, 100% { translate: 0 0 } 86% { translate: 0 7px } 92% { translate: 0 0 } }

/* tray: the slot the ticket prints out of */
.rm-tray { position: relative; margin: -4px 22px 0; padding: 12px 64px 10px 16px; border-radius: 0 0 16px 16px; background: linear-gradient(#1b0f18, #0d070c); box-shadow: inset 0 6px 10px rgba(0, 0, 0, .8), 0 0 0 2px #5a3a0e; font: 600 13px var(--mono); letter-spacing: .06em; color: #ffcf6b; text-shadow: 0 0 8px rgba(255, 190, 80, .7); text-transform: uppercase; overflow: hidden; white-space: nowrap; text-overflow: ellipsis }
.rm-tray::after { content: "🎟 " var(--spins, "000"); position: absolute; right: 14px; top: 12px; color: #ff6b8e; text-shadow: 0 0 8px rgba(255, 80, 120, .7) }
.rm-slot.win .rm-tray span { animation: rm-flash .22s steps(1) 6 }
.rm-fx { position: absolute; z-index: 20; font-size: 26px; pointer-events: none; will-change: transform, opacity }

.rm-pick { margin-top: 0; transition: opacity .25s }
.rm-pick:empty { display: none }
.rm-pick.out { opacity: 0 }
.rm-pick .rm-card { position: relative; margin: 0 22px; padding: 22px clamp(16px, 2.4vw, 26px) 20px; border-radius: 0 0 18px 18px; background: radial-gradient(120% 90% at 0% 0%, rgba(255, 196, 70, .08), transparent 60%), var(--bg2); border: 1px solid var(--line); border-top: 2px dashed rgba(255, 212, 107, .45); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .9) }
.rm-pick .rm-card::before, .rm-pick .rm-card::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--card) }
.rm-pick .rm-card::before { left: -11px } .rm-pick .rm-card::after { right: -11px }
.rm-pick.in .rm-card { animation: rm-print 1.1s cubic-bezier(.3, .7, .2, 1) both; transform-origin: 50% 0 }
@keyframes rm-print { from { clip-path: inset(0 0 100% 0); transform: translateY(-24px) } 70% { clip-path: inset(0 0 0 0) } }

/* card */
.rm-card { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: clamp(16px, 2.4vw, 28px); align-items: start }
.rm-poster img, .rm-noposter { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; border-radius: 14px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06); object-fit: cover }
.rm-poster:not(.nop) .rm-noposter, .rm-tile:not(.nop) span, .nop img { display: none !important }
.rm-noposter { display: grid; place-content: center; text-align: center; gap: 6px; padding: 16px; background: radial-gradient(120% 80% at 30% 0%, #3b3f7a, #161827 70%) }
.rm-noposter b { font-family: var(--display); font-size: 22px; line-height: 1.1 }
.rm-noposter span { color: var(--mute); font-family: var(--mono); font-size: 13px }
.rm-info h2 { margin: 8px 0 6px; font-family: var(--display); font-size: clamp(28px, 3.4vw, 44px); line-height: 1.02; letter-spacing: -.03em }
.rm-meta { margin: 0 0 8px; color: var(--mute); font-size: 15px }
.rm-rate { margin: 0 0 10px; display: flex; align-items: baseline; gap: 6px; font-size: 13.5px; color: var(--dim) }
.rm-rate b { color: var(--beam); font-size: 17px }
.rm-tag { margin: 0 0 10px; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--text) }
.rm-over { margin: 0 0 12px; color: var(--text); font-size: 15.5px; line-height: 1.55 }
.rm-over.dim { color: var(--dim); font-size: 14px }
.rm-crew { margin: 0 0 4px; font-size: 14.5px; color: var(--fg) }
.rm-crew span { color: var(--dim); margin-right: 4px }
.rm-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px }
.rm-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); color: var(--fg); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s }
.rm-btn:hover { background: rgba(255, 255, 255, .09) }
.rm-btn.on { border-color: #ff6b8e; color: #ff9ab2; background: rgba(255, 107, 142, .1) }

.rm-go { display: grid; justify-items: center; gap: 10px; margin-top: 20px }
.rm-spin { position: relative; min-width: 240px; min-height: 60px; padding: 14px 34px; border: 0; border-radius: 99px; cursor: pointer; color: #0b0c10; font: 800 20px var(--display); letter-spacing: -.01em;
  background: linear-gradient(135deg, #ffd27f, #ffb547 45%, #ff9a5a); box-shadow: 0 18px 40px -14px rgba(255, 170, 70, .8), inset 0 -3px 0 rgba(0, 0, 0, .15); transition: transform .15s, filter .2s }
.rm-spin:hover { filter: brightness(1.06) }
.rm-spin:active { transform: scale(.96) }
.rm-spin:disabled { cursor: default; filter: grayscale(.7) brightness(.7); box-shadow: none }
.rm-count { margin: 0; color: var(--dim); font-size: 13.5px; font-variant-numeric: tabular-nums }

/* side */
.rm-side { display: grid; gap: 16px }
.rm-filters, .rm-mine, .rm-lists { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px }
.rm-filters[hidden], .rm-mine[hidden] { display: none }
.rm-f + .rm-f { margin-top: 14px }
.rm-f > b { display: block; margin-bottom: 8px; font-size: 13px; color: var(--mute); font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase }
.rm-chips { display: flex; flex-wrap: wrap; gap: 6px }
.rm-chips button { min-height: 36px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .2s, background .2s, color .2s }
.rm-chips button[aria-pressed="true"] { border-color: var(--accent); background: rgba(107, 138, 255, .16); color: var(--fg) }
.rm-clear, .rm-link { border: 0; background: none; padding: 6px 0; color: var(--accent2); font-weight: 600; font-size: 14px; cursor: pointer }
.rm-clear { margin-top: 12px }
.rm-mine label { display: grid; gap: 4px; margin-bottom: 10px }
.rm-mine label span { color: var(--mute); font-size: 13.5px }
.rm-mine textarea { width: 100%; padding: 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--bg2); color: var(--fg); font: 500 16px/1.5 var(--body); resize: vertical }
.rm-mine textarea:focus { outline: none; border-color: var(--accent) }
.rm-mine-n { margin: 8px 0 0; color: var(--dim); font-size: 13px }
.rm-lh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px }
.rm-saved { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 330px; overflow-y: auto }
.rm-saved li { display: flex; align-items: center; gap: 6px }
.rm-saved li.none { color: var(--dim); font-size: 14px }
.rm-saved [data-open] { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; border: 0; background: none; color: var(--fg); text-align: left; cursor: pointer; font-size: 14.5px }
.rm-saved [data-open]:hover { background: rgba(255, 255, 255, .05) }
.rm-saved img, .rm-saved i { flex: none; width: 30px; height: 45px; border-radius: 4px; object-fit: cover; background: #23263a }
.rm-saved span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rm-saved em { font-style: normal; color: var(--dim); font-size: 13px }
.rm-x { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; color: var(--dim); font-size: 20px; cursor: pointer }
.rm-x:hover { color: var(--fg); background: rgba(255, 255, 255, .06) }
.rm-seen { margin: 10px 0 0; color: var(--dim); font-size: 13px }

@media (max-width: 960px) { .rm-main { grid-template-columns: 1fr } }
@media (max-width: 600px) {
  .rm-modes { width: 100%; display: grid; grid-template-columns: 1fr 1fr; border-radius: 20px }
  .rm-modes button { padding: 9px 8px; font-size: 14px; border-radius: 15px }
  .rm-slot { --wh: 250px; padding-right: 44px }
  .rm-marquee { padding: 12px 46px 18px; margin: 0 2px -6px }
  .rm-sign { font-size: clamp(19px, 6vw, 24px); white-space: nowrap }
  .rm-mute { width: 32px; height: 32px; right: 8px }
  .rm-cab { padding: 12px; border-radius: 20px }
  .rm-window { gap: 5px; padding: 6px; grid-template-columns: 1fr 2fr 1fr }
  .rm-sym { height: calc((var(--wh) - 12px) / 3) }
  .rm-sym span { font-size: 9px; letter-spacing: .04em }
  .rm-pt { height: calc((var(--wh) - 12px) * .82) }
  .rm-lever { --len: 74px; width: 42px; top: 58px; right: -2px }
  .rm-lever .knob { width: 30px; height: 30px; left: 6px }
  .rm-lever .rod { left: 17px; width: 7px }
  .rm-lever .base { left: 2px; width: 24px; height: 38px }
  .rm-tray { margin: -4px 12px 0; font-size: 11.5px; padding: 11px 58px 9px 12px }
  .rm-pick .rm-card { margin: 0 12px }
  .rm-card { grid-template-columns: 1fr; justify-items: center; text-align: center }
  .rm-poster { width: min(220px, 62vw) }
  .rm-rate, .rm-acts { justify-content: center }
  .rm-spin { width: 100% }
  .rm-stage { padding: 16px }
}
.rm-reelv.swap .rm-rs { animation: rm-fade .18s linear }
@keyframes rm-fade { from { opacity: 0 } }
/* Reduce motion: no travelling reels, lever or flying coins; fades and glows stay */
@media (prefers-reduced-motion: reduce) {
  /* the site-wide rule switches off all animation; these gentle, non-moving ones are allowed back */
  .rm .rm-reelv.swap .rm-rs { animation: rm-fade .18s linear !important }
  .rm .rm-pick.in .rm-card { animation: rm-fade .5s ease both !important }
  .rm .rm-slot.win .rm-payline, .rm .rm-slot.win .rm-bulbs i { animation: rm-flash .3s steps(1) 4 !important }
  .rm .rm-pick { transition-duration: .3s !important }
  .rm-spin:active, .rm-btn { transform: none }
}
