:root {
    --brand-color: #4f46e5;
    --brand-color-dark: #4338ca;
    --surface-bg: #0f1117;
    --surface-card: #171923;
    --surface-border: #262b38;
    --text-muted: #9aa1b1;
}

body {
    background-color: #f5f6fa;
}

body.theme-dark {
    background-color: var(--surface-bg);
    color: #e6e8ef;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.video-card {
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    background: #fff;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.video-card .thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #1a1c25;
    overflow: hidden;
}

.video-card .thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card .duration-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.72rem;
    padding: 1px 6px;
    border-radius: 4px;
}

.video-card .progress {
    height: 3px;
    border-radius: 0;
}

.section-heading {
    font-weight: 700;
    margin: 1.5rem 0 1rem;
}

.sidebar-admin {
    min-height: calc(100vh - 56px);
    background: #171923;
    color: #cfd3dd;
}

.sidebar-admin a {
    color: #cfd3dd;
    text-decoration: none;
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    margin: 0.15rem 0.5rem;
}

.sidebar-admin a:hover,
.sidebar-admin a.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.stat-card {
    border-radius: 0.75rem;
    border: none;
    color: #fff;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
}

.comment-thread .reply {
    margin-left: 2.5rem;
    border-left: 2px solid #e5e7eb;
    padding-left: 0.75rem;
}

.badge-visibility-PUBLIC { background-color: #16a34a; }
.badge-visibility-PRIVATE { background-color: #dc2626; }
.badge-visibility-GROUP { background-color: #d97706; }
.badge-visibility-UNLISTED { background-color: #6b7280; }

/* ----------------------------------------------------------------------
   Error pages (404 / 403 / 500) — a shared "off-air" motif: since every
   video on HueToob plays through an embedded player, the natural way to
   say "there's nothing here" is to show that player with no signal,
   rather than a generic icon unrelated to what the app actually does.
   One shared visual system (this block), reused with a different icon
   and copy per error type — see app/Views/partials/error-screen.php.
   ---------------------------------------------------------------------- */
.error-screen-wrap {
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.error-screen {
    width: 100%;
    max-width: 640px;
    text-align: center;
}

.error-screen .screen {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 0.9rem;
    overflow: hidden;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.035) 0px,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px,
            transparent 3px
        ),
        repeating-conic-gradient(
            from 0deg,
            #23263a 0deg 4deg,
            #2b2f47 4deg 8deg
        );
    background-size: 100% 100%, 6px 6px;
    box-shadow: 0 25px 50px rgba(15, 17, 23, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    animation: error-screen-static 0.4s steps(6) infinite;
}

.error-screen .screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 45%, rgba(10, 11, 16, 0.55) 100%);
}

.error-screen .screen-code {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(3rem, 12vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.error-screen .screen-icon {
    position: absolute;
    bottom: 12px;
    right: 16px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.1rem;
    z-index: 1;
}

.error-screen .rec-dot {
    position: absolute;
    top: 14px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.6);
    z-index: 1;
}

.error-screen .rec-dot .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    animation: error-screen-blink 1.4s ease-in-out infinite;
}

.error-screen h1 {
    margin-top: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.error-screen p {
    color: var(--text-muted, #6b7280);
    max-width: 440px;
    margin: 0.5rem auto 1.5rem;
}

@keyframes error-screen-static {
    0%   { background-position: 0 0, 0 0; }
    100% { background-position: 0 0, 6px 3px; }
}

@keyframes error-screen-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
    .error-screen .screen { animation: none; }
    .error-screen .rec-dot .dot { animation: none; }
}
