/* 热门漫画轮播 */
.hot-comics-section {
    margin-bottom: 40px;
}

/* 轮播区域 - 相对定位，作为箭头定位的参考 */
.carousel-area {
    position: relative;
    display: flex;
    align-items: center;
}

/* 轮播箭头 - 绝对定位在轮播图上层 */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.carousel-arrow:hover {
    background-color: #ff6b35;
    color: #fff;
}

.carousel-prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}

.carousel-next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

.carousel-arrow svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
}

/* 轮播内容区 */
.carousel-wrapper {
    flex: 1;
    overflow: hidden;
    margin: 0 0;
}

/* 轮播轨道 */
.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
}

/* 热门漫画网格（轮播项） */
.hot-comics-grid {
    display: flex;
    gap: 20px;
}

.hot-comics-grid .comic-card {
    flex-shrink: 0;
    width: calc((100% - 100px) / 6);
    min-width: 150px;
}

/* 轮播容器 */
.carousel-wrapper {
    flex: 1;
    overflow: hidden;
}

/* 轮播轨道 */
.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
}

/* 排行榜 */
.rankings-section {
    margin-bottom: 40px;
}

.rankings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.ranking-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ranking-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    padding: 5px;
    border-radius: 4px;
}

.ranking-item:hover {
    background-color: #f5f5f5;
}

.ranking-item:first-child {
    padding: 10px;
    background-color: #fafafa;
    border-radius: 8px;
}

.ranking-item:first-child .ranking-cover {
    width: 60px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.ranking-item:first-child .ranking-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-item:first-child .ranking-info {
    flex: 1;
}

.ranking-item:first-child .ranking-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.ranking-item:first-child .ranking-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ranking-item:first-child .ranking-author {
    font-size: 12px;
    color: #666;
}

.ranking-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.ranking-num.top {
    background-color: #ff6b35;
    color: #fff;
}

.ranking-num.normal {
    background-color: #e0e0e0;
    color: #666;
}

.ranking-item:not(:first-child) .ranking-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-item:not(:first-child) .ranking-author {
    font-size: 12px;
    color: #999;
    width: 80px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 排行榜悬浮详情框 */
.ranking-item {
    position: relative;
}

.ranking-tooltip {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    width: 280px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 15px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.ranking-item:hover .ranking-tooltip {
    opacity: 1;
    visibility: visible;
}

.ranking-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 6px 6px 0;
    border-style: solid;
    border-color: transparent #fff transparent transparent;
}

.tooltip-content {
    display: flex;
    gap: 15px;
}

.tooltip-cover {
    width: 80px;
    height: 110px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.tooltip-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tooltip-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tooltip-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.tooltip-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tooltip-author {
    font-size: 12px;
    color: #999;
}

.tooltip-rank {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    font-weight: bold;
    color: #e0e0e0;
}

/* 最近更新 */
.latest-section {
    margin-bottom: 40px;
}

.latest-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .hot-comics-grid,
    .latest-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .rankings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hot-comics-grid,
    .latest-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .rankings-grid {
        grid-template-columns: 1fr;
    }
}
