* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #eee;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 左侧目录栏 */
#sidebar {
    width: 250px;
    min-width: 180px;
    max-width: 600px;
    background: rgba(30, 30, 46, 0.8);
    overflow: hidden;
    transition: width 0.3s ease;
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    position: relative;
    display: flex;
    flex-direction: column;
}

#sidebar.collapsed {
    width: 0;
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

/* 侧边栏顶部切换按钮区域 */
#sidebar-header {
    display: flex;
    padding: 15px 10px;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 20, 36, 0.5);
}

.view-toggle-btn {
    flex: 1;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    background: rgba(233, 69, 96, 0.2);
    color: #eee;
}

.view-toggle-btn.active {
    background: rgba(233, 69, 96, 0.5);
    color: #fff;
    font-weight: 500;
}

/* 歌曲列表容器 */
#playlist-container {
    flex: 1;
    overflow-y: auto;
}

#playlist-container h2 {
    padding: 20px 15px 10px;
    font-size: 1.2rem;
    color: #e94560;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

#playlist-container ul {
    list-style: none;
    padding: 0 10px 10px;
}

#playlist-container li {
    padding: 12px 15px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
}

#playlist-container li:hover {
    background: rgba(233, 69, 96, 0.2);
}

#playlist-container li.active {
    background: rgba(233, 69, 96, 0.3);
    color: #e94560;
    font-weight: 500;
}

/* 歌词容器 */
#lyrics-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

#lyrics-content {
    line-height: 1.8;
    font-size: 1rem;
    color: #ddd;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#lyrics-content p {
    margin-bottom: 10px;
}

.lyrics-placeholder {
    color: #888;
    text-align: center;
    padding: 40px 20px;
    font-style: italic;
}

.lyrics-error {
    color: #e94560;
    text-align: center;
    padding: 40px 20px;
}

/* 拖拽条 */
#resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: transparent;
    cursor: ew-resize;
    z-index: 20;
    transition: background 0.2s ease;
}

#resize-handle:hover,
#resize-handle.dragging {
    background: rgba(233, 69, 96, 0.5);
}

/* 右侧播放器区域 */
#main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

#toggleSidebar {
    position: absolute;
    left: 20px;
    top: 20px;
    background: rgba(233, 69, 96, 0.8);
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 20;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

#toggleSidebar:hover {
    background: rgba(233, 69, 96, 1);
    transform: scale(1.05);
}

/* 视频 / 封面 */
#player-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

#video-player {
    width: 100%;
    height: 100%;
    background: black;
    object-fit: contain;
}

#cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 模式提示 */
#mode-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 15;
}

#mode-hint.show {
    opacity: 1;
}

/* 控制栏 */
#controls {
    width: 100%;
    max-width: 1000px;
    background: rgba(30, 30, 46, 0.8);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
    opacity: 1;
    transition: opacity 0.5s;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

#controls.hidden {
    opacity: 0;
    pointer-events: none;
}

#progress-container {
    flex: 1;
    margin: 0 15px;
    display: flex;
    align-items: center;
}

#progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

#progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e94560;
    cursor: pointer;
}

.time-display {
    font-size: 0.8rem;
    color: #aaa;
    min-width: 45px;
    text-align: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
    margin: 0 5px;
}

.control-btn:hover {
    background: rgba(233, 69, 96, 0.8);
    transform: scale(1.1);
}

.control-btn.active {
    background: rgba(233, 69, 96, 0.8);
}

#volume-container {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

#volume {
    width: 80px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

#volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e94560;
    cursor: pointer;
}

/* 滚动条美化 */
#playlist-container::-webkit-scrollbar,
#lyrics-container::-webkit-scrollbar {
    width: 8px;
}

#playlist-container::-webkit-scrollbar-track,
#lyrics-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#playlist-container::-webkit-scrollbar-thumb,
#lyrics-container::-webkit-scrollbar-thumb {
    background: rgba(233, 69, 96, 0.5);
    border-radius: 4px;
}

#playlist-container::-webkit-scrollbar-thumb:hover,
#lyrics-container::-webkit-scrollbar-thumb:hover {
    background: rgba(233, 69, 96, 0.7);
}