/* 天坠音乐分享社区样式 */

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

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

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

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* 主要内容 */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* 搜索区域 */
.search-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border-radius: 30px;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.tag:hover,
.tag.active {
    background: #667eea;
    color: white;
}

/* 音乐网格 */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.music-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.music-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.15);
}

.music-card.pending {
    opacity: 0.7;
    filter: grayscale(0.5);
    cursor: default;
}

.music-card.pending::before {
    content: "待审核";
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ff9800;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.card-cover {
    height: 160px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-cover i {
    font-size: 4rem;
    color: rgba(255,255,255,0.5);
}

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

.music-card:not(.pending):hover .play-overlay {
    opacity: 1;
}

.play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 1.2rem;
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content {
    padding: 1.2rem;
}

.song-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uploader-info {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.download-count,
.play-count {
    font-size: 0.8rem;
    color: #667eea;
}

.play-count {
    color: #ff9800;
}

.download-btn {
    background: none;
    border: 1px solid #667eea;
    color: #667eea;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.download-btn:hover {
    background: #667eea;
    color: white;
}

/* 上传区域 */
.upload-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.upload-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.upload-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #555;
}

.form-control {
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.file-upload {
    border: 2px dashed #e0e0e0;
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-upload:hover {
    border-color: #667eea;
}

.file-upload i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
    display: block;
}

.file-info {
    font-size: 0.9rem;
    color: #888;
}

.upload-submit {
    padding: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.upload-submit:hover {
    transform: translateY(-2px);
}

/* 播放器 */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s;
    z-index: 1000;
}

.player-bar.active {
    transform: translateY(0);
}

.player-info {
    flex: 1;
}

.player-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 1rem;
}

.player-btn:hover {
    background: #667eea;
    color: white;
}

.player-btn.play-pause {
    width: 50px;
    height: 50px;
    background: #667eea;
    color: white;
    font-size: 1.2rem;
}

.player-progress {
    flex: 1;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.close-player {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover,
.page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 提示信息 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 2000;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #4caf50;
}

.toast.error {
    border-left: 4px solid #f44336;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f0f0f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .player-bar {
        flex-direction: column;
        padding: 1rem;
    }
    
    .player-controls {
        justify-content: center;
    }
}