:root {
    --primary-color: #ff2e63;
    --secondary-color: #08d9d6;
    --accent-color: #ffde7d;
    --text-color: #333333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --card-hover-bg: #f5f7ff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-light: linear-gradient(135deg, rgba(255, 46, 99, 0.1), rgba(8, 217, 214, 0.1));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 100px;
}

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

/* 主容器样式 */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-container .container {
    flex: 1;
}

/* 头部设计 */
header {
    margin-bottom: 30px;
}

/* 搜索框样式 */
.search-container {
    padding: 20px 0;
    background: white;
    border-radius: 0 0 20px 20px;
    margin-top: -5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: #888;
    font-size: 1.1rem;
    z-index: 2;
}

.search-box input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 12px 12px 45px;
    font-size: 1rem;
    outline: none;
    color: var(--text-color);
    border-radius: 25px;
}

.search-box input[type="hidden"] {
    display: none;
}

.search-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 5px;
}

.clear-search-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 5px;
    text-decoration: none;
    font-size: 0.9rem;
}

.search-btn:hover, .clear-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 分类导航样式 */
.categories-nav {
    display: flex;
    justify-content: flex-start;
    margin: 30px 0;
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 8px;
    overflow-x: auto;
}

.category-item {
    --category-primary: #ff2e63;
    --category-secondary: #ff6b9d;
    
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: white;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--category-secondary), var(--category-primary));
    font-size: 0.9rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.category-item:hover::before {
    left: 100%;
}

.category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
}

