/* ==========================================================================
   3ALUPA // MEDIA — Neo-Precision Architectural Monochrome Design
   Anti-AI-Slop: Zero gradients, pure optical black & stark white contrast,
   hairline geometric precision, Inter typography & grand kinetic motion.
   ========================================================================== */

:root {
    --bg-base: #030304;
    --bg-surface: #09090c;
    --bg-surface-elevated: #101015;
    --bg-surface-hover: #16161c;
    --bg-input: #060608;

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-mid: rgba(255, 255, 255, 0.16);
    --border-bright: rgba(255, 255, 255, 0.35);
    --border-focus: #38bdf8;
    --accent-cyan: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.25);
    --border-card: rgba(56, 189, 248, 0.12);

    --text-primary: #ffffff;
    --text-secondary: #a0a0ab;
    --text-tertiary: #585864;
    --text-muted: #3a3a44;

    --accent-white: #ffffff;
    --accent-black: #030304;
    --accent-success: #22c55e;
    --accent-warn: #eab308;
    --accent-danger: #ef4444;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    --radius-sharp: 0px;
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-full: 9999px;

    --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-snap: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    letter-spacing: -0.015em;
}

/* Subtle architectural grid canvas in background */
.ambient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}

/* Precision Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: #1e1e24;
    border-radius: var(--radius-xs);
}
::-webkit-scrollbar-thumb:hover {
    background: #363642;
}

::selection {
    background: #ffffff;
    color: #000000;
}

.hidden {
    display: none !important;
}

.sr-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================================================
   Navigation Header
   ========================================================================== */
.navbar {
    position: relative;
    width: 100%;
    z-index: 100;
    background: #040406;
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
}

.navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(255, 255, 255, 0.02) 25%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.02) 75%,
        rgba(0, 0, 0, 0.95) 100%
    );
    background-size: 250% 100%;
    animation: monoNavSweep 12s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 1;
}

.navbar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: monoBorderScan 6s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 2;
}

@keyframes monoNavSweep {
    0% { background-position: 0% 0; }
    100% { background-position: 100% 0; }
}

@keyframes monoBorderScan {
    0% { background-position: -100% 0; opacity: 0.3; }
    100% { background-position: 200% 0; opacity: 0.9; }
}

.nav-container {
    position: relative;
    z-index: 3;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.85rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.btn-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s var(--ease-snap);
}

.btn-nav-back:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    user-select: none;
}

.brand-monogram {
    font-size: 0.85rem;
    color: #ffffff;
    transform: translateY(-1px);
    transition: transform 0.4s var(--ease-snap);
}

.brand:hover .brand-monogram {
    transform: translateY(-2px) scale(1.15);
}

.brand-title {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #ffffff;
}

.brand-sep {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
}

/* HUD System Status */
.system-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.status-indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-success);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: statusPulse 2.4s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

/* Telegram Auth & User Profile Pill */
.user-profile-box {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.25rem 0.6rem 0.25rem 0.35rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.user-profile-box:hover {
    border-color: var(--border-bright);
    background-color: var(--bg-surface-elevated);
}

.user-avatar-wrap {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-xs);
    overflow: hidden;
    background: #1a1a20;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.user-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffffff;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.user-badge.badge-admin {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

/* Admin Storage Telemetry Pill */
.admin-storage-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.75rem;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #ffffff;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
}

.admin-storage-pill:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.admin-storage-pill i {
    color: var(--accent-cyan);
    font-size: 0.8rem;
}

.admin-storage-bar-micro {
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.admin-storage-bar-micro div {
    height: 100%;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

.telegram-login-container {
    display: flex;
    align-items: center;
}

/* Telegram Button (Monochrome Luxury & High-Contrast) */
.btn-telegram-mono {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    background: #000000;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-xs);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s var(--ease-snap);
}

.btn-telegram-mono:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.btn-telegram-mono i {
    font-size: 0.95rem;
    transition: transform 0.25s ease;
}

.btn-telegram-mono:hover i {
    transform: scale(1.1);
}

/* Base Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    border-radius: var(--radius-xs);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s var(--ease-snap);
    user-select: none;
    text-decoration: none;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.12);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #2a2a32;
    color: #7a7a88;
    border-color: transparent;
}

.btn-secondary {
    background: var(--bg-surface);
    color: #ffffff;
    border: 1px solid var(--border-mid);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-bright);
    color: #ffffff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger-ghost {
    background: transparent;
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger-ghost:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-danger);
    color: #ffffff;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
}

.btn-icon-minimal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-minimal:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-bright);
    color: #ffffff;
}

/* ==========================================================================
   Monumental Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    z-index: 10;
    padding: 5rem 2rem 3.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-wrap {
    max-width: 1440px;
    margin: 0 auto;
}

.hero-kicker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-tertiary);
}

.kicker-tag {
    color: var(--text-secondary);
    font-weight: 600;
}

.kicker-coord {
    color: var(--text-muted);
}

.hero-headline {
    font-family: var(--font-sans);
    font-size: clamp(2.4rem, 5.5vw, 4.6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #ffffff;
    margin-bottom: 1.75rem;
    text-transform: uppercase;
}

.headline-row {
    display: block;
    overflow: hidden;
}

.headline-inner {
    display: inline-block;
}

.text-contrast-outline {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.85);
}

.hero-desc {
    max-width: 780px;
    font-size: 1.08rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Specs Telemetry HUD Grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border-subtle);
}

.spec-card {
    position: relative;
    background: var(--bg-base);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
}

.spec-card:hover {
    background: #07070a;
}

.spec-card-corner {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1;
    user-select: none;
    pointer-events: none;
}
.spec-card-corner.top-left { top: 6px; left: 8px; }
.spec-card-corner.top-right { top: 6px; right: 8px; }

.spec-card-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.spec-card-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.spec-card-val {
    font-family: var(--font-sans);
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.spec-card-sub {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Main Feed & Filters
   ========================================================================== */
.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
    position: relative;
    z-index: 10;
    flex: 1;
    width: 100%;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.25rem;
    flex-wrap: wrap;
}

.filter-tabs {
    display: inline-flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    padding: 3px;
    gap: 2px;
}

.filter-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.2s var(--ease-snap);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.filter-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.filter-btn.active {
    background: #ffffff;
    color: #000000;
    font-weight: 700;
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.counter-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Media Card (Architectural Precision Frame) */
.media-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xs);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    transition: border-color 0.35s var(--ease-snap), transform 0.35s var(--ease-snap), box-shadow 0.35s var(--ease-snap);
}

.media-card:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.2);
}

.card-media-wrap {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #020203;
    position: relative;
    overflow: hidden;
}

