/* ============================================
   24bit无损音乐网 - 全站样式（PC + 移动端适配）
   ============================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: #f3ecb8;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #111;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Logo ---------- */
.logo-link {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-top: 36px;
  margin-bottom: 8px;
}

.logo-link:hover,
.logo-link:focus,
.logo-link:active {
  outline: none;
  text-decoration: none;
}

.logo {
  position: relative;
  font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
  font-size: 56px;
  line-height: 1;
  color: #111;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
}

/* 鸡：相对 logo 居中定位 */
.chicken-anchor {
  position: absolute;
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
  width: 64px;
  height: 58px;
  z-index: 1000;
  pointer-events: none;
}

.chicken-wrap {
  display: inline-block;
  animation: chickenShake 0.55s ease-in-out infinite alternate;
}

.chicken {
  display: block;
}

.glasses {
  transform-origin: 60px 62px;
  animation: glassesShake 0.45s ease-in-out infinite alternate;
}

@keyframes glassesShake {
  0%   { transform: translateX(-4px) rotate(-3deg); }
  100% { transform: translateX(4px) rotate(3deg); }
}

@keyframes chickenShake {
  0%   { transform: translateX(-3px) rotate(-2deg); }
  100% { transform: translateX(3px) rotate(2deg); }
}

/* ---------- 搜索框 ---------- */
.search-box {
  display: flex;
  align-items: center;
  width: 92%;
  max-width: 520px;
  margin: 22px auto 0;
  background: #fff;
  border: 1px solid #dfe1e5;
  border-radius: 999px;
  padding: 6px 6px 6px 48px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  position: relative;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: #9aa0a6;
  pointer-events: none;
}

.search-box input {
  flex: 1;
  height: 44px;
  border: none;
  outline: none;
  font-size: 16px;
  color: #333;
  background: transparent;
}

.search-box input::placeholder {
  color: #9aa0a6;
}

.search-btn {
  height: 38px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #111;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}

.search-btn:hover { background: #333; }

/* ---------- 搜索结果 ---------- */
.search-result {
  display: none;
  width: 92%;
  max-width: 520px;
  margin: 10px auto 0;
  position: relative;
  z-index: 100;
}

.search-result.active {
  display: block;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  margin-bottom: 6px;
}

.result-card:hover { background: #f6fffa; }

.result-cover {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
}

.result-main { flex: 1; min-width: 0; }

.result-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
}

.result-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-sub {
  margin-top: 3px;
  font-size: 13px;
  color: #666;
}

.result-desc {
  margin-top: 2px;
  font-size: 12px;
  color: #1a7f4d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-badge {
  flex-shrink: 0;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-weight: 600;
}

.result-badge.badge-origin {
  color: #1a7f4d;
  background: #e6f9f0;
  border: 1px solid #7dd4b0;
}

.result-badge.badge-hq {
  color: #BBA612;
  background: #fff;
  border: 1px solid #BBA612;
}

.result-badge.badge-other {
  color: #5b3cc4;
  background: #e8e0ff;
  border: 1px solid #b39ddb;
}

.result-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.result-actions .icon-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: #999;
  cursor: pointer;
  border-radius: 50%;
}

.result-empty {
  text-align: center;
  color: #888;
  font-size: 14px;
  padding: 18px;
  background: #fff;
  border-radius: 14px;
}

mark { background: transparent; color: inherit; }

/* ---------- 榜单容器：并排居中 ---------- */
.charts-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 14px 40px;
  max-width: 820px;
  margin: 0 auto;
}

.chart-box,
.singer-box {
  width: 170px;
  background: #f7f5ef;
  border: 1.5px solid #bdbdbd;
  border-radius: 18px;
  padding: 16px 14px 18px;
  box-shadow: 0 3px 8px rgba(0,0,0,.06);
}

.chart-title,
.singer-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #111;
}

