/* Global Layout & Basic Styles */
.section-container {
    width: 29.5rem; /* ~1200px equivalent usually */
    margin: 0 auto;
    padding: 1rem 0;
}

.title {
    width: 100%;
    display: flex;
    justify-content: flex-start; /* Align left */
    align-items: flex-start; /* Align to bottom for border connection */
    border-bottom: 2px solid #313131;
    padding-bottom: 0;
    margin-bottom: 1.5rem;
    height: 3rem; /* Fixed height for consistent shape */
    position: relative;
    border-radius: 0; /* Reset commonn.css rounded corners */
}

.title .lf {
    background-color: #313131; /* Dark background */
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 1.5rem 0 1rem;
    position: relative;
    /* Create the slanted edge effect using clip-path or pseudo-element behavior */
    /* Using pseudo-element for better browser support of the 'tab' look */
    margin-right: 0; 
}

/* The slanted tip */
.title .lf::after {
    content: "";
    position: absolute;
    top: 0;
    right: -1.4rem; /* Width of the slant */
    width: 0;
    height: 0;
    border-bottom: 3rem solid #494949; /* Match height and color */
    border-right: 1.5rem solid transparent; /* Create the slope */
}

.title .lf span {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff; /* White text */
    text-transform: uppercase;
    border-bottom: none; /* Remove old underline */
    padding-bottom: 0;
    margin-bottom: 0;
    display: inline-block;
}

/* Image helpers */
.img-wrapper {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}
.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Section 1: Top News --- */
.section-1 {
    display: flex;
    flex-direction: column;
}

.s1-big-item {
    display: block;
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: inherit;
}
.s1-big-item .img-wrapper {
    width: 100%;
    height: 18rem;
    margin-bottom: 1rem;
}
.s1-big-item .content .title {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;

}
.s1-big-item .content .date {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.8rem;
}
.s1-big-item .content .desc {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
}

.s1-list-item {
    display: block;
    border-bottom: 1px solid #dedede;
    padding: 1rem 0;
    text-decoration: none;
}
.s1-list-item:first-child { 
    border-top: 1px solid #dedede; 
}
.s1-list-item .title {
    height: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    border: none;
    padding: 0;
    margin-bottom: 0.3rem;
}
.s1-list-item .date {
    font-size: 1rem;
    color: #999;
}

/* --- Section 2: Big Cards List --- */
.s2-card {
    display: block;
    margin-bottom: 2rem;
    text-decoration: none;
}
.s2-card .img-wrapper {
    width: 100%;
    height: 16rem;
    margin-bottom: 0.8rem;
}
.s2-card .title {
    height: auto;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    font-size: 1.4rem;
    font-weight: bold;
    border: none;
    padding: 0;
    margin-bottom: 0.3rem;
    color: #000;
}
.s2-card .date {
    font-size: 1rem;
    color: #888;
}

