/* Shared affiliate toplist styles (used by guide pages) */
.toplist {
    margin: 40px 0;
}

.toplist-item {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border, #E8E5F0);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
    gap: 1.5rem;
    transition: box-shadow 0.3s, transform 0.15s;
    position: relative;
}

.toplist-item:hover {
    box-shadow: 0 4px 20px rgba(80, 58, 168, 0.08);
    transform: translateY(-2px);
}

.toplist-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--accent-purple, #503AA8);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.toplist-rank {
    background: var(--accent-purple, #503AA8);
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toplist-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: 6px;
}

.toplist-logo {
    width: 120px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 8px;
    border: 1px solid var(--border, #E8E5F0);
}

.toplist-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.toplist-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text, #111);
    margin-bottom: 0.2rem;
}

.toplist-bonus {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-purple, #503AA8);
}

.toplist-stars {
    display: flex;
    gap: 1px;
    font-size: 0;
}

.toplist-stars .star {
    color: #FFEE58;
    font-size: 14px;
}

.toplist-stars .star.half {
    position: relative;
    color: #ddd;
}

.toplist-stars .star.half::before {
    content: "\2605";
    position: absolute;
    left: 0;
    overflow: hidden;
    width: 50%;
    color: #FFEE58;
}

.toplist-stars .star.empty {
    color: #ddd;
}

.toplist-cta {
    flex-shrink: 0;
}

a.btn-play,
.toplist-cta a.btn-play {
    display: inline-block;
    background: var(--accent-purple, #503AA8);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background 0.3s, transform 0.15s;
    white-space: nowrap;
}

a.btn-play:hover,
.toplist-cta a.btn-play:hover {
    background: #3f2d8a;
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}

.show-more-toggle {
    display: none;
}

.show-more-content {
    display: none;
}

.show-more-toggle:checked ~ .show-more-content {
    display: block;
}

.show-more-label {
    display: block;
    text-align: center;
    padding: 12px 30px;
    margin: 1rem auto;
    background: var(--light-bg, #F8F7FC);
    color: var(--accent-purple, #503AA8);
    border: 2px solid var(--accent-purple, #503AA8);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    width: fit-content;
}

.show-more-label:hover {
    background: var(--accent-purple, #503AA8);
    color: white;
}

.show-more-toggle:checked ~ .show-more-label {
    display: none;
}

.page-header .trusted-badge {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 1.2rem;
    letter-spacing: 0.2px;
}

.page-header .trust-block {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    opacity: 0.95;
    margin: 1.2rem auto 0;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    max-width: 760px;
    color: #fff;
}

.page-header .trust-block a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.4);
    text-underline-offset: 2px;
}

.page-header .trust-block a:hover {
    text-decoration-color: #fff;
}

.page-header .trust-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    object-fit: cover;
    margin-right: 4px;
}

/* Mobile trust-block sizing is consolidated in the .toplist mobile block below */

.toplist-intro {
    margin-top: 2rem;
}

.toplist-intro p {
    color: #555;
    font-size: 0.95rem;
    margin: 0.4rem 0 0;
}

@media (max-width: 768px) {
    /* Compress the guide hero on mobile so the affiliate table starts above the fold */
    .page-header {
        padding: 18px 0 14px !important;
    }
    .page-header h1 {
        font-size: 1.3rem !important;
        line-height: 1.25 !important;
    }
    .page-header .subtitle {
        display: none;
    }
    .page-header .trusted-badge {
        display: none;
    }
    /* Keep the author/trust-block visible on mobile, just compact */
    .page-header .trust-block {
        font-size: 0.66rem;
        line-height: 1.35;
        padding: 6px 10px;
        gap: 4px;
        margin: 0.6rem auto 0;
        max-width: 100%;
    }
    .page-header .trust-avatar {
        width: 24px;
        height: 24px;
        margin-right: 2px;
    }

    /* Pull the toplist tight against the hero on mobile */
    .content {
        padding: 8px 0 !important;
    }
    .toplist-intro {
        margin-top: 0 !important;
    }
    .toplist-intro h2 {
        font-size: 1.1rem !important;
        margin: 0 0 0.2rem !important;
    }
    .toplist-intro p {
        font-size: 0.82rem;
        line-height: 1.4;
    }
    .toplist {
        margin: 14px 0 !important;
    }

    /* Compact horizontal row on mobile so a full item fits above the fold */
    .toplist-item {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 0.6rem 0.7rem;
        gap: 0.7rem;
        margin-bottom: 0.6rem;
    }
    .toplist-rank {
        width: 24px;
        height: 24px;
        font-size: 0.72rem;
    }
    .toplist-logo {
        width: 70px;
        height: 50px;
        padding: 4px;
    }
    .toplist-stars {
        gap: 0;
    }
    .toplist-stars .star {
        font-size: 11px;
    }
    .toplist-name {
        font-size: 0.92rem;
        margin-bottom: 0.1rem;
    }
    .toplist-bonus {
        font-size: 0.78rem;
        line-height: 1.25;
    }
    .toplist-badge {
        font-size: 0.62rem;
        padding: 2px 8px;
        top: -8px;
        right: 8px;
    }
    a.btn-play,
    .toplist-cta a.btn-play {
        padding: 8px 14px;
        font-size: 0.78rem;
    }
}
