/* 主样式文件 */
:root {
  --primary-color: #07c160;
  --secondary-color: #2ba471;
  --accent-color: #10b981;
  --text-color: #1f2d2b;
  --light-text: #6b7c75;
  --border-color: #e3efe8;
  --background-color: #f4fbf7;
  --card-background: #ffffff;
  --header-height: 56px;
  --footer-height: 60px;
  --max-width: 750px;
}

body {
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Helvetica, Arial,
    sans-serif;
  background: var(--background-color);
  color: var(--text-color);
}

/* 基本布局 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--card-background);
  position: relative;
  box-shadow: 0 18px 40px rgb(7 193 96 / 23%);
  border-radius: 24px;
  overflow: hidden;
  background-image:
    radial-gradient(
      900px 420px at 20% -8%,
      rgba(7, 193, 96, 0.08),
      transparent 62%
    ),
    radial-gradient(
      820px 380px at 88% 4%,
      rgba(16, 185, 129, 0.07),
      transparent 64%
    ),
    radial-gradient(
      760px 420px at 50% 108%,
      rgba(43, 164, 113, 0.06),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(255, 255, 255, 0.2) 22%,
      transparent 55%
    );
}

/* 头部样式 */
.header {
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--card-background);
  box-shadow: 0 6px 20px rgba(7, 193, 96, 0.08);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
}

.search-icon img {
  width: 24px;
  height: 24px;
}

/* 内容区域 */
.content {
  flex: 1;

  padding-bottom: var(--footer-height);
}

/* 底部导航 */
.footer {
  height: var(--footer-height);
  position: fixed;
  bottom: 0;
  left: 50%;
  width: min(100%, var(--max-width));
  background-color: var(--card-background);
  box-shadow: 0 -6px 20px rgba(7, 193, 96, 0.08);
  border-top: 1px solid var(--border-color);
  z-index: 100;
  transform: translateX(-50%);
  border-radius: 0 0 24px 24px;
}

.nav-tabs {
  width: 100%;
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

@media (max-width: 768px) {
  .footer {
    left: 0;
    width: 100%;
    transform: none;
    border-radius: 0;
  }
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--light-text);
  transition: color 0.2s;
}

.tab.active {
  color: var(--primary-color);
}

.tab-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  background: none;
  display: grid;
  place-items: center;
}

.tab-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.tab-icon svg path,
.tab-icon svg circle,
.tab-icon svg line {
  stroke: currentColor;
}

.tab-text {
  font-size: 12px;
}

/* 通用组件样式 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
  font-size: 18px;
  font-weight: bold;
  color: #07c160;
}

.more-link {
  font-size: 14px;
  color: var(--primary-color);
}

.podcasts-list {
  padding: 8px;
}

/* 播客卡片样式 */
.podcast-card {
  background-color: var(--card-background);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 26px rgba(7, 193, 96, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.podcast-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(7, 193, 96, 0.12);
}

.podcast-card-link {
  display: flex;
  padding: 12px;
}

.podcast-card-cover {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.podcast-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podcast-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  color: white;
  background: var(--primary-color);
}

.top-badge {
  background-color: var(--primary-color);
}

.hot-badge {
  background-color: #ff8a3d;
}

.podcast-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
}

.podcast-card-info {
  flex: 1;
  padding-left: 12px;
  display: flex;
  flex-direction: column;
}

.podcast-card-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 4px;
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.podcast-card-theme {
  font-size: 12px;
  color: var(--primary-color);
  margin-bottom: 6px;
}

.podcast-card-summary {
  font-size: 14px;
  color: var(--light-text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.podcast-card-meta {
  margin-top: auto;
  font-size: 12px;
  color: var(--light-text);
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.page-btn {
  padding: 8px 16px;
  border-radius: 999px;
  background-color: var(--primary-color);
  color: white;
  font-size: 14px;
  margin: 0 8px;
}

.page-current {
  font-size: 14px;
  color: var(--light-text);
}

/* 底部播放器 */
.audio-player {
  position: fixed;
  bottom: var(--footer-height);
  left: 0;
  right: 0;
  background-color: var(--card-background);
  box-shadow: 0 -6px 20px rgba(7, 193, 96, 0.08);
  padding: 12px 16px;
  z-index: 99;
  max-width: var(--max-width);
  margin: 0 auto;
  display: none;
  border: 1px solid var(--border-color);
  border-bottom: none;
}

.audio-player.active {
  display: block;
}

.player-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-info {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.player-cover {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  margin-right: 12px;
  flex-shrink: 0;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-details {
  flex: 1;
  min-width: 0;
}

.player-title {
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.player-progress {
  display: flex;
  flex-direction: column;
}

.progress-bar {
  height: 3px;
  background-color: var(--border-color);
  border-radius: 1.5px;
  position: relative;
  margin-bottom: 4px;
}

.progress-current {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 1.5px;
  width: 0;
}

.progress-time {
  font-size: 10px;
  color: var(--light-text);
}

.player-controls {
  display: flex;
  align-items: center;
  margin-left: 12px;
}

.control-btn {
  width: 32px;
  height: 32px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin: 0 4px;
}

.prev-btn {
  background-image: url("../images/prev.svg");
}

.play-btn {
  background-image: url("../images/play.svg");
}

.play-btn.playing {
  background-image: url("../images/pause.svg");
}

.next-btn {
  background-image: url("../images/next.svg");
}

.speed-btn {
  font-size: 12px;
  padding: 4px 6px;
  background-color: var(--border-color);
  border-radius: 4px;
  color: var(--text-color);
  margin-left: 8px;
}

/* 无内容提示 */
.no-podcasts,
.no-results {
  padding: 32px 16px;
  text-align: center;
  color: var(--light-text);
}

/* 响应式调整 */
@media (max-width: 480px) {
  .podcast-card-summary {
    display: none;
  }
}
