/* style-rankings.css - Rankings pages (rankings.html, best-anime-YYYY.html, top-100-anime.html) */

.rk-page { max-width: 980px; }
.rk-page .site-logo-link-small { text-decoration: none; }
.rk-page .blog-post-meta a, .rk-source a, .rk-more a { color: var(--primary-color); }
.rk-page h2 { font-size: 1.5rem; }

/* year bar */
.rk-years { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin: 6px 0 12px; scrollbar-width: thin; }
.rk-year { flex: 0 0 auto; padding: 6px 12px; border-radius: 16px; font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--text-color) !important; background: var(--tile-bg); border: 1px solid var(--tile-border); }
.rk-year:hover { border-color: var(--primary-color); }
.rk-year.on { background: var(--primary-color); border-color: var(--primary-color); color: #fff !important; }

/* tabs */
.rk-tabs { display: none; gap: 6px; flex-wrap: wrap; border-bottom: 2px solid var(--tile-border); margin-bottom: 4px; }
.rk-js .rk-tabs { display: flex; }
.rk-tab { padding: 10px 16px; font-weight: 700; text-decoration: none; color: var(--text-muted-color) !important; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.rk-tab:hover { color: var(--text-color) !important; }
.rk-tab.on { color: var(--primary-color) !important; border-bottom-color: var(--primary-color); }
.rk-section { padding-top: 4px; }
.rk-section h2 { margin-top: 18px !important; }

/* Highest rated / most popular switch */
.rk-toggle { display: inline-flex; padding: 4px; border-radius: 24px; background: var(--tile-bg); border: 1px solid var(--tile-border); margin: 0 0 14px; }
.rk-tbtn { font: 600 .92rem 'Poppins', sans-serif; padding: 8px 16px; border-radius: 20px; border: none; background: none; color: var(--text-color); cursor: pointer; }
.rk-tbtn.on { background: var(--primary-color); color: #fff; }

/* numbered list (anime, studios, voice actors) */
.rk-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rk-item { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px; background: var(--tile-bg); border: 1px solid var(--tile-border); }
.rk-item img { width: 80px; height: 114px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; margin: 0; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.rk-poster-ph { width: 80px; height: 114px; border-radius: 8px; }
.rk-person img, .rk-person .rk-initial { width: 72px; height: 72px; border-radius: 50%; object-position: top; }
.rk-info { min-width: 0; flex: 1; }
.rk-info h3 { margin: 0 0 2px !important; font-size: 1.08rem !important; color: var(--text-color) !important; }
.rk-sub, .rk-sub-inline { color: var(--text-muted-color); font-size: .82rem; }
.rk-meta { color: var(--text-muted-color); font-size: .86rem; margin-top: 3px; }
.rk-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-weight: 700; font-size: .92rem; }
.rk-num { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 700 1.05rem 'Poppins', sans-serif; background: color-mix(in srgb, var(--primary-color) 18%, transparent); color: var(--primary-color); }
.rk-top1 { background: linear-gradient(135deg, #ffd54a, #f0a500); color: #3a2a00; }
.rk-top2 { background: linear-gradient(135deg, #e3e7ec, #a9b3bf); color: #26303a; }
.rk-top3 { background: linear-gradient(135deg, #f0b27a, #c26a2c); color: #3a1e08; }

/* character grid */
.rk-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.rk-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 8px 10px; border-radius: 14px; background: var(--tile-bg); border: 1px solid var(--tile-border); }
.rk-card .rk-num { position: absolute; top: 6px; left: 6px; width: 30px; height: 30px; font-size: .85rem; }
.rk-card img, .rk-card .rk-initial { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: top; margin: 0 0 4px; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.rk-card b { font-size: .92rem; line-height: 1.2; }
.rk-card small { color: var(--text-muted-color); font-size: .75rem; line-height: 1.2; }
.rk-fav { font-weight: 700; font-size: .85rem; margin-top: 2px; }
.rk-initial { display: flex; align-items: center; justify-content: center; font: 700 2rem 'Poppins', sans-serif; color: #fff; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, #7b5cff)); flex: 0 0 auto; }

.rk-note { color: var(--text-muted-color); font-size: .85rem; margin-top: 12px; }
.rk-source { color: var(--text-muted-color); font-size: .82rem; margin-top: 22px; }
.rk-more h2 { font-size: 1.3rem !important; }

/* hub */
.rk-hero { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin: 16px 0 6px; border-radius: 16px; text-decoration: none; color: var(--text-color) !important; background: linear-gradient(135deg, color-mix(in srgb, #ffd54a 30%, transparent), color-mix(in srgb, var(--primary-color) 20%, transparent)); border: 2px solid #f0a500; transition: transform .15s ease; }
.rk-hero:hover { transform: translateY(-3px); }
.rk-hero > span:first-child { font-size: 2.4rem; }
.rk-hero b { display: block; font-size: 1.15rem; } .rk-hero small { color: var(--text-muted-color); }
.rk-yeargrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.rk-yeargrid a { display: block; text-align: center; padding: 10px 6px; border-radius: 12px; font-weight: 700; text-decoration: none; color: var(--text-color) !important; background: var(--tile-bg); border: 1px solid var(--tile-border); transition: transform .12s ease, border-color .12s ease; }
.rk-yeargrid a:hover { transform: translateY(-2px); border-color: var(--primary-color); }

@media (max-width: 640px) {
    .rk-page { padding: 18px 12px !important; }
    .rk-item { gap: 10px; padding: 8px 10px; }
    .rk-item img, .rk-poster-ph { width: 62px; height: 88px; }
    .rk-person img, .rk-person .rk-initial { width: 56px; height: 56px; }
    .rk-num { width: 30px; height: 30px; font-size: .9rem; }
    .rk-info h3 { font-size: .98rem !important; }
    .rk-tab { padding: 8px 10px; font-size: .9rem; }
    .rk-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
    .rk-card img, .rk-card .rk-initial { width: 76px; height: 76px; }
}

/* links inside page text: use the theme color instead of the browser's default blue/purple */
.rk-page .blog-post-content a, .rk-page .blog-post-meta a, .rk-page .rk-source a { color: var(--primary-color) !important; text-decoration: none; font-weight: 600; }
.rk-page .blog-post-content a:hover, .rk-page .blog-post-meta a:hover, .rk-page .rk-source a:hover { text-decoration: underline; }
.rk-page .rk-yeargrid a, .rk-page .rk-hero { color: var(--text-color) !important; font-weight: 700; text-decoration: none !important; }
