
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
    padding-bottom: 80px; /* 为底部播放栏预留空间 */
}

a {
    text-decoration: none;
    color: #a855f7;
}

a:hover {
    color: #c084fc;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    padding-top: 15px;
}

/* 头部导航 */
header {
    background-color: #1e293b;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: bold;
    color: #a855f7;
}

.logo i {
    margin-right: 8px;
}

/* 主导航 */
.main-nav {
    display: flex;
    margin: 0 20px;
}

.main-nav a {
    color: #e2e8f0;
    padding: 5px 15px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.main-nav a:hover {
    color: #a855f7;
}

.main-nav a.active {
    color: #a855f7;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 2px;
    background-color: #a855f7;
    border-radius: 1px;
}

.search-bar {
    flex: 1;
    max-width: 350px;
    margin: 0 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 8px 15px 8px 35px;
    border: 1px solid #334155;
    border-radius: 20px;
    font-size: 14px;
    background-color: #334155;
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.search-bar i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    color: #e2e8f0;
    font-size: 20px;
    cursor: pointer;
}

/* 主内容区 */
main {
    padding: 25px 0;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title h2 {
    font-size: 18px;
    color: #f8fafc;
    font-weight: 600;
}

.section-title a {
    font-size: 14px;
    color: #a855f7;
    display: flex;
    align-items: center;
}

.section-title a i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.section-title a:hover i {
    transform: translateX(3px);
}

/* 主播分类 */
.recc-nav {
    margin-bottom: 30px;
    padding-bottom: 10px;
}

.recc-nav::-webkit-scrollbar {
    height: 4px;
}

.recc-nav::-webkit-scrollbar-thumb {
    background-color: #334155;
    border-radius: 2px;
}

.nav-list {
    /* display: grid; */
    /* grid-template-columns:repeat(10, 9.5%); */
    /* grid-template-columns: 1fr 1fr 1fr;
    grid-column-gap: 0.5%;
    grid-row-gap: 3%;
    grid-template-rows: auto;
    grid-auto-rows: min-content; */


    display: grid;
    grid-template-columns:repeat(10, auto);
    grid-template-rows: auto;
    grid-auto-rows: min-content;
    gap: 3px;
}
.nav-list a {
    background-color: #a855f7;
    border-radius: 6px;
    padding-top: 5px;
    padding-bottom: 5px;
}
.nav-item.active {
    display: inline-block;
    width: 100%;
    height: 100%;
    color: #f8fafc;
}

.nav-item:hover:not(.active) {
    border-color: #a855f7;
    color: #a855f7;
    background-color: rgba(168, 85, 247, 0.05);
}

/* 精选小说 */
.featured-books {
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 15px;
    /* scrollbar-width: thin; */
}

.featured-books::-webkit-scrollbar {
    height: 4px;
}
/* #334155 */
.featured-books::-webkit-scrollbar-thumb {
    background-color: #334155;
    border-radius: 2px;
}

.book-grid {
    display: flex;
    column-gap: 2.5%;
    row-gap: 15px;
    /* min-width: max-content; */
    flex-wrap: wrap;
    justify-content: flex-start;
}

.book-card {
    width: 18%;
    background-color: #1e293b;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.book-play-area {
    height: 140px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.play-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #a855f7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

.book-info {
    padding: 15px;
}

.book-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f8fafc;
}

.book-meta {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.book-meta span {
    display: flex;
    align-items: center;
}

.book-meta i {
    margin-right: 4px;
    font-size: 12px;
}

.book-update {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #94a3b8;
}

.read-link {
    color: #a855f7;
    font-weight: 500;
}

/* 最新更新列表 */
.latest-updates {
    margin-bottom: 30px;
}

.update-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.update-item {
    background-color: #1e293b;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.update-item:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.update-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.update-play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #a855f7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.update-play:hover {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    transform: scale(1.05);
}

.update-details {
    flex: 1;
}

.update-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f8fafc;
}

.update-meta {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.update-meta span {
    display: flex;
    align-items: center;
}

.update-meta i {
    margin-right: 4px;
    font-size: 11px;
}

.update-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.update-actions .read-link {
    font-size: 13px;
}

.update-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #a855f7;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.update-play-btn:hover {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    transform: scale(1.05);
}

/* 人气主播 */
.popular-hosts {
    margin-bottom: 40px;
}

.host-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.host-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.host-item:hover {
    transform: translateY(-5px);
    background-color: rgba(168, 85, 247, 0.05);
}

.host-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
    border: 2px solid #334155;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.host-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.host-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
    color: #f8fafc;
}

.host-books {
    font-size: 12px;
    color: #94a3b8;
}

/* 分页UI组件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 20px;
    gap: 8px;
}

.pagination-button {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination-button:hover:not(.active):not(.disabled) {
    border-color: #a855f7;
    color: #a855f7;
    background-color: rgba(168, 85, 247, 0.05);
}

.pagination-button.active {
    background-color: #a855f7;
    color: white;
    border-color: #a855f7;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.pagination-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* 底部播放栏 */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1e293b;
    border-top: 1px solid #334155;
    padding: 10px 0;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.2);
    z-index: 90;
}