.card-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.4s var(--ease-snap), transform 0.6s var(--ease-cinematic);
    position: relative;
    z-index: 2;
}

.card-media-img.is-loaded {
    opacity: 1;
}

.card-media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 2;
    transition: transform 0.6s var(--ease-cinematic);
}

.media-card:hover .card-media-img,
.media-card:hover .card-media-video {
    transform: scale(1.04);
}

/* Card Badges (Top) */
.card-top-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    z-index: 5;
}

.badge-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 0.2rem 0.5rem;
    background: rgba(3, 3, 4, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    color: #ffffff;
}

.badge-retention {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    background: rgba(3, 3, 4, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
}

/* Quick Copy Action on Card */
.card-quick-copy {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(3, 3, 4, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-xs);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.25s var(--ease-snap);
    z-index: 6;
}

.media-card:hover .card-quick-copy {
    opacity: 1;
    transform: translateY(0);
}

.card-quick-copy:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* Card Body & Metadata */
.card-body {
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    flex: 1;
}

.card-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.015em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-author-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.card-author-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    background: #181820;
}

.card-desc {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

.card-stats {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.card-stat-item {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-tertiary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    cursor: default;
    transition: color 0.2s ease;
}

.card-stat-item.is-like-btn {
    cursor: pointer;
}

.card-stat-item.is-like-btn:hover {
    color: #ffffff;
}

.card-stat-item.is-liked {
    color: #ffffff;
    font-weight: 600;
}

.card-size-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

/* Card Skeleton Loader */
.card-skeleton {
    height: 290px;
    background: #070709;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    position: relative;
    overflow: hidden;
}

.card-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    animation: skeletonShimmer 1.8s infinite;
}

@keyframes skeletonShimmer {
    100% { transform: translateX(100%); }
}

/* Feed Loader / End */
.feed-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
}

.loader-line {
    width: 60px;
    height: 2px;
    background: #181822;
    position: relative;
    overflow: hidden;
}

.loader-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30px;
    background: #ffffff;
    animation: linePulse 1.2s infinite ease-in-out;
}

@keyframes linePulse {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.feed-end {
    text-align: center;
    padding: 4rem 0 2rem;
}

.feed-end-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

/* Empty State */
.empty-feed {
    text-align: center;
    padding: 6rem 2rem;
    background: var(--bg-surface);
    border: 1px dashed var(--border-mid);
    border-radius: var(--radius-xs);
    max-width: 540px;
    margin: 2rem auto;
}

.empty-icon-wrap {
    font-size: 2.2rem;
    color: var(--text-tertiary);
    margin-bottom: 1.25rem;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.empty-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
}

/* ==========================================================================
   Modal Windows (Architectural Precision Layer)
   ========================================================================== */
.modal-layer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-window {
    position: relative;
    z-index: 10;
    background: var(--bg-surface);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-xs);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 1px 1px rgba(255, 255, 255, 0.15);
}

.modal-window.modal-wide {
    max-width: 1480px;
    width: 95vw;
}

.modal-top {
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background: #060608;
}

.modal-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-tertiary);
    display: block;
    margin-bottom: 0.2rem;
}

.modal-heading h2 {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.modal-dismiss {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 0.2rem;
}

.modal-dismiss:hover {
    color: #ffffff;
    transform: scale(1.15);
}

/* Modal Form */
.modal-form {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.auth-warning-box {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1.15rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-xs);
    font-size: 0.82rem;
    color: #ffffff;
}

.auth-warning-box i {
    font-size: 1.35rem;
    color: #ffffff;
}

.input-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-block label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.text-req {
    color: #ffffff;
}

.text-muted {
    color: var(--text-tertiary);
    font-weight: 400;
}

input[type="text"],
textarea.custom-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-xs);
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
textarea.custom-textarea:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 1px #ffffff;
}

input[type="text"]::placeholder,
textarea.custom-textarea::placeholder {
    color: var(--text-tertiary);
}

/* Drop Area */
.drop-area {
    border: 1.5px dashed var(--border-bright);
    background: #050507;
    border-radius: var(--radius-xs);
    padding: 2.25rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s var(--ease-snap);
    position: relative;
}

.drop-area:hover,
.drop-area.dragover {
    border-color: #ffffff;
    background: #09090e;
    box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.04);
}

.drop-icon {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    transition: transform 0.25s ease;
}

.drop-area:hover .drop-icon {
    transform: translateY(-3px);
}

.drop-main-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.drop-highlight {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.drop-sub-text {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
}

kbd {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: #181820;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-xs);
    color: #ffffff;
}

.file-chosen {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #0c0c12;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-xs);
    margin-top: 0.75rem;
}

.file-chosen-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 0.2rem;
}

.file-name-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
}

.file-size-text {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.btn-clear {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.3rem;
    transition: color 0.2s ease;
}

.btn-clear:hover {
    color: #ffffff;
}

/* Upload Progress Box */
.upload-progress-box {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.upload-progress-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.progress-track {
    width: 100%;
    height: 4px;
    background: #14141c;
    border-radius: var(--radius-xs);
    overflow: hidden;
}

.progress-indicator {
    height: 100%;
    background: #ffffff;
    transition: width 0.2s linear;
}

.progress-indicator.processing-shimmer {
    background: linear-gradient(90deg, #ffffff 0%, #3b82f6 50%, #ffffff 100%);
    background-size: 200% 100%;
    animation: progressShimmer 1.4s infinite linear;
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.turnstile-box {
    display: flex;
    justify-content: center;
    min-height: 65px;
}

.modal-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Media Viewer Modal (Theater Experience)
   ========================================================================== */
.type-pill {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 0.2rem 0.55rem;
    background: #ffffff;
    color: #000000;
    border-radius: var(--radius-xs);
    margin-right: 0.6rem;
}

.viewer-headline {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.viewer-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    min-height: 520px;
    max-height: calc(92vh - 60px);
}

.media-stage {
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    border-right: 1px solid var(--border-subtle);
    min-height: 460px;
    max-height: calc(92vh - 60px);
    overflow: hidden;
}

.media-stage img,
.media-stage video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-xs);
}

.media-details-sidebar {
    padding: 1.35rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    background: #060608;
    max-height: calc(92vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
}

.viewer-author-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.viewer-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #16161e;
    border: 1px solid var(--border-mid);
}

.viewer-author-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.viewer-author-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
}

.viewer-author-login {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.viewer-desc-box {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.viewer-interactions-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-like-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.95rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-like-pill:hover {
    border-color: #ffffff;
    color: #ffffff;
}

.btn-like-pill.liked {
    background: #ffffff;
    border-color: #ffffff;
    color: #000000;
}

.viewer-views-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.95rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* Unified Action HUD (Sidebar Control Bar) */
.viewer-actions-hud {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
    background: #020204;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-xs);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.7);
    flex-wrap: wrap;
}

.hud-zoom-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.hud-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-xs);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s var(--ease-snap);
}

.hud-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
    transform: translateY(-1px);
}

