/* 分类卡片样式 */
.popular-categories {
    padding: 20px 0;
}

/* 分类页面标题样式 */
.category-main-title {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-subtitle {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 0;
}

.category-description {
    font-size: 14px;
    color: #6b7280;
    margin: 8px 0 0 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-description {
    opacity: 1;
}

.category-card-link {
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.category-card {
    position: relative;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    min-height: 160px;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: #4f46e5;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(147, 51, 234, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card__content {
    position: relative;
    z-index: 2;
    padding: 30px 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.category-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card__icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-card__icon::before {
    opacity: 1;
}

.category-card__icon i {
    font-size: 24px;
    color: #ffffff;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card__icon {
    transform: scale(1.1) rotate(10deg);
}

.category-card:hover .category-card__icon i {
    transform: scale(1.1);
}

.category-card__text h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    transition: all 0.3s ease;
    position: relative;
}

.category-card:hover .category-card__text h4 {
    color: #4f46e5;
    transform: translateY(-2px);
}

/* 特殊卡片 - 动漫卡片样式 */
.category-card.anime-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.category-card.anime-card .category-card__text h4 {
    color: white;
}

.category-card.anime-card:hover .category-card__text h4 {
    color: #fff;
}

.category-card.anime-card .category-card__icon {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.category-card.anime-card:hover .category-card__icon::before {
    background: rgba(255, 255, 255, 0.3);
}

/* NEW 标签样式 */
.category-card__badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 3;
}

.category-card__badge-text {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 最新更新榜单样式 */
.latest-rankings {
    padding: 40px 0;
}

.latest-rankings h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.ranking-section {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.ranking-section:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.ranking-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ranking-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
}

.ranking-header h4 i {
    color: #4f46e5;
    margin-right: 8px;
}

.view-more {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-more:hover {
    color: #4f46e5;
    text-decoration: none;
}

.view-more i {
    transition: transform 0.3s ease;
}

.view-more:hover i {
    transform: translateX(3px);
}

.ranking-list {
    padding: 20px 25px;
    max-height: 480px;
    overflow-y: auto;
}

.ranking-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background: #f8fafc;
    padding-left: 8px;
    margin-left: -8px;
    margin-right: -8px;
    border-radius: 8px;
}

.ranking-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 15px;
    margin-top: 2px;
}

.ranking-number.top-three {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.ranking-number.top-three:nth-child(1) {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.ranking-item:nth-child(1) .ranking-number.top-three {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.ranking-item:nth-child(2) .ranking-number.top-three {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.ranking-item:nth-child(3) .ranking-number.top-three {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
}

.ranking-content {
    flex: 1;
    min-width: 0;
}

.ranking-title {
    display: block;
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 6px;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-title:hover {
    color: #4f46e5;
    text-decoration: none;
}

.ranking-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #6b7280;
    flex-wrap: wrap;
}

.update-time,
.game-type,
.content-type {
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-type,
.content-type {
    background: #e5e7eb;
    color: #4b5563;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.no-data {
    text-align: center;
    color: #9ca3af;
    padding: 40px 20px;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .category-card {
        min-height: 140px;
    }
    
    .category-card__content {
        padding: 25px 15px;
    }
    
    .category-card__icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .category-card__icon i {
        font-size: 20px;
    }
    
    .category-card__text h4 {
        font-size: 16px;
    }

    .latest-rankings h2 {
        font-size: 28px;
    }
    
    .ranking-section {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .category-card {
        min-height: 120px;
    }
    
    .category-card__content {
        padding: 20px 10px;
    }
    
    .category-card__icon {
        width: 45px;
        height: 45px;
        margin-bottom: 12px;
    }
    
    .category-card__icon i {
        font-size: 18px;
    }
    
    .category-card__text h4 {
        font-size: 15px;
    }

    .latest-rankings h2 {
        font-size: 24px;
    }
    
    .ranking-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .ranking-list {
        padding: 15px 20px;
    }
    
    .ranking-item {
        padding: 10px 0;
    }
    
    .ranking-number {
        width: 20px;
        height: 20px;
        font-size: 11px;
        margin-right: 12px;
    }
}

/* 动画定义 */
.category-card {
    animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(1) {
    animation-delay: 0.1s;
}

.category-card:nth-child(2) {
    animation-delay: 0.2s;
}

.category-card:nth-child(3) {
    animation-delay: 0.3s;
}

.ranking-section {
    animation: fadeInUp 0.6s ease forwards;
}

.ranking-section:nth-child(1) {
    animation-delay: 0.2s;
}

.ranking-section:nth-child(2) {
    animation-delay: 0.3s;
}

.ranking-section:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 焦点状态 */
.category-card-link:focus .category-card {
    outline: 3px solid #4f46e5;
    outline-offset: 2px;
    transform: translateY(-4px);
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    .category-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .category-card__text h4 {
        color: #f9fafb;
    }
    
    .category-card:hover {
        border-color: #6366f1;
    }
    
    .category-card:hover .category-card__text h4 {
        color: #818cf8;
    }

    .latest-rankings h2 {
        color: #f9fafb;
    }
    
    .ranking-section {
        background: #1f2937;
    }
    
    .ranking-header {
        background: linear-gradient(135deg, #374151, #4b5563);
        border-bottom-color: #4b5563;
    }
    
    .ranking-header h4 {
        color: #f9fafb;
    }
    
    .ranking-title {
        color: #e5e7eb;
    }
    
    .ranking-title:hover {
        color: #818cf8;
    }
    
    .ranking-item:hover {
        background: #374151;
    }
}