/* === Home Page Styles === */

.page {
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
}

/* Help button in top bar */
.help-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.help-btn:active {
  background: var(--border);
}

/* Category tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  border: none;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cat-tab:active {
  transform: scale(0.96);
}
.cat-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(91,76,219,0.3);
}

/* Score list */
.score-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.score-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}

.score-card:active {
  background: var(--bg);
}

.score-cover {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}

.score-info {
  flex: 1;
  min-width: 0;
}

.score-name {
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
}

.page-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Help modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-content h2 {
  font-size: 1.2rem;
  margin: 0 0 16px;
  color: var(--primary);
}

.help-body h3 {
  font-size: 0.95rem;
  margin: 16px 0 8px;
  color: var(--text);
}
.help-body h3:first-child {
  margin-top: 0;
}

.help-body p,
.help-body li {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.help-body ul {
  padding-left: 18px;
  margin: 4px 0;
}

.help-body li {
  margin: 4px 0;
}

.help-body b {
  color: var(--text);
}