.hud-btn:active {
    transform: scale(0.93);
}

.hud-badge {
    height: 34px;
    padding: 0 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hud-badge:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.hud-divider {
    width: 1px;
    height: 22px;
    background: var(--border-mid);
    margin: 0 0.15rem;
}

.hud-btn.hud-danger {
    color: var(--accent-danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.hud-btn.hud-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--accent-danger);
    color: #ffffff;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border-subtle);
}

.info-cell {
    background: #060608;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-caption {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
}

.info-data {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

.text-accent {
    color: #ffffff;
}

.text-warn {
    color: var(--accent-warn);
}

.action-footer {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Toast Stack (Floating Minimalist Notifications)
   ========================================================================== */
.toast-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: #09090d;
    color: #ffffff;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-xs);
    padding: 0.85rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.15);
}

.toast-success i {
    color: #ffffff;
}

.toast-error {
    border-color: rgba(239, 68, 68, 0.5);
}

.toast-error i {
    color: var(--accent-danger);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    background: #030304;
    padding: 2.5rem 2rem;
    position: relative;
    z-index: 10;
}

.footer-wrap {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-monogram {
    font-size: 0.85rem;
    color: #ffffff;
}

.footer-copy {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.footer-hint {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
/* ==========================================================================
   Comprehensive Mobile & Tablet Responsiveness
   ========================================================================== */
@media (max-width: 1024px) {
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .viewer-content {
        grid-template-columns: 1fr;
    }
    .media-stage {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }
}

@media (max-width: 768px) {
    /* Touch optimization */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    .navbar {
        padding-top: max(0.4rem, env(safe-area-inset-top));
    }

    .nav-container {
        padding: 0.65rem 1rem;
        gap: 0.5rem;
    }

    .brand-title {
        font-size: 1.05rem;
    }

    .brand-sep,
    .brand-sub {
        display: none;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .btn-telegram-mono {
        padding: 0.45rem 0.75rem;
        font-size: 0.75rem;
    }

    .btn-primary.btn-publish {
        padding: 0.45rem 0.75rem;
        font-size: 0.75rem;
    }

    .user-profile-box {
        padding: 0.2rem 0.45rem;
        gap: 0.45rem;
    }

    .user-avatar-wrap {
        width: 24px;
        height: 24px;
    }

    .user-name {
        max-width: 75px;
        font-size: 0.72rem;
    }

    .user-badge {
        display: none;
    }

    .hero-section {
        padding: 2.75rem 1rem 2rem;
    }

    .hero-kicker {
        font-size: 0.65rem;
        flex-wrap: wrap;
        gap: 0.4rem;
        margin-bottom: 1rem;
    }

    .hero-headline {
        font-size: clamp(1.85rem, 8vw, 3rem);
        margin-bottom: 1.15rem;
        letter-spacing: -0.03em;
    }

    .hero-desc {
        font-size: 0.9rem;
        line-height: 1.55;
        margin-bottom: 2rem;
    }

    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .spec-card {
        padding: 1.15rem 1rem;
    }

    .spec-card-num {
        font-size: 0.62rem;
        margin-bottom: 0.25rem;
    }

    .spec-card-label {
        font-size: 0.65rem;
        margin-bottom: 0.25rem;
    }

    .spec-card-val {
        font-size: 1.18rem;
        margin-bottom: 0.2rem;
    }

    .spec-card-sub {
        font-size: 0.62rem;
    }

    .main-container {
        padding: 1.75rem 1rem 4.5rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        margin-bottom: 1.5rem;
    }

    .filter-tabs {
        overflow-x: auto;
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 2px;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
        min-height: 38px;
    }

    .filter-right {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* On mobile/touch: quick copy button always visible */
    .card-quick-copy {
        opacity: 0.92;
        transform: translateY(0);
        width: 34px;
        height: 34px;
    }

    .card-body {
        padding: 1rem 1.15rem;
    }

    /* Modals on Mobile: full-screen / bottom-sheet styling */
    .modal-layer {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .modal-window {
        max-height: 92vh;
        width: 100%;
        border-radius: 8px 8px 0 0;
        display: flex;
        flex-direction: column;
    }

    .modal-window.modal-wide {
        max-height: 94vh;
    }

    .modal-top {
        padding: 1rem 1.15rem;
        flex-shrink: 0;
    }

    .modal-heading h2 {
        font-size: 1.05rem;
    }

    .modal-dismiss {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
    }

    .modal-form {
        padding: 1.15rem 1rem;
        gap: 1.1rem;
        max-height: calc(92vh - 65px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Crucial for iOS: prevents automatic zoom on input focus */
    input[type="text"],
    textarea.custom-textarea {
        font-size: 16px !important;
    }

    .drop-area {
        padding: 1.5rem 1rem;
    }

    .drop-main-text {
        font-size: 0.85rem;
    }

    .drop-sub-text {
        font-size: 0.7rem;
    }

    .turnstile-box {
        width: 100%;
        overflow-x: auto;
    }

    .modal-bottom {
        padding-top: 0.85rem;
        gap: 0.65rem;
    }

    .modal-bottom .btn {
        min-height: 44px;
        font-size: 0.85rem;
    }

    /* Viewer Modal Mobile Experience */
    .viewer-content {
        display: flex;
        flex-direction: column;
        max-height: calc(94vh - 65px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: auto;
    }

    .media-stage {
        padding: 0;
        height: 50vh;
        max-height: 52vh;
        min-height: 250px;
        flex-shrink: 0;
        background: #000000;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    .media-stage img,
    .media-stage video {
        max-height: 100%;
    }

    .zoom-toolbar {
        bottom: 0.75rem;
        padding: 0.25rem 0.4rem;
        gap: 0.25rem;
    }

    .zoom-btn {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .zoom-badge-btn {
        padding: 0.2rem 0.55rem;
        font-size: 0.68rem;
    }

    .media-details-sidebar {
        padding: 1.25rem 1rem;
        gap: 1.15rem;
        background: #060608;
        overflow-y: visible;
        flex-shrink: 0;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .info-cell {
        padding: 0.7rem;
    }

    .info-caption {
        font-size: 0.62rem;
    }

    .info-data {
        font-size: 0.8rem;
    }

    .action-footer .btn {
        min-height: 46px;
        font-size: 0.88rem;
    }

    /* Floating Toasts on Mobile */
    .toast-stack {
        bottom: max(16px, env(safe-area-inset-bottom));
        right: 12px;
        left: 12px;
        align-items: center;
    }

    .toast {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.78rem;
    }

    .site-footer {
        padding: 2rem 1rem max(2rem, env(safe-area-inset-bottom));
    }

    .footer-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .footer-copy {
        font-size: 0.75rem;
    }

    .footer-hint {
        font-size: 0.68rem;
    }
}

@media (max-width: 440px) {
    .btn-telegram-mono span {
        display: none;
    }
    .btn-telegram-mono::after {
        content: "Войти";
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Filter Controls Group (Sort & Period Selectors)
   ========================================================================== */
.filter-controls-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.filter-select-icon {
    position: absolute;
    left: 0.75rem;
    font-size: 0.72rem;
    color: var(--text-tertiary);
    pointer-events: none;
    z-index: 2;
}

.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    color: #e2e8f0;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 500;
    padding: 0.48rem 1.85rem 0.48rem 2rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-snap);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    outline: none;
}

.filter-select:hover {
    border-color: var(--border-bright);
    color: #ffffff;
}

.filter-select:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 1px #ffffff;
}

.filter-select option {
    background: #0d0d12;
    color: #ffffff;
    padding: 0.5rem;
}

/* ==========================================================================
   Date Badge & Post Actions on Cards
   ========================================================================== */
.card-date-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.card-date-badge i {
    font-size: 0.62rem;
    color: var(--text-muted);
}

.card-action-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.25rem 0.45rem;
    border-radius: var(--radius-xs);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.card-action-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   MarkdownV2 Guide Trigger & Modal
   ========================================================================== */
.label-with-guide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.guide-trigger-link {
    background: none;
    border: none;
    color: #38bdf8;
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    transition: color 0.2s ease;
}

.guide-trigger-link:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.modal-guide {
    max-width: 620px;
    width: 95%;
}

.guide-body {
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    max-height: 70vh;
    overflow-y: auto;
}

.guide-intro {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.guide-table-wrap {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    overflow: hidden;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
}

.guide-table th {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.6rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-subtle);
}

.guide-table td {
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.guide-table tr:last-child td {
    border-bottom: none;
}

.guide-table code {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #e2e8f0;
}

.guide-tip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-xs);
    font-size: 0.76rem;
    color: #93c5fd;
    line-height: 1.5;
}

.guide-code-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    padding: 0.15rem 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    border-radius: 3px;
}

.guide-quote-demo {
    border-left: 3px solid #38bdf8;
    padding-left: 0.5rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ==========================================================================
   Telegram MarkdownV2 Rendered Styles
   ========================================================================== */
.viewer-desc-text,
.card-desc {
    word-break: break-word;
}

.tg-bold {
    font-weight: 700;
    color: #ffffff;
}

.tg-italic {
    font-style: italic;
}

.tg-underline {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tg-strikethrough {
    text-decoration: line-through;
    opacity: 0.75;
}

.tg-spoiler {
    background: #252530;
    color: transparent !important;
    border-radius: 3px;
    padding: 0.1rem 0.35rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, color 0.2s ease;
    display: inline;
}

.tg-spoiler.revealed,
.tg-spoiler:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15);
}

.tg-code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.12em 0.38em;
    border-radius: 3px;
    color: #f1f5f9;
}

.tg-pre {
    background: #07070a;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    padding: 0.65rem 0.85rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    color: #f8fafc;
}

.tg-quote {
    border-left: 3px solid #38bdf8;
    padding: 0.3rem 0 0.3rem 0.75rem;
    margin: 0.5rem 0;
    background: rgba(56, 189, 248, 0.04);
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.tg-link {
    color: #38bdf8;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.tg-link:hover {
    color: #7dd3fc;
}

/* ==========================================================================
   Standard Shimmer Placeholder (Matches Card Skeleton)
   ========================================================================== */
.media-loader-placeholder {
    position: absolute;
    inset: 0;
    background: #070709;
    overflow: hidden;
    z-index: 1;
    user-select: none;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.media-loader-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: skeletonShimmer 1.8s infinite;
}

/* ==========================================================================
   Photo Zoom & Pan Theater Experience
   ========================================================================== */
.zoom-stage-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: default;
    touch-action: none;
}

.zoom-stage-wrapper.is-zoomed {
    cursor: grab;
}

.zoom-stage-wrapper.is-dragging {
    cursor: grabbing !important;
}

.viewer-zoomable-img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: var(--radius-xs);
    transform-origin: center center;
    will-change: transform;
    opacity: 0;
    transition: opacity 0.35s ease;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
}

.viewer-zoomable-img.is-loaded {
    opacity: 1;
}

.viewer-zoomable-img.animating {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

/* Floating Zoom Toolbar */
.zoom-toolbar {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    background: rgba(8, 8, 12, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-mid);
    border-radius: 9999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.1);
    z-index: 25;
    user-select: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s var(--ease-snap);
}

.zoom-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.zoom-badge-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    padding: 0.25rem 0.7rem;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zoom-badge-btn:hover {
    background: #ffffff;
    color: #000000;
}

/* ==========================================================================
   True Browser Fullscreen Stage Experience
   ========================================================================== */
.media-stage:fullscreen,
.media-stage:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    background: #000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: none !important;
    z-index: 99999 !important;
}

.media-stage:fullscreen .viewer-zoomable-img,
.media-stage:-webkit-full-screen .viewer-zoomable-img,
.media-stage:fullscreen video,
.media-stage:-webkit-full-screen video {
    max-width: 100vw !important;
    max-height: 100vh !important;
}

/* ==========================================================================
   Floating Scroll to Top Button
   ========================================================================== */
.scroll-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: #07070a;
    border: 1px solid var(--border-bright);
    color: #ffffff;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    z-index: 1500;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.15);
    transition: all 0.25s var(--ease-snap);
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
}

.scroll-to-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-to-top-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 16px 36px rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.scroll-to-top-btn:active {
    transform: translateY(1px);
}

/* ==========================================================================
   Dedicated Upload Page Styles (/upload)
   ========================================================================== */
.upload-page-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.upload-page-wrapper {
    flex: 1;
    max-width: 840px;
    width: 100%;
    margin: 3rem auto 5rem;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

.upload-card-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-xs);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 1px 1px rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
}

.upload-card-header {
    padding: 2.25rem 2.5rem 1.75rem;
    border-bottom: 1px solid var(--border-subtle);
    background: #060608;
    position: relative;
}

.upload-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-tertiary);
    display: block;
    margin-bottom: 0.4rem;
}

.upload-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.upload-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.upload-standalone-form {
    padding: 2.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.65rem;
}

.field-label-prominent {
    font-family: var(--font-sans);
    font-size: 0.86rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.custom-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-xs);
    padding: 0.85rem 1.15rem;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    color: #ffffff;
    outline: none;
    transition: all 0.2s ease;
}

.custom-input:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 1px #ffffff;
}

.drop-area-standalone {
    padding: 3rem 2rem;
}

.file-icon-badge {
    font-size: 1.5rem;
    color: #ffffff;
}

.file-meta-col {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.auth-warning-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.turnstile-block {
    display: flex;
    justify-content: center;
    min-height: 65px;
}

.upload-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.btn-submit-upload {
    padding: 0.85rem 1.75rem;
    font-size: 0.92rem;
}

@media (max-width: 768px) {
    .upload-page-wrapper {
        margin: 1.5rem auto 3rem;
        padding: 0 1rem;
    }

    .upload-card-header {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .upload-title {
        font-size: 1.35rem;
    }

    .upload-standalone-form {
        padding: 1.5rem 1.25rem;
        gap: 1.35rem;
    }

    .drop-area-standalone {
        padding: 2rem 1rem;
    }

    .upload-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .upload-form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .scroll-to-top-btn {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }

    .viewer-actions-hud {
        gap: 0.35rem;
        padding: 0.45rem 0.55rem;
    }

    .hud-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .hud-badge {
        height: 32px;
        font-size: 0.7rem;
        padding: 0 0.5rem;
    }
}

/* ==========================================================================
   Custom Video Player (Neo-Precision Dark 2026)
   ========================================================================== */
.vplayer-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #040406;
    border-radius: var(--radius-xs);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.vplayer-video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    display: block;
    cursor: pointer;
    background: #000;
}

/* Fullscreen mode support */
.vplayer-container:fullscreen,
.vplayer-container:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    background: #000 !important;
}

.vplayer-container:fullscreen .vplayer-video,
.vplayer-container:-webkit-full-screen .vplayer-video {
    max-height: 100vh !important;
}

/* Center Animated Play/Pause Button */
.vplayer-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(14, 14, 18, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.4rem;
    padding-left: 4px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, background 0.2s ease, border-color 0.2s ease;
    z-index: 10;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.vplayer-center-play:hover {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(26, 26, 34, 0.96);
    border-color: rgba(255, 255, 255, 0.5);
}

.vplayer-container.is-playing .vplayer-center-play {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.85);
}

/* Buffering Spinner Overlay */
.vplayer-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    z-index: 12;
    pointer-events: none;
}

