/* ===========================
   Typing Video Ranking Page Styles
   =========================== */

/* --- Filter Section --- */
.typing-video-ranking-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 List --- */
.typing-video-ranking-list {
  width: 100%;
  max-width: 960px;
  margin: 0.75rem auto 0;
  padding: 0 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* --- Card --- */
.typing-video-ranking-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.typing-video-ranking-card:hover {
  border-color: rgba(var(--accent-rgb), 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* --- Rank Number --- */
.typing-video-ranking-rank {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 50%;
}
.typing-video-ranking-rank.rank-gold {
  background: linear-gradient(135deg, var(--medal-gold) 0%, var(--medal-gold-dim) 100%);
  color: var(--medal-gold-text);
  font-weight: 900;
}
.typing-video-ranking-rank.rank-silver {
  background: linear-gradient(135deg, var(--medal-silver) 0%, var(--medal-silver-dim) 100%);
  color: var(--medal-silver-text);
  font-weight: 900;
}
.typing-video-ranking-rank.rank-bronze {
  background: linear-gradient(135deg, var(--medal-bronze) 0%, var(--medal-bronze-dim) 100%);
  color: #fff;
  font-weight: 900;
}

/* --- Thumbnail --- */
.typing-video-ranking-thumb {
  position: relative;
  flex-shrink: 0;
  width: 160px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(var(--accent-rgb), 0.05);
  display: block;
}
.typing-video-ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Platform Badge (overlay on thumbnail) --- */
.typing-video-ranking-platform {
  position: absolute;
  bottom: 4px;
  left: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.8rem;
}

/* --- Info Area --- */
.typing-video-ranking-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* --- Title --- */
.typing-video-ranking-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  transition: color 0.2s;
}
.typing-video-ranking-title:hover {
  color: var(--accent);
  text-decoration: none;
}

/* --- Meta (user + source song) --- */
.typing-video-ranking-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.typing-video-ranking-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.typing-video-ranking-user {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  flex-shrink: 0;
}
.typing-video-ranking-user:hover {
  color: var(--accent);
  text-decoration: none;
}

/* --- Stats (views + likes) --- */
.typing-video-ranking-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.typing-video-ranking-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.typing-video-ranking-stats i {
  font-size: 0.75rem;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
  .typing-video-ranking-filters {
    padding: 0.5rem 1.25rem 0.375rem;
  }
  .typing-video-ranking-list {
    padding: 0 1.25rem 2rem;
  }
  .typing-video-ranking-thumb {
    width: 120px;
  }
}

@media (max-width: 640px) {
  .typing-video-ranking-filters {
    padding: 0.5rem 1rem 0.25rem;
  }
  .typing-video-ranking-list {
    padding: 0.5rem 0.75rem 2rem;
  }
  .typing-video-ranking-card {
    gap: 0.5rem;
    padding: 0.625rem;
  }
  .typing-video-ranking-thumb {
    width: 100px;
  }
  .typing-video-ranking-rank {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
  }
  .typing-video-ranking-title {
    font-size: 0.82rem;
  }
  .typing-video-ranking-meta {
    font-size: 0.72rem;
    flex-wrap: wrap;
  }
  .typing-video-ranking-stats {
    font-size: 0.75rem;
  }
}

@media (max-width: 400px) {
  .typing-video-ranking-thumb {
    width: 80px;
  }
  .typing-video-ranking-meta span:last-child {
    display: none;
  }
}
