/* ==================== 全局样式 ==================== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  background: #111;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: inherit;
}

.player {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}


/* ==================== 左侧播放器区域 ==================== */
.left {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 100%;
  padding: 0 20px;
}

/* ==================== 黑胶唱片封面样式 ==================== */
.cover-wrapper {
  width: 320px;
  height: 320px;
  position: relative;
  flex: 0 0 auto;
  margin: 20px 0;
}

/* 新增：静止的外圈容器 */
.vinyl-container {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 13px solid rgba(255, 255, 255, 0.15); /* 浅白色边框，透明度15% */
  background: rgba(255, 255, 255, 0.05); /* 可选：轻微填充 */
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px); /* 可选：毛玻璃效果 */
  position: relative;
  overflow: hidden;
}

/* 内层：旋转的黑胶唱片 */
.vinyl {
  position: absolute;
  top: 3px; /* 减去边框宽度 */
  left: 3px; /* 减去边框宽度 */
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  background: #1a1a1a;
  transition: transform 0.3s ease;
  
  /* 动画控制：始终应用动画，但默认暂停 */
  animation: spin 20s linear infinite;
  animation-play-state: paused;
}

.vinyl.spinning {
  animation-play-state: running;
}

/* 黑胶纹理 */
.vinyl::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    #222 0px,
    #1a1a1a 2px,
    #222 4px
  );
  opacity: 0.3;
}

/* 封面图 */
.cover {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
}

/* 旋转动画 */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 悬停效果 */
.vinyl:hover {
  transform: scale(1.03);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .cover-wrapper {
    display: none;
  }
}

/* 歌曲信息 */
.info {
  margin-top: 18px;
  width: 300px;
  text-align: center;
  font-size: 18px;
  min-height: 48px;
  max-height: 48px;
  overflow: hidden;
}
.title {
  font-size: 18px;
  font-weight: 700;
  background-color: #fff;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  line-height: 1.2;
}

/* 控制区 */
.controls {
  margin-top: 18px;
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.time-display {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #ccc;
}
.progress {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  outline: none;
}
.progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0597ff;
  cursor: pointer;
  transition: transform 0.15s;
}
.progress::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
.buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.buttons button {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.buttons button.small {
  width: 40px;
  height: 40px;
}
.buttons button.main {
  width: 60px;
  height: 60px;
  background: linear-gradient(90deg, #0565ff, #ff4e50);
}
.buttons button img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  display: block;
}
.buttons button:hover {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.18);
}


/* ==================== 播放列表面板（左侧滑出） ==================== */
.playlist-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  z-index: 1499;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.playlist-overlay.show {
  opacity: 1;
  visibility: visible;
}

#playlistPanel {
  position: fixed;
  top: 0;
  left: 0;
  width: 380px;
  height: 100vh;
  background: #1a1a1a;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  overflow: hidden; /* 隐藏内部滚动条 */
}
#playlistPanel.show {
  transform: translateX(0);
}

.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}
.playlist-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}
.close-btn {
  width: 32px;
  height: 32px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close-btn:hover {
  background: #555;
}

/* 新增：滚动容器包裹层 - 隐藏滚动条的核心 */
.playlist-scroll-wrapper {
  flex: 1;
  overflow: hidden; /* 隐藏溢出的滚动条 */
  position: relative;
}

/* 修改：内部滚动区域 - 通过增加宽度隐藏滚动条 */
#playlistInner {
  width: calc(100% + 17px); /* 增加17px（滚动条典型宽度） */
  height: 100%;
  overflow-y: auto; /* 启用滚动 */
  overflow-x: hidden;
  padding: 10px;
  padding-right: 17px; /* 用padding补偿被隐藏的滚动条区域 */
  box-sizing: border-box;
}

