:root {
    --primary-color: #FFA1C9;
    --gradient-bg: linear-gradient(135deg, #FFA1C9 0%, #d94f8b 100%);
    --font-title: 'ZCOOL QingKe HuangYou', cursive;
    --font-body: 'Ma Shan Zheng', cursive;
}


*{
	font-family: var(--font-title);
}
html,body,h1,h2,h3,h4,h5,h6,p,code,label,span,code, kbd, pre, samp{
    font-family: var(--font-title) !important;
}

body{
    max-width: 500px;
    margin: 0 auto;
}

::-webkit-scrollbar {
    width: 0;
    height: 0;
    background-color: transform;
}

::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb:hover {
    background-color: transform !important;
}

::-webkit-scrollbar-track {
    box-shadow: inset 0 0 0 transform !important;
}
input{
    width: 170px !important;
}

.navbar {
    background: var(--primary-color);
    max-width: 500px;
    margin: 0 auto;
    border-radius: 8px;
}

/* 分类导航样式 */
.category-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 56px;
    z-index: 999;
    width: 100%;
}

.category-btn {
    border-radius: 25px;
    margin: 0 2px;
    /*padding: 0.5rem 1.2rem;*/
    transition: all 0.3s ease;
    border: 2px solid transparent;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 107, 176, 0.3);
    flex-shrink: 0;
    /* 防止按钮被压缩 */
}

.category-btn.active {
    background: var(--gradient-bg);
    color: white !important;
    box-shadow: 0 4px 12px rgba(253, 73, 112, 0.3);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(253, 73, 112, 0.2);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

/* 搜索分类 */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s;
}

.card-link:hover {
    transform: translateY(-3px);
}

.card-search {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s;
    /*height: 180px;*/
    margin-bottom: 20px;
}

.card-search:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


.card-search img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    font-size: 0.85rem;
    color: #666;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    line-height: 1.4;
}

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

.badge-genre {
    background-color: #f0f0f0;
    color: #555;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.rating {
    color: #ffc107;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .card-search {
        height: auto;
        /* flex-direction: column; */
    }
    
    .card-search img{
        width: 70px;
    }

    .card-body {
        padding: 15px;
    }
}

/* 拟态风格返回顶部按钮 */
#scrollToTopBtn {
    position: fixed;
    width: 45px;
    height: 45px;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #f0f0f0, #e5e5e5);
    border: none;
    border-radius: 50%;
    padding: 15px;
    box-shadow: 8px 15px 5px rgba(0, 0, 0, 0.1), 8px 8px -15px rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    z-index: 999;
    display: none;
    /* 默认隐藏 */
}

#scrollToTopBtn:hover {
    background: #f9f9f9;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}

#scrollToTopBtn:active {
    transform: translateY(1px);
}

/* 按钮内的图标 */
#scrollToTopBtn i {
    font-size: 20px;
    color: var(--primary-color);
}

/* 滚动时显示按钮 */
#scrollToTopBtn.show {
    display: block;
}