.category-item.active {
    background: linear-gradient(135deg, var(--category-primary), var(--category-secondary));
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.category-item i {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* 歌曲列表 */
.songs-container {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    font-weight: 600;
}

.category-title i {
    margin-right: 10px;
    font-size: 1.3rem;
}

/* 歌曲计数 */
.song-count {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
    margin-left: 10px;
}

.songs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.song-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    overflow: hidden;
}

.song-row:hover {
    background: var(--card-hover-bg);
    transform: translateX(5px);
}

.song-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.album-art {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.album-art i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

.song-details {
    flex: 1;
    min-width: 0;
}

.song-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist i {
    margin-right: 6px;
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.song-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #888;
    font-size: 0.85rem;
    margin-right: 15px;
}

.play-count, .duration {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.play-count i, .duration i {
    margin-right: 4px;
    font-size: 0.8rem;
}

./* 确保播放按钮可点击 */
.play-btn {
    background: var(--gradient);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(255, 46, 99, 0.3);
    position: relative;
    z-index: 10;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 46, 99, 0.4);
}

/* 确保歌曲行可点击区域正确 */
.song-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    overflow: hidden;
}

.song-row:hover {
    background: var(--card-hover-bg);
    transform: translateX(5px);
}

/* 确保没有元素覆盖按钮 */
.song-row > * {
    position: relative;
    z-index: 1;
}

/* 无歌曲状态 */
.no-songs {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-songs i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-songs p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.clear-search {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.clear-search:hover {
    text-decoration: underline;
}

/* 微信警告 */
.wechat-warning {
    display: none;
    text-align: center;
    padding: 15px;
    background-color: rgba(255, 46, 99, 0.1);
    color: var(--primary-color);
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid rgba(255, 46, 99, 0.2);
    font-size: 0.9rem;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 46, 99, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 浮动元素 */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-element {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--gradient-light);
    border-radius: 50%;
    animation: float 20s infinite linear;
    opacity: 0.4;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    100% {
        transform: translateY(-1000px) translateX(500px) rotate(720deg);
    }
}

/* APlayer 播放器样式修复 */
.aplayer {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
    background: white !important;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1) !important;
    border-radius: 15px 15px 0 0 !important;
    margin: 0 !important;
}

.aplayer .aplayer-info {
    padding: 15px 20px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    background: white !important;
}

.aplayer .aplayer-pic {
    width: 60px !important;
    height: 60px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.aplayer .aplayer-body {
    margin-left: 75px !important;
    padding: 0 !important;
}

.aplayer .aplayer-title {
    color: var(--text-color) !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    margin-bottom: 4px !important;
}

.aplayer .aplayer-author {
    color: #666 !important;
    font-size: 0.9rem !important;
}

.aplayer .aplayer-controller {
    padding: 15px 20px !important;
    background: white !important;
}

.aplayer .aplayer-controller .aplayer-bar-wrap {
    margin: 0 15px !important;
    height: 4px !important;
}

.aplayer .aplayer-controller .aplayer-bar {
    height: 4px !important;
    background: #e0e0e0 !important;
    border-radius: 2px !important;
}

.aplayer .aplayer-controller .aplayer-bar .aplayer-loaded {
    background: #b0b0b0 !important;
    height: 4px !important;
    border-radius: 2px !important;
}

.aplayer .aplayer-controller .aplayer-bar .aplayer-played {
    background: var(--gradient) !important;
    height: 4px !important;
    border-radius: 2px !important;
}

.aplayer .aplayer-controller .aplayer-bar .aplayer-played .aplayer-thumb {
    width: 14px !important;
    height: 14px !important;
    background: white !important;
    border: 3px solid var(--primary-color) !important;
    top: -5px !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3) !important;
}

.aplayer .aplayer-controller .aplayer-time {
    color: #666 !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

.aplayer .aplayer-controller .aplayer-time .aplayer-icon {
    width: 20px !important;
    cursor: pointer !important;
}

.aplayer .aplayer-controller .aplayer-time .aplayer-icon path {
    fill: currentColor !important;
}

.aplayer .aplayer-controller .aplayer-time .aplayer-icon:hover {
    color: var(--primary-color) !important;
}

.aplayer .aplayer-list {
    border: none !important;
    background: white !important;
}

.aplayer .aplayer-list ol li {
    border-top: 1px solid #f0f0f0 !important;
    padding: 12px 15px !important;
    transition: all 0.3s ease !important;
}

.aplayer .aplayer-list ol li:hover {
    background: #f8f9fa !important;
}

.aplayer .aplayer-list ol li.aplayer-list-light {
    background: var(--gradient-light) !important;
    color: var(--primary-color) !important;
}

/* 迷你播放器样式 */
.mini-player {
    position: fixed;
    bottom: 80px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    z-index: 999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.mini-player.active {
    transform: translateY(0);
    opacity: 1;
}

.mini-player-content {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 15px;
}

.mini-album-art {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.mini-album-art i {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.mini-song-info {
    flex: 1;
    min-width: 0;
}

.mini-song-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-song-artist {
    font-size: 0.75rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.mini-control-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    font-size: 0.8rem;
}

.mini-control-btn:hover {
    background: var(--gradient);
    color: white;
    transform: scale(1.1);
}

.mini-control-btn.play-pause {
    background: var(--gradient);
    color: white;
    box-shadow: 0 3px 8px rgba(255, 46, 99, 0.3);
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.mini-progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 200px;
}

.mini-progress-time {
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
    min-width: 35px;
}

.mini-progress {
    flex: 1;
}

.mini-progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.mini-progress-filled {
    height: 100%;
    background: var(--gradient);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.mini-progress-bar:hover .mini-progress-filled::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.mini-expand-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    flex-shrink: 0;
}

.mini-expand-btn:hover {
    background: var(--gradient);
    color: white;
}

/* 播放器动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 46, 99, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 46, 99, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 46, 99, 0);
    }
}

.mini-album-art.playing {
    animation: pulse 2s infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .song-row {
        padding: 10px;
    }
    
    .song-meta {
        flex-direction: column;
        gap: 5px;
        align-items: flex-end;
    }
    
    .album-art {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .album-art i {
        font-size: 1rem;
    }
    
    .song-name {
        font-size: 0.9rem;
    }
    
    .song-artist {
        font-size: 0.8rem;
    }
    
    .play-btn {
        width: 32px;
        height: 32px;
    }
    
    .categories-nav {
        padding: 10px;
        gap: 6px;
    }
    
    .category-item {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .mini-player {
        left: 10px;
        right: 10px;
        bottom: 70px;
    }
    
    .mini-player-content {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .mini-progress-container {
        max-width: 150px;
    }
    
    .mini-controls {
        gap: 3px;
    }
    
    .mini-control-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .mini-control-btn.play-pause {
        width: 32px;
        height: 32px;
    }
    
    .aplayer .aplayer-info {
        padding: 10px 15px !important;
    }
    
    .aplayer .aplayer-pic {
        width: 50px !important;
        height: 50px !important;
    }
    
    .aplayer .aplayer-body {
        margin-left: 65px !important;
    }
}

@media (max-width: 480px) {
    .mini-progress-container {
        display: none;
    }
    
    .song-meta {
        display: none;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
}

/* 优化搜索框 - 移动端适配 */
.search-container {
    position: relative;
    margin: 0 auto;
    max-width: 500px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.95);
    border-radius: 25px;
    padding: 8px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 15px;
    font-size: 16px; /* 防止iOS缩放 */
    color: #2c3e50;
    outline: none;
    min-width: 0;
}

.search-input::placeholder {
    color: #95a5a6;
}

.search-button {
    background: var(--gradient);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    margin-left: 8px;
    flex-shrink: 0;
}

.search-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 46, 99, 0.4);
}

.clear-search {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #95a5a6;
    margin-right: 5px;
    flex-shrink: 0;
}

.clear-search:hover {
    background: rgba(0,0,0,0.05);
    color: #e74c3c;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .search-box {
        padding: 6px 12px;
        border-radius: 20px;
    }
    
    .search-input {
        padding: 8px 12px;
        font-size: 16px; /* 保持16px防止iOS缩放 */
    }
    
    .search-button {
        width: 36px;
        height: 36px;
        margin-left: 6px;
    }
    
    .clear-search {
        width: 28px;
        height: 28px;
        margin-right: 3px;
    }
    
    .search-button i,
    .clear-search i {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .search-container {
        margin: 0 10px;
    }
    
    .search-box {
        padding: 5px 10px;
    }
    
    .search-input {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .search-input::placeholder {
        font-size: 14px;
    }
}

/* 搜索建议框 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    margin-top: 8px;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

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

.suggestion-icon {
    width: 24px;
    height: 24px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-artist {
    font-size: 0.75rem;
    color: #7f8c8d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}