/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fdf7f9;
}

a {
    color: #e85a71;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #d13a54;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    border: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(232, 90, 113, 0.1);
    padding: 15px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-box {
    width: 100%;
    max-width: 400px;
}

.search-box form {
    display: flex;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #f8ccd4;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #e85a71;
}

.search-box button {
    padding: 0 20px;
    background-color: #e85a71;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #d13a54;
}

/* 导航栏样式 */
.main-nav {
    background-color: #e85a71;
    border-radius: 4px;
    position: relative;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-item a {
    display: block;
    color: #fff;
    padding: 12px 20px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.nav-item a:hover,
.nav-item.active a,
.has-submenu .active{
	color: #fff;
    background-color: #d13a54;
}

/* 二级导航 */
.has-submenu:hover .submenu {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 100;
    border-radius: 0 0 4px 4px;
}

.submenu li a {
    color: #333;
    padding: 10px 15px;
    border-bottom: 1px solid #f5f5f5;
}

.submenu li:last-child a {
    border-bottom: none;
}

.submenu li a:hover {
    background-color: #f8f8f8;
    color: #e85a71;
}


/* 主要内容区样式 */
.main-content {
    margin-bottom: 30px;
}

.section {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
}

.section-title {
    color: #e85a71;
    font-size: 22px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8ccd4;
}

/* 影视列表样式 */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.movie-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.movie-poster {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.movie-poster img {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.movie-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(232, 90, 113, 0.9);
    color: #fff;
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 20px;
}

.movie-new {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 153, 0, 0.9);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 20px;
}

.movie-title {
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-info {
    font-size: 14px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 筛选条件样式 */
.filters {
    background-color: #fff;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-group {
    margin-bottom: 10px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: inline-block;
    width: 60px;
    font-weight: 500;
    color: #555;
}

.filter-item {
    display: inline-block;
    padding: 4px 12px;
    margin-right: 10px;
    margin-bottom: 8px;
    background-color: #f8f8f8;
    border-radius: 20px;
    font-size: 14px;
    color: #555;
    transition: all 0.3s ease;
}

.filter-item:hover,
.filter-item.active {
    background-color: #e85a71;
    color: #fff;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.page-num {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background-color: #f8f8f8;
    border-radius: 4px;
    color: #555;
    transition: all 0.3s ease;
}

.page-num:hover,
.page-num.active {
    background-color: #e85a71;
    color: #fff;
}

.page-ellipsis {
    margin: 0 5px;
    color: #999;
}

/* 播放页样式 */
.movie-info-header {
    margin-bottom: 20px;
}

.movie-play-title {
    font-size: 26px;
    color: #333;
    margin-bottom: 10px;
}

.movie-meta {
    color: #666;
    font-size: 14px;
}

.meta-item {
    display: inline-block;
    margin-right: 20px;
    padding-right: 20px;
    border-right: 1px solid #eee;
}

.meta-item:last-child {
    border-right: none;
}

.player-container {
    position: relative;
    width: 100%;
    background-color: #000;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 25px;
}

.player-placeholder {
	background-color: #000;
	border-radius: 8px;
	overflow: hidden;
	position: relative;
	padding-top: 56.25%; /* 16:9 比例 */
}

.player-placeholder .MacPlayer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}


/* 播放源选择 */
.source-selector {
    margin-bottom: 30px;
}

.source-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #555;
}

.source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.source-btn {
    padding: 8px 15px;
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 4px;
    color: #555;
    transition: all 0.3s ease;
}

.source-btn:hover,
.source-btn.active {
    background-color: #e85a71;
    color: #fff;
    border-color: #e85a71;
}

/* 影片详情 */
.movie-details {
    margin-bottom: 30px;
}

.details-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #555;
}

.details-content {
    line-height: 1.8;
    color: #444;
}

.details-content p {
    margin-bottom: 15px;
}

.details-content p:last-child {
    margin-bottom: 0;
}

/* 相关推荐 */
.related-movies {
    margin-top: 30px;
}

.related-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #555;
}

/* 友情链接 */
.friend-links {
    background-color: #fff;
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
}

.links-container a {
    color: #666;
    transition: color 0.3s ease;
}

.links-container a:hover {
    color: #e85a71;
    text-decoration: underline;
}

/* 页脚样式 */
.site-footer {
    background-color: #e85a71;
    color: #fff;
    padding: 25px 0;
    border-radius: 4px;
}

.footer-content {
    text-align: center;
    font-size: 14px;
}

.footer-content p {
    margin-bottom: 10px;
}

.footer-content p:last-child {
    margin-bottom: 0;
}

.footer-content a {
    color: #fff;
    margin: 0 5px;
    transition: opacity 0.3s ease;
}

.footer-content a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        max-width: 100%;
        width: 100%;
    }
    .nav-item {
		flex: 0 0 25%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .submenu {
        position: static;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .submenu li a {
        color: rgba(255, 255, 255, 0.8);
        padding-left: 40px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .meta-item {
        display: block;
        margin-bottom: 5px;
        border-right: none;
        padding-right: 0;
    }
}

@media (max-width: 576px) {
    .logo h1 {
        font-size: 24px;
    }
    
    .section {
        padding: 15px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
    
    .movie-title {
        font-size: 14px;
    }
    
    .movie-info {
        font-size: 12px;
    }
    
    .page-btn,
    .page-num {
        padding: 5px 10px;
        margin: 0 3px;
        font-size: 14px;
    }
}

.movie-duration-span{
    position:absolute;
    color: rgb(229 233 240);
    font-size: .75rem;
    line-height: 1rem;
    padding-top:  .25rem;
    padding-bottom: .25rem;
    padding-left: .5rem;
    padding-right: .5rem;
    background-color: #1f2937bf;
    border-radius: .5rem;
    right: .25rem;
    bottom: .25rem;
}



.thumbnail-video {
    display: none;
    -o-object-fit: cover;
    object-fit: cover;
    width: 100%;
    height: 100%;
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    position: absolute;
}

/* 进度条样式 */
.thumbnail-progress-bar {
  top: 0;
  left: 0;
  width: 0%; /* 初始宽度为0 */
  height: 3px; /* 进度条高度 */
  background-color: #ef4444; /* 红色 (类似 bg-red-500) */
  z-index: 10; /* 在所有元素的最上层 */
  transition: width 2.0s ease-out, opacity 0.2s ease-out; /* 平滑过渡效果 */
  opacity: 0; /* 默认完全透明 */
}

/* 当进度条处于活动状态时 (JS会添加此类) */
.thumbnail-progress-bar.is-loading {
  opacity: 1; /* 使其可见 */
  width: 90%; /* 动画效果：加载时宽度增长到90% */
}

/* 当加载完成时 (JS会添加此类) */
.thumbnail-progress-bar.is-loaded {
  opacity: 1;
  width: 100%; /* 加载完成，宽度充满 */
}