*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{width:100%;height:100%;overflow:hidden;background:#000;color:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft JhengHei",Arial,sans-serif}
#feed{width:100%;height:100vh;height:100dvh;overflow-y:scroll;overflow-x:hidden;scroll-snap-type:y mandatory;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;background:#000}
#feed::-webkit-scrollbar{display:none}
.video-item,.ad-item{position:relative;width:100%;height:100vh;height:100dvh;overflow:hidden;background:#000;scroll-snap-align:start;scroll-snap-stop:always}
.video-item video{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;object-fit:contain;background:#000}
.video-item:after{content:"";position:absolute;z-index:2;left:0;right:0;bottom:0;height:45%;pointer-events:none;background:linear-gradient(to top,rgba(0,0,0,.92),rgba(0,0,0,.30),transparent)}
.topbar{position:absolute;z-index:10;top:0;left:0;right:0;padding-top:calc(env(safe-area-inset-top) + 16px);text-align:center;font-size:16px;font-weight:700;pointer-events:none;text-shadow:0 1px 5px rgba(0,0,0,.9)}
.topbar span{display:inline-block;padding-bottom:5px;border-bottom:2px solid #fff}
.info{position:absolute;z-index:5;left:16px;right:90px;bottom:calc(env(safe-area-inset-bottom) + 28px);text-shadow:0 1px 5px rgba(0,0,0,.95)}
.episode{display:inline-block;margin-bottom:8px;padding:4px 10px;border-radius:7px;background:rgba(255,255,255,.18);backdrop-filter:blur(8px);font-size:12px;font-weight:700}
.title{margin-bottom:7px;font-size:17px;font-weight:700;line-height:1.4}
.meta{font-size:13px;color:rgba(255,255,255,.8)}
.actions{position:absolute;z-index:25;right:11px;bottom:calc(env(safe-area-inset-bottom) + 36px);width:64px;display:flex;flex-direction:column;align-items:center;gap:19px}
.action{width:64px;display:flex;flex-direction:column;align-items:center;border:0;outline:0;background:transparent;color:#fff;cursor:pointer;text-decoration:none;font-family:inherit}
.action-icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;font-size:30px;line-height:1;filter:drop-shadow(0 2px 5px rgba(0,0,0,.75))}
.action-label{margin-top:3px;font-size:11px;font-weight:700;line-height:1.2;text-shadow:0 1px 4px rgba(0,0,0,.95)}
.avatar{position:relative;width:52px;height:52px;margin-bottom:3px;border:2px solid #fff;border-radius:50%;display:flex;align-items:center;justify-content:center;background:linear-gradient(145deg,#303030,#111);box-shadow:0 2px 10px rgba(0,0,0,.55);font-size:23px;font-weight:800}
.avatar:after{content:"+";position:absolute;bottom:-7px;left:50%;transform:translateX(-50%);width:19px;height:19px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#fe2c55;color:#fff;font-size:15px;font-weight:700}
.like-icon{transition:transform .16s ease}.action.like.active .like-icon{transform:scale(1.14)}
.action.like.active .like-icon:before{content:"❤️"}.action.like:not(.active) .like-icon:before{content:"🤍"}
.like-count{min-width:40px;text-align:center}.share-icon{font-size:31px}.sound-icon{font-size:26px}
.next-toast{position:absolute;z-index:40;left:50%;bottom:calc(env(safe-area-inset-bottom) + 115px);transform:translate(-50%,18px);width:calc(100% - 40px);max-width:360px;padding:12px 15px;border:1px solid rgba(255,255,255,.15);border-radius:13px;background:rgba(20,20,20,.86);backdrop-filter:blur(12px);opacity:0;visibility:hidden;transition:.22s;pointer-events:none}
.next-toast.show{opacity:1;visibility:visible;transform:translate(-50%,0)}
.next-main{display:flex;align-items:center;justify-content:space-between;gap:12px}.next-title{margin-bottom:3px;font-size:14px;font-weight:700}.next-sub{font-size:12px;color:rgba(255,255,255,.65)}.next-count{min-width:42px;text-align:right;font-size:20px;font-weight:800}
.switch-toast{position:absolute;z-index:45;left:50%;top:50%;transform:translate(-50%,-50%);display:none;padding:10px 16px;border-radius:20px;background:rgba(0,0,0,.72);font-size:13px;white-space:nowrap}
#global-toast{position:fixed;z-index:999998;left:50%;bottom:calc(env(safe-area-inset-bottom) + 40px);transform:translate(-50%,15px);padding:10px 17px;border-radius:22px;background:rgba(30,30,30,.92);color:#fff;font-size:13px;white-space:nowrap;opacity:0;visibility:hidden;transition:.2s;pointer-events:none}
#global-toast.show{opacity:1;visibility:visible;transform:translate(-50%,0)}
#rotate-warning{display:none;position:fixed;z-index:999999;inset:0;align-items:center;justify-content:center;padding:30px;background:#000;text-align:center}.rotate-icon{margin-bottom:12px;font-size:50px}.rotate-text{font-size:18px;line-height:1.8}

/* 雙擊快退 / 快轉 15 秒提示 */
.seek-feedback{
    position:absolute;
    z-index:35;
    top:50%;
    min-width:92px;
    padding:15px 17px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:50%;
    background:rgba(0,0,0,.48);
    -webkit-backdrop-filter:blur(7px);
    backdrop-filter:blur(7px);
    color:#fff;
    text-align:center;
    text-shadow:0 1px 5px rgba(0,0,0,.9);
    pointer-events:none;
    opacity:0;
    transform:translateY(-50%) scale(.88);
    transition:opacity .15s ease,transform .15s ease;
}
.seek-feedback.show{opacity:1;transform:translateY(-50%) scale(1)}
.seek-feedback.seek-backward{left:12%}
.seek-feedback.seek-forward{right:12%}
.seek-feedback-icon{font-size:36px;font-weight:800;line-height:30px}
.seek-feedback-text{margin-top:6px;font-size:15px;font-weight:800;line-height:1;white-space:nowrap}

/* 第五則滿版 iframe 廣告 */
.ad-item{touch-action:pan-y}
.ad-item iframe{position:absolute;z-index:1;inset:0;width:100%;height:100%;display:block;border:0;overflow:hidden;pointer-events:none;background:#fff}
.ad-touch-layer{position:absolute;z-index:5;inset:0;width:100%;height:100%;background:transparent;cursor:pointer;touch-action:pan-y}
.ad-badge{position:absolute;z-index:10;right:10px;bottom:calc(env(safe-area-inset-bottom) + 10px);padding:4px 7px;border-radius:5px;background:rgba(0,0,0,.55);color:rgba(255,255,255,.85);font-size:10px;line-height:1;pointer-events:none}

@media screen and (orientation:landscape) and (max-height:600px){#rotate-warning{display:flex}}
@media (min-width:700px) and (min-height:601px){body{display:flex;justify-content:center}#feed{max-width:500px;box-shadow:0 0 60px rgba(255,255,255,.08)}}
