/* Frontend Shell */
:root {
    --frontend-max-width: 1120px;
    --frontend-gap: 20px;
    --frontend-radius: 6px;
    --frontend-card-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.frontend-body {
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.92) 42%, rgba(226, 232, 240, 0.9) 100%);
    min-height: 100vh;
}

.frontend-main {
    width: 100%;
}

.frontend-page-shell {
    width: 100%;
    max-width: var(--frontend-max-width);
    margin: 0 auto;
}

.category-main-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--frontend-gap);
    align-items: start;
}

.category-page-layout {
    overflow: visible !important;
}

.category-main-left,
.category-main-right {
    min-width: 0;
}

.category-main-right {
    position: relative;
    align-self: start;
}

.category-sidebar-sticky {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .05em;
    color: #0f172a;
    text-transform: uppercase;
}

.category-sidebar-title::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.12);
}

.category-popular-stack,
.category-ad-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stream-feed-card:hover,
.related-card:hover {
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1) !important;
}

.related-card {
    position: relative;
    display: block !important;
    text-decoration: none;
    color: #fff !important;
    border-radius: 6px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
    transition: transform .2s ease, box-shadow .2s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.18) !important;
}

.related-card-media {
    position: relative;
    width: 100%;
    height: 188px !important;
    background: #e2e8f0;
    overflow: hidden;
}

.related-card-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform .28s ease;
}

.related-card:hover .related-card-media img {
    transform: scale(1.05);
}

.related-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.06) 12%, rgba(2, 6, 23, 0.82) 100%);
}

.related-card-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 14px 13px;
    z-index: 1;
}

.related-card-title {
    font-size: 15px;
    line-height: 1.35;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-tag {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

.frontpage-canvas-frame {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
}

.frontpage-canvas-stage {
    width: 1060px;
    transform-origin: top left;
}

.breaking-card {
    height: 310px !important;
}

.breaking-card-media {
    height: 182px !important;
}

.breaking-card-media img {
    width: 100% !important;
    height: 182px !important;
    object-fit: cover !important;
    object-position: center center !important;
}

.breaking-card-content {
    gap: 10px !important;
}

.breaking-card-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
    min-height: calc(1.35em * 3) !important;
    max-height: calc(1.35em * 3) !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
}

.home-section-card {
    height: 290px !important;
}

.home-section-card-media {
    height: 210px !important;
}

.home-section-card-media img {
    width: 100% !important;
    height: 210px !important;
    object-fit: cover !important;
    object-position: center center !important;
}

.home-section-card-content {
    gap: 10px !important;
}

.home-section-card-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
    min-height: calc(1.35em * 3) !important;
    max-height: calc(1.35em * 3) !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
}

.home-gallery-card {
    border-radius: 6px !important;
    overflow: hidden !important;
    transition: transform .2s ease, box-shadow .2s ease !important;
}

.home-gallery-card-media {
    height: 200px !important;
}

.home-gallery-card-media img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    object-position: center center !important;
}

.home-gallery-card-title {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.home-gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15,23,42,.10), 0 2px 6px rgba(15,23,42,.08) !important;
}

.home-gallery-card:hover .home-gallery-card-media img {
    transform: scale(1.05);
}

.sports-standings-cards {
    gap: 8px !important;
}

.sports-standings-card {
    transition: transform .18s ease, box-shadow .18s ease;
}

.economy-widget-card {
    min-height: 138px !important;
}

.economy-widget-shell {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: 0 !important;
}

.topic-showcase-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 20px;
    width: 100% !important;
    max-width: 1060px;
}

.topic-showcase-main {
    min-width: 0;
}

.topic-lead-card,
.topic-mini-card,
.topic-side-card {
    border-radius: 6px !important;
    border: 1px solid #e8edf4 !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.topic-lead-link {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    min-width: 0;
}

.topic-lead-media,
.topic-mini-media {
    overflow: hidden;
}

.topic-lead-media img,
.topic-mini-media img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.topic-lead-content,
.topic-mini-content {
    min-width: 0;
}

.topic-lead-title,
.topic-mini-title {
    text-wrap: balance;
}

.topic-subgrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.topic-side-card {
    min-width: 0;
}

