/* UG666页面样式 */

/* 公告内容样式 */
#layer-placard-content {
  padding: 15px 25px;
  max-height: 300px;
  overflow-y: auto;
}

#layer-placard-content>li {
  padding: 8px 0;
  line-height: 1.5;
  font-size: 14px;
  list-style: decimal;
  margin-left: 20px;
}

#layer-placard-content a {
  font-weight: 500;
}

/* UG666页面样式 */
.about-content {
  padding: 20px;
  color: #fff;
  max-width: 800px;
  margin: 0 auto;
  height: 90%;
  /* 添加固定高度以启用滚动条 */
  overflow: auto;
  /* 确保内容溢出时显示滚动条 */
}

.about-section {
  margin-bottom: 35px;
  /* 增加更多的底部间距 */
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  clear: both;
  /* 确保元素不会浮动叠加 */
  position: relative;
  /* 建立层叠上下文 */
  z-index: 1;
  /* 确保正常层叠顺序 */
}

.about-section:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, rgba(49, 194, 124, 0.7), rgba(49, 194, 124, 0.2));
  border-radius: 8px 8px 0 0;
}

.about-section>h2:first-child {
  margin-top: 5px;
}

.about-section:last-child {
  margin-bottom: 10px;
}

.about-section h2 {
  margin-bottom: 15px;
  font-size: 22px;
  color: #31c27c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.about-section:nth-child(2) {
  display: block;
  padding: 20px;
  overflow: hidden;
}

/* 优化同步歌单区域内容布局 */
.about-section:nth-child(2) {
  padding: 20px;
}

.about-avatar {
  text-align: center;
  margin-bottom: 15px;
}

.about-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.about-info p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.about-info a,
.about-section a {
  color: #31c27c;
  text-decoration: none;
}

.about-info a:hover,
.about-section a:hover {
  text-decoration: underline;
}

.about-notice {
  text-align: center;
}

.placard-btn-inner {
  background-color: #31c27c !important;
  border: none !important;
}

/* 同步歌单容器优化 */
.sync-container {
  display: block;
  width: 100%;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0 auto;
  max-width: 98%;
}

/* 优化已登录状态和未登录状态的样式 */
#sync-login-container,
#sync-loggedin-container,
.sync-container .sheet-item {
  margin-left: auto;
  margin-right: auto;
  width: 100% !important;
  box-sizing: border-box;
}

/* 调整同步歌单容器的内部间距 */
.sync-container {
  padding: 0;
}

/* 优化内部卡片项目 */
.sync-container .sheet-item {
  display: block;
  float: none;
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
  overflow: hidden;
  padding: 15px;
  transition: all 0.3s ease;
}

.sync-container .sheet-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-color: rgba(49, 194, 124, 0.3);
}

/* 确保最后一个项目没有底部边距 */
.sync-container .sheet-item:last-child {
  margin-bottom: 0;
}

/* 标题栏样式 */
.sync-container .sheet-title-bar {
  background-color: transparent !important;
  padding: 12px 15px !important;
  margin: 0 0 15px 0 !important;
  font-weight: 500;
  border-bottom: 1px solid rgba(49, 194, 124, 0.3);
  text-align: left;
  position: relative;
  font-size: 16px;
  color: #fff;
}

.sync-container .sheet-title-bar .layui-icon {
  margin-right: 8px;
  color: #31c27c;
  vertical-align: middle;
}

/* 登录表单容器优化 */
.login-box {
  display: flex;
  align-items: center;
  padding: 10px 15px;
}

.login-box .sheet-cover {
  width: 80px;
  height: 80px;
  margin: 0 15px 0 0;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
}

.login-form {
  flex: 1;
}

.login-form p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 5px;
}

.login-btn-area {
  text-align: center;
  margin-top: 20px;
}

/* 用户信息展示优化 */
.user-info {
  display: flex;
  align-items: center;
  padding: 10px 15px;
}

