@import url("/common/css/ad-slot-layout.css");

* {
    box-sizing: border-box;
}

html,
body,
.fg-tpl-body {
    margin: 0;
    background: var(--fg-bg);
    color: var(--fg-text);
    font-family: var(--fg-font);
}

.fg-tpl-body a {
    color: inherit;
    text-decoration: none;
}

.fg-tpl-body img {
    display: block;
    width: 100%;
    max-width: 100%;
}

.fg-tpl-body h1,
.fg-tpl-body h2,
.fg-tpl-body h3,
.fg-tpl-body h4,
.fg-tpl-body h5,
.fg-tpl-body h6 {
    letter-spacing: 0;
}

.fg-home-shell,
.fg-category-page {
    width: min(100%, var(--fg-content-max));
    margin: 0 auto;
    padding: 24px 16px 56px;
}

.fg-home-hero {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(300px, 0.8fr);
    gap: 24px;
    min-width: 0;
}

.fg-hero-cover,
.fg-rank-panel,
.fg-card,
.fg-app-ad-strip,
.fg-category-head,
.fg-footer-note {
    background: var(--fg-surface);
    border: 1px solid var(--fg-border);
}

.fg-hero-cover {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: visible;
    padding: 26px;
}

.fg-hero-cover img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: fill;
    opacity: 0.92;
    filter: saturate(1.08) contrast(1.06);
}

.fg-hero-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 9, 11, 0.42), rgba(8, 9, 11, 0.04));
}

.fg-hero-cover strong,
.fg-hero-eyebrow,
.fg-hero-cover .fg-duration,
.fg-play-mark {
    position: relative;
    z-index: 1;
}

.fg-hero-eyebrow,
.fg-card-kicker,
.fg-section-head span,
.fg-category-head span {
    color: rgba(242, 139, 69, 0.72);
    font-size: 12px;
    font-weight: 600;
}

.fg-hero-cover strong {
    width: min(440px, 100%);
    margin-top: 8px;
    color: rgba(242, 243, 245, 0.68);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
}

.fg-play-mark {
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--fg-accent);
    opacity: 0.88;
}

.fg-play-mark::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 14px;
    border-left: 12px solid #fff;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.fg-hero-cover .fg-duration,
.fg-card-cover .fg-duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 3px 7px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 11px;
}

.fg-rank-panel {
    padding: 16px;
}

.fg-rank-panel--mobile {
    display: none;
}

.fg-rank-panel h2 {
    margin: 0 0 14px;
    color: var(--fg-text-secondary);
    font-size: 16px;
    font-weight: 500;
}

.fg-rank-item {
    display: grid;
    grid-template-columns: 30px 136px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--fg-border);
}

.fg-rank-item:last-child {
    border-bottom: 0;
}

.fg-rank-num {
    color: rgba(242, 139, 69, 0.78);
    font-weight: 700;
}

.fg-rank-item img {
    aspect-ratio: 16 / 9;
    object-fit: fill;
    filter: saturate(1.08) contrast(1.04);
}

.fg-rank-copy {
    min-width: 0;
}

.fg-rank-copy strong,
.fg-rank-copy em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fg-rank-copy strong {
    color: rgba(242, 243, 245, 0.58);
    font-size: 12px;
    font-weight: 400;
}

.fg-rank-copy em {
    color: var(--fg-muted);
    font-size: 12px;
    font-style: normal;
}

.fg-category-tabs {
    display: flex;
    gap: 12px;
    margin: 14px 0 42px;
    overflow-x: auto;
    scrollbar-width: none;
}

.fg-category-tabs::-webkit-scrollbar {
    display: none;
}

.fg-category-tabs a {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 11px 24px;
    border: 1px solid var(--fg-border);
    border-radius: 999px;
    background: var(--fg-surface);
    color: var(--fg-text-secondary);
    font-size: 14px;
}

.fg-category-tabs a.is-active {
    border-color: var(--fg-accent);
    background: var(--fg-accent);
    color: #100b08;
    font-weight: 700;
}

.fg-channel-head {
    margin: 40px 0 0;
}

.fg-channel-head span {
    color: rgba(242, 139, 69, 0.72);
    font-size: 12px;
    font-weight: 600;
}

.fg-channel-head h2 {
    margin: 6px 0 0;
    color: var(--fg-text-secondary);
    font-size: 24px;
    font-weight: 600;
}

.fg-section {
    margin-top: 48px;
}

.fg-section-head,
.fg-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.fg-section-head h2,
.fg-category-head h1 {
    margin: 6px 0 0;
    color: var(--fg-text-secondary);
    font-size: 24px;
    font-weight: 600;
}

