/* ===========================
   Typing Videos Index Page
   =========================== */

/* --- Header --- */
.tvi-header {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 2rem 0;
}

.tvi-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.tvi-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.tvi-title i {
  color: var(--accent);
}

.tvi-count {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.tvi-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Filters (reuse ranking-filter classes from rankings.css) --- */
.tvi-filters {
  position: sticky;
  top: var(--topbar-height);
  z-index: 5;
  background: var(--body-bg);
  padding: 0.75rem 2rem 0.5rem;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

/* --- Card Grid --- */
.tvi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
  max-width: 960px;
  margin: 0.75rem auto 0;
  padding: 0 2rem;
}

/* --- Song link inside card --- */
.tvi-song {
  margin-top: 0.2rem;
  font-size: 0.72rem;
}

.tvi-song a {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.tvi-song a:hover {
  color: var(--accent);
}

/* --- Pagination --- */
.tvi-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.5rem 2rem;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.tvi-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tvi-page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.tvi-page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.tvi-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 36px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Empty State --- */
.tvi-empty {
  text-align: center;
  padding: 3rem 2rem;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  color: var(--text-muted);
}

.tvi-empty i {
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.tvi-empty-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.tvi-empty-text {
  font-size: 0.85rem;
}

/* --- CTA Link --- */
.tvi-cta {
  text-align: center;
  padding: 0.5rem 2rem 2rem;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.tvi-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tvi-cta-link:hover {
  background: var(--hover-bg, rgba(255, 255, 255, 0.05));
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
  .tvi-header {
    padding: 1rem 1.25rem 0;
  }

  .tvi-filters {
    padding: 0.5rem 1.25rem 0.375rem;
  }

  .tvi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1.25rem;
  }
}

@media (max-width: 480px) {
  .tvi-header {
    padding: 0.75rem 1rem 0;
  }

  .tvi-title {
    font-size: 1.1rem;
  }

  .tvi-filters {
    padding: 0.5rem 1rem 0.25rem;
  }

  .tvi-grid {
    grid-template-columns: 1fr;
    padding: 0 0.75rem;
  }
}