.player-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.now-playing {
    display: flex;
    align-items: center;
    width: 25%;
    min-width: 200px;
}

.playing-cover {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.playing-info {
    overflow: hidden;
}

.playing-title {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f8fafc;
}

.playing-host {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    color: #94a3b8;
    font-size: 16px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.control-btn:hover {
    color: #a855f7;
    transform: scale(1.1);
}

.play-pause-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.play-pause-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

.progress-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-time {
    font-size: 12px;
    color: #94a3b8;
    width: 40px;
    text-align: center;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: #334155;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, #a855f7 0%, #c084fc 100%);
    border-radius: 2px;
}

.progress-handle {
    position: absolute;
    left: 35%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #a855f7;
    box-shadow: 0 0 0 3px #1e293b, 0 0 0 5px rgba(168, 85, 247, 0.3);
}

.volume-control {
    width: 20%;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.volume-icon {
    color: #94a3b8;
    transition: color 0.3s ease;
}

.volume-icon:hover {
    color: #a855f7;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background-color: #334155;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-level {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 70%;
    background-color: #64748b;
    border-radius: 2px;
}

.volume-handle {
    position: absolute;
    left: 70%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #94a3b8;
    box-shadow: 0 0 0 2px #1e293b;
}

/* 简化的页脚 */
footer {
    background-color: #1e293b;
    color: #94a3b8;
    padding: 25px 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    font-size: 20px;
    font-weight: bold;
    color: #f8fafc;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.footer-logo i {
    margin-right: 8px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 25px;
    margin: 15px 0;
}

.footer-links a {
    color: #94a3b8;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #a855f7;
}

.copyright {
    font-size: 13px;
    margin-top: 15px;
    color: #94a3b8;
}

/* 响应式设计 - 断点优化 */
@media (max-width: 1024px) {
    .progress-container {
        max-width: 400px;
    }
    .update-font {
        display: none;
    }
    .nav-list {
        display: grid;
        grid-template-columns:repeat(8, auto);
        grid-template-rows: auto;
        grid-auto-rows: min-content;
        gap: 3px;
    }
    .host-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-list {
        display: grid;
        grid-template-columns:repeat(6, auto);
        grid-template-rows: auto;
        grid-auto-rows: min-content;
        gap: 3px;
    }
    /* 导航调整 */
    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #1e293b;
        flex-direction: column;
        padding: 15px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
        border-top: 1px solid #334155;
    }
    .update-font {
        display: none;
    }
    .main-nav.active {
        display: flex;
    }
    
    .main-nav a {
        padding: 10px 15px;
        border-bottom: 1px solid #334155;
    }
    
    .main-nav a:last-child {
        border-bottom: none;
    }
    
    .menu-toggle {
        display: block;
        margin-right: 15px;
    }
    
    .search-bar {
        display: none;
    }
    
    .search-bar.active {
        display: block;
        position: absolute;
        top: 60px;
        left: 5%;
        right: 5%;
        max-width: none;
        margin: 0;
    }
    
    .volume-control {
        display: none;
    }
    
    .now-playing {
        width: 35%;
    }
    
    .progress-container {
        max-width: 300px;
    }
    
    .host-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .nav-list {
        display: grid;
        grid-template-columns:repeat(5, auto);
        grid-template-rows: auto;
        grid-auto-rows: min-content;
        gap: 3px;
    }
    .now-playing {
        width: 40%;
    }
    .update-font {
        display: none;
    }
    .progress-container {
        max-width: 220px;
    }
    
    .control-buttons {
        gap: 10px;
    }
    
    .play-pause-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .control-btn {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .nav-list {
        display: grid;
        grid-template-columns:repeat(4, auto);
        grid-template-rows: auto;
        grid-auto-rows: min-content;
        gap: 3px;
    }
    .book-grid {
        gap: 2%;
        row-gap: 10px;
        justify-content: space-between;
    }
    .book-grid .book-card:nth-child(15) {
        display: none;
    }
    .update-font {
        display: none;
    }
    .book-card {
        /* width: 160px; */
        width: 48%;
    }
    
    .book-play-area {
        height: 100px;
    }
    .play-button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .book-title {
        font-size: 14px;
    }
    
    .book-meta {
        font-size: 12px;
    }
    
    .update-meta {
        gap: 8px;
        font-size: 11px;
    }
    
    .update-actions .read-link {
        display: none;
    }
    
    .now-playing {
        min-width: 140px;
    }
    
    .playing-title {
        font-size: 13px;
    }
    
    .playing-host {
        font-size: 11px;
    }
    
    .progress-time {
        font-size: 11px;
        width: 30px;
    }
    
    .host-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 360px) {
    .nav-list {
        display: grid;
        grid-template-columns:repeat(2, auto);
        grid-template-rows: auto;
        grid-auto-rows: min-content;
        gap: 1.5px;
    }
    .host-avatar {
        width: 60px;
        height: 60px;
    }
    .update-font {
        display: none;
    }
    .host-name {
        font-size: 13px;
    }
    
    .now-playing {
        min-width: 120px;
    }
    
    .playing-cover {
        width: 40px;
        height: 40px;
    }
    
    .footer-links {
        gap: 10px 15px;
    }
}