/* v61 — skeleton loading + fast route feedback */
:root {
    --v61-skeleton-bg: rgba(255,255,255,.055);
    --v61-skeleton-bg-2: rgba(255,255,255,.095);
    --v61-skeleton-line: rgba(255,255,255,.075);
    --v61-skeleton-border: rgba(255,255,255,.10);
    --v61-skeleton-radius: 18px;
}

html[data-v61-skeleton="true"] body::after {
    content: "v61";
    position: fixed;
    left: 10px;
    bottom: 10px;
    z-index: 99999;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(35,35,35,.86);
    border: 1px solid rgba(255,255,255,.16);
    color: rgba(255,255,255,.74);
    font: 700 10px/1 Inter, system-ui, sans-serif;
    pointer-events: none;
}

body.v61-route-loading .site-page:not(.hidden) {
    min-height: 420px;
}

.page-transition-overlay.v61-fast-transition {
    position: fixed !important;
    inset: 0 auto auto 0 !important;
    width: 100% !important;
    height: 4px !important;
    z-index: 99998 !important;
    background: transparent !important;
    pointer-events: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
}

.page-transition-overlay.v61-fast-transition.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

.page-transition-overlay.v61-fast-transition .page-transition-indicator {
    display: none !important;
}

.page-transition-overlay.v61-fast-transition::before,
.page-transition-overlay.v61-fast-transition::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    border-radius: 0 999px 999px 0;
    pointer-events: none;
}

.page-transition-overlay.v61-fast-transition::before {
    width: 100%;
    background: rgba(255,255,255,.08);
}

.page-transition-overlay.v61-fast-transition::after {
    width: 36%;
    background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.72), rgba(255,255,255,.18));
    animation: v61-progress-swipe .72s cubic-bezier(.2,.7,.25,1) infinite;
}

@keyframes v61-progress-swipe {
    from { transform: translateX(-45vw); }
    to { transform: translateX(112vw); }
}

.v61-skeleton-wrap {
    width: 100%;
    display: grid;
    gap: 18px;
    animation: v61-skeleton-in .12s ease-out both;
}

.video-grid > .v61-skeleton-wrap,
.donates-grid > .v61-skeleton-wrap,
.giveaways-grid > .v61-skeleton-wrap,
.winners-grid > .v61-skeleton-wrap {
    display: contents;
}

#feedStream > .v61-skeleton-wrap {
    max-width: 980px;
    margin: 0 auto;
}

#donatesPage > .v61-skeleton-wrap {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.v61-skeleton-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--v61-skeleton-border);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
}

.v61-skeleton-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.v61-skeleton-pill,
.v61-skeleton-action,
.v61-skeleton-line,
.v61-skeleton-media,
.v61-skeleton-avatar,
.v61-skeleton-button {
    position: relative;
    overflow: hidden;
    background: var(--v61-skeleton-bg);
    border: 1px solid var(--v61-skeleton-border);
}

.v61-skeleton-pill { width: 86px; height: 34px; border-radius: 999px; }
.v61-skeleton-action { width: 120px; height: 38px; border-radius: 12px; }

.v61-skeleton-card {
    min-height: 280px;
    padding: 14px;
    border-radius: var(--v61-skeleton-radius);
    border: 1px solid var(--v61-skeleton-border);
    background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.025));
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    contain: layout paint style;
}

.video-grid .v61-skeleton-card,
.donates-grid .v61-skeleton-card,
.giveaways-grid .v61-skeleton-card {
    min-height: 330px;
}

.feed-stream .v61-skeleton-card,
#feedStream .v61-skeleton-card {
    min-height: 210px;
}

.v61-skeleton-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
}

.v61-skeleton-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v61-skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.v61-skeleton-lines {
    flex: 1;
    display: grid;
    gap: 8px;
}

.v61-skeleton-line {
    height: 12px;
    border-radius: 999px;
}

.v61-skeleton-line.is-title { width: 78%; height: 16px; }
.v61-skeleton-line.is-wide { width: 92%; }
.v61-skeleton-line.is-mid { width: 68%; }
.v61-skeleton-line.is-short { width: 42%; }

.v61-skeleton-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.v61-skeleton-button {
    height: 38px;
    border-radius: 12px;
    flex: 1;
}

.v61-skeleton-button.is-icon {
    flex: 0 0 42px;
}

.v61-skeleton-card *,
.v61-skeleton-toolbar * {
    pointer-events: none !important;
}

.v61-skeleton-pill::after,
.v61-skeleton-action::after,
.v61-skeleton-line::after,
.v61-skeleton-media::after,
.v61-skeleton-avatar::after,
.v61-skeleton-button::after {
    content: "";
    position: absolute;
    inset: -1px;
    background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.10) 45%, rgba(255,255,255,.18) 52%, transparent 64%);
    transform: translateX(-115%);
    animation: v61-skeleton-shimmer 1.35s ease-in-out infinite;
}

.v61-skeleton-card:nth-child(2n) .v61-skeleton-line::after,
.v61-skeleton-card:nth-child(2n) .v61-skeleton-media::after,
.v61-skeleton-card:nth-child(2n) .v61-skeleton-button::after { animation-delay: .12s; }
.v61-skeleton-card:nth-child(3n) .v61-skeleton-line::after,
.v61-skeleton-card:nth-child(3n) .v61-skeleton-media::after,
.v61-skeleton-card:nth-child(3n) .v61-skeleton-button::after { animation-delay: .22s; }

@keyframes v61-skeleton-shimmer {
    0% { transform: translateX(-115%); }
    62%, 100% { transform: translateX(115%); }
}

@keyframes v61-skeleton-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.v61-route-preview {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99990;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 170px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(20,20,20,.92);
    box-shadow: 0 14px 40px rgba(0,0,0,.28);
    color: rgba(255,255,255,.82);
    font-size: 13px;
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease, transform .14s ease;
}

.v61-route-preview.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.v61-route-preview i { color: rgba(255,255,255,.72); }

body[data-page="donates"] .v61-route-preview { display: none; }

body.v61-skeleton-ready .app-loader {
    transition: opacity .12s ease, visibility .12s ease;
}

@media (max-width: 760px) {
    .v61-skeleton-wrap { gap: 12px; }
    .v61-skeleton-toolbar { padding: 12px; align-items: stretch; flex-direction: column; }
    .v61-skeleton-pill { width: 74px; height: 32px; }
    .v61-skeleton-card { min-height: 230px; padding: 12px; }
    .v61-route-preview { left: 12px; right: 12px; bottom: 12px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .page-transition-overlay.v61-fast-transition::after,
    .v61-skeleton-pill::after,
    .v61-skeleton-action::after,
    .v61-skeleton-line::after,
    .v61-skeleton-media::after,
    .v61-skeleton-avatar::after,
    .v61-skeleton-button::after {
        animation: none !important;
    }
    .v61-route-preview,
    .v61-skeleton-wrap { transition: none !important; animation: none !important; }
}
