/* Ranking article pages */

.ranking-hero {
    background: linear-gradient(135deg, #f0e6ff 0%, #e8d5ff 100%);
    padding: 52px 24px 44px;
    text-align: center;
    border-bottom: 2px solid #CF9FFF;
}

.ranking-hero .tag {
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #7B2FBE;
    margin-bottom: 14px;
}

.ranking-hero h1 {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: #1a1a1a;
    line-height: 1.15;
    max-width: 820px;
    margin: 0 auto 14px;
    border: none;
    padding: 0;
}

.ranking-hero .subtitle {
    font-style: italic;
    color: #666;
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

/* Wrap */
.ranking-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 24px 60px;
}

.ranking-wrap > p {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.05rem;
    color: #333;
    margin-bottom: 22px;
    line-height: 1.8;
}

/* Intro quote */
.intro-quote {
    border-left: 4px solid #CF9FFF;
    padding: 12px 20px;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: #555;
    font-size: 1.05rem;
    margin-bottom: 36px;
    background: #f7f0ff;
    border-radius: 0 6px 6px 0;
}

/* Ranking list */
.ranking-list {
    margin-top: 48px;
}

.rank-entry {
    display: grid;
    grid-template-columns: 48px 100px 1fr;
    gap: 0 20px;
    border-top: 1px solid #e5d4f7;
    padding: 32px 0;
    align-items: start;
}

.rank-poster {
    width: 100px;
    aspect-ratio: 2 / 3;
    border-radius: 4px;
    background: #f0e6ff;
    overflow: hidden;
    border: 1px solid #e5d4f7;
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.rank-entry:last-child {
    border-bottom: 1px solid #e5d4f7;
}

.rank-num {
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 2.8rem;
    color: #CF9FFF;
    line-height: 1;
    padding-top: 4px;
}

.rank-entry.gold   .rank-num { color: #d4af37; }
.rank-entry.silver .rank-num { color: #a8a9ad; }
.rank-entry.bronze .rank-num { color: #c77c40; }

.rank-content h2 {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.25rem;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.3;
}

.rank-meta {
    font-family: 'Trebuchet MS', Arial, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 10px;
}

.stars {
    display: inline-block;
    font-size: 0.95rem;
    color: #7B2FBE;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.rank-content p {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 0.98rem;
    color: #444;
    margin-bottom: 0;
    line-height: 1.78;
}

/* Closing note */
.closing-note {
    font-family: Georgia, 'Times New Roman', Times, serif;
    margin-top: 52px;
    font-style: italic;
    color: #666;
    font-size: 1rem;
    border-top: 1px solid #e5d4f7;
    padding-top: 28px;
    line-height: 1.8;
}

/* Related Posts */
.related-posts {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.related-posts h2 {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.4rem;
    color: #1a1a1a;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #CF9FFF;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.related-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
}

.related-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: top;
    border-radius: 6px;
    display: block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.related-card img:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.related-card-title {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.4;
}

.related-card:hover .related-card-title {
    color: #7B2FBE;
    text-decoration: underline;
}

/* Dark mode */
[data-theme="dark"] .ranking-hero {
    background: linear-gradient(135deg, #1e1040 0%, #160d30 100%);
    border-bottom-color: #3a1f6e;
}

[data-theme="dark"] .ranking-hero h1 { color: #f0e6ff; }
[data-theme="dark"] .ranking-hero .tag { color: #CF9FFF; }
[data-theme="dark"] .ranking-hero .subtitle { color: #aaa; }

[data-theme="dark"] .ranking-wrap > p { color: #d0d0d0; }

[data-theme="dark"] .intro-quote {
    background: rgba(90, 45, 158, 0.18);
    border-left-color: #7B2FBE;
    color: #ccc;
}

[data-theme="dark"] .rank-entry { border-top-color: #2a2a2a; }
[data-theme="dark"] .rank-entry:last-child { border-bottom-color: #2a2a2a; }

[data-theme="dark"] .rank-poster {
    background: #1e1e1e;
    border-color: #333;
}

[data-theme="dark"] .rank-content h2 { color: #f0e6ff; }
[data-theme="dark"] .rank-meta { color: #777; }
[data-theme="dark"] .rank-content p { color: #ccc; }

[data-theme="dark"] .closing-note {
    color: #aaa;
    border-top-color: #2a2a2a;
}

[data-theme="dark"] .related-posts h2 {
    color: #f0e6ff;
    border-bottom-color: #3a1f6e;
}

[data-theme="dark"] .related-card-title { color: #ccc; }

@media (max-width: 768px) {
    .ranking-hero {
        padding: 36px 16px 32px;
    }

    .ranking-wrap {
        padding: 32px 16px 48px;
    }

    .rank-entry {
        grid-template-columns: 40px 80px 1fr;
        gap: 0 12px;
    }

    .rank-num {
        font-size: 2rem;
    }

    .rank-poster {
        width: 80px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-posts {
        padding: 0 16px 60px;
    }
}
