/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #ffffff;
    color: #495057;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 - 全新设计 */
.main-header {
    background: #ffffff;
    box-shadow: 0 2px 20px rgba(204, 37, 41, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    border-bottom: 3px solid rgb(204, 37, 41);
}

.main-header .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 20px;
    gap: 25px;
    max-width: none;
    width: 100%;
    margin: 0;
}

.search-box {
    margin-left: auto;
    position: relative;
    transition: all 0.3s ease;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo a:hover {
    transform: scale(1.05);
}

.main-nav {
    flex: 1;
    max-width: 1000px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1px;
    margin: 0;
    padding: 0;
    justify-content: center;
    background: #fff5f5;
    border-radius: 8px;
    overflow: hidden;
}

.main-nav ul li {
    margin-right: 0;
    position: relative;
    flex: 1;
    text-align: center;
}

.main-nav ul li a {
    text-decoration: none;
    color: rgb(204, 37, 41);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 15px 20px;
    font-size: 15px;
    letter-spacing: 0.5px;
    display: block;
    background: white;
    border: none;
    box-shadow: inset 0 0 0 0 transparent;
    position: relative;
    overflow: hidden;
}

.main-nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgb(204, 37, 41);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.main-nav ul li a:hover {
    background: linear-gradient(135deg, rgba(204, 37, 41, 0.05), rgba(204, 37, 41, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(204, 37, 41, 0.15);
}

.main-nav ul li a:hover::before {
    transform: scaleX(1);
}

.main-nav ul li a.active {
    background: linear-gradient(135deg, rgb(204, 37, 41), rgb(170, 30, 33));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(204, 37, 41, 0.25);
}

.main-nav ul li a.active::before {
    transform: scaleX(1);
    background: white;
}

/* 搜索框全新设计 - 点击展开效果 */
.search-box {
    position: relative;
    transition: all 0.3s ease;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: auto;
    overflow: hidden;
}

.search-input {
    width: 0;
    padding: 0;
    border: none;
    outline: none;
    background: white;
    color: #2d3748;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 25px 0 0 25px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
}

.search-input:focus,
.search-form.active .search-input {
    width: 250px;
    padding: 12px 20px 12px 45px;
    opacity: 1;
    pointer-events: all;
}

.search-btn {
    background: linear-gradient(135deg, rgb(204, 37, 41), rgb(170, 30, 33));
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(204, 37, 41, 0.3);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(204, 37, 41, 0.4);
    min-width: 130px;
    letter-spacing: 1px;
}

.search-btn:hover::before {
    left: 100%;
}

.search-btn:active {
    transform: translateY(0);
}

/* 搜索图标和文字 */
.search-icon {
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.search-text {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    font-weight: 600;
}

/* 搜索框展开时的样式 */
.search-form.active .search-btn {
    border-radius: 0 25px 25px 0;
    box-shadow: 0 4px 15px rgba(204, 37, 41, 0.25);
}

/* 点击激活搜索框 */
.search-btn:focus + .search-input,
.search-btn:focus-within + .search-input {
    width: 250px;
    padding: 12px 20px 12px 45px;
    opacity: 1;
    pointer-events: all;
}

/* 添加搜索图标到输入框 */
.search-form::before {
    content: '🔍';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #94a3b8;
    z-index: 3;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.search-form.active::before,
.search-input:focus + .search-btn + .search-form::before,
.search-input:focus ~ .search-form::before {
    opacity: 1;
    left: 15px;
}

/* 搜索框JavaScript交互样式 */
.search-box.clicked .search-input {
    width: 250px;
    padding: 12px 20px 12px 45px;
    opacity: 1;
    pointer-events: all;
}

.search-box.clicked .search-btn {
    border-radius: 0 25px 25px 0;
}

.search-box.clicked::before {
    opacity: 1;
    left: 15px;
}

/* 自定义搜索按钮激活状态 */
.search-btn.active {
    border-radius: 0 25px 25px 0;
    box-shadow: 0 4px 15px rgba(204, 37, 41, 0.25);
}

/* 添加点击事件处理脚本 */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.search-btn:focus {
    animation: pulse 0.3s ease;
}

/* 主要内容区域 */
.main-content {
    padding: 30px 0;
}

/* Hero区域 */
.hero-section {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: url(../images/bg.jpg);
    border-radius: 15px;
    padding: 60px 30px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: white;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(30deg);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.9);
}

.hero-search .search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.hero-search .search-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 30px 0 0 30px;
    outline: none;
    font-size: 16px;
    background-color: rgba(255,255,255,0.9);
    color: #333;
}

.hero-search .search-form button {
    background-color: #ff6b35;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.hero-search .search-form button:hover {
    background-color: #e55a2b;
}

/* 通用区块标题 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title {
    font-size: 24px;
    color: rgb(204, 37, 41);
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background-color: rgb(204, 37, 41);
    border-radius: 2px;
}

.view-all {
    color: rgb(204, 37, 41);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.view-all:hover {
    color: rgb(170, 30, 33);
    text-decoration: underline;
}

/* 分类导航 */
.category-section {
    margin-bottom: 40px;
}

.category-container {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.category-item {
    display: inline-block;
    padding: 8px 20px;
    background-color: #fff5f5;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s;
    font-size: 14px;
}

.category-item:hover,
.category-item.active {
    background-color: rgb(204, 37, 41);
    color: white;
    transform: translateY(-2px);
}

.category-item.more {
    background-color: transparent;
    border: 1px solid #ddd;
}

/* 动漫卡片网格 */
.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

/* 公共动漫卡片样式 */
.song-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(0);
    border: 1px solid #e9ecef;
}

.song-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(204, 37, 41, 0.25);
    border-color: rgba(204, 37, 41, 0.3);
}

.card-cover {
    position: relative;
    height: 240px;
    overflow: hidden;
    pointer-events: none; /* 修复card-cover无法点击的问题 */
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.song-card:hover .card-cover img {
    transform: scale(1.08);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 40%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none; /* 修复card-cover无法点击的问题 */
}

.song-card:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    font-size: 48px;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.song-card:hover .play-icon {
    transform: scale(1);
}

.new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgb(204, 37, 41);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(204, 37, 41, 0.4);
    z-index: 2;
}

.card-info {
    padding: 18px;
    background: white;
}

.song-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #2c3e50;
    transition: color 0.3s;
}

.song-card:hover .song-title {
    color: rgb(204, 37, 41);
}

.song-artist {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgb(204, 37, 41);
    font-weight: 500;
}

.release-date {
    font-size: 12px;
    color: #95a5a6;
}

/* 热门榜单 */
.popular-section {
    margin: 50px 0;
}

.popular-list-container {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.popular-list-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.popular-list-column {
    width: 50%;
}

.popular-list-column h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: rgb(204, 37, 41);
    text-align: center;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popular-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    transition: background-color 0.3s;
    cursor: pointer;
    border: 1px solid #e9ecef;
}

.popular-item:hover {
    background-color: #fff5f5;
    border-color: rgba(204, 37, 41, 0.2);
}

.popular-item.top3 {
    background-color: rgba(204, 37, 41, 0.1);
    border-color: rgba(204, 37, 41, 0.3);
}

.popular-item.top3:hover {
    background-color: rgba(204, 37, 41, 0.2);
}

.rank-badge {
    width: 25px;
    height: 25px;
    background-color: #fff5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
    color: #666;
}

.popular-item.top3 .rank-badge {
    background-color: rgb(204, 37, 41);
    color: white;
}

.popular-cover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
}