.vplayer-spin-circle {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: vplayer-spin 0.8s linear infinite;
}

.vplayer-spin-text {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    background: rgba(8, 8, 10, 0.85);
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-subtle);
}

@keyframes vplayer-spin {
    to { transform: rotate(360deg); }
}

/* Keyboard Feedback Badge (e.g. +5s, 80%, 1.5x) */
.vplayer-feedback-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(14, 14, 18, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.5rem 1.15rem;
    z-index: 15;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* Controls Overlay */
.vplayer-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 1.1rem 0.85rem 1.1rem;
    background: linear-gradient(to top, rgba(4, 4, 6, 0.95) 0%, rgba(4, 4, 6, 0.65) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 11;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.vplayer-container.is-autohide .vplayer-controls {
    opacity: 0;
    pointer-events: none;
}

.vplayer-container.is-autohide {
    cursor: none;
}

/* Timeline / Scrubber */
.vplayer-timeline-wrap {
    position: relative;
    width: 100%;
    height: 18px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.vplayer-time-tooltip {
    position: absolute;
    bottom: 24px;
    transform: translateX(-50%);
    background: rgba(16, 16, 22, 0.95);
    border: 1px solid var(--border-mid);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-xs);
    pointer-events: none;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.vplayer-timeline-rail {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 2px;
    transition: height 0.15s ease;
    overflow: visible;
}

.vplayer-timeline-wrap:hover .vplayer-timeline-rail {
    height: 6px;
}

/* YouTube style buffer bar */
.vplayer-buffered-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    transition: width 0.25s ease;
    pointer-events: none;
}

.vplayer-played-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-cyan);
    border-radius: 2px;
    pointer-events: none;
}

