/* =========================================
   MaruShorts Premium Styles - Transparent Edition
   ========================================= */

/* 1. 全局基础 */
:root {
    --primary-color: #E50914;
    --bg-color: #0a0a0a;
    --text-main: #ffffff;
    --text-sub: #b3b3b3;
}

body {
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: "Hiragino Kaku Gothic ProN", sans-serif;
    -webkit-font-smoothing: antialiased; 
    overscroll-behavior: none;
}

/* 2. 顶部导航 (首页用) */
.navbar {
    padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.logo { color: var(--primary-color); font-weight: 900; font-size: 22px; text-shadow: 0 0 10px rgba(229, 9, 20, 0.4); }
.user-icon { font-size: 11px; color: #ffd700; background: linear-gradient(45deg, #333, #444); padding: 6px 12px; border-radius: 20px; font-weight: bold; border: 1px solid rgba(255, 215, 0, 0.3); }

/* 3. 首页卡片 */
.section-title { padding: 25px 15px 15px; font-weight: 700; font-size: 18px; }
.grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 15px 80px; }
.card { cursor: pointer; position: relative; }
.poster { width: 100%; aspect-ratio: 2/3; background-size: cover; border-radius: 6px; position: relative; overflow: hidden; }
.badge { position: absolute; top: 6px; right: 6px; background: var(--primary-color); font-size: 9px; padding: 3px 6px; border-radius: 3px; }
.card-info h3 { font-size: 13px; margin: 8px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-info p { font-size: 11px; color: var(--text-sub); margin: 0; }

/* 4. 播放器核心 */
.player-body { 
    overflow: hidden; 
    background: black; 
    height: 100vh; 
    height: 100dvh; 
}

.back-btn { 
    position: fixed; top: 20px; left: 20px; z-index: 100; 
    padding-top: env(safe-area-inset-top);
    width: 32px; height: 32px; 
    display: flex; align-items: center; justify-content: center; 
    background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); 
    border-radius: 50%; color: white; text-decoration: none; font-size: 18px; border: 1px solid rgba(255,255,255,0.2); 
}

.swiper-container { 
    width: 100vw; 
    height: 100vh; 
    height: 100dvh; 
    overflow-y: scroll; 
    scroll-snap-type: y mandatory; 
    scroll-behavior: smooth; 
    scrollbar-width: none; 
}

.video-slide { 
    width: 100vw; 
    height: 100vh; 
    height: 100dvh; 
    scroll-snap-align: start; 
    position: relative; 
    display: flex; justify-content: center; align-items: center; 
    background: #000; 
}

video { 
    width: 100%; height: 100%; 
    object-fit: contain; 
    max-height: 100dvh; 
}

/* 5. 底部信息层 */
.video-info {
    position: absolute; 
    left: 0; right: 0; z-index: 10;
    bottom: 0;
    padding: 40px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    background: transparent; /* 透明背景 */
    pointer-events: none;
    transition: opacity 1s ease;
    opacity: 1;
}
.video-info-hidden { opacity: 0; }

.video-info h3 { 
    margin: 0 0 6px; 
    font-size: 17px; 
    font-weight: 700; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}
.video-info p { 
    margin: 0; 
    font-size: 13px; 
    color: #fff;
    opacity: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* 6. 锁定层 */
.locked-slide { background: #000; }
.blur-bg { position: absolute; width: 100%; height: 100%; background: radial-gradient(circle, #222 0%, #000 100%); z-index: 1; }
.lock-overlay { position: relative; z-index: 20; text-align: center; padding: 0 30px; width: 100%; }
.lock-icon { font-size: 48px; margin-bottom: 15px; animation: float 3s infinite; }
@keyframes float { 0%,100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
.price { color: #ff4757; font-size: 20px; font-weight: 900; margin: 10px 0 25px; }
.pay-btn { width: 100%; padding: 14px 0; border: none; background: linear-gradient(90deg, #E50914 0%, #ff4757 100%); color: white; border-radius: 50px; font-size: 16px; font-weight: bold; cursor: pointer; box-shadow: 0 8px 20px rgba(229, 9, 20, 0.4); }
.pay-btn:active { transform: scale(0.98); }

/* 7. 弹窗 */
.age-box { border: 1px solid #333 !important; box-shadow: 0 20px 50px rgba(0,0,0,0.8) !important; }

/* =========================================
   8. 进度条与时间显示 (新增)
   ========================================= */

.video-progress-container {
    margin-bottom: 12px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: auto; /* 允许点击 */
}

.time-display {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-family: monospace;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    pointer-events: none;
}

.progress-wrapper {
    width: 100%;
    height: 15px; /* 触控区域高度 */
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.progress-bg {
    width: 100%;
    height: 3px; /* 视觉高度 */
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    top: 0;
    left: 0;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -3px;
    width: 9px;
    height: 9px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}