/* Musicool v4.1 Style Sheet */
/* Version: v4.1 */

/* === 主题和基础样式 === */
:root{
  --bg:#0b0f14;
  --panel:#111722;
  --accent:#CDB477; 
  --accent2:#4cc9ff; 
  --text:#d9e8ff;
  --muted:#9db3d1;
  --ok:#9be474;
  --warn:#ffe38a;
  --err:#ffb3b3;
  --hover-bg:#152033;
  --playing-bg:rgba(76, 201, 255, 0.2); 
  --playing-bg-hover:rgba(76, 201, 255, 0.3); 
}
html,body{height:100%} body{
  margin:0;
  background:radial-gradient(1400px 600px at 10% -10%, #132033, #0b0f14) fixed;
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  display:flex;align-items:flex-start;justify-content:center;padding:28px;
}
.wrap{width:min(1120px,96vw)}
h1{display:flex;align-items:center;gap:14px;margin:0 0 18px 0;font-size:40px;letter-spacing:.5px}
h1 .ver{background:#1b2534;color:#9cc6ff;border-radius:999px;padding:4px 10px;font-size:14px;margin-left:8px}


/* 统一的图标基础样式，控制 web-icon.png 的显示尺寸 */
.icon {
  width: 28px;
  height: 28px;
  vertical-align: middle; 
  margin-right: 6px; 
  /* 如果 web-icon.png 是一个高分辨率文件，可以加上： */
  /* object-fit: cover; */
}

.card{
  background:rgba(255,255,255,.04);
  backdrop-filter:saturate(180%) blur(12px); 
  border:1px solid rgba(255,255,255,.1);
  border-radius:18px; 
  padding:20px 22px 22px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4); 
  transition: all 0.5s ease-in-out; 
}

/* [V3.3 FIX] 彻底隐藏 API 信息和输入框 */
.api-display-row {
    display: none !important; 
}
.row.cols-3 input {
    display: none !important;
}

.row{display:grid;gap:12px;margin:12px 0}
.row.cols-3{grid-template-columns:1fr auto auto}
label{font-size:13px;color:var(--muted)}
input,button{border:none;outline:none}
input{width:100%;padding:14px;border-radius:12px;background:#0f1622;color:var(--text);border:1px solid transparent}
input:focus{border-color:var(--accent2)}
button{padding:0 18px;height:48px;border-radius:12px;color:#0b0f14;cursor:pointer;
        background:linear-gradient(135deg,var(--accent),var(--accent)); 
        font-weight: 600; transition: transform 0.1s, box-shadow 0.1s;}
button.ghost{
    background:var(--hover-bg);color:#cfe6ff;border:1px solid #263246;
}
button:active{transform:translateY(1px); box-shadow: none;}
.status{min-height:20px;font-size:13px;margin-top:6px}
.status.ok{color:var(--ok)} .status.warn{color:var(--warn)} .status.err{color:var(--err)}
.path{font-size:14px;color:#9bb6d7;margin:8px 0 10px; font-weight: 500;}

/* --- V3.2 自定义播放器控件样式 --- */
.custom-player-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid #1b2534; 
    margin-top: 20px;
}

.timeline-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--muted);
    width: 100%;
}
#timeline {
    flex-grow: 1;
    height: 6px;
    cursor: pointer;
    -webkit-appearance: none;
    background: #344055;
    border-radius: 3px;
}
#timeline::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.player-buttons-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px; 
    width: 100%; 
    max-width: 400px; 
    margin: 0 auto; 
}

/* 核心播放按钮 (大) */
#playPauseBtn {
    height: 60px; 
    width: 60px;
    border-radius: 50%; 
    background: var(--accent);
    color: #0b0f14;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    order: 3;
}
/* 上一首/下一首 (次级大) */
#prevBtn {
    order: 2; 
}
#nextBtn {
    order: 4; 
}
#prevBtn, #nextBtn {
    height: 56px;
    width: 56px;
    font-size: 20px;
    border-radius: 50%; 
    color: var(--cfe6ff);
    background: var(--hover-bg);
    border: 1px solid #263246;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

/* 循环/音量按钮 (边缘) */
#modeBtn {
    order: 1; 
}
#muteBtn {
    order: 5; 
}
#modeBtn, #muteBtn {
    height: 48px;
    width: 48px;
    font-size: 18px; 
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    transition: color 0.2s;
    flex-shrink: 0;
}
.mode-btn.active {
    color: var(--accent2);
}

/* --- 文件列表样式 (保持不变) --- */
.list-area-container {
    margin-top: 12px;
}
.file-list{
  background:#0f1622;border-radius:12px;padding:0;max-height:350px;overflow-y:auto;
  border:1px solid #152033;
}
.list-item{
  padding:12px 16px;cursor:pointer;font-size:16px;border-bottom:1px solid #152033;
  display:flex;align-items:center;transition: background-color 0.15s, color 0.15s;line-height: 1.4;
}
.list-item:last-child{border-bottom:none}
.list-item:hover{background:var(--hover-bg)}
.list-item.dir{color:var(--accent2); font-weight: 500;}
.list-item.dir-up{color:var(--accent)} 
.list-item.disabled{color:var(--muted);cursor:default;background:none;}
.list-item.disabled:hover{background:none}
.list-item.playing{
  background:var(--playing-bg);
  color:var(--accent2);
  font-weight: 600;
}
.list-item.playing:hover{
  background: var(--playing-bg-hover); 
}

/* --- 播放详情模式 (保持不变) --- */
#playerDetail {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  text-align: center;
}
#playerDetail .cover-container {
  width: 250px; height: 250px; background:#1b2534; border-radius:12px; 
  margin-bottom: 25px; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
}
#playerDetail .cover-img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; 
  transition: opacity 0.3s;
}
#playerDetail .cover-placeholder {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; align-items: center;
  font-size: 80px; color: var(--muted);
  background: #1b2534;
}
#playerDetail .title {
  font-size: 30px; font-weight: 700; color: #fff; margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.toggle-btn {
  margin-top: 10px;
  padding: 8px 16px;
  font-size: 13px;
  background: var(--hover-bg);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid #263246;
}
/* 视图切换 */
.list-view #fileList { display: block; }
.list-view #playerDetail { display: none; }
.detail-view #fileList { display: none; }
.detail-view #playerDetail { display: flex; }