.chart-list,
.singer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chart-list li,
.singer-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.chart-list a,
.singer-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.r1 { background: #e83b3b; }
.r2 { background: #f57c2d; }
.r3 { background: #f5b53f; }
.r4 { background: #bdbdbd; }

.song {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 播放页 ---------- */
.player {
  width: 92%;
  max-width: 375px;
  margin: 30px auto 40px;
  border-radius: 18px;
  background: linear-gradient(160deg, #9b9d93, #7e8078);
  padding: 18px 20px 22px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.25), 0 12px 28px rgba(0,0,0,.28);
  color: #fff;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.top-tags {
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 44px;
}

.tag-master {
  background: linear-gradient(180deg, #38a7f0, #1794e8);
  border-radius: 5px;
  padding: 5px 10px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.tag-master .sub {
  display: block;
  font-size: 13px;
  margin-top: 1px;
}

.tag-flac,
.tag-size,
.tag-gfv {
  background: #111;
  color: #fff;
  border-radius: 5px;
  font-weight: 700;
  font-size: 14px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 22px;
}

.cover-frame {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 14px solid #111;
  overflow: hidden;
  background: #000;
  position: relative;
  flex-shrink: 0;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.player.playing .cover-img {
  animation: rotateInner 8s linear infinite;
}

@keyframes rotateInner {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 5;
}

.play-btn svg {
  width: 44px;
  height: 44px;
}

.nav-btn {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 3;
}

.nav-btn svg {
  width: 28px;
  height: 28px;
}

#prevBtn { left: 50px; top: 50%; transform: translateY(-50%); }
#nextBtn { right: 50px; top: 50%; transform: translateY(-50%); }

.song-area {
  margin-top: 20px;
  text-align: center;
}

.song-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.song-title {
  font-size: 18px;
  font-weight: 600;
}

.time {
  font-size: 14px;
  opacity: .9;
}

.progress {
  margin-top: 10px;
  height: 3px;
  background: rgba(255,255,255,.55);
  border-radius: 3px;
  cursor: pointer;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #fff, #c9d6cf);
  border-radius: 3px;
  position: relative;
}

.progress-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
}

.artist {
  margin-top: 10px;
  font-size: 15px;
  color: rgba(255,255,255,.95);
}

/* 歌词 */
.lyrics-wrap {
  position: relative;
  margin-top: 10px;
  height: 140px;
  overflow: hidden;
  background: #8E999D;
  border-radius: 10px;
}

.lyrics {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  transition: transform 0.4s ease;
}

.lyrics-mask {
  position: absolute;
  left: 0;
  right: 0;
  height: 40px;
  z-index: 2;
  pointer-events: none;
}

.lyrics-mask-top {
  top: 0;
  background: linear-gradient(to bottom, rgba(142,153,157,1), transparent);
}

.lyrics-mask-bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(142,153,157,1), transparent);
}

.lyric-line {
  text-align: center;
  font-size: 14px;
  line-height: 28px;
  color: #0E1412;
  transition: all 0.3s ease;
}

.lyric-line.active {
  font-size: 16px;
  font-weight: 600;
  color: #66C7F8;
}

/* 返回按钮 */
.back-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  background: rgba(255,255,255,.5);
  border-radius: 999px;
  color: #111;
  font-size: 14px;
  font-weight: 600;
  z-index: 999;
}

/* 下载按钮 */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 1.5px solid rgba(255,255,255,.4);
  border-radius: 999px;
  color: rgba(255,255,255,.8);
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 8px;
}

/* 快捷键提示 */
.shortcut-hint {
  position: absolute;
  bottom: 10px;
  right: 12px;
  padding: 4px 10px;
  background: rgba(0,0,0,.45);
  border-radius: 999px;
  font-size: 11px;
  color: rgba(255,255,255,.7);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
}

.shortcut-hint.show { opacity: 1; }

/* ---------- PC 端 ---------- */
@media (min-width: 769px) {
  .logo { font-size: 72px; }
  .logo-link { margin-top: 48px; }
  .search-box { margin-top: 30px; }
  .charts-container { gap: 28px; padding-top: 32px; }
  .chart-box, .singer-box { width: 200px; }
}

/* ---------- 小屏手机 ---------- */
@media (max-width: 480px) {
  .logo { font-size: 44px; }
  .charts-container { gap: 12px; padding: 18px 8px 30px; }
  .chart-box, .singer-box { width: 46vw; max-width: 180px; }
  .chart-list li, .singer-list li { font-size: 13px; }
  .cover-frame { width: 120px; height: 120px; border-width: 10px; }
  #prevBtn { left: 20px; }
  #nextBtn { right: 20px; }
}
