/* 主题颜色定义 */
:root {
    --primary-color: #F8C3CD; /* 浅粉色主色 */
    --background-color: #FFFFFF; /* 纯净白背景 */
    --secondary-background: #F5F5DC; /* 浅米色背景 */
    --accent-color: #F0E68C; /* 浅金色强调色 */
    --text-dark: #333333; /* 深灰主文本 */
    --text-medium: #666666; /* 中灰辅助文本 */
    --white: #FFFFFF;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --dark-primary: #e91e63; /* 深粉色用于悬停效果 */
}

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

body {
    font-family: 'Inter', '思源黑体', sans-serif;
    color: var(--text-dark);
    background-color: var(--background-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo img {
    height: 40px;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.search-input-container {
    position: relative;
}

#search-input {
    padding: 8px 12px;
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    width: 200px;
    transition: width 0.3s ease;
}

#search-input:focus {
    outline: none;
    width: 250px;
    box-shadow: 0 0 5px rgba(248, 195, 205, 0.5);
}

.search-history {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    box-shadow: var(--shadow);
    display: none;
    z-index: 10;
}

.user-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--dark-primary);
}

.btn-outline {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: #fdf2f4;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.user-menu {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    box-shadow: var(--shadow);
    display: none;
    min-width: 150px;
    z-index: 10;
}

.user-menu:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: #fdf2f4;
}

/* 导航菜单 - 参考Cellflix风格 */
.main-navigation {
    background: linear-gradient(90deg, var(--primary-color), #ff9a8b);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.nav-menu li {
    margin-right: 5px;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 5px 2px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* 短剧卡片网格 - 参考Cellflix风格 */
.drama-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin: 30px 0;
    padding: 20px 0;
}

.drama-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.drama-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.drama-cover {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.drama-card:hover .drama-cover {
    transform: scale(1.1);
}

.drama-title {
    padding: 12px 10px;
    text-align: center;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--white);
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 分页控件 */
.pagination-controls {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 15px;
    border: 1px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 2px;
}

.pagination-btn:hover,
.pagination-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* 播放页样式 */
.player-container {
    position: relative;
    width: 100%;
    background: #000;
    margin: 20px 0;
}

.video-player {
    width: 100%;
    height: auto;
    display: block;
}

.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 5px;
    background: #555;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    width: 0%;
}

.time-display {
    color: var(--white);
    font-size: 0.8rem;
    min-width: 80px;
    text-align: center;
}

.fullscreen-btn {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1.2rem;
}

.episode-list {
    width: 80px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    padding: 10px 0;
    overflow-y: auto;
    max-height: 80vh;
}

.episode-item {
    padding: 8px 5px;
    text-align: center;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.episode-item.active {
    border-left-color: var(--accent-color);
    background: rgba(240, 230, 140, 0.2);
}

.episode-item.locked {
    opacity: 0.6;
    position: relative;
}

.episode-item.locked::after {
    content: "🔒";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.interaction-panel {
    position: absolute;
    right: 20px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.interaction-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}

.interaction-count {
    font-size: 0.7rem;
    margin-top: 2px;
}

.like-btn.liked {
    color: var(--primary-color);
}

.comment-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid #eee;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.comment-section.active {
    transform: translateY(0);
}

.close-comments {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.comment-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.submit-comment {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 0 15px;
    cursor: pointer;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
}

.comment {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 5px;
}

/* 个人中心 */
.profile-container {
    display: flex;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.profile-sidebar {
    flex: 0 0 250px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.profile-menu {
    list-style: none;
}

.profile-menu li {
    margin-bottom: 10px;
}

.profile-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.profile-menu a:hover,
.profile-menu a.active {
    background-color: #fdf2f4;
    color: var(--primary-color);
}

.profile-content {
    flex: 1;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    min-width: 300px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.record-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.record-cover {
    width: 80px;
    height: 100px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
}

.record-info {
    flex: 1;
    min-width: 200px;
}

.record-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.record-meta {
    color: var(--text-medium);
    font-size: 0.9rem;
}

.action-btn {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.member-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--secondary-background);
    border-radius: 8px;
    flex-wrap: wrap;
}

.member-badge {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-dark);
    flex-shrink: 0;
}

.settings-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 10px 0;
    border: 1px solid #ddd;
}

.save-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.save-btn:hover {
    background-color: var(--dark-primary);
}

/* 登录/注册页面 */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 30px;
}

.auth-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* 权限遮罩层 */
.permission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.purchase-modal {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-medium);
}

.modal-title {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.purchase-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.purchase-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.option-price {
    font-weight: 700;
    color: var(--primary-color);
}

.buy-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.vip-upsell {
    background: var(--secondary-background);
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.vip-packages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.vip-package {
    background: var(--white);
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #eee;
}

.package-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.package-price {
    color: var(--primary-color);
    font-weight: 700;
}

/* 页脚 */
.site-footer {
    background: linear-gradient(90deg, var(--primary-color), #ff9a8b);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    color: var(--white);
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}