@media (max-width: 1060px) {
    .topic-showcase-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        height: auto !important;
    }

    .topic-showcase-main {
        width: 100% !important;
        height: auto !important;
        display: grid !important;
        grid-template-rows: auto auto !important;
        gap: 16px !important;
    }

    .topic-lead-card,
    .topic-mini-card,
    .topic-side-card {
        height: auto !important;
    }

    .topic-lead-link {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }

    .topic-lead-media,
    .topic-lead-media img {
        height: 220px !important;
    }

    .topic-lead-content {
        height: auto !important;
        padding: 16px !important;
    }

    .topic-lead-title {
        font-size: 20px !important;
        line-height: 1.24 !important;
    }

    .topic-lead-summary {
        font-size: 14px !important;
        line-height: 1.55 !important;
        -webkit-line-clamp: 3 !important;
    }

    .topic-subgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        height: auto !important;
        gap: 12px !important;
    }

    .topic-mini-link {
        height: auto !important;
    }

    .topic-mini-media,
    .topic-mini-media img {
        height: 150px !important;
    }

    .topic-mini-content {
        padding: 12px !important;
    }

    .topic-mini-title {
        min-height: calc(1.35em * 3) !important;
        -webkit-line-clamp: 3 !important;
    }

    .topic-side-card {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 767px) {
    .topic-showcase-grid {
        gap: 14px !important;
    }

    .topic-lead-card,
    .topic-mini-card,
    .topic-side-card {
        border-radius: 6px !important;
    }

    .topic-lead-media,
    .topic-lead-media img {
        height: 208px !important;
    }

    .topic-lead-content {
        padding: 14px !important;
    }

    .topic-lead-title {
        font-size: 18px !important;
        line-height: 1.22 !important;
    }

    .topic-subgrid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .topic-mini-media,
    .topic-mini-media img {
        height: 180px !important;
    }

    .topic-mini-title {
        min-height: calc(1.35em * 3) !important;
        font-size: 15px !important;
        -webkit-line-clamp: 3 !important;
    }

    .topic-mini-summary {
        display: none !important;
    }
}

.post-page-shell {
    width: 100%;
}

.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
    align-items: start;
    overflow: visible !important;
}

.post-main,
.post-aside {
    min-width: 0;
}

.post-aside {
    position: sticky;
    top: 100px;
    align-self: start;
    height: fit-content;
    overflow: visible !important;
}

.post-card {
    border-radius: 6px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06) !important;
}

.post-breadcrumbs {
    flex-wrap: wrap;
    row-gap: 6px;
}

.post-title {
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.post-meta {
    row-gap: 8px;
}

.post-summary {
    position: relative;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0) 58%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    padding: 18px 20px 18px 22px !important;
    border-left-width: 0 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 14px 30px rgba(15, 23, 42, 0.05);
}

.post-summary::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ef4444 0%, #0f172a 100%);
}

.post-figure {
    border-radius: 6px !important;
}

.post-figure img {
    width: 100%;
    object-fit: cover;
}

.post-figure-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.post-figure-bar > div:first-child,
.post-figure-bar > div:last-child {
    min-width: 0;
}

.post-figure-bar > div:first-child {
    flex: 1 1 auto;
}

.post-figure-bar > div:last-child {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    margin-left: auto;
}

.post-figure-bar > div:last-child > div:first-child {
    display: none !important;
}

.post-figure-bar a[aria-label] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    border-radius: 999px;
    color: #fff !important;
    flex: 0 0 36px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.post-figure-bar a[aria-label]:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.18);
    filter: saturate(1.06);
}

.post-tags a {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.post-tags a:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}

.post-comment-list > div,
.post-comment-form {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.post-aside-inner {
    position: static !important;
    top: auto !important;
    align-self: start;
    max-height: none;
    overflow: visible !important;
}

#post-stream-container {
    margin-top: 20px !important;
}

.post-stream-layout {
    margin-top: 20px !important;
}

.frontend-footer-shell {
    margin-top: 56px;
}

