:root {
    --accent: #ff3b5c;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-root {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.v-scroller {
    flex: 1;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}

.v-slide {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

.ui-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.sidebar {
    position: absolute;
    right: 12px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    z-index: 50;
}

.sb-item {
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 1));
    text-align: center;
    cursor: pointer;
    pointer-events: auto;
    transition: .2s;
}

.sb-item:active {
    transform: scale(.85);
}

.sb-item i {
    font-size: 34px;
    color: #fff;
}

.sb-item span {
    display: block;
    font-size: 11px;
    font-weight: 800;
    margin-top: 2px;
    color: #fff;
    text-shadow: 2px 2px 4px #000;
}

.user-pfp-box {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    padding: 2px;
    background: #fff;
    margin-bottom: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, .6);
    overflow: hidden;
}

.user-pfp-box img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.v-footer {
    padding: 20px 85px 45px 15px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 1) 0%,
        transparent 100%
    );
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 45;
}

.footer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.footer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-text h4 {
    font-weight: 800;
    font-size: 16px;
    text-shadow: 1px 1px 3px #000;
    display: flex;
    align-items: center;
    gap: 4px;
}

.footer-text p {
    font-size: 13px;
    opacity: .85;
    text-shadow: 1px 1px 2px #000;
    line-height: 1.2;
}

.status-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    font-size: 90px;
    opacity: 0;
    transition: all .3s cubic-bezier(.18, .89, .32, 1.28);
    z-index: 60;
    color: rgba(255, 255, 255, .6);
    pointer-events: none;
    filter: drop-shadow(0 0 25px #000);
}

.loader-spin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 40;
    display: none;
}

.screen-full {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
}

::-webkit-scrollbar {
    display: none;
}

.text-red {
    color: var(--accent) !important;
}

/* Header */

#top-header {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    z-index: 3000;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 7px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: linear-gradient(
        180deg,
        rgba(18,18,18,.82),
        rgba(5,5,5,.66)
    );
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow:
        0 8px 30px rgba(0,0,0,.36),
        inset 0 1px 0 rgba(255,255,255,.06);
}

#settings-btn {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#settings-btn i {
    font-size: 16px;
}

#speed-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--accent);
    border: 2px solid #111;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
}

#category-bar {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    white-space: nowrap;
}

.cat-btn {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 15px;
    border-radius: 12px;
    background: rgba(255,255,255,.065);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.62);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.cat-btn.active {
    color: #fff;
    background: linear-gradient(
        135deg,
        rgba(255,59,92,.95),
        rgba(255,59,92,.68)
    );
    border-color: rgba(255,255,255,.16);
}

#tg-btn {
    flex: 0 0 auto;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: 13px;
    background: linear-gradient(
        135deg,
        #2AABEE,
        #229ED9
    );
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
}

/* Settings */

#settings-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4000;
    background: rgba(10,10,10,.97);
    backdrop-filter: blur(20px);
    border-radius: 22px 22px 0 0;
    padding-bottom: 36px;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.32,.72,0,1);
    box-shadow: 0 -8px 40px rgba(0,0,0,.6);
}

#settings-drawer.open {
    transform: translateY(0);
}

#drawer-handle {
    width: 38px;
    height: 4px;
    background: rgba(255,255,255,.3);
    border-radius: 2px;
    margin: 14px auto 0;
}

#drawer-title {
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    padding: 14px 20px 6px;
}

.drawer-section-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    padding: 12px 20px 6px;
}

.speed-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 20px 8px;
}

.speed-btn {
    flex: 1;
    min-width: 62px;
    padding: 12px 8px;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    border: 2px solid rgba(255,255,255,.1);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

.speed-btn.active {
    background: rgba(255,59,92,.25);
    border-color: var(--accent);
    color: var(--accent);
}

.speed-label {
    display: block;
    font-size: 9px;
    font-weight: 600;
    opacity: .6;
    margin-top: 2px;
}

#drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 3999;
    background: rgba(0,0,0,.5);
    display: none;
    opacity: 0;
    transition: opacity .3s;
}

#drawer-overlay.show {
    display: block;
    opacity: 1;
}

/* Progress */

.pb-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,.15);
    z-index: 100;
    cursor: pointer;
    touch-action: none;
    pointer-events: auto;
}

.pb-fill {
    height: 100%;
    background: #fff;
    width: 0;
    box-shadow: 0 0 10px rgba(255,255,255,.6);
    position: relative;
}

.pb-thumb {
    position: absolute;
    top: 50%;
    right: -6px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transform: translateY(-50%);
}

.v-timer {
    position: absolute;
    right: 15px;
    bottom: 45px;
    font-family: monospace;
    font-weight: 950;
    font-size: 14px;
    z-index: 45;
}

/* Watermark */

.moving-watermark {
    position: absolute;
    z-index: 35;
    pointer-events: none;
    display: none;
    max-width: 70vw;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0,0,0,.20);
    color: rgba(255,255,255,.78);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    white-space: nowrap;
    opacity: 0;
    transform: scale(.96);
    transition:
        opacity .35s ease,
        transform .35s ease;
}

.moving-watermark.show {
    display: block;
    opacity: 1;
    transform: scale(1);
}

/* Loading */

#ad-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 6000;
    background: rgba(0,0,0,.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

#ad-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,.1);
    border-top: 4px solid #ff3b5c;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.loading-text {
    color: rgba(255,255,255,.8);
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
}

.loading-progress {
    color: rgba(255,255,255,.4);
    font-size: 13px;
    margin-top: 8px;
}

.loading-sub {
    color: rgba(255,255,255,.3);
    font-size: 11px;
    margin-top: 4px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes heart-zoom {

    0% {
        transform: scale(0);
        opacity: 1;
    }

    50% {
        transform: scale(1.8) rotate(-15deg);
    }

    100% {
        transform: scale(2.8) rotate(15deg);
        opacity: 0;
    }
}

.heart-pop {
    position: fixed;
    color: var(--accent);
    font-size: 100px;
    z-index: 500;
    pointer-events: none;
    animation: heart-zoom .8s ease-out forwards;
}

@media (max-width: 420px) {

    #top-header {
        left: 8px;
        right: 8px;
        gap: 6px;
        padding: 6px;
    }

    #settings-btn {
        width: 38px;
        flex-basis: 38px;
    }

    .cat-btn {
        height: 36px;
        padding: 0 13px;
        font-size: 11px;
    }

    #tg-btn {
        height: 38px;
        padding: 0 10px;
    }

    #tg-btn .join-text {
        display: none;
    }
}
