/* ===================== */
/* 音乐播放器样式 - 圆形封面版 */
/* ===================== */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 50%, #0a0a1a 100%);
    min-height: 100vh;
    color: #fff;
}

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

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

header .pc-search-input {
    width: 220px;
}

header h1 {
    font-size: 1.8rem;
    color: #e2b04a;
    text-shadow: 0 0 20px rgba(226, 176, 74, 0.3);
}

header p {
    color: #888;
    margin-top: 5px;
}

.main-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* ===================== */
/* 左侧播放区域 */
/* ===================== */
.player-section {
    flex: 1;
    min-width: 350px;
    background: linear-gradient(180deg, rgba(26,26,58,0.9) 0%, rgba(15,15,35,0.95) 100%);
    border-radius: 20px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* 圆形专辑封面 */
.vinyl-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 25px;
}

.vinyl {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #2a2a4a 0%, #1a1a2e 50%, #0f0f1a 100%);
    position: relative;
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.5),
        0 0 60px rgba(226, 176, 74, 0.1),
        inset 0 0 30px rgba(0,0,0,0.3);
}

.album-art {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #1e1e3f 0%, #0d0d1a 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

/* 封面占位图标 */
.album-art::before {
    content: '♪';
    font-size: 65px;
    color: rgba(226, 176, 74, 0.3);
    text-shadow: 0 0 20px rgba(226, 176, 74, 0.2);
}

/* 封面有图片时隐藏占位符 */
.album-art.has-image::before {
    display: none;
}

/* 中心唱片孔 */
.vinyl-center {
    width: 36px;
    height: 36px;
    background: linear-gradient(145deg, #2a2a4a, #1a1a2e);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    border: 3px solid #3a3a5a;
    box-shadow: 
        0 0 10px rgba(0,0,0,0.5),
        inset 0 2px 4px rgba(255,255,255,0.1);
}

/* 中心孔洞 */
.vinyl-center::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #080810;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 唱片外圈金色边框 */
.vinyl::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(226, 176, 74, 0.15);
    top: 0;
    left: 0;
    pointer-events: none;
}

/* 旋转动画 */
.vinyl.spinning {
    animation: spin 8s linear infinite;
}

.vinyl.paused {
    animation-play-state: paused;
}

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

/* 唱针隐藏 */
.tonearm {
    display: none !important;
}

/* ===================== */
/* 歌曲信息 */
/* ===================== */
.song-info {
    text-align: center;
    margin-bottom: 20px;
}

.song-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.song-artist {
    font-size: 1rem;
    color: #888;
}

/* ===================== */
/* 进度条 */
/* ===================== */
.progress-section {
    width: 100%;
    max-width: 320px;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e2b04a, #f0c060);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
}

/* ===================== */
/* 控制按钮 */
/* ===================== */
.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.control-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
    padding: 8px;
    position: relative;
}

.control-btn:hover {
    color: #e2b04a;
    transform: scale(1.1);
}

.control-btn.active {
    color: #e2b04a;
}

.control-btn.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2b04a, #c49a3a);
    color: #111;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(226, 176, 74, 0.4);
}

.control-btn.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 35px rgba(226, 176, 74, 0.6);
}

/* ===================== */
/* 音量弹窗 - 竖向显示在按钮上方 */
/* ===================== */
.volume-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    background: rgba(30, 30, 50, 0.98);
    border-radius: 10px;
    padding: 15px 8px;
    display: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    z-index: 100;
}

.volume-popup.show {
    display: block;
}

.volume-popup-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.volume-popup-bar {
    width: 8px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.volume-popup-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, #e2b04a, #f0c060);
    border-radius: 4px;
    height: 70%;
}