.footer-grid-lock {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.footer-divider {
    border-color: #e2e8f0;
}

.footer-link {
    color: #334155;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-link:hover {
    color: #dc2626;
    transform: translateX(2px);
}

.footer-social-chip {
    border: 1px solid transparent;
    color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 8px 18px -12px rgba(2, 6, 23, 0.9);
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 0;
    line-height: 1;
}

.footer-social-chip:hover {
    transform: translateY(-1px);
}

.footer-social-chip--x {
    background: #0f172a;
}

.footer-social-chip--facebook {
    background: #1877f2;
}

.footer-social-chip--instagram {
    background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 8%, #fd5949 45%, #d6249f 60%, #285aeb 95%);
}

.footer-social-chip--youtube {
    background: #ff0000;
}

.footer-corporate-link {
    color: #475569;
    transition: color 0.2s ease;
}

.footer-corporate-link:hover {
    color: #dc2626;
}

@media (max-width: 1060px) {
    .post-layout {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .post-main {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }

    .post-card {
        padding: 18px !important;
        border-radius: 6px !important;
    }

    .post-title {
        font-size: 32px !important;
        line-height: 1.15 !important;
    }

    .post-summary {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    .post-figure img {
        max-height: 420px !important;
    }

    .post-figure-bar {
        padding: 14px 16px !important;
    }

    .post-aside-inner {
        position: static !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .post-aside {
        position: static !important;
        top: auto !important;
        height: auto !important;
    }

    .post-stream-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 960px) {
    .footer-grid-lock {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .footer-grid-lock {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .post-layout {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .post-card {
        padding: 16px 14px !important;
        border-radius: 6px !important;
        border-left: 1px solid #e5e7eb !important;
        border-right: 1px solid #e5e7eb !important;
    }

    .post-title {
        font-size: 28px !important;
        line-height: 1.18 !important;
    }

    .post-meta {
        font-size: 12px !important;
    }

    .post-summary {
        padding: 14px 14px 14px 18px !important;
        font-size: 15px !important;
        line-height: 1.5 !important;
        border-radius: 6px !important;
    }

    .post-summary::before {
        top: 12px;
        bottom: 12px;
    }

    .post-figure-bar {
        position: static !important;
        background: #fff !important;
        border-top: 1px solid #e5e7eb !important;
        padding: 12px 14px !important;
        gap: 12px !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    .post-figure-bar > div:first-child {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: hidden;
    }

    .post-figure-bar > div:first-child > div:last-child {
        min-width: 0;
    }

    .post-figure-bar > div:first-child > div:last-child > div:last-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .post-figure-bar > div:first-child img {
        width: 36px !important;
        height: 36px !important;
        flex: 0 0 36px;
    }

    .post-figure-bar > div:last-child {
        width: auto !important;
        flex: 0 0 auto;
        justify-content: flex-start !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
        margin-left: 0 !important;
    }

    .post-figure-bar > div:last-child::-webkit-scrollbar {
        display: none;
    }

    .post-comment-form {
        padding: 12px !important;
    }

    .related-card {
        border-radius: 6px !important;
    }

    .related-card-media {
        height: 220px !important;
    }
}

@media (min-width: 768px) {
    .home-section-card {
        border-radius: 6px !important;
        border: 1px solid #e9eef5;
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04) !important;
    }

    .home-section-card-media {
        height: 214px !important;
    }

    .home-section-card-media img {
        height: 214px !important;
    }

    .home-section-card-content {
        padding: 14px 14px 12px !important;
        gap: 10px !important;
    }

    .home-section-card-title {
        font-size: 15px !important;
        line-height: 1.34 !important;
    }

    .sports-standings-cards {
        display: grid !important;
        grid-auto-flow: column !important;
        grid-auto-columns: 118px !important;
        grid-template-columns: none !important;
        gap: 12px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 4px 2px 12px !important;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .sports-standings-card {
        position: relative;
        min-height: 132px !important;
        height: 132px !important;
        padding: 14px 12px 12px !important;
        border-radius: 6px !important;
        background:
            radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 46%),
            linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
        border: 1px solid #e5edf6 !important;
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.07) !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 0 !important;
        overflow: hidden;
    }

    .sports-standings-card::after {
        content: "";
        position: absolute;
        left: 12px;
        right: 12px;
        top: 12px;
        height: 3px;
        border-radius: 999px;
        background: linear-gradient(90deg, #16a34a 0%, rgba(22, 163, 74, 0.08) 100%);
        opacity: 0.95;
    }

    .sports-standings-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1) !important;
    }

    .sports-standings-logo {
        width: 40px !important;
        height: 40px !important;
        margin-top: 10px !important;
        border-radius: 6px;
        background: #ffffff;
        box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
    }

    .sports-standings-logo img {
        width: 28px !important;
        height: 28px !important;
    }

    .sports-standings-points {
        margin-top: auto !important;
        font-size: 28px !important;
        line-height: 1 !important;
        font-weight: 900 !important;
        letter-spacing: -0.05em;
        color: #0f172a !important;
    }

    .sports-standings-name {
        padding: 0 !important;
        margin-top: 6px !important;
        text-align: left !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        color: #475569 !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;
        overflow: hidden !important;
        min-height: calc(1.2em * 2) !important;
    }

    #economy-widget-grid {
        display: grid !important;
        grid-auto-flow: column !important;
        grid-auto-columns: 172px !important;
        grid-template-columns: none !important;
        gap: 12px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 4px 2px 12px !important;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .economy-widget-card {
        min-height: 154px !important;
        padding: 14px 12px !important;
        border-radius: 6px !important;
        background:
            radial-gradient(circle at top left, rgba(104, 161, 255, 0.12), transparent 46%),
            linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
        border: 1px solid #e5edf6 !important;
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.07) !important;
        overflow: hidden;
    }

    .economy-widget-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1) !important;
    }

    .sports-standings-cards::-webkit-scrollbar,
    #economy-widget-grid::-webkit-scrollbar {
        height: 8px;
    }

    .sports-standings-cards::-webkit-scrollbar-thumb,
    #economy-widget-grid::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 999px;
    }

    .sports-standings-cards::-webkit-scrollbar-track,
    #economy-widget-grid::-webkit-scrollbar-track {
        background: transparent;
    }
}

@media (max-width: 1279px) {
}