.popular-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-cover .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* 修复热门榜单封面无法点击的问题 */
}

.popular-cover .play-overlay .play-icon {
    font-size: 24px;
    color: white;
}

.popular-item:hover .play-overlay {
    opacity: 1;
}

.popular-info {
    flex: 1;
    min-width: 0;
}

.popular-info .song-title {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.popular-info .song-artist {
    font-size: 14px;
    margin-bottom: 5px;
    color: #666;
}

.popular-info .song-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgb(204, 37, 41);
}

/* 双图Banner区域 */
.banner-section {
    margin: 40px 0;
    padding: 0;
}

.banner-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.banner-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.banner-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
}

.banner-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .banner-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    
    .banner-image {
        height: 250px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .banner-image {
        height: 200px;
    }
}

/* 底部样式 */
.main-footer {
    background: #ffffff;
    color: #495057;
    padding: 60px 0 30px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.08);
    border-top: 1px solid #e9ecef;
}

.main-footer a{
    color: #2a4c70;
    text-decoration: none;
    transition: color 0.3s ease;
}
.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgb(204, 37, 41);
}

.main-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    width: 100%;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: rgb(204, 37, 41);
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p {
    color: #6c757d;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 14px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 15px;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    color: rgb(204, 37, 41);
    transition: transform 0.3s ease;
}

