.video-reels-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 24px;
}

.video-reels-page-subtitle {
    color: #71717a;
    font-size: 15px;
}

.video-reel-card {
    cursor: pointer;
}

.video-reel-card-preview {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #111;
    aspect-ratio: 9 / 14;
}

.video-reel-card-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    filter: blur(22px) brightness(.5);
    transform: scale(1.18);
}

.video-reel-card-preview img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-reel-card-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 22px;
}

.video-reel-card-views {
    position: absolute;
    z-index: 2;
    left: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 12px;
}

.video-reel-card-body {
    padding: 9px 2px 0;
}

.video-reel-card-title {
    font-weight: 700;
    line-height: 1.25;
}

.video-reel-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
    color: #71717a;
    font-size: 13px;
}

.video-reels-empty {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 24px;
    color: #71717a;
}

.video-reels-empty i {
    font-size: 38px;
}

#reels-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

#reels-modal.is-open {
    display: flex;
}

#reels-slide-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#reels-player {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    cursor: pointer;
}

#reels-progress {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 12;
    height: 4px;
    width: 0%;
    background: #fff;
    transition: width 100ms linear;
}

.reel-anim {
    will-change: transform, opacity;
}

.slide-up-in {
    animation: slideUpIn 320ms ease both;
}

.slide-down-in {
    animation: slideDownIn 320ms ease both;
}

@keyframes slideUpIn {
    from { transform: translateY(18%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDownIn {
    from { transform: translateY(-18%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#reels-controls,
#reels-main-controls {
    position: absolute;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: #fff;
    user-select: none;
}

#reels-controls {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

#reels-main-controls {
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 0;
    outline: 0;
    background: none;
    color: #fff;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease;
}

.control-btn:hover {
    opacity: .72;
    transform: scale(1.05);
}

.control-btn i {
    font-size: 24px;
    line-height: 1;
}

.control-btn .btn-label,
.control-btn .like-count,
.control-btn .views-count {
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, .9));
}

.btn-label {
    font-size: 10px;
    line-height: 10px;
    letter-spacing: .6px;
    opacity: .86;
    font-weight: 900;
}

#reels-like i.liked {
    color: #ff4d6a;
}

#reels-like-count,
#reels-views-count {
    font-size: 11px;
    margin-top: -2px;
    opacity: .9;
    font-weight: 900;
}

#reels-main-controls .badge {
    display: inline-block;
    margin-top: -2px;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
}

#reels-main-controls .badge.on {
    background: rgba(0, 200, 0, .25);
}

#reels-main-controls .badge.off {
    background: rgba(200, 0, 0, .25);
}

#reels-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 22;
    border: 0;
    outline: 0;
    background: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease;
}

#reels-close:hover {
    opacity: .65;
    transform: scale(1.1);
}

#reel-overlay-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 14;
    display: none;
    padding: 0;
    border: 0;
    outline: 0;
    background: none;
    color: #fff;
    font-size: 70px;
    cursor: pointer;
    transform: translate(-50%, -50%);
    animation: reelsPulse 2s infinite;
}

@keyframes reelsPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: .62; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

#autoplay-count-display {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 21;
    color: #fff;
    font-size: 12px;
    opacity: .72;
}

.reel-author-box {
    position: absolute;
    left: 50%;
    bottom: 20px;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(450px, calc(100vw - 140px));
    padding: 15px;
    border-radius: 15px;
    background: rgba(98, 95, 95, .25);
    color: #fff;
    transform: translateX(-50%);
}

.reel-author-avatar {
    width: 72px;
    height: 114px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: .25rem;
    background: #151515;
}

.reel-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-author-content {
    flex: 1;
    min-width: 0;
}

.reel-author-name {
    display: inline-block;
    margin-bottom: 4px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .05em;
    line-height: 1.2;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

.reel-author-name:hover {
    color: #6bbef9;
}

.reel-author-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.meta-separator {
    opacity: .6;
}

.reel-caption {
    margin-bottom: 3px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.reel-caption:empty,
.reel-description:empty,
.reel-author-meta .meta-item:empty,
.meta-item:empty + .meta-separator,
.meta-separator:has(+ .meta-item:empty) {
    display: none;
}

.reel-description {
    max-height: 40px;
    overflow: hidden;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
}

.reel-ad-outline-btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #fff;
    border-radius: 6px;
    background-color: transparent;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s ease-in-out;
}

.reel-ad-outline-btn:hover {
    background-color: rgba(255, 255, 255, .1);
    border-color: #fff;
    color: #fff;
}

body.reels-open {
    overflow: hidden !important;
}

body.reels-ui-hidden #reels-controls,
body.reels-ui-hidden #reels-main-controls .control-btn:not(#reels-toggle-ui),
body.reels-ui-hidden .reel-author-box,
body.reels-ui-hidden #autoplay-count-display {
    display: none !important;
}

#reels-modal.is-loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 30;
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    border: 3px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: reelsLoader .7s linear infinite;
}

@keyframes reelsLoader {
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    #reels-controls {
        right: 2px;
    }

    #reels-main-controls {
        left: 2px;
    }

    .reel-author-box {
        left: 12px;
        right: 58px;
        bottom: 18px;
        width: auto;
        transform: none;
        padding: 10px;
    }

    .reel-author-avatar {
        width: 58px;
        height: 92px;
    }

    .reel-description {
        display: none;
    }
}