body { margin: 0; padding: 0; overflow: hidden; }
.video-container {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 10;
    transition: height 0.3s ease, margin-top 0.3s ease;
    overscroll-behavior: contain;
    touch-action: pan-y;
    snap-type: y mandatory;
}
.video-container::-webkit-scrollbar { display: none; }
.video-item {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    transition: transform 0.3s ease;
    scroll-snap-align: start;
}
.image-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: none;
    z-index: 10;
    background-color: black;
}
.image-item { width: 100%; height: 100%; object-fit: cover; }
.video-js { width: 100%; height: 100%; object-fit: cover; background-color: black; }
.guide-overlay { transition: opacity 0.5s; }
.action-btn { transition: transform 0.2s ease, fill 0.2s ease; }
.action-btn:hover { transform: scale(1.1); }
.liked { fill: #ff0000; stroke: none; }
.count-feedback { position: absolute; color: white; font-weight: bold; animation: floatUp 1s ease forwards; }
.share-feedback { position: absolute; color: white; background: rgba(0, 0, 0, 0.7); padding: 4px 8px; border-radius: 4px; font-size: 14px; animation: fadeOut 1.5s ease forwards; }
@keyframes floatUp { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-20px); } }
@keyframes fadeOut { 0% { opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
#below-video-ads-container { position: fixed; top: 0px; width: 100%; height: 100vh; margin: 0 auto; text-align: center; z-index: 5; transition: opacity 0.3s ease; display: flex; justify-content: center; align-items: center; flex-direction: column; }
#below-video-ads-container img { height: 50vh; }
/* #below-video-ads-container>div { margin: 10px auto; } */
.video-item.relative, .image-container.relative {
    z-index: 2000;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
}
.play-btn svg { width: 40px; height: 40px; }
.next-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1001;
}
.next-btn:hover { background: rgba(0, 0, 0, 0.9); }
@media (orientation: landscape) { .note-txt { width: 10%; } }
.loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 4px solid #f3f3f3; border-top: 4px solid #3498db; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; z-index: 1000; }
@keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }
.pause-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, 0.7); color: white; padding: 10px 20px; border-radius: 5px; cursor: pointer; z-index: 1000; display: none; }
.pause-btn:hover { background: rgba(0, 0, 0, 0.9); }
/* Rewarded ad overlay (see defineAndShowRewardedAd in mai_n.php) */
#rewarded-ad-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: #000;
    display: none;
    flex-direction: column;
}
#rewarded-ad-overlay.open { display: flex; }
#rewarded-ad-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.85);
}
#rewarded-ad-progress {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}
#rewarded-ad-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: #ffd54f;
}
#rewarded-ad-timer {
    min-width: 22px;
    color: #fff;
    font: 600 13px/1 sans-serif;
    text-align: right;
}
#rewarded-ad-close {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    visibility: hidden;
}
#rewarded-ad-close.visible { visibility: visible; }
#rewarded-ad-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: absolute;
    z-index: -1;
    width: 100vw;
    height: 100vh;
}
#rewarded-ad-image {
    width: 100vw;
    height: 100vh;
    cursor: pointer;
    object-fit: fill;
}
#rewarded-ad-label {
    padding: 8px 12px 14px;
    color: rgba(255, 255, 255, 0.7);
    font: 400 12px/1 sans-serif;
    text-align: center;
}