.footer-links a:hover {
    color: rgb(204, 37, 41);
    transform: translateX(5px);
}

.footer-links a:hover::before {
    transform: translateX(5px);
}

.footer-bottom {
    width: 100%;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: #6c757d;
    font-size: 13px;
    text-align: center;
}

.footer-bottom a {
    color: rgb(204, 37, 41);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 600;
}

.footer-bottom a:hover {
    color: rgb(170, 30, 33);
    text-decoration: underline;
}

/* 错误提示页面样式 */
.error-container {
    background-color: #fff;
    border-radius: 10px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.error-container h1 {
    font-size: 32px;
    color: rgb(204, 37, 41);
    margin-bottom: 20px;
}

.error-container p {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 25px;
    }
    
    .card-cover {
        height: 220px;
    }
}

@media (max-width: 992px) {
    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }
    
    .card-cover {
        height: 200px;
    }
    
    .card-info {
        padding: 15px;
    }
    
    .song-title {
        font-size: 16px;
    }
    
    .song-artist {
        font-size: 14px;
    }
    
    .popular-list-grid {
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .main-header .container {
        flex-direction: column;
        gap: 20px;
        padding: 10px 20px;
    }
    
    .main-nav {
        width: 100%;
    }
    
    .main-nav ul {
        justify-content: center;
        gap: 1px;
        flex-wrap: wrap;
    }
    
    .main-nav ul li {
        flex: none;
    }
    
    .main-nav ul li a {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .search-box {
        min-width: auto;
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 10px 0;
    }
    
    .logo a img {
        width: 150px !important;
    }
    
    .main-nav ul {
        gap: 1px;
        flex-wrap: wrap;
    }
    
    .main-nav ul li {
        flex: 1;
        min-width: 120px;
    }
    
    .main-nav ul li a {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .search-box {
        padding: 6px;
        min-width: auto;
    }
    
    .search-box::before {
        left: 15px;
        font-size: 14px;
    }
    
    .search-box input {
        padding: 8px 15px 8px 35px;
        font-size: 14px;
    }
    
    .search-box button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-search .search-form {
        flex-direction: column;
    }
    
    .hero-search .search-form input,
    .hero-search .search-form button {
        width: 100%;
        border-radius: 30px;
        margin-bottom: 10px;
    }
    
    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .category-list {
        flex-wrap: wrap;
    }
    
    .category-item {
        margin-bottom: 10px;
    }
    
    .popular-item {
        padding: 10px;
    }
    
    .popular-cover {
        width: 50px;
        height: 50px;
    }
    
    .error-container {
        padding: 30px 20px;
    }
    
    .error-container h1 {
        font-size: 24px;
    }
    
    .error-container p {
        font-size: 16px;
    }
    
    .vip-benefits {
        flex-direction: column;
        align-items: center;
    }
    
    .benefit-item {
        width: 100%;
        justify-content: center;
    }
    
    .vip-promo-section {
        padding: 30px 20px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .view-all {
        align-self: flex-end;
    }
    
    /* 热门榜单响应式 */
    .popular-list-grid {
        flex-direction: column;
        gap: 20px;
    }
    
    .popular-list-column h3 {
        text-align: left;
    }
    
    /* 动漫卡片响应式 */
    .card-cover {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .card-cover {
        height: 170px;
    }
    
    .card-info {
        padding: 12px;
    }
    
    .song-title {
        font-size: 15px;
    }
    
    .song-artist {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .song-meta {
        font-size: 12px;
    }
    
    h1 {
        font-size: 28px;
    }
}