.user-info .sheet-cover {
  width: 80px;
  height: 80px;
  margin: 0 15px 0 0;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
}

.user-details {
  flex: 1;
}

.user-name {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 5px;
}

.user-details p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.user-actions {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  flex-wrap: wrap;
}

.user-actions button {
  margin: 5px;
  flex: 1;
  min-width: 140px;
  max-width: 200px;
}

.user-actions .button-row {
  display: flex;
  width: 100%;
  justify-content: center;
}

.user-actions .login-out {
  background-color: #FF5722 !important;
  border-color: #FF5722 !important;
}

/* 内容区域样式 */
.sync-container .sheet-item>div:not(.sheet-title-bar) {
  padding: 10px 15px;
}

/* 按钮样式优化 */
.sync-container .layui-btn {
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sync-container .layui-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 输入框样式优化 */
.sync-container .layui-input {
  background: rgba(30, 30, 30, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-radius: 4px;
  transition: all 0.3s ease;
  height: 38px;
}

.sync-container .layui-input:focus {
  border-color: rgba(49, 194, 124, 0.5) !important;
  box-shadow: 0 0 5px rgba(49, 194, 124, 0.3);
}

/* 优化表单区域布局 */
.sync-container .layui-form-item {
  margin-bottom: 15px;
}

/* 帮助区域样式优化 */
.help-title {
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.help-title:hover {
  background-color: rgba(49, 194, 124, 0.2) !important;
}

.help-title:after {
  content: '点击查看';
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
}

/* 为展开状态添加新的样式 */
.help-title.expanded:after {
  content: '点击隐藏';
}

.help-content {
  display: none;
  /* 默认隐藏帮助内容 */
  margin-top: 10px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  border-left: 3px solid rgba(49, 194, 124, 0.5);
  transition: all 0.3s ease;
}

.help-content p {
  margin-bottom: 10px;
  line-height: 1.8;
}

.help-content p:last-child {
  margin-bottom: 0;
}

/* UG666歌单列表样式 */
.user-playlist-list {
  margin-top: 15px;
  max-height: 500px;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}

.user-playlist-list .sheet-item {
  width: calc(25% - 8px);
  /* 改为4列，更紧凑 */
  float: none;
  text-align: center;
  margin-bottom: 10px;
  position: relative;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 5px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-playlist-list .sheet-item:hover {
  transform: translateY(-3px);
  background: rgba(49, 194, 124, 0.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.user-playlist-list .sheet-cover {
  width: 65px;
  /* 显著减小封面尺寸 */
  height: 65px;
  margin: 5px auto;
  cursor: pointer;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  object-fit: cover;
}

.user-playlist-list .sheet-cover:hover {
  transform: scale(1.05);
}

.user-playlist-list .sheet-name {
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  display: block;
  margin-bottom: 3px;
  color: #eee;
  cursor: pointer;
  padding: 3px 5px;
  font-size: 12px;
  transition: all 0.3s ease;
}

/* 移除播放量图标，简化界面 */
.user-playlist-list .sheet-item::after {
  display: none;
}

/* 移动端适配 */
@media screen and (max-width: 1200px) {
  .user-playlist-list .sheet-item {
    width: calc(25% - 8px);
    /* 保持4列 */
  }
}

@media screen and (max-width: 900px) {
  .user-playlist-list .sheet-item {
    width: calc(33.33% - 7px);
    /* 3列 */
  }
}

@media screen and (max-width: 600px) {
  .user-playlist-list .sheet-item {
    width: calc(33.33% - 7px);
    /* 保持3列 */
  }

  .user-playlist-list {
    gap: 10px;
  }
}

@media screen and (max-width: 450px) {
  .user-playlist-list .sheet-item {
    width: calc(50% - 5px);
    /* 2列 */
  }
}

/* 搜索弹窗样式优化 */
.layui-layer-close {
  display: block !important;
  /* 确保关闭按钮显示 */
}

.layui-layer-title {
  background-color: #31c27c !important;
  color: #fff !important;
}

#layer-form-content {
  padding: 20px;
  max-height: 180px;
  /* 限制高度 */
  overflow-y: auto;
}

#search-area {
  padding: 0;
  margin: 0;
}

.search-input {
  position: relative;
  display: flex;
  margin-bottom: 15px;
}

.search-input .layui-input {
  flex: 1;
  margin-right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(150, 150, 150, 0.3);
  color: #333;
  height: 38px;
  border-radius: 2px;
}

.search-input .layui-btn {
  background-color: #31c27c;
  border: none;
}

/* 移动设备适配 */
@media screen and (max-width: 768px) {
  .about-content {
    padding: 15px 10px;
    height: 85vh;
    /* 调整高度适应移动设备 */
  }

  .about-section {
    padding: 15px;
    margin-bottom: 20px;
    /* 减少底部间距 */
  }

  .about-section h2 {
    font-size: 18px;
    /* 减小标题字体 */
    margin-bottom: 10px;
  }

  /* 登录表单移动端优化 */
  .login-box {
    flex-direction: column;
    text-align: center;
  }

  .login-box .sheet-cover {
    margin: 0 auto 15px;
  }

  /* 用户信息移动端优化 */
  .user-info {
    flex-direction: column;
    text-align: center;
  }

  .user-info .sheet-cover {
    margin: 0 auto 15px;
  }

  .user-details {
    text-align: center;
  }

  /* 标题栏文本溢出处理 */
  .sheet-title-bar {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 60px !important;
    /* 为"点击查看"文本留出空间 */
  }

  /* 歌单列表移动端优化 */
  .user-playlist-list .sheet-item {
    width: calc(33.33% - 7px);
  }

  .user-playlist-list .sheet-name {
    max-width: 100px;
  }

  /* Cookie设置按钮移动端优化 */
  .cookie-btn-area {
    text-align: center;
    margin-top: 10px;
  }

  #open-cookie-btn,
  .open-cookie-btn {
    width: 100%;
    max-width: 200px;
    margin: 5px auto;
  }

  /* 用户操作按钮在小屏幕上的布局优化 */
  .user-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .user-actions .button-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .user-actions .login-refresh,
  .user-actions .open-cookie-btn {
    flex: 1;
    margin: 0 5px;
    max-width: none;
  }

  .user-actions .login-out {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  /* 弹窗在移动端的调整 */
  .layui-layer {
    width: 95% !important;
    left: 2.5% !important;
    margin-left: 0 !important;
  }
}

/* 超小屏幕适配 */
@media screen and (max-width: 480px) {
  .about-section {
    padding: 12px;
    margin-bottom: 15px;
  }

  .sync-container .layui-btn {
    font-size: 13px !important;
    height: 36px !important;
    line-height: 36px !important;
  }

  /* 调整按钮样式 */
  .user-actions .button-row {
    margin-bottom: 8px;
  }

  .user-actions .login-refresh,
  .user-actions .open-cookie-btn {
    font-size: 12px !important;
    padding: 0 5px !important;
  }

  .user-actions .login-out {
    font-size: 13px !important;
  }

  /* 强制按钮全宽 */
  .login-refresh,
  .login-out,
  .sync-container button[onclick="syncPlaylist()"] {
    width: 100% !important;
    max-width: 180px !important;
  }

  /* 超小屏幕歌单列表优化 */
  .user-playlist-list .sheet-item {
    width: calc(50% - 5px);
  }

  /* Cookie设置相关元素的超小屏幕优化 */
  #open-cookie-btn,
  .open-cookie-btn {
    font-size: 13px !important;
    height: 36px !important;
    line-height: 36px !important;
    max-width: 180px;
  }

  /* 弹窗内文本区域在小屏幕上的适配 */
  #popup-netease-cookie {
    min-height: 80px;
  }

  /* 弹窗适配 */
  .layui-layer-title {
    font-size: 14px !important;
    height: 38px !important;
    line-height: 38px !important;
  }

  /* 帮助弹窗在小屏幕上的文本适配 */
  .layui-layer ol,
  .layui-layer ul {
    padding-left: 20px;
  }

  .layui-layer li {
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 13px;
  }
}

/* 极小屏幕适配（老款iPhone SE等） */
@media screen and (max-width: 320px) {
  .about-section {
    padding: 10px;
  }

  .sync-container .sheet-title-bar {
    padding: 8px 10px !important;
    font-size: 14px;
  }

  /* 按钮文字缩小 */
  .sync-container .layui-btn {
    font-size: 12px !important;
    padding: 0 10px;
  }

  /* 帮助内容在极小屏幕上的优化 */
  .help-content {
    padding: 10px;
  }

  .help-content p {
    font-size: 12px;
    line-height: 1.5;
  }
}

/* 处理横向滚动问题 */
.about-content p {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 优化链接在移动设备上的点击区域 */
.about-section a {
  padding: 2px 0;
  display: inline-block;
}

/* 弹窗中关闭按钮样式优化 */
.layui-layer-setwin .layui-layer-close1 {
  background-position: 1px -40px !important;
  cursor: pointer;
}

/* 公告弹窗样式优化 */
.layui-layer-page .layui-layer-content {
  overflow: auto !important;
}

/* 搜索弹窗样式额外优化 */
.layui-layer-page[type="page"] .layui-layer-content {
  overflow: visible !important;
}

@media screen and (max-width: 500px) {
  .user-playlist-list .sheet-item {
    width: calc(33.33% - 7px);
  }

  .user-playlist-list .sheet-name {
    max-width: 100px;
  }
}

@media screen and (max-width: 350px) {
  .user-playlist-list .sheet-item {
    width: 100%;
  }
}

/* 网格导航样式 */
.nav-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 10px 0;
  width: 100%;
}

.nav-grid-item {
  flex: 1;
  min-width: 100px;
  margin: 5px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border-radius: 2px;
  border: 1px solid rgba(150, 150, 150, .5);
  background-color: rgba(0, 0, 0, 0.12);
  color: #C5C5C5;
  opacity: .8;
  filter: alpha(opacity=80);
  cursor: pointer;
  padding: 5px;
}

.nav-grid-item:hover {
  border: 1px solid #fff;
  opacity: 1;
  filter: alpha(opacity=100);
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.nav-grid-item.active {
  background-color: rgba(49, 194, 124, 0.2);
  color: #fff;
  border-color: rgba(49, 194, 124, 0.5);
}

.nav-grid-item.active:after {
  content: '';
  display: block;
  border-bottom: 3px solid #31c27c;
  position: absolute;
  bottom: 0;
  left: 30%;
  right: 30%;
}

.nav-grid-img {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  margin: 5px auto;
  display: block;
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.nav-grid-item:hover .nav-grid-img {
  transform: scale(1.05);
}

.nav-grid-name {
  font-size: 14px;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 5px;
}

/* 鼠标悬停时显示完整歌单名称的提示框样式 */
.nav-grid-item:hover .nav-grid-name {
  white-space: normal;
  overflow: visible;
  position: relative;
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  padding: 5px;
  margin: 5px -5px 0;
  color: #fff;
}

/* 移动设备响应式设计 */
@media screen and (max-width: 768px) {
  .nav-grid-item {
    min-width: 80px;
    padding: 5px;
  }

  .nav-grid-img {
    width: 65px;
    height: 65px;
  }

  .nav-grid-name {
    font-size: 12px;
  }
}

@media screen and (max-width: 480px) {
  .nav-grid-item {
    min-width: 60px;
    margin: 3px;
  }

  .nav-grid-img {
    width: 55px;
    height: 55px;
  }
}