/* CSS Document */
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
form,
fieldset,
input,
textarea,
p,
blockquote,
th,
td {
    margin: 0;
    padding: 0;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

fieldset,
img {
    border: 0;
}

address,
caption,
cite,
code,
dfn,
em,
strong,
th,
var {
    font-style: normal;
    font-weight: normal;
}

ol,
ul {
    list-style: none;
}

caption,
th {
    text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: 100%;
    font-weight: normal;
}

q:before,
q:after {
    content: '';
}

abbr,
acronym {
    border: 0;
}

a {
    text-decoration: none;
}

.clearfix:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
}

.clearfix {
    display: block;
}

.clear {
    clear: both;
}

body {
    background-color: #f5f5f5;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #333;
    -webkit-text-size-adjust: none;
}

#top {
    background-color: #fff;
    padding-bottom: 20px;
}

.navbar-wrap {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.column {
    display: flex;
    justify-content: space-around;
    padding: 0 10px;
    height: 44px;
    line-height: 44px;
}

.block {
    flex: 1;
    text-align: center;
    font-size: 16px;
    color: #666;
    position: relative;
    cursor: pointer;
}

.block.active {
    color: #1490ce;
    font-weight: 500;
}

.block.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: #1490ce;
    border-radius: 2px;
}

/* Modern Card Layout */
.modern-card {
    background: #fff;
    margin: 10px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Episode Pills for mobilejuqingjieshao */
.episode-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.episode-pill {
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    background: #f8f8f8;
    border-radius: 4px;
    color: #333;
    font-size: 16px;
    border: 1px solid #eee;
}

.episode-pill.active {
    background: #1490ce;
    color: #fff;
    border-color: #1490ce;
}

/* Hero Section Styles */
.hero-section {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.hero-img {
    width: 100px;
    height: 140px;
    border-radius: 4px;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}

.hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.hero-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #000;
}

.hero-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.4;
}

.hero-rating {
    color: #ff9900;
    font-weight: bold;
    margin-left: 5px;
}

.hero-desc {
    font-size: 14px;
    color: #888;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Common List Styles */
.section-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 15px 0;
    padding-left: 10px;
    border-left: 4px solid #1490ce;
    height: 18px;
    line-height: 18px;
    color: #333;
    display: flex;
    align-items: center;
}

.plot-summary {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
    text-align: justify;
}

/* Truncation Toggle */
.containerc {
    position: relative;
    overflow: hidden;
    transition: height 0.3s;
}

.containerc.on {
    height: 1.5em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    padding-right: 20px;
}

.containerc.off {
    height: auto;
}

.toggle-icon {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg ...>...</svg>') no-repeat center;
    background-size: contain;
    transform: rotate(0deg);
    transition: transform 0.3s;
    cursor: pointer;
}

.containerc.off .toggle-icon {
    transform: rotate(180deg);
}

.list-item {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item:last-child {
    border-bottom: none;
}

.item-title {
    font-size: 16px;
    color: #333;
}

.item-date {
    font-size: 12px;
    color: #999;
}

/* Button Styles */
.btn-primary {
    display: inline-block;
    padding: 6px 15px;
    background-color: #1490ce;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
}

/* Footer */
#bottom {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 12px;
    background: #fff;
    margin-top: 20px;
    border-top: 1px solid #eee;
}

#bottom a {
    color: #666;
    margin: 0 5px;
}

/* Recommendations */
.recommend-list {
    display: flex;
    flex-direction: column;
}

.recommend-item {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.recommend-item:last-child {
    border-bottom: none;
}

.recommend-img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
    flex-shrink: 0;
}

.recommend-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recommend-title {
    font-size: 15px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommend-time {
    font-size: 12px;
    color: #999;
}

.recommendations .section-title {
    margin-bottom: 0;
}

/* Pagination Styles */
.fenye {
    text-align: center;
    padding: 20px 0;
}

.fenye a {
    display: inline-block;
    margin: 0 5px;
    padding: 5px 12px;
    background: #f5f5f5;
    color: #666;
    border-radius: 15px;
    font-size: 14px;
}

.fenye a.active,
.fenye a:hover {
    background: #1490ce;
    color: #fff;
}

#load-more {
    display: inline-block;
    width: 90%;
    height: 40px;
    line-height: 40px;
    background: #f0f0f0;
    color: #666;
    text-align: center;
    border-radius: 20px;
    font-size: 14px;
    margin: 0 auto;
}

#load-more-a {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
}

/* Legacy styles port */
.rmyimg {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.rmyimg dd {
    text-align: center;
}

.rmyimg img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 4px;
}

.rmyimg h2 {
    font-size: 12px;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Actor List Styles (New) */
.actor-list {
    padding: 0 5px;
}

.actor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}

.actor-item:last-child {
    border-bottom: none;
}

.actor-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.role-name {
    font-size: 14px;
    color: #888;
}

/* Fallback for raw tables and Legacy UL/LI (mh-list) */
.actor-list table {
    width: 100%;
}

.actor-list tr {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    width: 100%;
}

.actor-list td {
    border: none;
    padding: 0;
}

.actor-list td:first-child {
    order: 2;
    color: #888;
    font-size: 14px;
}

.actor-list td:last-child {
    order: 1;
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

/* Support for mh-list structure (Backend Generated UL/LI) */
.mh-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mh-item {
    border-bottom: 1px dashed #eee;
    padding: 12px 0;
}

.mh-item:last-child {
    border-bottom: none;
}

.mh-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-decoration: none;
}

.mh-col-first {
    order: 2;
    color: #888;
    font-size: 14px;
    white-space: nowrap;
}

.mh-col-last {
    order: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.mh-item-header {
    display: none;
}

/* Show More Toggle Styles */
.hide {
    display: none !important;
}

.mohe-bar {
    display: block;
    text-align: center;
    padding: 15px 0 5px 0;
    color: #1490ce;
    cursor: pointer;
    font-size: 14px;
}

.mohe-more::after {
    content: "查看更多演员";
    display: inline-block;
    vertical-align: middle;
}

.mohe-more.open::after {
    content: "收起";
}

.mohe-more::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 5px solid #1490ce;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    vertical-align: middle;
    margin-right: 5px;
    transition: transform 0.3s;
}

.mohe-more.open::before {
    transform: rotate(180deg);
}