/**
 * 南乔牧音乐电台 - 前台样式
 */

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

:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #fff;
    --bg-gray: #f5f7fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-gray);
    border-radius: 20px;
    padding: 5px 15px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    width: 180px;
    font-size: 14px;
}

.search-box button {
    border: none;
    background: none;
    color: var(--text-light);
    cursor: pointer;
}

.btn-admin {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s;
}

.btn-admin:hover {
    background: var(--primary-color);
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-color);
    box-shadow: var(--shadow);
    z-index: 999;
    padding: 20px;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 15px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
}

/* Hero区域 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 80px 0;
    color: white;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

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

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

/* 通用区块 */
.section {
    padding: 60px 0;
}

.section-gray {
    background: var(--bg-gray);
}

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

.section-title {
    font-size: 24px;
    font-weight: 700;
}

.view-all {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.view-all:hover {
    color: var(--primary-color);
}

/* 歌单网格 */
.playlist-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.playlist-card {
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s;
}

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

.playlist-cover {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    margin-bottom: 12px;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.playlist-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.playlist-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-count {
    font-size: 13px;
    color: var(--text-light);
}

/* 歌曲列表 */
.song-list {
    background: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.3s;
}

.song-item:last-child {
    border-bottom: none;
}

.song-item:hover {
    background: var(--bg-gray);
}

.song-number {
    width: 30px;
    color: var(--text-lighter);
    font-size: 14px;
}

.song-cover {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    margin-right: 15px;
}

.song-info {
    flex: 1;
}

.song-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 3px;
}

.song-artist {
    font-size: 13px;
    color: var(--text-light);
}

.song-actions {
    opacity: 0;
    transition: opacity 0.3s;
}

.song-item:hover .song-actions {
    opacity: 1;
}

.btn-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.btn-play:hover {
    transform: scale(1.1);
}

/* 歌曲卡片网格 */
.song-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.song-card {
    text-decoration: none;
    color: var(--text-color);
}

.song-card-cover {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    margin-bottom: 12px;
}

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

.song-card-cover .play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
}

.song-card:hover .play-overlay {
    opacity: 1;
}

.play-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.song-card-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card-artist {
    font-size: 13px;
    color: var(--text-light);
}

/* 歌手网格 */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.artist-card {
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s;
}

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

.artist-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
}

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

.artist-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 5px;
}

.artist-count {
    font-size: 13px;
    color: var(--text-light);
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: var(--bg-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.category-desc {
    font-size: 13px;
    opacity: 0.8;
}

/* 底部 */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.footer-copyright {
    font-size: 14px;
    opacity: 0.7;
}

/* 播放器 */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
}

.player-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-song {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 250px;
}

.player-cover {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.player-title {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-size: 12px;
    color: var(--text-light);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-control {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s;
}

.btn-control:hover {
    color: var(--primary-color);
}

.player-controls .btn-play {
    width: 44px;
    height: 44px;
    font-size: 18px;
}

.player-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-current,
.time-total {
    font-size: 12px;
    color: var(--text-light);
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 120px;
}

.player-volume i {
    font-size: 14px;
    color: var(--text-light);
}

.volume-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    cursor: pointer;
}

.volume-fill {
    height: 100%;
    background: var(--text-light);
    border-radius: 2px;
    width: 70%;
}

.btn-playlist {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 18px;
}

/* 播放列表面板 */
.playlist-panel {
    position: fixed;
    right: -350px;
    top: 70px;
    bottom: 80px;
    width: 350px;
    background: var(--bg-color);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s;
    display: flex;
    flex-direction: column;
}

.playlist-panel.active {
    right: 0;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.playlist-header h3 {
    font-size: 16px;
}

.playlist-header button {
    border: none;
    background: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 18px;
}

.playlist-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.3s;
}

.playlist-item:hover {
    background: var(--bg-gray);
}

.playlist-item.active {
    background: rgba(102, 126, 234, 0.1);
}

.playlist-item img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 10px;
}

.playlist-item-info {
    flex: 1;
}

.playlist-item-title {
    font-size: 13px;
    font-weight: 500;
}

.playlist-item-artist {
    font-size: 12px;
    color: var(--text-light);
}

/* 页面标题 */
.page-title {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-title h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.page-title p {
    opacity: 0.9;
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 20px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-light);
}

/* 详情页面 */
.detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.detail-cover {
    width: 250px;
    height: 250px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}

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

.detail-info {
    flex: 1;
}

.detail-info h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.detail-meta {
    color: var(--text-light);
    margin-bottom: 20px;
}

.detail-desc {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 25px;
}

.detail-actions {
    display: flex;
    gap: 15px;
}

/* 歌词 */
.lyrics-container {
    background: var(--bg-gray);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    max-height: 400px;
    overflow-y: auto;
}

.lyrics-line {
    padding: 8px 0;
    color: var(--text-light);
    transition: all 0.3s;
}

.lyrics-line.active {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .playlist-grid,
    .artist-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .song-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav,
    .header-actions .search-box {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .playlist-grid,
    .artist-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .song-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .player-container {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .player-song {
        width: 100%;
    }
    
    .player-progress {
        order: 3;
        width: 100%;
    }
    
    .player-volume,
    .btn-playlist {
        display: none;
    }
    
    .playlist-panel {
        width: 100%;
        right: -100%;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .detail-cover {
        width: 200px;
        height: 200px;
    }
    
    .detail-info h1 {
        font-size: 24px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .playlist-grid,
    .artist-grid,
    .song-grid,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-actions {
        flex-direction: column;
    }
}
