/* 基础样式重置与全局设置 */
/* CSS变量定义 */
:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --card-bg: #1E1E1E;
    --card-padding: 1rem;
    --card-radius: 0.75rem;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --card-margin: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #121212;
    color: #ffffff;
    line-height: 1.6;
}

/* 布局组件样式 */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部导航样式 */
header {
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FF53B4;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #FF53B4;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #FF53B4;
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

/* 主内容区样式 */
main {
    margin-top: 70px; /* 为固定头部留出空间 */
}

/* 英雄区域样式 */
.hero-section {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding-top: 30vh;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #e0e0e0;
    max-width: 600px;
    margin-bottom: 2rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #FF53B4;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #e04896;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 83, 180, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 快速访问区域优化 - 解决动画卡顿问题 */
.card-hover {
    /* 使用will-change提示浏览器准备动画 */
    will-change: transform, box-shadow;
    /* 减少动画属性数量，仅保留必要的变换 */
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    /* 初始状态移除不必要的阴影 */
    transform: translateZ(0); /* 触发GPU加速 */
}

.card-hover:hover {
    /* 减少缩放比例，降低计算量 */
    transform: translateY(-3px) scale(1.01);
    /* 简化阴影效果 */
    box-shadow: 0 4px 12px rgba(255, 83, 180, 0.1);
}

/* 为图片添加独立优化的过渡 */
.card-hover img {
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateZ(0);
}

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

/* 移除可能导致性能问题的叠加动画 */
.artist-card {
    transition: transform 0.25s ease-out;
    will-change: transform;
}

.artist-card:hover {
    transform: translateY(-4px); /* 减少上移距离 */
}

.song-title-highlight {
    color: #9D4EDD;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(157, 78, 221, 0.8);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { text-shadow: 0 0 8px rgba(157, 78, 221, 0.8); }
    50% { text-shadow: 0 0 15px rgba(157, 78, 221, 1); }
    100% { text-shadow: 0 0 8px rgba(157, 78, 221, 0.8); }
}

/* 优化标签页切换动画 */
.tab-pane {
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
    opacity: 0;
    transform: translateY(10px);
    display: none;
}

.tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 页脚样式 */
footer {
    background-color: #0A0A0A;
    border-top: 1px solid #333333;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

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

.footer-column a {
    color: #aaaaaa;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-column a:hover {
    color: #FF53B4;
}

/* 音乐播放器样式 */
.fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.player-button {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.player-button:hover {
    color: #FF53B4;
}

.progress-bar {
    flex-grow: 1;
    height: 4px;
    background-color: #333333;
    border-radius: 2px;
    cursor: pointer;
}

.progress {
    height: 100%;
    background-color: #FF53B4;
    border-radius: 2px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #333333;
}

th {
    background-color: #1E1E1E;
    font-weight: bold;
}

tr:hover {
    background-color: #2D2D2D;
}

/* 标签页样式 */
.tab-content {
    margin-top: 1rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.nav-tabs {
    display: flex;
    list-style: none;
    border-bottom: 1px solid #333333;
    margin-bottom: 1rem;
}

.nav-tabs .nav-item {
    margin-right: 0.5rem;
}

.nav-tabs .nav-link {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #aaaaaa;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
    color: #ffffff;
    border-bottom-color: #FF53B4;
}

.nav-tabs .nav-link:hover {
    color: #ffffff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #121212;
        padding: 1rem;
        border-top: 1px solid #333333;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-content {
        padding-top: 20vh;
    }
}

@media (max-width: 480px) {
    .grid-cols-3, .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1E1E1E;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* 音乐排行榜样式 */
.album_list_wrapper {
    margin-top: 1rem;
}

.album_list_name {
    display: flex;
    padding: 0.75rem;
    background-color: #1E1E1E;
    font-weight: bold;
}

.album_inner_list_padding {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #333333;
    transition: background-color 0.3s ease;
}

.album_inner_list_padding:hover {
    background-color: #2D2D2D;
}

/* 加载更多按钮样式 */
.load-more {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 1px solid #FF53B4;
    color: #FF53B4;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.load-more:hover {
    background-color: #FF53B4;
    color: #ffffff;
}

/* 音乐人卡片样式 */
.artist-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.artist-card:hover {
    transform: translateY(-5px);
}

.artist-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.artist-card:hover .artist-overlay {
    opacity: 1;
}

/* 视频卡片样式 */
.video-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: rgba(0,0,0,0.7);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

/* 分类筛选按钮样式 */
.category-filter {
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-filter.active {
    background-color: #FF53B4;
    color: white;
}

/* 网格布局辅助类 */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 响应式网格类 */
@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* 间距辅助类 */
.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

/* 文本样式 */
.text-primary {
    color: #FF53B4;
}

.text-secondary {
    color: #39C1DE;
}

.text-accent {
    color: #FFD800;
}

.text-gray-400 {
    color: #aaaaaa;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.text-center {
    text-align: center;
}

/* 卡片基础样式 */
.card {
    background-color: #1E1E1E;
    border-radius: 0.75rem;
    overflow: hidden;
}

/* 图片样式 */
.img-responsive {
    width: 100%;
    height: auto;
    display: block;
}

.object-cover {
    object-fit: cover;
}

/* 辅助类 */
.overflow-hidden {
    overflow: hidden;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.hidden {
    display: none;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

/* 背景颜色类 */
.bg-gray-700 {
    background-color: #333333;
}

.bg-gray-800 {
    background-color: #1E1E1E;
}

.bg-secondary {
    background-color: #39C1DE;
}

/* 过渡和变换类 */
.transition-colors {
    transition: color 0.3s ease;
}

.transition-transform {
    transition: transform 0.3s ease;
}

.transition-opacity {
    transition: opacity 0.3s ease;
}

.duration-300 {
    transition-duration: 300ms;
}

.duration-500 {
    transition-duration: 500ms;
}

/* 音乐播放按钮样式 */
.play-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #39c1de;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

/* 排行榜中的播放按钮始终可见 */
.album_inner_list_padding .play-button {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.card-hover:hover .play-button {
    opacity: 1;
    transform: translateY(0);
}

.play-button:hover {
    transform: scale(1.1);
    background-color: #2ba8c5;
}