/* 本地字体 */
@font-face {
    font-family: 'Bitter';
    src: url('../assets/fonts/Bitter-Regular.ttf') format('truetype');
    font-weight: 400;
}
@font-face {
    font-family: 'Bitter';
    src: url('../assets/fonts/Bitter-Bold.ttf') format('truetype');
    font-weight: 700;
}

body {
    background: #dfe7ef;
    font-family: "Bitter", serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.player {
    background: #eef3f7;
    width: 900px;
    height: 480px;
    box-shadow: 0px 15px 35px -5px rgba(50, 88, 130, 0.32);
    border-radius: 15px;
    padding: 30px;
    display: flex;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
}

.directory {
    width: 280px;
    margin-right: 20px;
    overflow-y: auto;
    border-right: 1px solid #d0d8e6;
    padding-right: 20px;
    box-sizing: border-box;
}

.directory ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.directory li {
    padding: 6px 8px;
    cursor: pointer;
    color: #71829e;
    transition: background-color 0.3s ease;
    border-radius: 6px;
    margin-bottom: 2px;
    font-size: 14px;
    line-height: 1.2;
}

.directory li:hover {
    background-color: #d0d8e6;
}

.directory li.active {
    background-color: #a3b3ce;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.player-content {
    flex: 1;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.player-cover {
    width: 250px;
    height: 250px;
    margin: -120px auto 10px;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    box-shadow: 0px 10px 40px 0px rgba(76, 70, 124, 0.5);
    position: absolute;
    z-index: 10;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.album-info {
    color: #71829e;
    margin-top: 160px;
    text-align: center;
    flex-shrink: 0;
}

.album-info__track {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #71829e;
}

.album-info__name {
    font-size: 16px;
    opacity: 0.7;
    color: #acb8cc;
}

.controls-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    flex-shrink: 0;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-control input {
    width: 100px;
}

.icon {
    width: 24px;
    height: 24px;
    fill: #acb8cc;
    cursor: pointer;
}

.play-mode button {
    padding: 2px 6px;
    background-color: #eef3f7;
    color: #acb8cc;
    border: 1px solid #d0d8e6;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    margin-left: 5px;
}

.play-mode button:hover {
    background-color: #a3b3ce;
    color: #fff;
    border-color: #a3b3ce;
}

.play-mode button.active {
    background-color: #a3b3ce;
    color: #fff;
    border-color: #a3b3ce;
}

.progress {
    width: 100%;
    margin-top: 5px;
    flex-shrink: 0;
}

.progress__bar {
    height: 6px;
    background-color: #d0d8e6;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
}

.progress__current {
    height: 100%;
    width: 0%;
    background-color: #a3b3ce;
    border-radius: 10px;
}

.progress__time {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #71829e;
    font-size: 14px;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 5px 0;
    flex-shrink: 0;
}

.player-controls button {
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.player-controls button img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.player-controls .play-btn {
    width: 100px;
    height: 80px;
}

.player-controls button.small-btn {
    width: 50px;
    height: 50px;
}

.lyrics-container {
    text-align: center;
    color: #71829e;
    font-size: 15px;
    margin: 0 0 0px;
    height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px 0;
    flex-shrink: 0;
}

/* 明确指定 input 类型 */
.volume-control input[type="range"] {
    width: 100px;
    -webkit-appearance: none; /* 移除 aWebKit/Blink 浏览器的默认外观 */
    appearance: none;
    background: transparent; /* 移除默认背景 */
    cursor: pointer;
}

/* --- 针对 Chrome, Safari, Edge (Chromium) 等浏览器 --- */
/* 1. 自定义滑块轨道 (Track) */
.volume-control input[type="range"]::-webkit-slider-runnable-track {
    background-color: #d0d8e6; /* 设置轨道颜色为灰色 (与进度条背景色一致) */
    height: 6px;
    border-radius: 10px;
}

/* 2. 自定义滑块按钮 (Thumb) */
.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; /* 必须设置，以应用自定义样式 */
    appearance: none;
    margin-top: -4px; /* 垂直居中对齐滑块: (轨道高度 - 滑块高度) / 2 */
    background-color: #a3b3ce; /* 设置滑块颜色为激活状态的灰色 */
    height: 14px;
    width: 14px;
    border-radius: 50%;
}

/* --- 针对 Firefox 浏览器 --- */
/* 1. 自定义滑块轨道 (Track) */
.volume-control input[type="range"]::-moz-range-track {
    background-color: #d0d8e6;
    height: 6px;
    border-radius: 10px;
}

/* 2. 自定义滑块按钮 (Thumb) */
.volume-control input[type="range"]::-moz-range-thumb {
    background-color: #a3b3ce;
    height: 14px;
    width: 14px;
    border-radius: 50%;
}

/* --- 自定义滚动条样式 --- */
/* 适用于 Firefox 浏览器 */
.directory {
  scrollbar-width: thin; /* 使滚动条变细 */
  scrollbar-color: #a3b3ce transparent; /* 第一个颜色是滑块颜色，第二个是轨道颜色（设为透明） */
}

/* 适用于 Chrome, Safari, Edge 等浏览器 */
.directory::-webkit-scrollbar {
  width: 8px; /* 定义整个滚动条的宽度 */
}

.directory::-webkit-scrollbar-track {
  background: transparent; /* 将轨道背景设置为透明，实现隐藏效果 */
}

.directory::-webkit-scrollbar-thumb {
  background-color: #a3b3ce; /* 设置滑块的颜色 */
  border-radius: 4px;      /* 给滑块设置圆角 */
}

/* 鼠标悬停效果 */
.directory::-webkit-scrollbar-thumb:hover {
  background-color: #71829e; 
}