* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    background-color: #fff; 
    color: #191919; 
    min-height: 100dvh;
    display: flex; 
    flex-direction: column; 
    line-height: normal;
    scrollbar-width: none;
}
body::-webkit-scrollbar { display: none; }

ul { list-style: none; }
a { text-decoration: none; color: inherit; -webkit-touch-callout: none; }
a, img { -webkit-user-drag: none; }


.header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 15px 0 25px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: env(safe-area-inset-top);
}

.header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: opacity 0.25s ease, max-width 0.3s ease;
    overflow: hidden;
    max-width: 60px;
}
.header-logo svg { display: block; }

.header-search-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    position: relative;
    transition: all 0.3s ease;
}

.header-search-input-wrap {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 16px;
    padding: 0 10px;
    height: 32px;
    width: 100%;
    max-width: 100px; 
    gap: 5px;
    transition: background 0.2s, max-width 0.3s ease, box-shadow 0.2s;
}

.header-search-input-wrap:focus-within {
    max-width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .header-search-input-wrap {
        max-width: 320px;
    }
    .header-search-input-wrap:focus-within {
        max-width: 420px;
    }
}

.header-search-icon {
    flex-shrink: 0;
    color: #b0b0b0;
    display: flex;
    align-items: center;
}

.header-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #333;
    width: 100%;
    caret-color: #00B51D;
}
.header-search-input::placeholder { color: #b0b0b0; }

.header-cancel-btn {
    flex-shrink: 0;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    transition: max-width 0.3s ease, opacity 0.25s ease, margin-left 0.3s ease;
    cursor: pointer;
}


.header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: opacity 0.25s ease, max-width 0.3s ease;
    overflow: hidden;
    max-width: 160px;
}
.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #333;
    flex-shrink: 0;
    cursor: pointer;
}
.header-open-app {
    background: #19c536;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 11px;
    border-radius: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.header.search-active .header-right {
    max-width: 0;
    opacity: 0;
}
.header.search-active .header-cancel-btn {
    max-width: 40px;
    opacity: 1;
    margin-left: 6px;
}


.banner {
    flex-shrink: 0;
    background: #32323B;
    color: white;
    padding: 20px 25px;
    text-align: center;
    position: sticky;
    top: var(--header-height, 44px);
    z-index: 99;
}
.banner h1 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
.laurel-left, .laurel-right {
    width: 14px;
    height: 22px;
    background: no-repeat center/contain;
    flex-shrink: 0;
}
.laurel-left {
    background-image: url("data:image/svg+xml, %3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2214.484%22 height%3D%2222%22 fill%3D%22none%22 version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient id%3D%22a%22 x1%3D%221%22 x2%3D%220%22 y1%3D%22.5%22 y2%3D%22.5%22%3E%3Cstop offset%3D%222.143%25%22 stop-color%3D%22%23FFFFFF%22 stop-opacity%3D%22.8%22%2F%3E%3Cstop offset%3D%22100%25%22 stop-color%3D%22%23FFFFFF%22 stop-opacity%3D%22.4%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cpath fill%3D%22url%28%23a%29%22 fill-opacity%3D%221%22 fill-rule%3D%22evenodd%22 d%3D%22M12.537 3.178c-1.634 1.313-3.171.806-3.171.806s.113-1.852 1.707-3.132 3.41-.738 3.41-.738-.31 1.751-1.946 3.064m-5.096.566c-.444 2.049-1.957 2.622-1.957 2.622s-1.076-1.51-.644-3.508c.434-2 2.186-2.72 2.186-2.72s.86 1.557.415 3.606m1.782 2.09a.708.708 0 0 0-1.048-.953Q6.845 6.344 6.05 8.622q-.808 2.312-.808 4.743 0 3.502 2.756 6.172 1.175 1.139 2.58 1.795 1.429.667 2.73.668h.002a.708.708 0 0 0 0-1.416q-.988 0-2.132-.534-1.19-.556-2.195-1.53-2.326-2.253-2.326-5.155 0-2.19.729-4.276.7-2.005 1.838-3.255M4.256 7.84c.744 1.96-.212 3.264-.212 3.264s-1.726-.68-2.451-2.591c-.725-1.913.352-3.472.352-3.472s1.568.838 2.311 2.799m7.62.713c-1.838 1.01-3.263.244-3.263.244s.433-1.804 2.225-2.788 3.487-.135 3.487-.135-.612 1.67-2.45 2.68m-1.024 4.67c-1.985.676-3.256-.326-3.256-.326s.74-1.7 2.676-2.359c1.937-.658 3.457.473 3.457.473s-.892 1.539-2.877 2.213m-7.565-.465c1.477 1.488 1.134 3.069 1.134 3.069s-1.854.08-3.294-1.37c-1.44-1.453-1.09-3.315-1.09-3.315s1.774.127 3.25 1.616m7.551 4.575c-2.057-.408-2.656-1.91-2.656-1.91s1.492-1.104 3.497-.706 2.757 2.138 2.757 2.138-1.541.887-3.598.478m-8.375 2.75C.51 19.324.18 17.74.18 17.74s1.66-.827 3.566-.087 2.344 2.584 2.344 2.584-1.672.606-3.627-.154%22%2F%3E%3C%2Fsvg%3E");
}
.laurel-right {
    background-image: url("data:image/svg+xml, %3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2214.484%22 height%3D%2222%22 fill%3D%22none%22 version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient id%3D%22a%22 x1%3D%221%22 x2%3D%220%22 y1%3D%22.5%22 y2%3D%22.5%22%3E%3Cstop offset%3D%222.143%25%22 stop-color%3D%22%23FFFFFF%22 stop-opacity%3D%22.8%22%2F%3E%3Cstop offset%3D%22100%25%22 stop-color%3D%22%23FFFFFF%22 stop-opacity%3D%22.4%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cpath fill%3D%22url%28%23a%29%22 fill-opacity%3D%221%22 fill-rule%3D%22evenodd%22 d%3D%22M27.021 3.178c-1.634 1.313-3.171.806-3.171.806s.113-1.852 1.707-3.132 3.41-.738 3.41-.738-.31 1.751-1.946 3.064m-5.096.566c-.444 2.049-1.957 2.622-1.957 2.622s-1.077-1.51-.644-3.508c.434-2 2.186-2.72 2.186-2.72s.86 1.557.415 3.606m1.781 2.09a.708.708 0 0 0-1.047-.953q-1.33 1.463-2.126 3.741-.809 2.312-.809 4.743 0 3.502 2.757 6.172 1.175 1.139 2.58 1.795 1.428.667 2.73.668h.002a.708.708 0 0 0 0-1.416q-.988 0-2.132-.534-1.19-.556-2.195-1.53-2.326-2.253-2.326-5.155 0-2.19.729-4.276.7-2.005 1.837-3.255M18.74 7.84c.744 1.96-.212 3.264-.212 3.264s-1.726-.68-2.452-2.591c-.725-1.913.353-3.472.353-3.472s1.568.838 2.311 2.799m7.62.713c-1.838 1.01-3.264.244-3.264.244s.434-1.804 2.225-2.788c1.794-.984 3.488-.135 3.488-.135s-.612 1.67-2.45 2.68m-1.024 4.67c-1.985.676-3.256-.326-3.256-.326s.74-1.7 2.676-2.359c1.936-.658 3.457.473 3.457.473s-.892 1.539-2.877 2.213m-7.565-.465c1.477 1.488 1.134 3.069 1.134 3.069s-1.854.08-3.294-1.37c-1.44-1.453-1.09-3.315-1.09-3.315s1.774.127 3.25 1.616m7.55 4.575c-2.056-.408-2.655-1.91-2.655-1.91s1.492-1.104 3.497-.706 2.757 2.138 2.757 2.138-1.542.887-3.598.478m-8.374 2.75c-1.954-.759-2.284-2.343-2.284-2.343s1.661-.827 3.567-.087 2.344 2.584 2.344 2.584-1.672.606-3.627-.154%22 transform%3D%22matrix%28-1 0 0 1 28.968 0%29%22%2F%3E%3C%2Fsvg%3E");
}
.banner-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}
.follow-btn {
    background: white;
    color: #2A2A2A;
    padding: 6px 8px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}