/* --- Section 3: Futures Quotes (Grid) --- */
.s3-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.s3-card {
    margin-bottom: 1.5rem;
    border: 1px solid #dedede;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
/* User said "border" for Section 3 */
.s3-card .img-wrapper {
    width: 100%;
    height: 16rem;
}
.s3-card .content {
    padding: 0.8rem;
}
.s3-card .title {
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    padding: 0;
    margin-bottom: 0.5rem;
    color: #313131;
    height: 3rem; /* limit height */
    overflow: hidden;
    line-height: 1.5rem;
}
.s3-card .date {
    font-size: 1rem;
    color: #999;
}

/* --- Section 4: Futures Exchange (Horizontal List) --- */
.s4-item {
    display: flex;
    /* margin-bottom: 1rem; */
    padding: 0.5rem;
    border: 1px solid #dedede;
    background: #fff;
    text-decoration: none;
    align-items: flex-start;
}
.s4-item .img-wrapper {
    width: 8rem;
    height: 7rem;
    flex-shrink: 0;
    margin-right: 1rem;
}
.s4-item .content {
    flex: 1;
}
.s4-item .title {
    font-size: 1.2rem;
    font-weight: 500;
    border: none;
    padding: 0;
    /* margin-bottom: 0.3rem; */
    color: #1a3a50; /* slightly colored from screenshot vibe */
        display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            height: auto;
            margin: 1rem auto .3rem; 
}
.s4-item .date {
    font-size: 1rem;
    color: #888;
}

/* --- Section 5: Knowledge (Big + Horizontal Small) --- */
.s5-big {
    display: block;
    margin-bottom: 2rem;
    text-decoration: none;border: 1px solid #dedede;
}
.s5-big .img-wrapper {
    width: 100%;
    height: 16rem;
    margin-bottom: 0.8rem;
}
.s5-big .content {
    padding: 0.8rem;
}
.s5-big .title {
    font-size: 1.3rem;
    font-weight: bold;
    border: none;
    padding: 0;
    margin-bottom: 0.3rem;
    color: #000;
}
.s5-big .date {
    font-size: 0.85rem;
    color: #888;
}

.s5-list {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.s5-list .s4-item:nth-child(3n){
    margin-bottom: 1.5rem;
}
.s5-small-card {
    display: flex;
    flex-direction: row; /* "Horizontal排布" usually means row list, but "small graph + title + date + border" often implies small vertical cards side-by-side or small horizontal cards. Let's do horizontal cards in grid. */
    align-items: flex-start;
    margin-bottom: 1rem;
    border: 1px solid #eee; /* "border" */
    padding: 0.5rem;
    text-decoration: none;
}
.s5-small-card .img-wrapper {
    width: 5rem;
    height: 3.5rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}
.s5-small-card .content {
    flex: 1;
    overflow: hidden;
    background-color: #fff;
}
.s5-small-card .title {
    font-size: 0.9rem;
    font-weight: bold;
    border: none;
    padding: 0;
    margin-bottom: 0.2rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.s5-small-card .date {
    font-size: 0.75rem;
    color: #aaa;
}

/* --- Section 6: NEWS (Big Cards) --- */
.section-6 .list-container {
    display: flex;
    flex-direction: column;
}
.s6-card {
    display: block;
    margin-bottom: 1.5rem;
    text-decoration: none;
    border: 1px solid #eee;
    background-color: #fff;
        /* "border" */
}
.s6-card .content {
    padding: 0.8rem ;
}
.s6-card .img-wrapper {
    width: 100%;
    height: 16rem;
    margin-bottom: 0.8rem;
}
.s6-card .title {
    font-size: 1.25rem;
    font-weight: bold;
    border: none;
    padding: 0;
    margin-bottom: 0.3rem;
    color: #000;
}
.s6-card .date {
    font-size: 0.85rem;
    color: #888;
}

/* Original/Shared styles that might be needed */
.header-top { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0.5rem 1rem; 
    border-bottom: 1px solid #eee;
}
.logo { height: 2rem; }
.bg-title { height: 1.5rem; }
.icon-title { height: 1.5rem; }
.footer {
    text-align: center;
    padding: 2rem 0;
    background: #f4f4f4;
    font-size: 0.9rem;
    color: #666;
}

/* --- Section 7: Futures Category (Image Background + Gradient) --- */
.s7-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.s7-card {
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    text-decoration: none;
    display: block;
}
.s7-card .img-wrapper {
    width: 100%;
    height: 18rem;
    position: relative;
    margin-bottom: 0; /* No margin below img, text is inside */
}
.s7-card .img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.s7-card .overlay {
    position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 40%;
        background-image: linear-gradient(180deg, #02010100 0%, #303F9F 100%);
        opacity: 0.9;
        z-index: 1;
}
.s7-card .content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    z-index: 2;
}
.s7-card .content p{
color: #fff;
}
.s7-card .title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5); 
    border: none;
    display: block;
    height: auto;
    background: none;
    padding: 0; 
    margin: 0 0 0.5rem 0;
            display: -webkit-box;
                -webkit-line-clamp: 3;
                -webkit-box-orient: vertical;
                overflow: hidden;
                height: auto;
}
.s7-card .title::after { display: none; }

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px; /* Above bottom bar if any */
    width: 35px;
    height: 35px;
    background-image: url("../images/to-top.png");
    background-repeat: no-repeat;
    background-position: center;
    background-color: #E53935; /* Red color matching image */
    cursor: pointer;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* --- Skeleton Screen --- */
#skeleton-loader {
    width: 29.5rem;
    margin: 6rem auto 0;
    padding: 1rem 0;
}
.sk-header {
    width: 100%;
    height: 3rem;
    background-color: #eee;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}
.sk-banner {
    width: 100%;
    height: 12rem;
    background-color: #eee;
    margin-bottom: 2rem;
    border-radius: 4px;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}
.sk-section {
    margin-bottom: 2rem;
}
.sk-title {
    width: 50%;
    height: 2rem;
    background-color: #eee;
    margin-bottom: 1rem;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}
.sk-big-item {
    width: 100%;
    height: 14rem;
    background-color: #eee;
    margin-bottom: 1rem;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}
.sk-list-item {
    width: 100%;
    height: 4rem;
    background-color: #eee;
    margin-bottom: 0.8rem;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}
.sk-card {
    width: 100%;
    height: 10rem;
    background-color: #eee;
    margin-bottom: 1rem;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
