/* Gated video page — self-contained, same gold/black tokens as membership.css. */

:root {
    --ink: #0b0b0c;
    --panel: #141412;
    --panel-raised: #1a1917;
    --paper: #f4eee6;
    --smoke: #9c9686;
    --line: rgba(244, 238, 230, 0.12);
    --line-strong: rgba(244, 238, 230, 0.22);
    --gold-1: #f6e7c1;
    --gold-2: #e3b04b;
    --gold-3: #b97a2a;
    --radius: 10px;
}

body {
    background: var(--ink);
    color: var(--paper);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.btn {
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.65rem 1.3rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: filter 0.15s ease, border-color 0.15s ease;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 60%, var(--gold-3));
    color: #221505;
}

.btn-gold:hover {
    filter: brightness(1.06);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: none;
}

.btn-outline {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--paper);
}

.btn-outline:hover {
    border-color: var(--gold-2);
    color: var(--gold-1);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.video-top-bar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}

.video-top-bar img {
    border-radius: 50%;
}

.video-page {
    max-width: 880px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) 4rem;
}

.video-back {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--smoke);
    margin-bottom: 1.2rem;
}

.video-back:hover {
    color: var(--gold-1);
}

.video-page h1 {
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    margin: 0 0 0.6rem;
}

.video-description {
    color: var(--smoke);
    line-height: 1.55;
    margin: 0 0 1.5rem;
    max-width: 65ch;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--panel);
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    gap: 0.5rem;
}

.video-state[hidden] {
    display: none;
}

.video-state .gate-icon {
    margin-bottom: 0.4rem;
}

.video-state h2 {
    font-size: 1.15rem;
    margin: 0;
}

.video-state p {
    color: var(--smoke);
    font-size: 0.9rem;
    max-width: 38ch;
    margin: 0 0 0.6rem;
}

.video-state .btn {
    min-width: 200px;
}

.gate-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--panel-raised);
    border: 1px solid var(--line-strong);
    color: var(--gold-1);
}

.video-watermark {
    position: absolute;
    z-index: 2;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(244, 238, 230, 0.55);
    background: rgba(11, 11, 12, 0.35);
    border-radius: 999px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.1s ease;
}

.video-watermark.is-visible {
    opacity: 1;
}

.video-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(11, 11, 12, 0.55);
    border: 1px solid var(--line-strong);
    color: var(--paper);
    backdrop-filter: blur(4px);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.video-icon-btn:hover,
.video-icon-btn:focus-visible {
    border-color: var(--gold-2);
    color: var(--gold-1);
}

.video-icon-btn:active {
    transform: scale(0.92);
}

.video-fullscreen-toggle {
    position: absolute;
    z-index: 3;
    right: 0.7rem;
    bottom: 0.7rem;
    width: 34px;
    height: 34px;
}

/* Skip-back / play-pause / skip-forward, grouped as one cluster so they
   read as a single control instead of buttons scattered around the
   frame — positioned at a fixed spot since Bunny's own play/pause button
   lives inside a cross-origin iframe we can't measure. */
.video-control-cluster {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.video-control-cluster.is-idle {
    opacity: 0;
    pointer-events: none;
}

.video-skip-btn {
    position: relative;
    width: 40px;
    height: 40px;
}

.video-skip-btn--forward .video-skip-icon {
    transform: scaleX(-1);
}

.video-skip-icon {
    display: flex;
}

.video-skip-amount {
    position: absolute;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.52rem;
    font-weight: 700;
    pointer-events: none;
}

.video-play-toggle {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 60%, var(--gold-3));
    border-color: transparent;
    color: #221505;
}

.video-play-toggle:hover,
.video-play-toggle:focus-visible {
    border-color: transparent;
    color: #221505;
    filter: brightness(1.06);
}

