/* Rockbox 专区样式（面板 + 三个分区） */

.rb-panel {
  max-width: 1080px;
  width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.rb-tabs {
  display: flex;
  gap: 6px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line, #e6e6ea);
  flex: 0 0 auto;
}

.rb-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted, #6b6b76);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.rb-tab.on {
  color: var(--text, #1c1c1e);
  border-bottom-color: var(--brand, #0066cc);
}

.rb-body {
  padding: 18px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.rb-state {
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted, #6b6b76);
  font-size: 14px;
}

.rb-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-muted, #6b6b76);
  line-height: 1.7;
}

/* ---- Rockbox 下载 ---- */
.rb-util-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.rb-util-card {
  border: 1px solid var(--line, #e6e6ea);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
  background: var(--surface-2, #fafafc);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.rb-util-ico {
  font-size: 26px;
  line-height: 1;
}

.rb-util-name {
  font-size: 16px;
  font-weight: 600;
}

.rb-util-meta {
  font-size: 12px;
  color: var(--text-muted, #6b6b76);
}

.rb-dl {
  display: inline-block;
  margin-top: 4px;
  text-decoration: none;
}

.rb-dl-na {
  font-size: 12px;
  color: var(--text-muted, #6b6b76);
}

/* ---- 版本分组（Rockbox 下载） ---- */
.rb-ver-head,
.rb-ver-sub {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 18px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1c1c1e);
}

.rb-ver-sub {
  margin: 16px 0 0;
  font-size: 13px;
}

.rb-ver-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted, #6b6b76);
}

.rb-old-wrap {
  margin: 18px 0 0;
  text-align: center;
}

.rb-ver-groups {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px dashed var(--line, #e6e6ea);
}

.rb-ver-group + .rb-ver-group {
  margin-top: 4px;
}

.rb-ver-group .rb-fw-grid {
  margin-top: 8px;
}

/* ---- 系统要求（可折叠） ---- */
.rb-req {
  margin: 16px 0 0;
  border: 1px solid var(--line, #e6e6ea);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--surface-2, #fafafc);
}

.rb-req summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1c1c1e);
}

.rb-req .rb-guide {
  margin-top: 10px;
}

/* ---- iPod 主题：机型 ---- */
.rb-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.rb-model-card {
  appearance: none;
  border: 1px solid var(--line, #e6e6ea);
  border-radius: 14px;
  background: var(--surface-2, #fafafc);
  padding: 16px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  text-align: left;
  transition: border-color 0.15s, transform 0.15s;
}

.rb-model-card:hover {
  border-color: var(--brand, #0066cc);
  transform: translateY(-1px);
}

.rb-model-name {
  font-size: 15px;
  font-weight: 600;
}

.rb-model-count {
  font-size: 12px;
  color: var(--text-muted, #6b6b76);
}

/* ---- iPod 主题：列表 ---- */
.rb-back-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.rb-list-title {
  font-size: 16px;
  margin: 0;
  flex: 1 1 auto;
}

.rb-list-count {
  font-size: 12px;
  color: var(--text-muted, #6b6b76);
}

.rb-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.rb-theme-card {
  border: 1px solid var(--line, #e6e6ea);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-2, #fafafc);
}

.rb-thumb {
  width: 100%;
  height: 108px;
  object-fit: contain;
  background: #f2f2f5;
  border-radius: 8px;
  display: block;
}

.rb-thumb-na {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #6b6b76);
}

.rb-theme-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rb-theme-meta,
.rb-theme-author {
  font-size: 11px;
  color: var(--text-muted, #6b6b76);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rb-more-wrap {
  text-align: center;
  margin: 18px 0 4px;
}

/* ---- 其他 ---- */
.rb-section {
  margin-bottom: 26px;
}

.rb-sec-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
}

.rb-guide {
  font-size: 13px;
  line-height: 1.85;
  color: var(--text, #1c1c1e);
}

.rb-guide ol,
.rb-guide ul {
  margin: 8px 0;
  padding-left: 22px;
}

.rb-guide li {
  margin: 4px 0;
}

.rb-fw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.rb-fw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line, #e6e6ea);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface-2, #fafafc);
}

.rb-fw-name {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 600;
}

.rb-fw-size {
  font-size: 12px;
  color: var(--text-muted, #6b6b76);
}

.rb-links {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.9;
}

.rb-links a {
  color: var(--brand, #0066cc);
}

@media (max-width: 520px) {
  .rb-body { padding: 14px; }
  .rb-theme-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .rb-thumb { height: 88px; }
}