/* 播放列表项样式 */
.playlist-list {
  display: flex;
  flex-direction: column;
}
.playlist-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #2a2a2a;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.playlist-item:hover {
  background: #3a3a3a;
}
.playlist-item.active {
  border-color: #1db954;
  background: #333;
}
.playlist-item img {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  object-fit: cover;
  margin-right: 15px;
  flex-shrink: 0;
}
.playlist-item-info {
  flex: 1;
  min-width: 0;
}
.playlist-item-info .song-name {
  font-size: 14px;
  color: #fff;
  margin-bottom: 4px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playlist-item-info .artist-name {
  font-size: 12px;
  color: #aaa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.playlist-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.playlist-item-actions button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}
.btn-play-item {
  background: #1db954;
  color: #fff;
}
.btn-play-item:hover {
  background: #1ed760;
}
.btn-delete {
  background: #444;
  color: #fff;
}
.btn-delete:hover {
  background: #e74c3c;
}


/* ==================== 右侧歌词区域 ==================== */
.right {
  width: 50%;
  padding: 36px;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}
.lyrics-wrapper {
  cursor: pointer;
  height: 100%;
  overflow-y: auto;
  padding-bottom: 120px;
  scroll-behavior: smooth;
  word-break: break-word;
  white-space: normal;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 1) 6%,
    rgba(0, 0, 0, 1) 94%,
    rgba(0, 0, 0, 0)
  );
}
.lyrics-wrapper::-webkit-scrollbar {
  display: none;
}
.lyrics-block p {
  margin: 2px 0;
  color: #aaa;
  font-size: 28px;
  line-height: 1.6;
  text-align: left;
}
.lyrics-block.active p {
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 203, 5, 0.3);
}


/* ==================== 搜索模态框 ==================== */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2002;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.search-modal.show {
  opacity: 1;
}
.search-modal-content {
  background: #1a1a1a;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
/* 搜索头部 - 确保所有元素水平对齐 */
.search-header {
    padding: 15px;
    background: #2a2a2a;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #333;
    align-items: center; /* Flex垂直居中 */
}

/* 搜索输入框 */
#searchInput {
    flex: 1;
    padding: 0 15px; /* 上下padding设为0 */
    background: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 14px;
    height: 38px; /* 固定高度 */
    line-height: 38px; /* 文字垂直居中 */
    box-sizing: border-box;
}

/* 搜索条数设置容器 - 关键修复 */
.search-limit {
    display: flex; /* 使用flex布局 */
    align-items: center; /* 垂直居中 */
    gap: 6px;
    color: #aaa;
    font-size: 14px;
    white-space: nowrap;
    height: 38px; /* 与输入框同高 */
}

/* "条数"标签 - 核心修复点 */
.search-limit label {
    color: #ccc;
    margin: 0;
    padding: 0;
    display: inline-flex; /* 改为inline-flex */
    align-items: center; /* 内部元素垂直居中 */
    height: 100%; /* 占满容器高度 */
    line-height: 1; /* 移除行高影响 */
}

/* 数字输入框 */
#searchLimit {
    width: 55px;
    padding: 0; /* 移除padding */
    background: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    height: 38px; /* 与搜索框相同高度 */
    line-height: 38px; /* 文字垂直居中 */
    box-sizing: border-box;
}

/* 关闭按钮 */
#closeSearchBtn {
    padding: 0 20px; /* 移除上下padding */
    height: 38px; /* 固定高度 */
    background: #444;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    line-height: 38px; /* 文字垂直居中 */
    box-sizing: border-box;
}
.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}
.search-loading, .search-empty, .search-error {
  text-align: center;
  padding: 40px;
  color: #aaa;
}
.search-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  background: #2a2a2a;
  border-radius: 8px;
  transition: background 0.2s;
}
.search-item:hover {
  background: #3a3a2a;
}
.search-item img {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  margin-right: 15px;
  object-fit: cover;
}
.search-item-info {
  flex: 1;
  min-width: 0;
}
.search-item-info strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-info span {
  color: #aaa;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.search-item-buttons button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}
.btn-play {
  background: #1db954;
  color: #fff;
}
.btn-play:hover {
  background: #1ed760;
}
.btn-add {
  background: #444;
  color: #fff;
}
.btn-add:hover {
  background: #555;
}
.search-item-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ==================== 搜索结果滚动条隐藏 ==================== */
.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  
  /* 现代浏览器隐藏滚动条 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.search-results::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Edge */
}

/* ==================== 评论弹窗 ==================== */
.comments-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.comments-modal.show {
  opacity: 1;
  visibility: visible;
}
.comments-modal-content {
  background-color: #000;
  padding: 20px;
  width: 80%;
  max-height: 80%;
  overflow-y: auto;
  border-radius: 10px;
  position: relative;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.comments-modal.show .comments-modal-content {
  opacity: 1;
}
.comments-modal-content::-webkit-scrollbar {
  width: 10px;
}
.comments-modal-content::-webkit-scrollbar-track {
  background: #333;
  border-radius: 5px;
}
.comments-modal-content::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}
.comments-modal-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}
#commentsList {
  max-height: auto;
  overflow-y: scroll;
  overflow: hidden;
}
.comment-item {
  display: flex;
  margin-bottom: 15px;
}
.comment-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}
.comment-item .content {
  font-size: 14px;
}


