/* ==================================
    1. 基礎重置與全域變數
   ================================== */
:root { 
    --sexify: #ff2442; /* 小紅書紅 */
    --bg: #f8f8f8;
    --card: #ffffff;
}

/* 隱藏捲動條但保留功能 */
::-webkit-scrollbar { 
    display: none; 
}

body { 
    -webkit-tap-highlight-color: transparent; 
    background-color: var(--bg); 
    font-family: "PingFang TC", "Microsoft JhengHei", -apple-system, sans-serif; 
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 基礎公用類 */
.text-sexify { color: var(--sexify); }
.bg-sexify { background-color: var(--sexify); }

/* ==================================
    2. 佈局與導航 (小紅書瀑布流風格)
   ================================== */
.masonry-grid { 
    column-count: 2; 
    column-gap: 8px; 
    padding: 8px; 
}

.masonry-item { 
    break-inside: avoid; 
    margin-bottom: 8px; 
    background: var(--card); 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    transition: transform 0.2s ease; 
    position: relative;
}

.masonry-item:active { transform: scale(0.98); }

.masonry-item img, 
.masonry-item video { 
    width: 100%; 
    max-height: 400px; 
    object-fit: cover; 
    display: block; 
}

/* 分頁內容 */
.tab-content { 
    display: none; 
    padding-bottom: 100px !important; 
    box-sizing: border-box;
}

.tab-content.active { 
    display: block; 
    animation: fadeIn 0.3s ease-out; 
}

/* 底部導航欄特效 */
.nav-btn { transition: all 0.2s ease; min-width: 50px; }
.nav-active { color: #000 !important; }
.nav-active i { transform: scale(1.1); color: #000; }
.nav-active span { font-weight: 900; }

/* ==================================
    3. 付費保護與預覽特效 (清晰版)
   ================================== */
/* ✨ 這裡修改了：將模糊度設為 0 */
.locked-blur {
    filter: blur(0px) brightness(1.0); 
    transition: all 0.5s ease;
    pointer-events: none; 
}

/* 鎖頭圖層 (改為極輕微的磨砂，不遮擋視線) */
.lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.05); /* 降低暗度 */
    -webkit-backdrop-filter: blur(0px); /* 移除模糊 */
    backdrop-filter: blur(0px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
}

/* 影片 UI 標籤 */
.video-mark { 
    position: absolute; 
    top: 8px; 
    right: 8px; 
    background: rgba(0,0,0,0.5); 
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    color: white; 
    font-size: 9px; 
    padding: 4px 8px; 
    border-radius: 40px; 
    z-index: 5;
}

/* ==================================
    4. 漫畫模式讀閱器 (最簡約風格)
   ================================== */
#product-modal-container {
    z-index: 5000;
}

.manga-page {
    width: 100%;
    max-width: 800px;
    margin: 0 auto; 
    display: block;
    /* 移除外邊距實現無縫接合 */
    margin-bottom: 0px; 
}

.manga-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==================================
    5. 動態特效
   ================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 雙擊愛心動畫 */
.big-heart-anim {
    position: absolute;
    font-size: 5rem;
    color: var(--sexify);
    opacity: 0;
    transform: scale(0.5) translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
    animation: bigHeart 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes bigHeart {
    0% { opacity: 0; transform: scale(0.5) translate(-50%, -50%); }
    15% { opacity: 1; transform: scale(1.2) translate(-50%, -50%); }
    100% { opacity: 0; transform: scale(1.5) translate(-50%, -80%); }
}