.fg-section-head a,
.fg-category-head a {
    min-height: 40px;
    padding: 10px 18px;
    border: 1px solid var(--fg-border);
    color: var(--fg-text-secondary);
}

.fg-stagger-feed {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 0.72fr)) minmax(220px, 0.62fr);
    gap: 24px;
    align-items: start;
}

.fg-category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.fg-card {
    min-width: 0;
    overflow: visible;
}

.fg-card a {
    display: block;
}

.fg-stagger-feed .fg-card--lead {
    grid-row: span 2;
}

.fg-category-grid .fg-card {
    flex: 1 1 calc((100% - 90px) / 6);
}

.fg-category-grid .fg-card--ad {
    flex: 0 0 calc((100% - 5px) / 2);
    max-width: calc((100% - 5px) / 2);
}

.fg-card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #1c2025;
    overflow: visible;
}

.fg-stagger-feed .fg-card--lead .fg-card-cover {
    aspect-ratio: 4 / 3;
}

.fg-card-cover img {
    height: 100%;
    object-fit: fill;
    filter: saturate(1.08) contrast(1.05);
    transition: filter var(--fg-transition);
}

.fg-card-cover .fg-play-mark {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: 28px;
    height: 28px;
    margin: 0;
    z-index: 2;
}

.fg-card-cover .fg-play-mark::after {
    left: 11px;
    top: 8px;
    border-left-width: 8px;
    border-top-width: 6px;
    border-bottom-width: 6px;
}

.fg-card:hover .fg-card-cover img {
    filter: saturate(1.16) contrast(1.08);
}

.fg-card--ad .fg-card-cover {
    height: var(--ad-slot-strip-li-h, 6.875rem);
    min-height: var(--ad-slot-strip-li-h, 6.875rem);
    aspect-ratio: auto;
    overflow: visible;
    border-radius: 0;
}

.fg-card--ad .fg-card-cover img {
    height: 100%;
    object-fit: fill;
    border-radius: 0;
}

.fg-card-body {
    padding: 10px 12px 12px;
}

.fg-card-body h3 {
    display: -webkit-box;
    margin: 4px 0 6px;
    overflow: hidden;
    color: rgba(242, 243, 245, 0.76);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.32;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.fg-card-body p {
    margin: 0;
    color: rgba(133, 139, 146, 0.72);
    font-size: 11px;
}

.fg-list-banners {
    margin: 16px 0;
    padding: 0 var(--fg-gap);
}

.fg-top-banners {
    margin-top: 16px;
}

.fg-list-banners ul,
.fg-top-banners ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 28px 0;
    padding: 0;
    list-style: none;
}

.fg-ad-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 28px 0;
    padding: 0;
    list-style: none;
}

.fg-list-banners a,
.fg-top-banners a {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: var(--ad-slot-banner-cover-ar-n) / var(--ad-slot-banner-cover-ar-d);
    border: 1px solid #5a351f;
    border-radius: 0;
    background: linear-gradient(90deg, #1c1714, #c86f36);
    overflow: visible;
}

.fg-ad-row a {
    display: block;
    aspect-ratio: var(--ad-slot-banner-cover-ar-n) / var(--ad-slot-banner-cover-ar-d);
    border: 1px solid #5a351f;
    border-radius: 0;
    background: linear-gradient(90deg, #1c1714, #c86f36);
    overflow: visible;
}

.fg-list-banners img,
.fg-top-banners img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 0;
}

.fg-ad-row img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 0;
}

.fg-list-banners li,
.fg-top-banners li {
    min-width: 0;
}

.fg-scroll-container {
    margin: 32px 0;
    border: 1px solid var(--fg-border);
    background: var(--fg-surface);
}

.fg-scroll-wrapper {
    --fg-scroll-item: 78px;
    --fg-scroll-gap: 8px;
    overflow: hidden;
    cursor: grab;
    touch-action: pan-y;
}

.fg-scroll-wrapper--dragging {
    cursor: grabbing;
}

.fg-scroll-track {
    display: flex;
    width: max-content;
    animation: fg-app-ad-scroll-left-step 64s linear infinite;
}

.fg-scroll-wrapper--marquee:hover .fg-scroll-track {
    animation-play-state: paused;
}

.fg-scroll-track-group {
    display: flex;
    gap: var(--fg-scroll-gap);
    padding: 14px var(--fg-scroll-gap) 14px 14px;
}

.fg-scroll-wrapper a {
    flex: 0 0 var(--fg-scroll-item);
    width: var(--fg-scroll-item);
    color: var(--fg-text-secondary);
    text-align: center;
    font-size: 11px;
}