/* ==================== 快捷键帮助面板 ==================== */
.shortcut-help {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2001;
}
.shortcut-help.show {
  display: flex;
}
.help-content {
  background: #fff;
  color: #333;
  padding: 20px 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  max-width: 320px;
  text-align: left;
  animation: fadeIn 0.3s ease;
}
.help-content h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.help-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
}
.help-content li {
  margin: 4px 0;
  font-size: 0.95rem;
}
.help-content b {
  color: #007bff;
}
.help-content button {
  display: block;
  margin: 0 auto;
  padding: 6px 14px;
  border: none;
  background: #007bff;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}


/* ==================== 欢迎提示 ==================== */
.welcome-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.welcome-modal.show {
  display: flex;
}
.welcome-content {
  background: #fff;
  color: #333;
  padding: 25px 35px;
  border-radius: 18px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
  max-width: 360px;
  text-align: center;
  animation: fadeIn 0.4s ease;
}
.welcome-content h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.welcome-content p {
  margin: 6px 0;
  line-height: 1.4;
}
.welcome-content .hint b {
  color: #007bff;
}
.welcome-content button {
  margin-top: 10px;
  padding: 8px 18px;
  border: none;
  background: #007bff;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
}


/* ==================== 在线状态 ==================== */
.online-status {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 14px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
  z-index: 9999;
  user-select: none;
  opacity: 0.9;
}


/* ==================== 动画 ==================== */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* 默认桌面端隐藏 */
#searchInPlaylistBtn {
  display: none !important;
}

#searchExecuteBtn {
  display:none;
}


/* ==================== 自定义确认对话框 ==================== */
.custom-confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-confirm-modal.show {
  display: flex;
  opacity: 1;
}