/* ===================== */
/* 右侧播放列表区域 */
/* ===================== */
.playlist-section {
    flex: 0 0 380px;
    max-width: 380px;
    background: rgba(15, 15, 30, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.playlist-header h2 {
    color: #e2b04a;
    font-size: 1.2rem;
}

.admin-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.admin-link:hover {
    color: #e2b04a;
}


/* 播放列表工具栏（搜索） */
.playlist-toolbar {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.playlist-toolbar .pc-search-input {
    width: 260px;
}

.playlist-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pc-search-input {
    padding: 6px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    width: 180px;
    transition: all 0.2s;
}

.pc-search-input::placeholder {
    color: rgba(255,255,255,0.35);
}

.pc-search-input:focus {
    background: rgba(255,255,255,0.12);
    border-color: rgba(226,176,74,0.5);
}

.song-list {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.song-item {
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 5px;
}

.song-item:hover {
    background: rgba(226, 176, 74, 0.1);
}

.song-item.playing {
    background: rgba(226, 176, 74, 0.15);
}

.song-item-info {
    display: flex;
    align-items: center;
}

.song-num {
    color: #555;
    margin-right: 10px;
    font-size: 0.9rem;
    min-width: 25px;
}

.song-item-name {
    color: #ccc;
    font-size: 0.95rem;
}

.song-sep {
    color: #555;
    margin: 0 5px;
}

.song-item-artist {
    color: #666;
    font-size: 0.85rem;
}

.song-item.playing .song-item-name {
    color: #e2b04a;
}

/* 滚动条 */
.song-list::-webkit-scrollbar {
    width: 6px;
}

.song-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
}

.song-list::-webkit-scrollbar-thumb {
    background: rgba(226, 176, 74, 0.3);
    border-radius: 3px;
}

.song-list::-webkit-scrollbar-thumb:hover {
    background: rgba(226, 176, 74, 0.5);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* ===================== */
/* 响应式布局 */
/* ===================== */
@media (max-width: 850px) {
    .container {
        padding: 15px 0;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .main-content {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 20px;
    }
    
    .player-section {
        min-width: 0;
        width: 100%;
        padding: 25px 15px;
    }
    
    .player-section .controls {
        justify-content: space-between;
    }
    
    .playlist-section {
        flex: none;
        max-width: 100%;
        width: 100%;
        padding: 20px 15px;
    }
    
    .song-list {
        max-height: 300px;
    }
    
    .vinyl-container {
        width: 180px;
        height: 180px;
    }
    
    .vinyl {
        width: 180px;
        height: 180px;
    }
    
    .vinyl-center {
        width: 30px;
        height: 30px;
    }
    
    .vinyl-center::after {
        width: 8px;
        height: 8px;
    }
    
    .album-art::before {
        font-size: 50px;
    }
    
    .control-btn.play-btn {
        width: 55px;
        height: 55px;
    }
    
    .song-info {
        width: 100%;
    }
    
    .song-title, .song-artist {
        text-align: center;
    }
}

/* 小屏手机适配 */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    header h1 {
        font-size: 1.6rem;
    }
    .player-section {
        padding: 20px 15px;
    }
    .vinyl-container {
        width: 150px;
        height: 150px;
    }
    .vinyl {
        width: 150px;
        height: 150px;
    }
    .vinyl-center {
        width: 26px;
        height: 26px;
    }
    .vinyl-center::after {
        width: 7px;
        height: 7px;
    }
    .album-art::before {
        font-size: 40px;
    }
    .song-title {
        font-size: 1.2rem;
    }
    .control-btn.play-btn {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
    .controls {
        gap: 8px;
        justify-content: space-between;
    }
    .progress-section {
        max-width: 100%;
    }
    .playlist-section {
        padding: 15px;
    }
}

/* 移动端音量弹窗修复 */
@media (max-width: 768px) {
    .volume-popup {
        bottom: 100%;
        margin-bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 120px;
        padding: 12px 6px;
    }
    
    .volume-popup.show {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .volume-popup-bar {
        width: 6px;
        height: 90px;
    }
    
    .volume-popup-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: 100%;
    }
    
}