.fg-scroll-wrapper img {
    width: 58px;
    height: 58px;
    margin: 0 auto 6px;
    object-fit: fill;
}

@keyframes fg-app-ad-scroll-left-step {
    0% {
        transform: translate3d(0, 0, 0);
    }
    3.125% {
        transform: translate3d(-3.125%, 0, 0);
    }
    6.25% {
        transform: translate3d(-3.125%, 0, 0);
    }
    9.375% {
        transform: translate3d(-6.25%, 0, 0);
    }
    12.5% {
        transform: translate3d(-6.25%, 0, 0);
    }
    15.625% {
        transform: translate3d(-9.375%, 0, 0);
    }
    18.75% {
        transform: translate3d(-9.375%, 0, 0);
    }
    21.875% {
        transform: translate3d(-12.5%, 0, 0);
    }
    25% {
        transform: translate3d(-12.5%, 0, 0);
    }
    28.125% {
        transform: translate3d(-15.625%, 0, 0);
    }
    31.25% {
        transform: translate3d(-15.625%, 0, 0);
    }
    34.375% {
        transform: translate3d(-18.75%, 0, 0);
    }
    37.5% {
        transform: translate3d(-18.75%, 0, 0);
    }
    40.625% {
        transform: translate3d(-21.875%, 0, 0);
    }
    43.75% {
        transform: translate3d(-21.875%, 0, 0);
    }
    46.875% {
        transform: translate3d(-25%, 0, 0);
    }
    50% {
        transform: translate3d(-25%, 0, 0);
    }
    53.125% {
        transform: translate3d(-28.125%, 0, 0);
    }
    56.25% {
        transform: translate3d(-28.125%, 0, 0);
    }
    59.375% {
        transform: translate3d(-31.25%, 0, 0);
    }
    62.5% {
        transform: translate3d(-31.25%, 0, 0);
    }
    65.625% {
        transform: translate3d(-34.375%, 0, 0);
    }
    68.75% {
        transform: translate3d(-34.375%, 0, 0);
    }
    71.875% {
        transform: translate3d(-37.5%, 0, 0);
    }
    75% {
        transform: translate3d(-37.5%, 0, 0);
    }
    78.125% {
        transform: translate3d(-40.625%, 0, 0);
    }
    81.25% {
        transform: translate3d(-40.625%, 0, 0);
    }
    84.375% {
        transform: translate3d(-43.75%, 0, 0);
    }
    87.5% {
        transform: translate3d(-43.75%, 0, 0);
    }
    90.625% {
        transform: translate3d(-46.875%, 0, 0);
    }
    93.75% {
        transform: translate3d(-46.875%, 0, 0);
    }
    96.875% {
        transform: translate3d(-50%, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.fg-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
}

.fg-pagination a,
.fg-pagination span {
    min-width: 40px;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--fg-border);
    color: var(--fg-text-secondary);
    text-align: center;
}

.fg-pagination .is-active {
    border-color: var(--fg-accent);
    background: var(--fg-accent);
    color: #100b08;
}

@media (max-width: 1023.98px) {
    .fg-home-hero,
    .fg-stagger-feed {
        grid-template-columns: 1fr;
    }

    .fg-hero-cover {
        min-height: 420px;
        padding: 24px;
    }

    .fg-category-grid .fg-card {
        flex: 1 1 calc((100% - 18px) / 2);
    }

    .fg-category-grid .fg-card--ad {
        flex-basis: 100%;
        max-width: 100%;
    }

}

@media (max-width: 767.98px) {
    .fg-home-shell,
    .fg-category-page {
        padding: 16px 10px 40px;
    }

    .fg-hero-cover {
        min-height: 300px;
        padding: 16px;
    }

    .fg-hero-cover strong {
        font-size: 18px;
    }

    .fg-rank-panel {
        padding: 18px;
    }

    .fg-rank-panel--desktop {
        display: none;
    }

    .fg-rank-panel--mobile {
        display: block;
        margin: 28px 0;
    }

    .fg-channel-head {
        margin-top: 28px;
    }

    .fg-channel-head h2 {
        font-size: 21px;
    }

    .fg-category-tabs {
        margin: 28px 0;
    }

    .fg-category-tabs a {
        min-height: 36px;
        padding: 9px 18px;
    }

    .fg-section-head,
    .fg-category-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .fg-section-head h2,
    .fg-category-head h1 {
        font-size: 21px;
    }

    .fg-list-banners ul,
    .fg-top-banners ul {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fg-ad-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fg-card--ad .fg-card-cover {
        height: var(--ad-slot-strip-li-h-sm, 2.8125rem);
        min-height: var(--ad-slot-strip-li-h-sm, 2.8125rem);
    }
}