.vplayer-played-badge {
    position: absolute;
    bottom: 12px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-xs);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 240, 255, 0.3);
    z-index: 15;
}

.vplayer-timeline-wrap:hover .vplayer-played-badge {
    opacity: 1;
}

.vplayer-scrubber-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%) scale(0);
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.7);
    transition: transform 0.15s ease;
    pointer-events: none;
}

.vplayer-timeline-wrap:hover .vplayer-scrubber-thumb {
    transform: translate(-50%, -50%) scale(1);
}

/* Controls Bottom Row */
.vplayer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.vplayer-left,
.vplayer-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Control Buttons */
.vplayer-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

.vplayer-btn:hover {
    color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.08);
}

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

/* Volume Group */
.vplayer-volume-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.vplayer-vol-slider-wrap {
    width: 65px;
    display: flex;
    align-items: center;
    transition: width 0.2s ease;
}

.vplayer-vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.vplayer-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease;
}

.vplayer-vol-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

.vplayer-vol-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: none;
}

/* Time Display */
.vplayer-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    letter-spacing: 0.03em;
    margin-left: 0.35rem;
    user-select: none;
}

.vplayer-time-current {
    color: var(--text-primary);
    font-weight: 600;
}

.vplayer-time-divider {
    color: var(--text-tertiary);
}

/* Speed Button */
.vplayer-speed-btn {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    width: auto;
    padding: 0 0.45rem;
    color: var(--text-secondary);
}

.vplayer-speed-btn:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Hero Headline Twitch Link ("МЕДИАХОСТИНГ SKERLED")
   ========================================================================== */
.headline-twitch-link {
    color: #38bdf8;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.headline-twitch-link:hover {
    color: #7dd3fc;
    text-shadow: 0 0 24px rgba(56, 189, 248, 0.45);
}

/* ==========================================================================
   Multi-Media Carousel in Viewer Stage & Card Badge (Up to 3 Items)
   ========================================================================== */
.card-multi-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    background: rgba(3, 3, 4, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: var(--radius-xs);
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.stage-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(10, 10, 14, 0.82);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 30;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.stage-carousel-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.stage-carousel-prev {
    left: 12px;
}

.stage-carousel-next {
    right: 12px;
}

.stage-carousel-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.25rem 0.65rem;
    background: rgba(8, 8, 12, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.stage-carousel-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.stage-carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.stage-carousel-dot.active {
    background: #38bdf8;
    transform: scale(1.25);
}

/* ==========================================================================
   Right Panel Comments Section (Neo-Precision Dark)
   ========================================================================== */
.viewer-comments-section {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border-subtle);
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.comments-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #ffffff;
}

.comments-count-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-subtle);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    color: #38bdf8;
}

