:root {
    --black: #000000;
    --violet: #8600DF;
    --chartreuse: #E5F20D;
    --red: #F20D0D;
    --green: #00F53A;
    --magenta: #FF00FF;
    --cyan: #00FFFF;
    --offwhite: #E0E0E0;
    --gray: #666666;
    --bg: var(--chartreuse);
    --panel: rgb(0 0 0 / 0.82);
    --fg: #ffffff;
    --muted: var(--gray);
    --accent: var(--chartreuse);
    --line: var(--violet);
    --fire: linear-gradient(to bottom, var(--red), var(--chartreuse));
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; min-height: 100dvh; }
body {
    color: var(--fg);
    font: 18px/1.35 "Pill Gothic 600mg", system-ui, sans-serif;
    background: url("/static/img/background.png") center / cover no-repeat fixed;
    background-color: var(--chartreuse);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem 2rem;
}
a { color: var(--fg); text-decoration: none; font-weight: 600; }
a:hover { text-shadow: 0 0 6px var(--red), 0 0 12px var(--chartreuse); color: var(--fg); }
.hero, .nav, .wrap, .foot {
    width: 70%;
    min-width: min(720px, 100%);
}
.hero {
    position: relative;
    margin-bottom: 1rem;
    background: transparent;
}
.hero:not(.fold),
.hero.fold.playing { aspect-ratio: 16 / 9; }
.hero:not(.fold) img, .hero:not(.fold) video, .hero:not(.fold) .hero-play, .hero:not(.fold) .hero-vid,
.hero.playing video, .hero.playing .hero-vid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}
.hero:not(.fold) img { object-fit: contain; }
.hero video { object-fit: contain; background: var(--black); }
.hero-vid { opacity: 0; pointer-events: none; }
.hero.playing .hero-vid { opacity: 1; pointer-events: auto; }
.hero-play {
    padding: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 0;
    min-height: 0;
}
.hero-play:hover { box-shadow: none; filter: brightness(1.08); }
.hero-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 2;
    min-height: 2.2rem;
    background: var(--black);
    border: 1px solid var(--offwhite);
}
.hero.fold:not(.playing) {
    display: flex;
    background: var(--panel);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
}
.hero.fold:not(.playing) > .hero-vid,
.hero.fold:not(.playing) > .hero-close { display: none; }
.hero.fold.playing .fold-bar { display: none; }
.fold-bar {
    --fold-w: 12rem;
    --fold-h: calc(var(--fold-w) * 453 / 1280);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1.25rem;
    width: 100%;
}
.fold-logo {
    display: block;
    width: var(--fold-w);
    flex: 0 0 var(--fold-w);
}
.fold-logo img { display: block; width: 100%; height: auto; }
.hero.fold .signin {
    display: flex;
    flex: 1 1 14rem;
    min-width: 0;
    gap: 1rem 1.25rem;
    align-items: center;
    font-size: 1.5em;
}
.signin-links {
    display: flex;
    flex: 1 1 8rem;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    align-items: center;
    min-width: 0;
}
.signin-who {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.6rem;
}
.who-pic {
    display: block;
    width: var(--fold-h);
    height: var(--fold-h);
    padding: 0;
    overflow: hidden;
    border-radius: 50%;
    flex: 0 0 var(--fold-h);
    background: var(--black);
}
.who-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.who-pic:hover { text-shadow: none; filter: brightness(1.08); }
.hub-btn {
    display: block;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    overflow: hidden;
    border-radius: 0.45rem;
    background: var(--black);
}
.hub-btn img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hub-btn:hover { text-shadow: none; filter: brightness(1.08); }
.wrap.auth {
    flex: 0 0 auto;
    max-width: 26rem;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 1.5rem 1.75rem;
    margin-top: 2rem;
}
.auth-mark { display: block; width: 100%; height: auto; }
.auth-tag { margin: 0; color: var(--offwhite); text-align: center; text-wrap: balance; }
.wrap.auth .btn, .wrap.auth button {
    width: 100%;
    text-align: center;
    font-weight: 700;
    border-radius: 0.55rem;
}
.auth-back { align-self: center; font-size: 1.2rem; color: var(--chartreuse); font-weight: 700; }
.nav, .wrap, .foot {
    background: var(--panel);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.nav {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem 1.25rem;
    align-items: center;
    padding-top: 1.25rem;
    padding-bottom: 1rem;
    border-radius: 0.75rem 0.75rem 0 0;
}
.wrap { padding-top: 1.5rem; padding-bottom: 2.5rem; flex: 1; }
.foot {
    color: var(--muted);
    padding-top: 1rem;
    padding-bottom: 1.5rem;
    border-radius: 0 0 0.75rem 0.75rem;
    font-size: 0.95rem;
}
.foot p { margin: 0; }
.foot p + p { margin-top: 0.35rem; }
.foot a { color: var(--muted); }
.nav-toggle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nav-burger {
    justify-self: end;
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 2.5rem; padding: 0.4rem 0.9rem;
    border: 2px solid var(--chartreuse); color: var(--fg); background: transparent;
    font: inherit; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
    border-radius: 999px;
}
.nav-burger:hover { border-color: var(--red); }
.nav nav, .nav .signin {
    display: none; flex-wrap: wrap; gap: 0.65rem 1.1rem; align-items: center;
    grid-column: 1 / -1;
}
.nav-toggle:checked ~ nav, .nav-toggle:checked ~ .signin { display: flex; }
.nav nav {
    font-family: "Monster Chiller", "Pill Gothic 600mg", sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 400;
    justify-content: center;
}
.nav nav a { font-weight: 400; }
.nav nav a[aria-current="page"] {
    background-image: var(--fire);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}
.signin .btn, .signin button {
    background: var(--violet); color: var(--fg); border: 0;
    padding: 0.45rem 1.1rem; font: inherit; min-height: 2.4rem; border-radius: 999px;
}
.signin .btn:hover { box-shadow: 0 0 12px var(--violet); }
.signin button:disabled { opacity: 0.45; cursor: not-allowed; }
.who { color: var(--muted); font-size: 0.95rem; font-weight: 400; }
h1 {
    font-family: "Turbo Jungle", "Pill Gothic 600mg", sans-serif;
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: 0 0 0.85rem;
    background-image: var(--fire);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    width: fit-content;
}
h2 { font-family: "Turbo Jungle", sans-serif; font-weight: 400; }
button, .btn {
    background: var(--violet); color: var(--fg); border: 0;
    padding: 0.5rem 1.1rem; font: inherit; cursor: pointer; min-height: 2.5rem; border-radius: 999px;
}
button:hover, .btn:hover { box-shadow: 0 0 12px var(--violet); }
.wrap.auth .auth-discord { background: #5865F2; }
.wrap.auth .auth-youtube { background: #FF0000; }
.wrap.auth .auth-discord:hover { box-shadow: 0 0 14px #5865F2; }
.wrap.auth .auth-youtube:hover { box-shadow: 0 0 14px #FF0000; }
button:focus-visible, .btn:focus-visible, a:focus-visible, .nav-burger:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--chartreuse); outline-offset: 3px;
}
form[action*="/delete"] button { background: var(--red); box-shadow: none; }
form[action*="/unlink/"] button { background: var(--magenta); }
.queue { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.queue li {
    display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
    border-bottom: 1px solid color-mix(in srgb, var(--violet) 50%, var(--gray));
    padding: 1.1rem 0;
}
.queue form { margin: 0; }
.queue li > .who + .btn,
.queue li > .who + form,
.queue li > a:not(.btn) + form {
    margin-left: auto;
}
.grid {
    list-style: none; padding: 0; margin: 1.5rem 0 0;
    display: grid; gap: 1.25rem; grid-template-columns: 1fr;
}
.grid li {
    border: 2px solid var(--violet); padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem;
    border-radius: 1.1rem; background: rgb(0 0 0 / 0.35);
}
.grid li:has(.thumb) { border: none; }
.form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 36rem; }
.form label { display: flex; flex-direction: column; gap: 0.4rem; }
.form input, .form textarea, .form select, .queue select {
    background: var(--black); color: var(--fg); border: 2px solid var(--violet);
    padding: 0.65rem 0.75rem; font: inherit; border-radius: 0.6rem;
}
.avatar { max-width: 8rem; }
.thumb { width: 100%; max-width: none; display: block; border-radius: 0.5rem; }
hr {
    border: none;
    height: 4px;
    background: linear-gradient(to right, #E5F20D, #F20D0D, #E5F20D);
    box-shadow: 0 0 6px #E5F20D, 0 0 12px #F20D0D, 0 0 18px rgba(242, 13, 13, 0.6), 0 0 24px rgba(229, 242, 13, 0.5);
    margin: 1.3em;
}
.episodes table, .prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.episodes th, .episodes td, .prose th, .prose td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid color-mix(in srgb, var(--violet) 50%, var(--gray)); }
.episodes .ep-rows { list-style: none; padding: 0; margin: 0.75rem 0 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.episodes .ep-rows li { margin: 0; }
.episodes .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 0.75rem 0 0;
}
.episodes .grid li { padding: 0.65rem; }
.episodes .thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    margin: 0;
    border: 4px solid rgba(255,255,255,0.33);
    border-radius: 18px;
    transition: border 0.5s ease, transform 0.5s ease;
}
.episodes a:hover .thumb, .episodes .thumb:hover {
    border: 4px solid #E5F20D;
    transform: scale(1.01);
    animation: heartbeatPulse 1.8s ease-in-out infinite;
}
@keyframes heartbeatPulse {
    0% { filter: drop-shadow(0 0 2px #E5F20D) drop-shadow(0 0 4px #F20D0D) drop-shadow(0 0 6px rgba(242, 13, 13, 0.35)) drop-shadow(0 0 8px rgba(229, 242, 13, 0.3)); }
    20% { filter: drop-shadow(0 0 3px #E5F20D) drop-shadow(0 0 6px #F20D0D) drop-shadow(0 0 9px rgba(242, 13, 13, 0.45)) drop-shadow(0 0 12px rgba(229, 242, 13, 0.4)); }
    35% { filter: drop-shadow(0 0 4px #E5F20D) drop-shadow(0 0 8px #F20D0D) drop-shadow(0 0 12px rgba(242, 13, 13, 0.55)) drop-shadow(0 0 16px rgba(229, 242, 13, 0.45)); }
    100% { filter: drop-shadow(0 0 2px #E5F20D) drop-shadow(0 0 4px #F20D0D) drop-shadow(0 0 6px rgba(242, 13, 13, 0.35)) drop-shadow(0 0 8px rgba(229, 242, 13, 0.3)); }
}
.ep-row { border: 2px solid var(--violet); border-radius: 0.6rem; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.6rem; }
#monaco-mount { height: 28rem; border: 2px solid var(--violet); border-radius: 0.6rem; }
.monaco-src { position: absolute; left: -9999px; width: 1px; height: 1px; }
.banner { max-width: 100%; }
.prose :is(h2,h3) { margin-top: 1.5rem; }
.prose img { max-width: 100%; }
time.md-date[data-fmt="count"] { font-variant-numeric: tabular-nums; }
.prose a { color: var(--cyan); }
.embed { position: relative; width: 100%; max-width: none; aspect-ratio: 16 / 9; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0.5rem; }
p:has(+ ul.grid), p.who { max-width: 42rem; }
::selection { background: var(--violet); color: var(--fg); }
input, select, textarea { accent-color: var(--green); }
@media (min-width: 640px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 800px) {
    .nav { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
    .nav-burger { display: none; }
    .nav nav, .nav .signin { display: flex; grid-column: auto; flex: 1; }
    .nav .signin { flex: 0 1 auto; justify-content: flex-end; }
    .nav nav { justify-content: flex-start; }
}
@media (min-width: 960px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    .episodes .grid { grid-template-columns: repeat(2, 1fr); }
}
