* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;

    background: #0f1117;
    color: #e6e6e6;

    line-height: 1.6;
}


/* Header */

header {
    max-width: 900px;

    margin: 50px auto 40px;

    padding: 0 20px;

    text-align: center;
}


.header-content h1 {
    color: white;

    font-size: 3rem;

    letter-spacing: -1px;

    margin: 25px 0 15px;
}


.header-content p {
    color: #a9adb8;

    font-size: 1.1rem;
}


/* Back button */

.back-button {
    display: inline-block;

    padding: 10px 18px;

    background: #171a22;

    border: 1px solid #272c38;

    border-radius: 10px;

    color: #e6e6e6;

    text-decoration: none;

    font-weight: 600;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.back-button:hover {
    background: #222735;

    border-color: #3d7cff;

    transform: translateY(-2px);
}


/* Divider */

hr {
    max-width: 1100px;

    height: 1px;

    margin: 30px auto;

    border: none;

    background: #292d38;
}


/* News container */

.news-container {
    max-width: 1100px;

    margin: 40px auto;

    padding: 0 20px;

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

    gap: 25px;
}


/* News cards */

.news-card {
    background: #171a22;

    border: 1px solid #272c38;

    border-radius: 18px;

    padding: 30px;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.news-card:hover {
    transform: translateY(-6px);

    border-color: #3d7cff;

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.35);
}


.news-card a {
    display: block;

    color: inherit;

    text-decoration: none;
}


.news-card h2 {
    color: white;

    font-size: 1.5rem;

    margin-bottom: 15px;

    transition: color 0.2s ease;
}


.news-card:hover h2 {
    color: #6ea8fe;
}


.news-card p {
    color: #a9adb8;

    margin-bottom: 20px;
}


.news-card time {
    color: #8b8f99;

    font-size: 0.9rem;
}


/* Empty state */

.empty {
    text-align: center;
}


/* Scroll animations */

.news-card {
    opacity: 0;

    transform: translateY(40px) scale(0.98);

    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}


.news-card.show {
    opacity: 1;

    transform: translateY(0) scale(1);
}


/* Footer */

footer {
    text-align: center;

    color: #8b8f99;

    padding: 30px 20px;
}


/* Mobile */

@media (max-width: 600px) {

    .header-content h1 {
        font-size: 2.2rem;
    }


    .news-card {
        padding: 25px;
    }

}

.news-card.search-result {

    opacity: 0;

    transform: translateY(15px);

    animation: searchFadeIn 0.25s ease forwards;

}


@keyframes searchFadeIn {

    from {

        opacity: 0;

        transform: translateY(15px);

    }


    to {

        opacity: 1;

        transform: translateY(0);

    }

}

/* Search */

.search-container {

    max-width: 1100px;

    margin: 35px auto 15px;

    padding: 0 20px;

}


.search-bar {

    width: 100%;

    padding: 16px 20px;

    background: #171a22;

    border: 1px solid #272c38;

    border-radius: 16px;

    color: white;

    font-family: inherit;

    font-size: 1rem;

    outline: none;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;

}


.search-bar::placeholder {

    color: #8f95a3;

}


.search-bar:focus {

    border-color: #3d7cff;

    box-shadow:
        0 0 0 4px rgba(61,124,255,0.12);

}