/* --- Global Styles --- */
body, html {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #ffffff;
    color: #202124;
}
a {
    text-decoration: none;
    color: inherit;
}
* {
    box-sizing: border-box;
}

/* --- Homepage Styles --- */
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
}
/* UPDATED with more padding */
.user-actions {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    gap: 20px;
}
.user-actions a {
    color: #4a4a4a;
}
.user-actions a:hover {
    opacity: 0.7;
}
.user-actions svg {
    width: 24px;
    height: 24px;
}
.logo h1 {
    font-size: 92px;
    font-weight: 400;
    color: #4a4a4a;
    margin-top: 0;
    margin-bottom: 28px;
    letter-spacing: -1px;
}
.logo span {
    font-weight: 500;
    color: #2a2a2a;
}
.search-area {
    width: 100%;
    max-width: 584px;
}
.search-bar {
    width: 100%;
    height: 46px;
    padding: 0 20px;
    font-size: 16px;
    border-radius: 24px;
    border: 1px solid #dfe1e5;
}
.search-bar:hover, .search-bar:focus {
    border-color: #c5c7ca;
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
    outline: none;
}
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 28px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}
.main-nav a {
    background-color: #f8f9fa;
    color: #3c4043;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 4px;
}
.main-nav a:hover {
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
    background-color: #f1f3f4;
}
footer {
    position: absolute;
    bottom: 20px;
    font-size: 12px;
    color: #70757a;
}

/* --- News Page Header Styles --- */
.site-header {
    padding: 0 20px;
    border-bottom: 1px solid #ebebeb;
}
.header-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    max-width: 1200px;
    margin: 0 auto;
}
.header-logo h1 {
    font-size: 24px;
    font-weight: 400;
    color: #4a4a4a;
    margin: 0;
}
.header-logo span {
    font-weight: 500;
    color: #2a2a2a;
}
.header-search-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    padding: 0 40px;
}
.header-search-bar {
    width: 100%;
    max-width: 600px;
    height: 40px;
    padding: 0 16px;
    font-size: 16px;
    border-radius: 20px;
    border: 1px solid #dfe1e5;
    background-color: #f1f3f4;
}
.header-search-bar:focus {
    background-color: #fff;
    border-color: #c5c7ca;
    box-shadow: 0 1px 6px rgba(32,33,36,.1);
    outline: none;
}
.secondary-nav {
    max-width: 1200px;
    margin: 0 auto;
}
.secondary-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
    height: 40px;
    align-items: center;
}
.secondary-nav a {
    font-size: 14px;
    color: #5f6368;
    padding-bottom: 8px;
    font-weight: 500;
}
.secondary-nav a.active {
    color: #1a73e8;
    border-bottom: 3px solid #1a73e8;
}
.secondary-nav a:not(.active):hover {
    color: #202124;
}

/* --- News Page Content Styles --- */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
.page-title {
    font-size: 28px;
    font-weight: 400;
    margin: 10px 0 20px 0;
    color: #3c4043;
}
.news-list {
    list-style: none;
    padding: 0;
    border-top: 1px solid #ebebeb;
}
.news-item {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid #ebebeb;
}
.news-item .text-content {
    flex: 1;
    margin-right: 20px;
}
.news-item .source {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #4d5156;
    font-weight: 500;
}
.news-item .favicon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border-radius: 2px;
}
.main-link:hover h3 {
    text-decoration: underline;
}
.news-item h3 {
    font-size: 20px;
    font-weight: 400;
    color: #1a0dab;
    margin: 0 0 5px 0;
}
.news-item .snippet {
    font-size: 14px;
    color: #4d5156;
    margin: 0;
    line-height: 1.5;
}
.news-item .timestamp {
    font-size: 12px;
    color: #70757a;
    margin-top: 8px;
}
.news-item .article-image {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f0f0f0;
}
/* --- Responsive Styles --- */
@media (max-width: 768px) {
    .header-search-wrapper {
        display: none;
    }
    .header-logo {
        flex-grow: 1;
    }
    .news-item {
        flex-direction: column-reverse;
    }
    .news-item .article-image {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
    }
    .news-item .text-content {
        margin-right: 0;
    }
}
@media (max-width: 600px) {
    .logo h1 {
        font-size: 60px;
    }
}