/* Global page reset */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
        "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.5;
    color: #eff2ff;
    background-color: #161a24;
    background-image: radial-gradient(circle at top left, rgba(124, 58, 237, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.15), transparent 28%);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.body_container {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 28px 20px 40px;
}

.header,
.footer,
.category_listing,
.myarticle,
.scrollbar {
    width: 100%;
}

.header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 24px 24px 18px;
}

.header .home {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.header .home a:first-child {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
}

.header .header_options {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: flex-start;
}

.header .header_options a {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.2s ease;
}

.header .header_options a:hover {
    color: #c7d2fe;
}

.heading {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 16px 0 4px;
}

.header .heading img {
    max-width: 240px;
    width: 100%;
    height: auto;
}

hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0;
}

.category_listing {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding: 16px 0 20px;
    margin-top: 16px;
    position: relative;
}

.category_listing::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 70px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to right, rgba(22, 26, 36, 0), rgba(22, 26, 36, 1));
}

.category_listing::-webkit-scrollbar,
.category_listing {
    scrollbar-width: none;
}

.category_listing::-webkit-scrollbar {
    display: none;
}

.list_item {
    flex: 0 0 auto;
}

.list_item p {
    margin: 0;
    padding: 10px 18px;
    min-width: max-content;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.list_item p:hover {
    background-color: rgba(124, 58, 237, 0.16);
    border-color: rgba(124, 58, 237, 0.5);
    transform: translateY(-1px);
}

.articles_listing {
    width: 100%;
}

@media (min-width: 621px) {
    .articles_listing {
        height: 44vw;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

.articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 28px;
    padding: 0;
}

.articles_listing::-webkit-scrollbar {
    display: none;
}

.article_item {
    background: rgba(255, 255, 255, 0.98);
    color: #121827;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.article_image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.article_text {
    padding: 18px 18px 14px;
    flex: 1;
}

.article_text h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: #111827;
}

.article_text p {
    margin: 0;
    color: #374151;
    font-size: 0.94rem;
    line-height: 1.65;
}

.article_footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px 16px;
    font-size: 0.85rem;
    color: #6b7280;
}

.scrollbar ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 18px 0 0;
    margin: 20px;
    list-style: none;
}

.scrollbar ul li {
    min-width: 38px;
    min-height: 38px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: #eef2ff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.scrollbar ul li:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(124, 58, 237, 0.6);
    transform: translateY(-1px);
}

.footer {
    margin-top: 40px;
    padding: 18px 24px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    text-align: center;

    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    /* width: 95%; */
    margin: 0 auto 1rem;
    justify-content: space-between;
    border: 1px solid #DAD7D0;
    box-shadow: 0 6px 18px rgba(28, 25, 23, 0.08);
    padding: 1rem 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    /* background: #FFFFFF; */
}

@media (max-width: 860px) {
    .header {
        justify-content: center;
    }

    .header .home {
        justify-content: center;
    }

    .header .header_options {
        justify-content: center;
        gap: 12px;
    }

    .body_container {
        padding: 22px 16px 30px;
    }

}

@media (max-width: 620px) {
    .category_listing {
        padding-top: 12px;
    }

    .article_image img {
        height: 160px;
    }

    .article_text h3 {
        font-size: 1rem;
    }

    .article_footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}