/* 音乐厅 - 黑胶唱片风格 v2 */

.music-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2.5rem 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* 黑胶唱片卡片 */
.vinyl-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

/* 黑胶唱片专辑容器 */
.vinyl-album {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 1rem;
}

/* 黑胶唱片碟片 */
.vinyl-disc {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: 
        repeating-radial-gradient(
            circle at center,
            #111 0px,
            #111 2px,
            #0a0a0a 3px,
            #0a0a0a 4px
        );
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s ease, left 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 0;
}

.vinyl-card:hover .vinyl-disc {
    left: 30%;
}

/* 唱片纹路 */
.disc-grooves {
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        transparent 0px,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 3px,
        transparent 4px
    );
}

/* 唱片标签 */
.disc-label {
    width: 35%;
    height: 35%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.disc-label::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #1a1a1a;
    border-radius: 50%;
}

.disc-title {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 1;
}

/* 专辑封面套 */
.album-sleeve {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    z-index: 2;
    transition: transform 0.5s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.vinyl-card:hover .album-sleeve {
    transform: translateX(-10%);
}

.sleeve-title {
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sleeve-artist {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.sleeve-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: auto;
}

/* 播放按钮 */
.vinyl-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #1a1a1f;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.vinyl-card:hover .vinyl-play-btn {
    opacity: 1;
}

.vinyl-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: #d4af37;
}

/* 音乐信息 */
.vinyl-info {
    text-align: center;
}

.music-title {
    font-size: 1rem;
    color: #d4af37;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.music-artist {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.music-desc {
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.music-price-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.music-price {
    font-size: 1rem;
    color: #e74c3c;
    font-weight: 700;
}

/* 黑胶唱片机播放器弹窗 */
.vinyl-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.vinyl-player-container {
    position: relative;
    background: linear-gradient(135deg, #1a1a1f 0%, #25252b 100%);
    border-radius: 16px;
    width: 500px;
    max-width: 95vw;
    max-height: 90vh;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.player-scroll-content {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding-bottom: 1rem;
}

.player-scroll-content::-webkit-scrollbar {
    width: 6px;
}

.player-scroll-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.player-scroll-content::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

.player-scroll-content::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

.player-album-info {
    text-align: center;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.player-album-info h2 {
    color: #d4af37;
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.player-artist {
    color: #888;
    font-size: 0.9rem;
}

/* 唱机 */
.turntable-container {
    display: flex;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 100%);
}

.turntable {
    width: 280px;
    height: 220px;
    background: linear-gradient(135deg, #3a3a45 0%, #2a2a35 50%, #1e1e28 100%);
    border-radius: 12px;
    position: relative;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #4a4a55;
}

/* 唱机底座装饰 */
.turntable::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 10%;
    right: 10%;
    height: 8px;
    background: linear-gradient(90deg, #2a2a35 0%, #3a3a45 50%, #2a2a35 100%);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

/* 唱机脚垫 */
.turntable::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 15px;
    width: 12px;
    height: 6px;
    background: #222;
    border-radius: 0 0 3px 3px;
    box-shadow: 
        238px 0 0 #222,
        0 2px 4px rgba(0,0,0,0.5),
        238px 2px 4px rgba(0,0,0,0.5);
}

/* 播放中的唱片 */
.vinyl-on-player {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: 
        repeating-radial-gradient(
            circle at center,
            #1a1a1a 0px,
            #1a1a1a 2px,
            #0a0a0a 3px,
            #0a0a0a 4px
        );
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.vinyl-on-player.spinning {
    animation: vinylSpin 1.8s linear infinite;
}

@keyframes vinylSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.player-grooves {
    position: absolute;
    top: 8%;
    left: 8%;
    right: 8%;
    bottom: 8%;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        transparent 0px,
        transparent 2px,
        rgba(255, 255, 255, 0.02) 3px,
        transparent 4px
    );
}

.player-label {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.player-label::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #1a1a1a;
    border-radius: 50%;
}

.player-label span {
    font-size: 0.5rem;
    color: #1a1a1a;
    font-weight: 700;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 1;
}

/* 唱臂 */
.tonearm {
    position: absolute;
    top: 15px;
    right: 25px;
    width: 80px;
    height: 110px;
    transform-origin: top right;
    transform: rotate(-35deg);
    transition: transform 0.8s ease;
}

.tonearm.playing {
    transform: rotate(8deg);
}

.tonearm-pivot {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #888 0%, #666 100%);
    border-radius: 50%;
}

.tonearm-rod {
    position: absolute;
    top: 8px;
    right: 6px;
    width: 3px;
    height: 85px;
    background: linear-gradient(90deg, #aaa 0%, #888 50%, #aaa 100%);
    transform-origin: top center;
    transform: rotate(-18deg);
}

.tonearm-cartridge {
    position: absolute;
    bottom: 0;
    left: 18px;
    width: 12px;
    height: 18px;
    background: #444;
    border-radius: 2px;
}

/* 播放器控制 */
.player-controls {
    padding: 0 2rem 1.5rem;
}

.time-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

#currentTime, #totalTime {
    font-size: 0.8rem;
    color: #888;
    min-width: 40px;
}

.progress-container {
    flex-grow: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.progress-bar {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37 0%, #f4d03f 100%);
    width: 0%;
    transition: width 0.1s linear;
}

.control-buttons {
    display: flex;
    justify-content: center;
}

.play-pause-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    border: none;
    color: #1a1a1f;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

.play-pause-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

/* 播放器底部 */
.player-footer {
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

.player-footer .music-desc {
    color: #aaa;
    margin-bottom: 1rem;
}

.player-footer .price-section {
    margin-bottom: 1rem;
}

/* 筛选按钮 - 统一风格 */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.2rem;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: rgba(212, 175, 55, 0.6);
    color: var(--gold-primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* 响应式 */
@media (max-width: 768px) {
    .music-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.5rem 1rem;
        padding: 1rem;
    }
    
    .turntable {
        width: 220px;
        height: 220px;
    }
    
    .vinyl-on-player {
        width: 150px;
        height: 150px;
    }
    
    .player-label {
        width: 50px;
        height: 50px;
    }
}