.container {
    flex-grow: 1;
    display: flex;
    background-color: #fff;
}


.sidebar {
    width: 70px;
    background-color: #f7f7f7;
    flex-shrink: 0;
    overflow: hidden;
    text-align: center;
    scrollbar-width: none;
    border: none;
    -webkit-touch-callout: none;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--total-sticky-height, 120px);
    align-self: flex-start;
    height: calc(100dvh - var(--total-sticky-height, 120px));
}
.sidebar::-webkit-scrollbar { display: none; }
#sidebar-nav { flex-shrink: 0; }
#sidebar-trigger {
    flex: 1;
    min-height: 50px;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
}
.sidebar li {
    padding: 20px 0;
    font-size: 14px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    z-index: 1;
}
.sidebar li.active { 
    color: #C88333; 
    font-weight: 800; 
    background-color: #fff; 
    border-radius: 12px 0 0 12px;
    margin-right: -1px;
    padding-right: 1px;
    z-index: 10;
}
.sidebar li.active::before {
    content: "";
    position: absolute;
    top: -12px;
    right: 0;
    width: 12px;
    height: 12px;
    background-color: transparent;
    border-bottom-right-radius: 12px;
    box-shadow: 5px 5px 0 5px #fff;
    pointer-events: none;
}
.sidebar li.active::after {
    content: "";
    position: absolute;
    bottom: -12px;
    right: 0;
    width: 12px;
    height: 12px;
    background-color: transparent;
    border-top-right-radius: 12px;
    box-shadow: 5px -5px 0 5px #fff;
    pointer-events: none;
}