.custom-confirm-content {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 25px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-confirm-modal.show .custom-confirm-content {
  transform: scale(1);
}

.custom-confirm-header h3 {
  margin: 0 0 15px 0;
  color: #ff4e50;
  font-size: 20px;
  font-weight: 600;
}

.custom-confirm-body {
  margin-bottom: 25px;
}

.custom-confirm-body p {
  margin: 0;
  color: #ddd;
  font-size: 16px;
  line-height: 1.5;
}

.custom-confirm-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.custom-confirm-footer button {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-cancel {
  background: #333;
  color: #ccc;
}

.btn-cancel:hover {
  background: #444;
  transform: scale(1.03);
}

.btn-ok {
  background: linear-gradient(90deg, #ff4e50, #e74c3c);
  color: #fff;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-ok:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .custom-confirm-content {
    padding: 20px;
    border-radius: 14px;
  }
  
  .custom-confirm-header h3 {
    font-size: 18px;
  }
  
  .custom-confirm-body p {
    font-size: 15px;
  }
  
  .custom-confirm-footer button {
    padding: 9px 20px;
  }
}


/* ==================== 自定义右键菜单 ==================== */
.context-menu {
  position: absolute;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 3000;
  display: none;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s, transform 0.2s;
  border: 1px solid #333;
}

.context-menu.show {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.context-menu-item {
  padding: 12px 16px;
  color: #ddd;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  transition: background 0.15s;
  user-select: none;
}

.context-menu-item:hover {
  background: #2a2a2a;
}

.context-menu-item:active {
  transform: scale(0.98);
}

.context-menu-item.separator {
  border-top: 1px solid #333;
  margin-top: 6px;
  padding-top: 6px;
}

/* 队列中的歌曲高亮 */
.playlist-item.in-queue {
  border-left: 4px solid #1db954;
  background: #2d3a2d !important;
}

/* 搜索结果队列标识 */
.search-item.in-queue::after {
  content: "⏭";
  position: absolute;
  top: 8px;
  right: 8px;
  background: #1db954;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .context-menu {
    min-width: 150px;
    padding: 6px;
  }
  
  .context-menu-item {
    padding: 10px 14px;
    font-size: 13px;
  }
}

/* ==================== 操作通知 ==================== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 4000;
  display: none;
  align-items: center !important; /* 强制垂直居中 */
  justify-content: flex-start; /* 水平左对齐 */
  gap: 12px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #333;
  max-width: 320px;
  min-height: 48px; /* 确保最小高度 */
}

.notification.show {
  display: flex !important;
  transform: translateX(0);
}

.notification-icon {
  flex-shrink: 0 !important; /* 防止图标被压缩 */
  width: 20px !important;
  height: 20px !important;
  display: flex !important; /* 图标容器用flex */
  align-items: center;
  justify-content: center;
}

.notification-icon img {
  display: block !important; /* 图片强制块级 */
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.notification-text {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 !important; /* 移除默认margin */
  padding: 0 !important; /* 移除默认padding */
  flex: 1 1 auto; /* 允许弹性伸缩 */
  min-width: 0; /* 防止flex item溢出 */
}

/* 不同类型通知的左侧标识 */
.notification.success {
  border-left: 4px solid #1db954;
}

.notification.info {
  border-left: 4px solid #0597ff;
}

.notification.warning {
  border-left: 4px solid #ffcb05;
}

.notification.error {
  border-left: 4px solid #ff4e50;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .notification {
    top: 15px;
    right: 15px;
    left: 15px;
    max-width: none;
    transform: translateY(-100%);
  }
  
  .notification.show {
    transform: translateY(0);
  }
  
  .notification-icon {
    width: 18px !important;
    height: 18px !important;
  }
}


/* ==================== 移动端阴影效果 ==================== */
@media (max-width: 768px) {
  /* 控制区域阴影 - 底部浮层效果 */
  .controls {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* 顶部歌曲信息区域阴影 */
  .info {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* 播放列表面板阴影 - 侧滑抽屉效果 */
  #playlistPanel {
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.4);
  }

  /* 搜索模态框阴影 - 居中弹窗效果 */
  .search-modal-content {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  }

  /* 评论模态框阴影 */
  .comments-modal-content {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  }

  /* 播放列表项悬停阴影 */
  .playlist-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  /* 搜索结果项悬停阴影 */
  .search-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  /* 按钮点击阴影反馈 */
  .buttons button:active,
  .search-item-buttons button:active,
  .playlist-item-actions button:active {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  }
}

/* ==================== 移动端适配样式 (max-width: 768px) ==================== */
@media (max-width: 768px) {
  /* ==================== 基础布局调整 ==================== */
  html, body {
    overflow: auto; /* 允许页面滚动 */
    font-size: 14px;
  }

  .player {
    flex-direction: column; /* 改为垂直布局 */
    height: 100vh;
    position: relative; /* 为搜索按钮定位 */
  }

  .left {
    width: 100%;
    height: auto;
    padding: 0;
    position: static;
  }

  .right {
    width: 100%;
    height: auto;
    padding: 0;
    flex: 1; /* 占据剩余空间 */
    display: flex;
    flex-direction: column;
  }

  /* ==================== 顶部歌曲信息区域 ==================== */
  .info {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 15px 20px; /* 左右对称padding */
    width: 100%;
    min-height: auto;
    max-height: none;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid #333;
  }

  .title {
    font-size: 16.5px;
    -webkit-line-clamp: 1; /* 单行显示 */
    line-height: 1.4;
    text-align: center; /* 居中显示 */
  }

  /* ==================== 中间歌词区域 ==================== */
  .lyric-wrapper {
    flex: 1;
    padding: 70px 20px 20px; /* 顶部避开固定标题，底部避开控制按钮 */
    height: calc(100vh - 280px); /* 动态计算高度 */
    display: flex;
    align-items: flex-start; /* 顶部对齐 */
  }

  .lyrics-wrapper {
    width: 100%;
    height: 100%;
    padding-bottom: 0;
    mask-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 1) 5%,
      rgba(0, 0, 0, 1) 85%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  .lyrics-block p {
    font-size: 14px; /* 改小字体 */
    line-height: 1.8;
    text-align: center; /* 左对齐显示 */
    margin: 12px 0;
  }

  .lyrics-block.active p {
    font-size: 16px; /* 仅大2px */
  }

  /* ==================== 底部控制区域 ==================== */
  .controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 15px 20px 25px;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #333;
    z-index: 100;
    gap: 12px;
  }

  .time-display {
    font-size: 12px;
  }

  .progress {
    height: 6px;
  }

  .progress::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
  }

  .buttons {
    gap: 8px;
  }

  .buttons button.small {
    width: 45px;
    height: 45px;
  }

  .buttons button.main {
    width: 65px;
    height: 65px;
  }

  /* ==================== 搜索执行按钮 ==================== */
  #searchExecuteBtn{
    width: 42px;
    height: 42px;
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
  }

  .search-execute-btn:hover {
    background: #444;
  }

  .search-execute-btn img {
    width: 55%;
    height: 55%;
    object-fit: contain;
  }

  .search-header {
    gap: 8px;
  }

  /* ==================== 播放列表调整 ==================== */
  #playlistPanel {
    width: 100%;
    height: 100vh;
  }

  .playlist-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .playlist-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .search-btn-in-header {
    width: 36px;
    height: 36px;
    background: #333;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
  }

  .search-btn-in-header:hover {
    background: #555;
  }

 #searchInPlaylistBtn {
    display: flex !important;
    width: 36px;
    height: 36px;
    background: #333;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
  }

  #searchInPlaylistBtn:hover {
    background: #555;
  }

  #searchInPlaylistBtn img {
    width: 60%;
    height: 60%;
    object-fit: contain;
  }


  .search-btn-in-header img {
    width: 60%;
    height: 60%;
    object-fit: contain;
  }

  .close-btn {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  #playlistInner {
    width: calc(100% + 17px);
    height: calc(100% - 60px); /* 减去标题栏高度 */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    padding-right: 17px;
  }

  .playlist-item {
    padding: 10px;
  }

  .playlist-item img {
    width: 45px;
    height: 45px;
  }

  .playlist-item-info .song-name {
    font-size: 13px;
  }

  .playlist-item-info .artist-name {
    font-size: 11px;
  }

  .playlist-item-actions button {
    padding: 5px 10px;
    font-size: 11px;
  }

  /* ==================== 搜索模态框调整 ==================== */
  .search-modal-content {
    width: 95%;
    max-height: 85vh;
  }

  .search-header {
    padding: 12px;
    gap: 8px;
  }

  #searchInput {
    height: 42px;
    line-height: 42px;
    font-size: 16px; /* 防止iOS缩放 */
  }

  .search-limit {
    height: 42px;
    gap: 4px;
  }

  .search-limit label {
    font-size: 12px;
  }

  #searchLimit {
    width: 50px;
    height: 42px;
    line-height: 42px;
  }

  #closeSearchBtn {
   display:none;
  }

  .search-results {
    padding: 8px;
  }

  .search-item {
    padding: 10px;
    margin-bottom: 8px;
  }

  .search-item img {
    width: 45px;
    height: 45px;
    margin-right: 12px;
  }

  .search-item-info strong {
    font-size: 14px;
  }

  .search-item-info span {
    font-size: 12px;
  }

  .search-item-buttons {
    gap: 6px;
  }

  .search-item-buttons button {
    padding: 5px 10px;
    font-size: 11px;
  }

  /* ==================== 评论弹窗调整 ==================== */
  .comments-modal-content {
    width: 90%;
    padding: 15px;
    max-height: 70vh;
  }

  .comment-item img {
    width: 35px;
    height: 35px;
  }

  .comment-item .content {
    font-size: 13px;
    line-height: 1.4;
  }

  /* ==================== 其他元素处理 ==================== */
  .cover-wrapper {
    display: none; /* 移动端隐藏封面 */
  }

  .online-status {
    right: 10px;
    bottom: 10px;
    font-size: 12px;
    padding: 4px 8px;
    z-index: 99;
  }

  .welcome-content,
  .help-content {
    max-width: 85%;
    padding: 20px;
  }

  .shortcut-help .help-content {
    max-width: 280px;
  }

  .shortcut-help h2 {
    font-size: 1.1rem;
  }

  .shortcut-help li {
    font-size: 0.85rem;
  }

  /* 隐藏桌面端元素 */
  .desktop-only {
    display: none !important;
  }
}

/* ==================== 小屏幕优化 (max-width: 375px) ==================== */
@media (max-width: 375px) {
  .title {
    font-size: 14px;
  }

  .lyrics-block p {
    font-size: 18px; /* 更小字体 */
    line-height: 1.6;
  }

  .lyrics-block.active p {
    font-size: 20px; /* 仅大2px */
  }

  .buttons button.small {
    width: 42px;
    height: 42px;
  }

  .buttons button.main {
    width: 60px;
    height: 60px;
  }

  .search-btn-in-header,
  .close-btn {
    width: 32px;
    height: 32px;
  }

  .controls {
    padding: 12px 15px 20px;
  }
}

/* ==================== 横屏模式优化 ==================== */
@media (max-width: 768px) and (orientation: landscape) {
  .info {
    padding: 10px 20px;
  }

  .lyrics-wrapper {
    padding: 60px 20px 20px;
  }

  .lyrics-block p {
    font-size: 16px;
    line-height: 1.5;
  }

  .lyrics-block.active p {
    font-size: 18px;
  }

  .controls {
    padding: 10px 20px 15px;
  }

  .buttons button.small {
    width: 40px;
    height: 40px;
  }

  .buttons button.main {
    width: 55px;
    height: 55px;
  }
}
