/* 小栈音乐播放器主样式 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 机械酒吧风格变量 */
:root {
    --primary-color: #333333;
    --secondary-color: #ff6b35;
    --accent-color: #00d4ff;
    --background-color: #121212;
    --surface-color: rgba(30, 30, 30, 0.8);
    --text-color: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #444444;
    --metal-gradient: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    --neon-glow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
    --transition: all 0.3s ease;
}

/* 播放器容器 */
.xiaozhan-music-player {
    width: 100%;
    height: 100%;
    background: var(--background-color);
    position: relative;
    overflow: hidden;
}

/* 三层视觉架构 */
.player-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: var(--background-color);
    overflow: hidden;
}

/* 齿轮容器 */
.gear-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 齿轮样式 */
.gear {
    position: absolute;
    border: 8px solid var(--border-color);
    border-radius: 50%;
    background: var(--metal-gradient);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 212, 255, 0.3);
    animation: rotate 20s linear infinite;
    transition: all 0.3s ease;
}

.gear::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: var(--background-color);
    border: 2px solid var(--border-color);
}

.gear::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 30px;
    background: var(--border-color);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* 齿轮齿 */
.gear::before {
    /* 中心孔 */
}

.gear-1::after {
    /* 齿1 */
}

.gear-1::before {
    /* 中心孔 */
}

/* 为齿轮添加多个齿 */
.gear-1::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: var(--background-color);
    border: 2px solid var(--border-color);
}

.gear-1 {
    position: relative;
}

.gear-1::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 30px;
    background: var(--border-color);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* 添加更多齿 */
.gear-1::before {
    /* 中心孔 */
}

/* 为齿轮添加8个齿 */
.gear-1::after,
.gear-1::before {
    /* 中心孔和第一个齿 */
}

.gear-1 {
    position: relative;
}

.gear-1::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 30px;
    background: var(--border-color);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* 为齿轮添加多个齿 */
.gear-1::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    z-index: 1;
}

/* 为齿轮添加8个齿 */
.gear-1::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 30px;
    background: var(--border-color);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    z-index: 0;
}

.gear-1 {
    position: relative;
}

/* 为齿轮添加更多齿 */
.gear-1::before {
    /* 中心孔 */
}

/* 光束灯效果增强 */
.beam {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.3;
    filter: blur(20px);
    animation: beam-move 8s ease-in-out infinite;
    transition: all 0.3s ease;
}

.light-1 {
    top: 20%;
    left: -10%;
    width: 200%;
    height: 50px;
    animation-delay: 0s;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.8), transparent);
}

.light-2 {
    top: 50%;
    left: -10%;
    width: 200%;
    height: 30px;
    animation-delay: 2s;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.8), transparent);
}

.light-3 {
    top: 80%;
    left: -10%;
    width: 200%;
    height: 40px;
    animation-delay: 4s;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.8), transparent);
}

/* 光束移动动画增强 */
@keyframes beam-move {
    0% {
        transform: translateX(-100%) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
        transform: translateX(0%) rotate(0deg);
    }
    100% {
        transform: translateX(100%) rotate(0deg);
        opacity: 0;
    }
}

.gear-1 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation-duration: 25s;
}

.gear-2 {
    width: 150px;
    height: 150px;
    top: 30%;
    right: 15%;
    animation-duration: 30s;
    animation-direction: reverse;
}

.gear-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-duration: 20s;
}

/* 金属网格 */
.metal-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