.main-content {
    flex-grow: 1;
    padding: 0;
    background-color: #fff;
    scrollbar-width: none;
    position: relative;
    z-index: 2;
    min-width: 0;
    overflow-x: clip;
}
.main-content::-webkit-scrollbar { display: none; }

.progress-container {
    position: sticky;
    top: var(--total-sticky-height, 120px);
    background-color: #fff; 
    z-index: 20;
    padding: 7px 10px 12px 10px; 
}
.progress-title { 
    font-size: 13px; 
    color: #191919; 
    font-weight: 500; 
    display: inline-block; 
    position: relative;
    transform: translateY(-3px);
    padding-bottom: 6px; 
}
.progress-title::after {
    content: '';
    position: absolute;
    left: 0; 
    bottom: 0; 
    width: 28px; 
    background-color: #999; 
    height: 3.5px; 
    border-radius: 2px; 
}

#movie-list { padding: 0 15px 20px 8px; }


.movie-card {
    margin-bottom: 0;
    border-bottom: 1px solid #f3f3f3;
    padding-bottom: 5px;
    width: 100%;
    overflow: hidden;
}
.frc-subject-item-tag-wrap {
    padding: 10px 0 35px 0;
    margin-bottom: 0;
}

.images-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    position: relative;
    align-items: stretch;
    height: 31vw;
    max-height: 150px;
    min-height: 115px;
}

.poster-wrapper {
    position: relative;
    flex: 0 0 auto;
    height: 100%;
    aspect-ratio: 3 / 4;
}
.poster-img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    border: 0.5px solid rgba(0, 0, 0, 0.05);
}

.rank-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 23px;
    height: 23px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-family: Arial, sans-serif;
    font-weight: 500;
    color: #ffffff;
    border-radius: 4px 0 8px 0;
    z-index: 10;
    padding: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.rank-badge.top3  { background-color: rgba(247, 154, 68, 0.88); }
.rank-badge.normal { background-color: rgba(0, 0, 0, 0.65); }

.carousel-wrapper {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}
.carousel {
    display: flex;
    overflow: hidden;
    gap: 4px;
    scrollbar-width: none;
    width: 100%;
    height: 100%;
    touch-action: pan-y pinch-zoom;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-width: 0;
    object-fit: cover;
    border: none;
    border-radius: 8px;
    pointer-events: none;
    display: block;
}
.carousel-dots {
    position: absolute;
    bottom: 6px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 4px;
    pointer-events: none;
}
.dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s;
}
.dot.active { background-color: rgba(255, 255, 255, 1); }

.movie-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    line-height: 1.2;
}
.movie-title {
    font-size: 20px;
    font-weight: normal;
    color: #191919;
    display: flex;
    align-items: center;
    gap: 3px;
}
.play-icon {
    display: inline-block;
    width: 16px;
    height: 20px;
    background: url("data:image/svg+xml, %3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2216%22 height%3D%2216%22%3E%3Cg fill%3D%22none%22 fill-rule%3D%22evenodd%22 transform%3D%22translate%281 1%29%22%3E%3Crect width%3D%2212.75%22 height%3D%2212.75%22 x%3D%22.625%22 y%3D%22.625%22 stroke%3D%22%23EE5400%22 stroke-width%3D%221.25%22 rx%3D%226.375%22%2F%3E%3Cpath fill%3D%22%23EE5400%22 d%3D%22M5 8.593v-3.18a1 1 0 0 1 1.53-.848l2.54 1.588a1 1 0 0 1 0 1.695L6.531 9.44A1 1 0 0 1 5 8.593%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") no-repeat center;
    background-size: contain;
    flex-shrink: 0;
    vertical-align: middle;
}
.heart-icon {
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml, %3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22%3E%3Cg fill%3D%22none%22 fill-rule%3D%22evenodd%22 stroke%3D%22%23FF9900%22 stroke-linecap%3D%22round%22 stroke-linejoin%3D%22round%22%3E%3Cpath stroke-width%3D%221.75%22 d%3D%22M13.084 19.395a27 27 0 0 1-.87.577c-.626.4-1.415.4-2.042.002-1.695-1.079-5.091-3.513-6.963-6.728-1.51-2.595-1.738-5.797.075-7.68 1.813-1.88 4.815-1.856 6.702.005.468.462.79.893 1.206 1.429.415-.536.738-.967 1.206-1.429 1.887-1.86 4.89-1.885 6.702-.004.692.718 1.087 1.63 1.226 2.626%22%2F%3E%3Cpath stroke-width%3D%221.85%22 d%3D%22M22.192 15.5h-7 3.5zm-3.5 3.5v-7 3.5z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") no-repeat center;
    background-size: contain;
    flex-shrink: 0;
    cursor: pointer;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #F90;
    margin-top: 2px;
    margin-bottom: 2px;
    line-height: 1.2;
}
.rating-row .rating-num { font-weight: 500; font-size: 12px; }
.frc-rating-stars { display: inline-flex; align-items: center; }
.frc-rating-stars-item { margin-right: 0.5px; display: flex; }
.frc-rating-stars-item svg { display: block; }

