/* 全站浮窗电台 */
.rj-radio-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.has-mobile-bottom-nav .rj-radio-widget {
  bottom: calc(62px + env(safe-area-inset-bottom, 0px) + 12px);
}

.rj-radio-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #6b7f5d, #c4a77d);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(62, 50, 40, 0.25);
  transition: transform 0.15s;
}
.rj-radio-toggle:hover { transform: translateY(-1px); }
.rj-radio-widget.playing .rj-radio-toggle {
  box-shadow: 0 0 0 3px rgba(107, 127, 93, 0.35);
}

.rj-radio-panel {
  margin-top: 0.5rem;
  width: 280px;
  padding: 0.85rem 1rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(62, 50, 40, 0.18);
  border: 1px solid #e4dfd6;
}
.rj-radio-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #6b7f5d;
  margin-bottom: 0.25rem;
}
.rj-radio-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #f5f0e8;
  color: #7a6e5e;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rj-radio-close:hover { background: #e8dfd2; color: #3e3228; }
.rj-radio-count-line { margin-bottom: 0.35rem; }
.rj-radio-count { color: #7a6e5e; font-size: 0.78rem; }
.rj-radio-now {
  font-size: 0.88rem;
  color: #3e3228;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}
.rj-radio-err {
  font-size: 0.78rem;
  color: #a65c2a;
  margin-bottom: 0.5rem;
}
.rj-radio-controls {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.rj-btn {
  flex: 1;
  padding: 0.45rem;
  border: 1px solid #e4dfd6;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
}
.rj-btn-primary {
  background: #6b7f5d;
  color: #fff;
  border-color: #6b7f5d;
  font-weight: 600;
}
.rj-volume { width: 100%; margin-bottom: 0.5rem; }
.rj-radio-link {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  color: #6b7f5d;
  text-decoration: none;
  margin-bottom: 0.65rem;
}
.rj-radio-link:hover { text-decoration: underline; }

/* 显示/关闭开关 */
.rj-radio-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid #ece6dc;
  font-size: 0.82rem;
  color: #7a6e5e;
  cursor: pointer;
  user-select: none;
}
.rj-radio-switch {
  width: 42px;
  height: 24px;
  margin: 0;
  accent-color: #6b7f5d;
  cursor: pointer;
  flex-shrink: 0;
}

/* 关闭后的小入口，可重新开启 */
.rj-radio-restore {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid #e4dfd6;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #7a6e5e;
  font-size: 0.72rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(62, 50, 40, 0.12);
}
body.has-mobile-bottom-nav .rj-radio-restore {
  bottom: calc(62px + env(safe-area-inset-bottom, 0px) + 12px);
}
.rj-radio-restore:hover {
  color: #6b7f5d;
  border-color: #c4a77d;
}

@media (max-width: 480px) {
  .rj-radio-widget { bottom: 12px; right: 12px; }
  body.has-mobile-bottom-nav .rj-radio-widget {
    bottom: calc(62px + env(safe-area-inset-bottom, 0px) + 8px);
    right: 12px;
  }
  .rj-radio-panel { width: calc(100vw - 24px); max-width: 280px; }
  .rj-radio-label { display: none; }
  .rj-radio-restore { bottom: 12px; right: 12px; }
  body.has-mobile-bottom-nav .rj-radio-restore {
    bottom: calc(62px + env(safe-area-inset-bottom, 0px) + 8px);
  }
}