.video-skip-flash {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(227, 176, 75, 0.18);
    color: var(--gold-1);
    font-size: 0.78rem;
    font-weight: 700;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transform: translate(-50%, -220%) scale(0.6);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.video-skip-flash.is-active {
    opacity: 1;
    transform: translate(-50%, -220%) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .video-icon-btn,
    .video-control-cluster,
    .video-skip-flash {
        transition: none;
    }
}

.video-frame:fullscreen {
    aspect-ratio: auto;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: 0;
    background: #000;
}

/* ---------- standalone gate page (login_error.html) ---------- */

.gate-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.gate-card {
    width: 100%;
    max-width: 380px;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    text-align: center;
}

.gate-card .gate-icon {
    margin: 0 auto 1rem;
}

.gate-card h1 {
    font-size: 1.25rem;
    margin: 0 0 0.6rem;
}

.gate-card p {
    color: var(--smoke);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1.3rem;
}

/* ---------- comments ---------- */

.comments {
    margin-top: 2.5rem;
}

.comments h2 {
    font-size: 1.2rem;
    margin: 0 0 1rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-input {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--paper);
    font: inherit;
    font-size: 0.9rem;
    padding: 0.75rem;
    resize: vertical;
    margin-bottom: 0.6rem;
}

.comment-input:focus {
    outline: none;
    border-color: var(--gold-2);
}

.comment-form-error {
    color: #e6a0a0;
    font-size: 0.82rem;
    margin: -0.3rem 0 0.6rem;
}

.comment-login-hint {
    color: var(--smoke);
    font-size: 0.88rem;
    margin-bottom: 2rem;
}

.comment-login-hint a {
    color: var(--gold-1);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.comment-empty {
    color: var(--smoke);
    font-size: 0.88rem;
}

.comment {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 0.9rem 1rem;
}

.comment--reply {
    background: var(--panel-raised);
}

/* Replies sit inside the comment they answer; the gold-tinted rail on the
   left traces each thread back up to its parent. */
.comment-children {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 0.8rem 0 0 0.4rem;
    padding-left: 0.8rem;
    border-left: 2px solid var(--line-strong);
}

.comment-children > .comment {
    padding: 0.75rem 0.85rem;
}

@media (min-width: 640px) {
    .comment-children {
        margin-left: 1rem;
        padding-left: 1rem;
    }
}

.comment-reply-to {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
    font-size: 0.76rem;
    color: var(--smoke);
}

.comment-reply-to:hover,
.comment-reply-to:focus-visible {
    color: var(--gold-1);
}

.comment:target {
    border-color: var(--gold-2);
}

.comment--creator {
    border-color: var(--gold-3);
}

.comment-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.comment-avatar {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--panel-raised);
    border: 1px solid var(--line-strong);
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.comment-date {
    color: var(--smoke);
    font-size: 0.76rem;
}

.creator-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: #221505;
    background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 60%, var(--gold-3));
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
}

.comment-liked {
    font-size: 0.76rem;
    color: var(--gold-1);
}

.comment-body {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.comment-body--removed {
    color: var(--smoke);
    font-style: italic;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.comment-like-form {
    margin: 0;
}

.comment-like {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--smoke);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.comment-like:hover,
.comment-like:focus-visible {
    color: var(--gold-1);
}

.comment-like.is-liked {
    color: var(--gold-2);
}

.comment-like.is-liked path {
    fill: currentColor;
}

.comment-like.is-static {
    cursor: default;
}

.comment-like.is-static:hover {
    color: var(--smoke);
}

.comment-like[disabled] {
    opacity: 0.6;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.comment-reply-toggle {
    display: inline-block;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--smoke);
    cursor: pointer;
}

.comment-reply-toggle:hover,
.comment-reply-toggle:focus-visible {
    color: var(--gold-1);
}

.comment-reply-form {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
}

.comment-reply-form .comment-input {
    margin-bottom: 0.5rem;
}

.comment-reply-actions {
    display: flex;
    gap: 0.5rem;
}

.comment-reply-actions .btn {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
    .video-watermark {
        transition: none;
    }
}