.comments-sort-tabs {
    display: inline-flex;
    background: #0a0a0f;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    padding: 2px;
    gap: 2px;
}

.comment-sort-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.comment-sort-btn:hover {
    color: #ffffff;
}

.comment-sort-btn.active {
    background: #ffffff;
    color: #000000;
}

/* Comment Composer */
.comment-composer {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.comment-reply-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0.65rem;
    background: rgba(56, 189, 248, 0.08);
    border-left: 2px solid #38bdf8;
    border-radius: 2px;
    font-size: 0.74rem;
    color: #bae6fd;
}

.comment-reply-info {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-reply-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.2rem;
}

.comment-reply-close:hover {
    color: #ffffff;
}

.comment-input-box {
    background: #0a0a0f;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-xs);
    padding: 0.55rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.2s ease;
}

.comment-input-box:focus-within {
    border-color: rgba(255, 255, 255, 0.6);
}

.comment-textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    line-height: 1.45;
    resize: vertical;
    min-height: 42px;
    max-height: 140px;
    outline: none;
}

.comment-textarea::placeholder {
    color: var(--text-tertiary);
}

.comment-attachments-preview {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}

.comment-att-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: #e2e8f0;
    max-width: 160px;
}

.comment-att-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-att-remove {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
    line-height: 1;
}

.comment-composer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.comment-tool-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 0.3rem 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.comment-tool-btn:hover {
    color: #ffffff;
    border-color: var(--border-bright);
    background: rgba(255, 255, 255, 0.08);
}

.comment-send-btn {
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: var(--radius-xs);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.comment-send-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.comment-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.comment-guest-notice {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.85rem;
    background: rgba(56, 189, 248, 0.04);
    border: 1px dashed rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-xs);
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-guest-notice:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: #38bdf8;
    color: #ffffff;
}

.comment-guest-notice i {
    color: #38bdf8;
    font-size: 1.05rem;
}

/* Comments List & Items */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comments-empty,
.comments-empty-state {
    text-align: center;
    padding: 1.35rem 0.75rem;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
}

.comment-item {
    background: linear-gradient(180deg, rgba(16, 16, 24, 0.92) 0%, rgba(10, 10, 15, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 6px;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.comment-item:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.comment-item.is-pending {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.04);
}

.comment-top,
.comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.comment-author {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.comment-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    background: #161622;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.comment-author-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-admin-tag,
.comment-admin-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.08rem 0.38rem;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #38bdf8;
    border-radius: 3px;
    letter-spacing: 0.04em;
}

.comment-date {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.comment-pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 0.12rem 0.45rem;
    border-radius: 3px;
}

.comment-body-text,
.comment-body {
    font-size: 0.83rem;
    line-height: 1.52;
    color: #e2e8f0;
    word-break: break-word;
    white-space: pre-wrap;
}

/* Comment Media Attachments (Up to 3 Images/Videos) */
.comment-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
    gap: 0.45rem;
    margin-top: 0.25rem;
}

.comment-media-grid.count-1 {
    grid-template-columns: minmax(120px, 240px);
}

.comment-media-item,
.comment-media-cell {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #030305;
    max-height: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.comment-media-item:hover,
.comment-media-cell:hover {
    border-color: rgba(56, 189, 248, 0.55);
}

.comment-media-item img,
.comment-media-item video,
.comment-media-cell img,
.comment-media-cell video {
    width: 100%;
    height: 100%;
    max-height: 165px;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

/* Comment Footer Actions (Like, Dislike, Reply, Delete) */
.comment-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.comment-actions-left {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.comment-react-btn,
.comment-act-btn {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.22rem 0.52rem;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    cursor: pointer;
    transition: all 0.16s ease;
}

.comment-react-btn:hover,
.comment-act-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

.comment-react-btn.active-like,
.comment-act-btn.liked {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.45);
    background: rgba(74, 222, 128, 0.12);
}

.comment-react-btn.active-dislike,
.comment-act-btn.disliked {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.12);
}

.comment-reply-btn,
.comment-act-btn.act-reply {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-tertiary);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.comment-reply-btn:hover,
.comment-act-btn.act-reply:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
}

.comment-del-btn,
.comment-act-btn.act-delete {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-tertiary);
    font-size: 0.74rem;
    cursor: pointer;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.comment-del-btn:hover,
.comment-act-btn.act-delete:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
}

/* Nested Replies & Collapse/Expand Toggle */
.comment-replies-section,
.comment-replies-wrap {
    margin-top: 0.4rem;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(56, 189, 248, 0.28);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-replies-section.collapsed,
.comment-replies-wrap.collapsed {
    display: none !important;
}

.comment-collapse-toggle,
.comment-replies-toggle {
    background: none;
    border: none;
    color: #38bdf8;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.15rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: flex-start;
}

.comment-collapse-toggle:hover,
.comment-replies-toggle:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

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

/* ==========================================================================
   Admin Moderation Tab & Modal
   ========================================================================== */
.filter-btn-admin {
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    color: #38bdf8 !important;
}

.filter-btn-admin:hover {
    background: rgba(56, 189, 248, 0.12) !important;
    color: #ffffff !important;
}

.moderation-badge {
    background: #ef4444;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.08rem 0.38rem;
    border-radius: 999px;
    margin-left: 0.25rem;
}

.modal-moderation {
    max-width: 760px;
    width: 95%;
}

.moderation-modal-body {
    padding: 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 75vh;
    overflow-y: auto;
}

.moderation-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.moderation-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.moderation-card {
    background: #0a0a0f;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-xs);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.moderation-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.moderation-reason-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 0.25rem 0.55rem;
    border-radius: 3px;
}

.moderation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-mod-approve {
    background: #10b981;
    color: #000000;
    border: none;
    border-radius: var(--radius-xs);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-mod-approve:hover {
    background: #34d399;
}

.btn-mod-decline {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-xs);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-mod-decline:hover {
    background: #ef4444;
    color: #ffffff;
}

/* ==========================================================================
   Upload Multi-File Group & Floating Text Selection Toolbar
   ========================================================================== */
.file-chosen-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: #0c0c12;
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-xs);
    margin-top: 0.75rem;
}

.file-chosen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.file-chosen-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add-more-files {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-more-files:hover {
    background: #38bdf8;
    color: #000000;
}

.multi-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.multi-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    font-size: 0.78rem;
}

