:root { --bg: #0B1026; --ink: #F5F7FF; --muted: #8C94B8; --yellow: #FFD23F; --pink: #FF5D8F; --green: #3DDC97; --purple: #3B1066; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; color: var(--ink); font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.app { position: relative; height: 100dvh; max-width: 520px; margin: 0 auto; background: var(--bg); overflow: hidden; }

.topbar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: max(10px, env(safe-area-inset-top)) 14px 10px; background: linear-gradient(#000a, #0000); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.logo b { color: var(--yellow); }
.pill { background: #0008; border: 1px solid #fff3; border-radius: 99px; padding: 6px 12px; font-size: 16px; }

.feed { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.clip { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; }
.clip video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.clip .meta { position: absolute; left: 14px; right: 76px; bottom: max(18px, env(safe-area-inset-bottom)); text-shadow: 0 1px 4px #000; }
.clip .meta .serie { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--yellow); text-transform: uppercase; }
.clip .meta .title { font-size: 15px; font-weight: 700; margin-top: 4px; }
.side { position: absolute; right: 10px; bottom: 90px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.side button { width: 50px; height: 50px; border-radius: 50%; background: #0007; border: 1px solid #fff3; font-size: 22px; display: grid; place-items: center; }
.side button.on { background: var(--pink); border-color: var(--pink); }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #fff2; }
.progress i { display: block; height: 100%; width: 0; background: var(--yellow); }
.paused::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 72px; color: #fffc; pointer-events: none; text-shadow: 0 2px 12px #000; }

.endcard { position: absolute; inset: auto 14px 90px 14px; background: #0B1026ee; border: 2px solid var(--yellow); border-radius: 20px; padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.endcard img { width: 72px; height: 72px; }
.endcard h3 { font-size: 18px; }
.endcard .row { display: flex; gap: 10px; width: 100%; }
.endcard .row .btn { flex: 1; }

.btn { border-radius: 14px; padding: 12px 16px; font-weight: 800; background: #ffffff14; border: 1px solid #fff3; }
.btn.primary { background: var(--yellow); color: var(--bg); border-color: var(--yellow); }
.btn.yes { background: var(--green); color: var(--bg); border-color: var(--green); }
.btn.no { background: var(--pink); color: var(--bg); border-color: var(--pink); }
.btn.wide { width: 100%; }

.final { flex-direction: column; gap: 14px; padding: 30px 24px; text-align: center; background: radial-gradient(circle at 50% 30%, var(--purple), var(--bg)); }
.final img { width: 160px; height: 160px; }
.final h2 { font-size: 24px; }
.final .opts { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.final .opt.sel { background: var(--yellow); color: var(--bg); }
.final textarea { width: 100%; border-radius: 12px; padding: 10px; background: #0005; color: var(--ink); border: 1px solid #fff3; font: inherit; }

.panel { position: absolute; inset: 0; z-index: 10; background: radial-gradient(circle at 50% 25%, var(--purple), var(--bg) 70%); overflow-y: auto; }
.panel-inner { min-height: 100%; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; padding: 32px 24px; text-align: center; }
.panel h1 { font-size: 34px; }
.panel h1 b { color: var(--yellow); }
.tagline { color: var(--ink); font-size: 17px; }
.field { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; font-weight: 700; }
.field input { border-radius: 12px; padding: 12px; background: #0006; color: var(--ink); border: 1px solid #fff3; font: inherit; }
.muted { color: var(--muted); font-weight: 400; }
.notice { font-size: 12px; color: var(--muted); }
.swipe-hint { position: absolute; z-index: 4; bottom: 120px; left: 50%; transform: translateX(-50%); background: #000a; padding: 8px 14px; border-radius: 99px; font-weight: 700; animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, -8px); } }
.toast { position: absolute; z-index: 20; left: 50%; bottom: 40px; transform: translateX(-50%); background: #000d; padding: 10px 16px; border-radius: 12px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