/* 卡片容器优化 */
.card-link {
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

/* 卡片主体美化 */
.card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(253, 73, 112, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

/* 图片容器优化 */
.card-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

/* 图片悬停动画 */
.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* 播放量标签美化 */
.play-count {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(253, 73, 112, 0.9);
    color: white !important;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 卡片内容区域 */
.card-body {
    padding: 0 1.2rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), #fff);
}

.my-5 {
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
}

/* 标题样式 */
.card-title {
    font-family: var(--font-title);
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* 分类信息样式 */
.card-text {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 分类图标装饰 */
.card-text::before {
    content: "🎬";
    margin-right: 6px;
    font-size: 1.1em;
}

/* 悬停效果增强 */
.card:hover {
    box-shadow: 0 8px 24px rgba(253, 73, 112, 0.2);
    transform: translateY(-4px);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .card-img-top {
        height: 180px;
    }

    .card-title {
        font-size: 1rem;
    }
}

/* 弹窗 */
/* 可以根据需求修改弹窗的样式 */
.popup-content {
    background-color: #ffeff6;
    /* 粉色背景 */
    /* padding: 20px; */
    font-size: 16px;
    line-height: 1.6;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 样式定义 */
.popup-buttons {
    display: flex;
    justify-content: space-between;
    /* 按钮均匀分布 */
    /* gap: 10px; */
    /* 按钮间距 */
    margin-top: 15px;
    /* 上方间距 */
}

.popup-buttons button {
    /* flex: 1; */
    /* 每个按钮占据相等的宽度 */
    padding: 10px 15px;
    /* 按钮内边距 */
    font-size: 14px;
    /* 按钮字体大小 */
    border: none;
    background-color: #4caf50;
    /* 默认按钮背景颜色 */
    color: #fff;
    /* 字体颜色 */
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}

.popup-buttons button:hover {
    opacity: 0.8;
    /* 鼠标悬停效果 */
}

.popup-content {
    text-align: center;
    /* 使文本居中 */
}

.popup-buttons button:first-child {
    background-color: #ff6bb0;
    /* 粉色按钮 */
    color: white;
}

.popup-buttons button:first-child:hover {
    background-color: #f5609f;
}

.popup-buttons button:last-child {
    background-color: #00c4b4;
    /* 绿色按钮 */
    color: white;
}

.popup-buttons button:last-child:hover {
    background-color: #00a89f;
}

/* 取消默认弹窗的样式 */
.swal2-html-container {
    margin: unset !important;
}


/* =================================== 播放页面样式 ==================================================== */

/* 播放器容器美化 */
#guigui_player_movie {
    width: 100%;
    height: 100%;
    /* max-height: 60vh; */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(253, 73, 112, 0.15);
    margin: 1rem auto;
    position: sticky;
    top: -500px;
    z-index: 999;
}

/* 详情标题区域 */
.mb-4 {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem !important;
}

#bookName {
    font-family: var(--font-title);
    color: var(--primary-color);
    font-size: 2.2rem;
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

#totalEpisodes {
    font-size: 1.2rem;
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    margin-left: 1rem;
}

/* 剧情描述 */
.episode-description {
    background: linear-gradient(45deg, #fff5f9, #ffffff);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.description-title {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* 集数列表美化 */
.list-group {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.episode-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    /*padding: 1rem !important;*/
    border: none !important;
    border-radius: 12px !important;
    background: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.episode-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(253, 73, 112, 0.2);
}

.episode-item img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 1.2rem;
    border: 2px solid var(--secondary-color);
}

.episode-item span {
    flex: 1;
    font-size: 1rem;
    color: #666;
    line-height: 1.4;
}

/* 当前播放集数样式 */
.active_guigui {
    background: linear-gradient(45deg, #fff5f9, #ffffff) !important;
    border: 2px solid var(--primary-color) !important;
}

/* 下载按钮美化 */
.download-btn {
    position: absolute;
    top: 16px;
    right: 8px;
    /*bottom: 1rem;*/
    background: var(--primary-color) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.4rem 1rem !important;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #fd4970 !important;
    transform: scale(1.05);
}

/* 响应式电脑端 */
@media screen and (min-width: 900px) {
    #guigui_player_movie {
        height: 500px;
    }
}

@media screen and (min-width: 1200px) {
    #guigui_player_movie {
        height: 500px;
    }
}

/* 响应式调整 */
@media (min-width: 768px) {
    .list-group {
        grid-template-columns: 1fr;
    }

    #bookName {
        font-size: 1.8rem;
    }

    .episode-item span {
        font-size: 15px;
        /* 超出隐藏 */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
        width: 200px;
    }

    .episode-item img {
        width: 50px;
        /* 图片固定大小 */
        height: 50px;
        object-fit: cover;
        margin-right: 15px;
        /* 图片和文字的间隔 */
        border-radius: 8px;
    }
}