.meta-info {
    font-size: 11px;
    color: #818181;
    margin-top: 3px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 80%;
    line-height: 1.2;
}
.quote {
    font-size: 13px;
    color: #494949;
    margin-top: 2px;
    margin-bottom: 6px;
    line-height: 1.3;
}

.frc-subject-item-tag {
    display: inline-flex;
    align-items: center;
    background: #f8f8f8;
    padding: 6px 10px;
    border-radius: 4px;
    gap: 0px;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.frc-subject-item-tag:active {
    transform: scale(0.92);
    opacity: 0.8;
    transition: none;
}
.frc-subject-item-tag-vendor-icons {
    display: inline-flex;
    align-items: center;
    gap: 0;
}
.frc-subject-item-tag-vendor-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    object-fit: contain;
    display: block;
}
.frc-subject-item-tag .arrow {
    font-size: 12px;
    color: #898989;
    margin-left: 2px;
    line-height: 1;
}


.list-footer {
    text-align: center;
    padding: 0px 0 20px 0;
}
.list-footer span {
    font-size: 13px;
    color: #bfbfbf;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s;
}
.list-footer span:active { opacity: 0.6; }


.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.overlay.show {
    opacity: 1;
    visibility: visible;
}
.bottom-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background-color: #F7F7F7;
    border-radius: 12px 12px 0 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 250px;
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-sheet.show { transform: translateY(0); }
.sheet-content { padding: 24px 20px 30px 20px; }
.sheet-title {
    font-size: 18px;
    font-weight: 500;
    color: #191919;
    margin-bottom: 12px;
}
.sheet-desc {
    font-size: 15px;
    color: #494949;
    line-height: 1.6;
}
.sheet-cancel {
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
    padding: 34px 0;
    text-align: center;
    font-size: 16px;
    color: #191919;
    background: #fff;
    cursor: pointer;
}


@media (prefers-color-scheme: dark) {
    .header { background: #232326; border-color: #333; }
    .header-logo svg path { fill: #00B51D; }
    .header-search-input-wrap { background: #333; }
    .header-search-input { color: #fff; }
    .header-search-input::placeholder { color: #777; }
    .header-icon-btn { color: #ccc; }
    .header-cancel-btn { color: #ccc; }
    .header.search-active .header-search-input-wrap { background: #3a3a3a; }

    .bottom-sheet { background-color: #232326; }
    .sheet-title { color: #fff; }
    .sheet-desc { color: #aaa; }
    .sheet-cancel { background-color: #232326; border-top-color: #333; color: #fff; }

    body { background-color: #232326; color: #fff; }
    .header, .container, .main-content { background-color: #232326; border-color: #333; }
    .header-search { background-color: #333; }

    .sidebar { background-color: #2f2f33; }
    .sidebar li.active { background-color: #232326; color: #dcb67f; }
    .sidebar li.active::before { box-shadow: 5px 5px 0 5px #232326; }
    .sidebar li.active::after { box-shadow: 5px -5px 0 5px #232326; }

    .movie-card { border-color: #333; }
    .movie-title { color: #fff; }
    .play-icon {
        background-image: url("data:image/svg+xml, %3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2216%22 height%3D%2216%22%3E%3Cg fill%3D%22none%22 fill-rule%3D%22evenodd%22 transform%3D%22translate%281 1%29%22%3E%3Crect width%3D%2212.75%22 height%3D%2212.75%22 x%3D%22.625%22 y%3D%22.625%22 stroke%3D%22%23E63948%22 stroke-width%3D%221.25%22 rx%3D%226.375%22%2F%3E%3Cpath fill%3D%22%23E63948%22 d%3D%22M5 8.593v-3.18a1 1 0 0 1 1.53-.848l2.54 1.588a1 1 0 0 1 0 1.695L6.531 9.44A1 1 0 0 1 5 8.593%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
    }
    .rating-row { color: #f29418; }
    .meta-info { color: #87878c; }
    .quote { color: #aaa; }
    .progress-container { background-color: #232326; }
    .progress-title { color: #ccc; border-color: #444; }
    .frc-subject-item-tag { background-color: #333; }
}