.player-beam-lights {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

/* 光束灯效果 */
.beam {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.3;
    filter: blur(20px);
    animation: beam-move 8s ease-in-out infinite;
}

.light-1 {
    top: 20%;
    left: -10%;
    width: 200%;
    height: 50px;
    animation-delay: 0s;
}

.light-2 {
    top: 50%;
    left: -10%;
    width: 200%;
    height: 30px;
    animation-delay: 2s;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

.light-3 {
    top: 80%;
    left: -10%;
    width: 200%;
    height: 40px;
    animation-delay: 4s;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

/* 光束移动动画 */
@keyframes beam-move {
    0% {
        transform: translateX(-100%) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(100%) rotate(0deg);
        opacity: 0;
    }
}

.player-ui {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.player-header {
    background: var(--metal-gradient);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.player-logo {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-shadow: var(--neon-glow);
}

.player-search {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

.search-input:focus {
    outline: none;
    box-shadow: var(--neon-glow);
    border-color: var(--accent-color);
}

.player-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-balance {
    color: var(--secondary-color);
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.user-vip {
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* 主内容区域 */
.player-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 分类导航区 */
.player-sidebar {
    width: 250px;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    padding: 1rem;
    overflow-y: auto;
}

.category-list {
    list-style: none;
}

.category-item {
    margin-bottom: 0.5rem;
}

.category-link {
    display: block;
    padding: 0.75rem;
    background: var(--metal-gradient);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Courier New', monospace;
    transition: var(--transition);
}

.category-link:hover {
    box-shadow: var(--neon-glow);
    transform: translateY(-2px);
}

.category-link.active {
    background: var(--secondary-color);
    box-shadow: var(--neon-glow);
}

/* 核心播放区 */
.player-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* 机械舱体封面律动区 */
.cover-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
    perspective: 1000px;
}

.cover-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.cover-art {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    object-fit: cover;
}

.cover-info {
    text-align: center;
    margin-bottom: 2rem;
}

.cover-title {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-shadow: var(--neon-glow);
    margin-bottom: 0.5rem;
}

.cover-artist {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.cover-price {
    font-family: 'Courier New', monospace;
    color: var(--secondary-color);
    font-weight: bold;
}

/* 播放控制栏 */
.player-controls {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.control-btn {
    width: 50px;
    height: 50px;
    background: var(--metal-gradient);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.control-btn:hover {
    box-shadow: var(--neon-glow);
    transform: scale(1.1);
}

.control-btn.play {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    background: var(--secondary-color);
}

.progress-container {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 4px;
    box-shadow: var(--neon-glow);
    transition: width 0.1s linear;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-bar {
    width: 100px;
    height: 6px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.volume-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 3px;
    box-shadow: var(--neon-glow);
}

/* 实时频谱柱 */
.spectrum-container {
    margin-bottom: 2rem;
}

.spectrum-bars {
    display: flex;
    align-items: flex-end;
    height: 100px;
    gap: 2px;
}

.spectrum-bar {
    flex: 1;
    background: var(--metal-gradient);
    border-radius: 2px 2px 0 0;
    transition: height 0.1s ease;
    box-shadow: 0 0 5px var(--accent-color);
}

/* 热门推荐区 */
.player-sidebar-right {
    width: 300px;
    background: var(--surface-color);
    border-left: 1px solid var(--border-color);
    padding: 1rem;
    overflow-y: auto;
}

.section-title {
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-color);
    text-shadow: var(--neon-glow);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.recommended-list {
    list-style: none;
}

.recommended-item {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--metal-gradient);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recommended-item:hover {
    box-shadow: var(--neon-glow);
    transform: translateY(-2px);
}

.recommended-cover {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.recommended-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommended-info {
    flex: 1;
    min-width: 0;
}

.recommended-title {
    font-family: 'Courier New', monospace;
    color: var(--text-color);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommended-artist {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommended-play-count {
    font-family: 'Courier New', monospace;
    color: var(--secondary-color);
    font-size: 0.625rem;
}

/* 播放列表区 */
.player-playlist {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.playlist-title {
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-color);
    text-shadow: var(--neon-glow);
}

.playlist-controls {
    display: flex;
    gap: 0.5rem;
}

.playlist-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.playlist-item:hover {
    background: rgba(0, 212, 255, 0.1);
}

.playlist-item.active {
    background: rgba(255, 107, 53, 0.2);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.playlist-number {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    width: 30px;
    text-align: center;
}

.playlist-info {
    flex: 1;
}

.playlist-song-title {
    font-family: 'Courier New', monospace;
    color: var(--text-color);
    font-size: 0.875rem;
}

.playlist-song-artist {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.playlist-duration {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-right: 1rem;
}

.playlist-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    color: var(--accent-color);
    text-shadow: var(--neon-glow);
}

/* 悬浮播放器 */
.xiaozhan-floating-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    z-index: 9999;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 60px;
}

.floating-player-cover {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.floating-player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-player-info {
    flex: 1;
    min-width: 0;
}

#floating-title {
    font-family: 'Courier New', monospace;
    color: var(--text-color);
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#floating-artist {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 0.625rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-player-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.floating-player-controls .control-btn {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
}

.floating-player-progress {
    flex: 1;
    margin: 0 0.75rem;
}

#floating-progress-bar {
    height: 3px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .player-content {
        flex-direction: column;
    }
    
    .player-sidebar {
        width: 100%;
        height: 100px;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .category-list {
        display: flex;
        gap: 0.5rem;
    }
    
    .category-item {
        margin-bottom: 0;
        white-space: nowrap;
    }
    
    .player-sidebar-right {
        display: none;
    }
    
    .cover-container {
        width: 200px;
        height: 200px;
    }
    
    .xiaozhan-floating-player {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    
    .floating-player-cover {
        width: 40px;
        height: 40px;
    }
    
    .floating-player-controls {
        gap: 0.5rem;
    }
    
    .floating-player-progress {
        margin: 0 0.5rem;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 10px var(--accent-color);
    }
    50% {
        box-shadow: 0 0 20px var(--accent-color), 0 0 30px var(--accent-color);
    }
    100% {
        box-shadow: 0 0 10px var(--accent-color);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* 加载动画 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-family: 'Courier New', monospace;
    color: var(--accent-color);
    font-size: 1.25rem;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
    margin-left: 1rem;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
    box-shadow: var(--neon-glow);
}