.multi-file-row-left {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.multi-file-row-name {
    color: #ffffff;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-file-row-size {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.multi-file-remove-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.15rem 0.35rem;
}

.multi-file-remove-btn:hover {
    color: #f87171;
}

/* Floating Text Selection Formatting Toolbar */
.desc-editor-wrap {
    position: relative;
    width: 100%;
}

.desc-selection-toolbar {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.35rem 0.45rem;
    background: rgba(12, 12, 18, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: var(--radius-xs);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8), 0 0 12px rgba(56, 189, 248, 0.18);
    z-index: 60;
    flex-wrap: wrap;
    animation: fmtToolbarPop 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fmtToolbarPop {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fmt-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #e2e8f0;
    height: 28px;
    min-width: 28px;
    padding: 0 0.45rem;
    border-radius: 3px;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fmt-btn:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.45);
    color: #ffffff;
}

.fmt-btn-label {
    font-size: 0.7rem;
}

.fmt-btn-clear:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

.fmt-sep {
    width: 1px;
    height: 18px;
    background: var(--border-mid);
    margin: 0 0.15rem;
}

/* ==========================================================================
   Mobile & Tablet Responsive Fixes (Video Player & Modal Overflow Prevention)
   ========================================================================== */
@media (max-width: 960px) {
    .modal-wide {
        width: 96vw;
        max-width: 96vw;
        max-height: 92dvh;
        margin: auto;
    }

    .viewer-content {
        display: flex;
        flex-direction: column;
        max-height: calc(92dvh - 54px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .media-stage {
        width: 100%;
        height: 44dvh;
        max-height: 46dvh;
        min-height: 220px;
        flex-shrink: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    .media-stage .vplayer-container {
        width: 100%;
        height: 100%;
        max-height: 100%;
    }

    .media-stage .vplayer-video {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
    }

    .media-details-sidebar {
        max-height: none;
        overflow-y: visible;
        padding: 1.1rem 1rem;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .modal-layer {
        padding: 0.35rem;
    }

    .modal-wide {
        width: 100%;
        max-width: 100%;
        max-height: 95dvh;
    }

    .viewer-content {
        max-height: calc(95dvh - 50px);
    }

    .media-stage {
        height: 40dvh;
        max-height: 42dvh;
        min-height: 210px;
    }

    .vplayer-controls {
        padding: 1.5rem 0.6rem 0.55rem 0.6rem;
        gap: 0.35rem;
        box-sizing: border-box;
        max-width: 100%;
    }

    .vplayer-bar {
        gap: 0.25rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .vplayer-left,
    .vplayer-right {
        gap: 0.2rem;
        min-width: 0;
    }

    .vplayer-btn {
        width: 28px;
        height: 28px;
        font-size: 0.82rem;
        flex-shrink: 0;
    }

    .vplayer-vol-slider-wrap {
        display: none;
    }

    .vplayer-time {
        font-size: 0.66rem;
        gap: 0.2rem;
        margin-left: 0.15rem;
        white-space: nowrap;
    }

    .vplayer-speed-btn {
        font-size: 0.68rem;
        padding: 0 0.3rem;
        width: auto;
    }

    .vplayer-center-play {
        width: 50px;
        height: 50px;
        font-size: 1.15rem;
    }

    .stage-carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .desc-selection-toolbar {
        left: 0;
        right: 0;
        justify-content: center;
    }
}

/* ==========================================================================
   Standalone Manual Moderation & AI Training Page (/panel/filter)
   ========================================================================== */
.filter-panel-body {
    min-height: 100vh;
    background: #050508;
    color: #f8fafc;
}

.filter-ai-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #38bdf8;
}

.ai-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.filter-panel-container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 6.2rem 1.5rem 4rem 1.5rem;
    position: relative;
    z-index: 2;
}

.filter-denied-card {
    max-width: 520px;
    margin: 4rem auto;
    padding: 2.5rem 2rem;
    background: #0b0b10;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    text-align: center;
}

.filter-denied-icon {
    font-size: 2.8rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.filter-denied-card h2 {
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
}

.filter-denied-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.filter-panel-header {
    background: linear-gradient(180deg, rgba(16, 16, 24, 0.95) 0%, rgba(10, 10, 15, 0.95) 100%);
    border: 1px solid var(--border-mid);
    border-radius: 8px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.filter-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-kicker {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #38bdf8;
    margin-bottom: 0.45rem;
}

.filter-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem 0;
}

.filter-title-accent {
    color: #38bdf8;
    font-family: var(--font-mono);
}

.filter-subtitle {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
    max-width: 820px;
    margin: 0;
}

.filter-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.9rem;
}

.filter-stat-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 0.95rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-stat-card.stat-pending {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.05);
}

.filter-stat-card.stat-forbidden {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
}

.filter-stat-card.stat-safe {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.04);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
}

.stat-hint {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.filter-nav-tabs {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.filter-tab-btn {
    background: #0c0c12;
    border: 1px solid var(--border-mid);
    color: var(--text-secondary);
    padding: 0.65rem 1.15rem;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.84rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.filter-tab-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-tab-btn.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.filter-tab-badge {
    background: #ef4444;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.08rem 0.42rem;
    border-radius: 999px;
}

.filter-queue-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.queue-status-pills {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.queue-filter-pill {
    background: #0b0b10;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.42rem 0.85rem;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.16s ease;
}

.queue-filter-pill.active {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.5);
    color: #38bdf8;
}

.queue-instruction-banner {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: #cbd5e1;
    padding: 0.48rem 0.85rem;
    border-radius: 5px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.queue-instruction-banner i {
    color: #38bdf8;
}

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

.filter-empty-state {
    background: #0b0b10;
    border: 1px dashed var(--border-mid);
    border-radius: 8px;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.filter-mod-card {
    background: #0b0b11;
    border: 1px solid var(--border-mid);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-mod-card.status-pending {
    border-left: 4px solid #f59e0b;
}

.filter-mod-card.status-approved {
    border-left: 4px solid #22c55e;
}

.filter-mod-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.mod-author-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mod-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-mid);
}

.mod-author-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.mod-author-username {
    color: #38bdf8;
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

.mod-author-id {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

.mod-status-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.14rem 0.45rem;
    border-radius: 3px;
}

.mod-status-badge.pending {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.mod-status-badge.approved {
    background: rgba(34, 197, 94, 0.14);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.mod-post-line {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.76rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.mod-text-section {
    background: #06060a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.95rem 1.1rem;
}

.mod-text-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.74rem;
    color: var(--text-tertiary);
    margin-bottom: 0.55rem;
}

.btn-inline-highlight {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.28rem 0.65rem;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.mod-selectable-text {
    font-size: 0.98rem;
    line-height: 1.6;
    color: #f8fafc;
    white-space: pre-wrap;
    word-break: break-word;
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
    padding: 0.35rem 0;
}

.mod-selectable-text::selection {
    background: rgba(239, 68, 68, 0.45);
    color: #ffffff;
}

mark.forbidden-text-mark {
    background: rgba(239, 68, 68, 0.28);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.65);
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    font-weight: 600;
}

.mod-training-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 0.95rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mod-spans-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.mod-spans-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #cbd5e1;
}

.selected-spans-chips {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.spans-empty-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-style: italic;
}

.forbidden-span-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}

.chip-del-btn {
    background: none;
    border: none;
    color: #fca5a5;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0 0.15rem;
    line-height: 1;
}

.chip-del-btn:hover {
    color: #ffffff;
}

.mod-manual-span-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mod-manual-span-row .manual-span-input {
    flex: 1;
    min-width: 220px;
}

.mod-train-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.filter-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}

.filter-form-group label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-input,
.filter-textarea {
    background: #07070c;
    border: 1px solid var(--border-mid);
    color: #ffffff;
    border-radius: 5px;
    padding: 0.55rem 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.84rem;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.filter-input-sm {
    padding: 0.42rem 0.65rem;
    font-size: 0.8rem;
}

.filter-input:focus,
.filter-textarea:focus {
    border-color: #38bdf8;
}

.filter-mod-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}

.mod-action-btn {
    padding: 0.52rem 0.95rem;
    border-radius: 5px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    transition: all 0.16s ease;
}

.btn-decline-train {
    background: #ef4444;
    color: #ffffff;
    border: 1px solid #ef4444;
}

.btn-decline-train:hover {
    background: #dc2626;
}

.btn-decline-only {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-decline-only:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

.btn-approve-only {
    background: #22c55e;
    color: #000000;
    border: 1px solid #22c55e;
}

.btn-approve-only:hover {
    background: #4ade80;
}

.btn-approve-train {
    background: rgba(34, 197, 94, 0.14);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.45);
}

.btn-approve-train:hover {
    background: rgba(34, 197, 94, 0.26);
    color: #ffffff;
}

/* Floating Popover when Admin Selects Text */
.selection-highlight-popover {
    position: absolute;
    z-index: 9999;
    background: #111118;
    border: 1px solid #ef4444;
    border-radius: 6px;
    padding: 0.25rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.85), 0 0 16px rgba(239, 68, 68, 0.35);
}

.selection-add-span-btn {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.38rem 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.selection-add-span-btn:hover {
    background: #dc2626;
}

/* Rules Tab Layout */
.filter-rules-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.filter-add-rule-card,
.filter-simulator-card {
    background: #0b0b11;
    border: 1px solid var(--border-mid);
    border-radius: 8px;
    padding: 1.35rem;
}

.filter-add-rule-card h3,
.filter-simulator-card h3,
.rules-list-header h3 {
    margin: 0 0 0.45rem 0;
    font-size: 1.05rem;
}

.add-rule-desc,
.rules-subtitle {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: block;
}

.training-rules-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.training-rule-card {
    background: #0b0b11;
    border: 1px solid var(--border-mid);
    border-radius: 6px;
    padding: 0.95rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.training-rule-card.is-forbidden-rule {
    border-left: 3px solid #ef4444;
}

.training-rule-card.is-safe-rule {
    border-left: 3px solid #22c55e;
}

.rule-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.rule-badges {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.rule-type-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
}

.rule-type-badge.forbidden {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
}

.rule-type-badge.safe {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
}

.rule-cat-badge {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.rule-delete-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.25rem 0.45rem;
    border-radius: 4px;
}

.rule-delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.rule-span-box,
.rule-fulltext-box {
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.45;
}

.rule-span-label {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    margin-right: 0.35rem;
}

.rule-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-tertiary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.45rem;
}

.simulator-actions-row {
    margin-top: 0.85rem;
}

.simulator-result-box {
    margin-top: 1.15rem;
}

.sim-verdict {
    padding: 1rem 1.15rem;
    border-radius: 6px;
    border: 1px solid var(--border-mid);
}

.sim-verdict.verdict-blocked {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
}

.sim-verdict.verdict-safe {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.5);
}

.sim-verdict-title {
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sim-verdict.verdict-blocked .sim-verdict-title {
    color: #fca5a5;
}

.sim-verdict.verdict-safe .sim-verdict-title {
    color: #86efac;
}

.sim-verdict-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.84rem;
    color: #e2e8f0;
}

@media (max-width: 960px) {
    .filter-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .filter-rules-layout {
        grid-template-columns: 1fr;
    }
    .mod-train-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .filter-panel-container {
        padding: 5.2rem 0.85rem 3rem 0.85rem;
    }
    .filter-stats-grid {
        grid-template-columns: 1fr;
    }
    .filter-mod-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .mod-action-btn {
        justify-content: center;
    }
}

/* ==========================================================================
   Global Maintenance & 500 Error Stub Experience
   ========================================================================== */
.maintenance-alert-banner {
    width: 100%;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, rgba(245, 158, 11, 0.12) 50%, rgba(239, 68, 68, 0.15) 100%);
    border-bottom: 1px solid rgba(239, 68, 68, 0.35);
    padding: 0.65rem 1.25rem;
    position: sticky;
    top: 60px;
    z-index: 99;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.m-banner-inner {
    max-width: 1380px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: #fca5a5;
    flex-wrap: wrap;
}

.m-banner-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-xs);
    letter-spacing: 0.05em;
    animation: pillPulse 2s infinite ease-in-out;
}

@keyframes pillPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.m-banner-text {
    flex: 1;
    color: #fee2e2;
}

.m-banner-code {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #f87171;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Feed 500 Error Monumental Box */
.feed-500-error {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3.5rem 1rem;
    width: 100%;
}

.error-500-box {
    background: #09090e;
    border: 1px solid rgba(239, 68, 68, 0.35);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(239, 68, 68, 0.05);
    border-radius: var(--radius-xs);
    max-width: 680px;
    width: 100%;
    padding: 2.75rem 2.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.error-500-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-xs);
    margin-bottom: 1.25rem;
}

.error-500-glitch {
    font-family: var(--font-mono);
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    color: #ffffff;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
}

.error-500-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.error-500-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
}

.error-500-hud {
    background: #040406;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.hud-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    word-break: break-all;
}

.hud-k {
    color: var(--text-muted);
}

.hud-v.val-red {
    color: #f87171;
    font-weight: 700;
}

.hud-v.val-amber {
    color: #fbbf24;
    font-weight: 700;
}

.btn-retry-500 {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #ffffff;
    color: #000000;
    font-weight: 700;
    padding: 0.8rem 1.6rem;
    font-size: 0.88rem;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-retry-500:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(255, 255, 255, 0.18);
}



