/* ========================================
   Google News Theme - Main Stylesheet
   Redesigned to match news.google.com
   ======================================== */

/* === Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: 'Roboto', 'Google Sans', Arial, sans-serif;
    background-color: #f3f3f3;
    color: #202124;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 2px;
    border-radius: 2px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* === Google Logo Colors === */
.gn-logo-g1 { color: #4285f4; }
.gn-logo-o1 { color: #ea4335; }
.gn-logo-o2 { color: #fbbc04; }
.gn-logo-g2 { color: #4285f4; }
.gn-logo-l  { color: #34a853; }
.gn-logo-e  { color: #ea4335; }
.gn-logo-news {
    color: #5f6368;
    font-weight: 400;
    margin-left: 2px;
}

/* Alternative logo styles */
.gn-logo-single {
    color: #1a73e8;
}

.gn-logo-mono {
    color: #202124;
}

/* Dark mode logo adjustments */
body.dark-mode .gn-logo-news {
    color: #9aa0a6;
}

body.dark-mode .gn-logo-mono {
    color: #e8eaed;
}

/* === Header === */
.gn-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.gn-header-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.gn-header-left {
    flex-shrink: 0;
}

.gn-logo-link {
    display: flex;
    align-items: center;
}

.gn-logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

/* === Centered Search Bar === */
.gn-header-center {
    flex: 1;
    max-width: 680px;
}

.gn-search-form {
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 24px;
    padding: 0 8px 0 16px;
    height: 44px;
    transition: box-shadow 0.2s, background 0.2s;
}

.gn-search-form:focus-within {
    background: #fff;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.gn-search-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.gn-search-form input[type="search"] {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: #202124;
    outline: none;
    min-width: 0;
}

.gn-search-form input[type="search"]::placeholder {
    color: #5f6368;
}

.gn-search-submit {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.gn-search-submit:hover {
    background: #e8eaed;
}

/* === Header Right Actions === */
.gn-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.gn-header-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s;
    color: #5f6368;
    background: transparent;
    border: none;
    cursor: pointer;
}

.gn-header-action:hover {
    background: #f1f3f4;
}

.gn-signin-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 23px;
    background: #1a73e8;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-left: 8px;
    transition: background 0.2s, box-shadow 0.2s;
}

.gn-signin-btn:hover {
    background: #1765cc;
    box-shadow: 0 1px 3px rgba(26, 115, 231, 0.3);
    color: #fff;
}

/* === Navigation Tabs === */
.gn-nav-tabs {
    background: #fff;
}

.gn-nav-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

.gn-nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0;
}

.gn-nav-menu::-webkit-scrollbar {
    display: none;
}

.gn-nav-menu li {
    list-style: none;
}

.gn-nav-menu li a {
    display: block;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 400;
    color: #5f6368;
    border-bottom: 3px solid transparent;
    transition: color 0.2s;
}

.gn-nav-menu li a:hover {
    color: #1a73e8;
}

.gn-nav-menu li.current-menu-item a,
.gn-nav-menu li.current_page_item a {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 500;
}

/* === Mobile Menu === */
.gn-mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
}

.gn-mobile-menu.active {
    left: 0;
}

.gn-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.gn-mobile-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gn-mobile-close:hover {
    background: #f1f3f4;
}

.gn-mobile-nav-list {
    padding: 8px 0;
}

.gn-mobile-nav-list li a {
    display: block;
    padding: 14px 24px;
    font-size: 15px;
    color: #202124;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.2s;
}

.gn-mobile-nav-list li a:hover {
    background: #f8f9fa;
    color: #1a73e8;
}

.gn-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.gn-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === Main Content === */
.gn-main-content {
    min-height: calc(100vh - 120px);
    padding: 24px;
}

/* === Briefing Layout === */
.gn-briefing {
    max-width: 1360px;
    margin: 0 auto;
}

.gn-briefing-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.gn-briefing-title {
    font-size: 28px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 4px;
}

.gn-briefing-date {
    font-size: 14px;
    color: #5f6368;
}

/* === Stock Ticker === */
.gn-stock-ticker {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.gn-stock-ticker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8eaed;
}

.gn-stock-ticker-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    margin: 0;
}

.gn-stock-ticker-time {
    font-size: 13px;
    color: #5f6368;
}

.gn-stock-ticker-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.gn-stock-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s, box-shadow 0.2s;
}

.gn-stock-item:hover {
    background: #f1f3f4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.gn-stock-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gn-stock-name {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.gn-stock-symbol {
    font-size: 11px;
    color: #5f6368;
    font-family: monospace;
}

.gn-stock-data {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.gn-stock-price {
    font-size: 15px;
    font-weight: 500;
    color: #202124;
}

.gn-stock-change {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.gn-stock-change.gn-up {
    color: #137333;
    background: #e6f4ea;
}

.gn-stock-change.gn-down {
    color: #c5221f;
    background: #fce8e6;
}

/* Dark mode for stock ticker */
body.dark-mode .gn-stock-ticker {
    background: #292a2d;
}

body.dark-mode .gn-stock-ticker-header {
    border-bottom-color: #3c4043;
}

body.dark-mode .gn-stock-ticker-title {
    color: #e8eaed;
}

body.dark-mode .gn-stock-ticker-time {
    color: #9aa0a6;
}

body.dark-mode .gn-stock-item {
    background: #3c4043;
}

body.dark-mode .gn-stock-item:hover {
    background: #4a4c4f;
}

/* Stock Ticker Loading & Empty States */
.gn-stock-loading,
.gn-stock-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #5f6368;
    font-size: 14px;
}

.gn-stock-spinner {
    animation: gn-spin 1s linear infinite;
}

@keyframes gn-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body.dark-mode .gn-stock-loading,
body.dark-mode .gn-stock-empty {
    color: #9aa0a6;
}

body.dark-mode .gn-stock-name {
    color: #e8eaed;
}

body.dark-mode .gn-stock-symbol {
    color: #9aa0a6;
}

body.dark-mode .gn-stock-price {
    color: #e8eaed;
}

body.dark-mode .gn-stock-change.gn-up {
    color: #81c995;
    background: #1e3a2b;
}

body.dark-mode .gn-stock-change.gn-down {
    color: #f28b82;
    background: #3c1f1e;
}

/* Responsive */
@media (max-width: 768px) {
    .gn-stock-ticker-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gn-stock-item {
        padding: 10px 12px;
    }
    
    .gn-stock-name {
        font-size: 13px;
    }
    
    .gn-stock-price {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gn-stock-ticker-list {
        grid-template-columns: 1fr;
    }
    
    .gn-stock-ticker {
        padding: 12px 16px;
    }
}

.gn-refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.gn-refresh-btn:hover {
    background: #e8eaed;
}

/* === Two Column Layout === */
.gn-briefing-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

/* === Story Sections === */
.gn-story-section {
    margin-bottom: 32px;
}

.gn-story-section-title {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gn-story-section-title a {
    color: #1a73e8;
    font-weight: 500;
    transition: color 0.2s;
}

.gn-story-section-title a:hover {
    color: #1765cc;
}

/* === Story Group (Featured + Related) === */
.gn-story-group {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* === Featured Article === */
.gn-story-featured {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8eaed;
}

.gn-story-featured-img {
    flex-shrink: 0;
    width: 260px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
}

.gn-story-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gn-story-featured:hover .gn-story-featured-img img {
    transform: scale(1.03);
}

.gn-story-featured-content {
    flex: 1;
    min-width: 0;
}

.gn-story-featured-title {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
    color: #202124;
    margin-bottom: 8px;
}

.gn-story-featured-title a {
    color: #202124;
    transition: color 0.2s;
}

.gn-story-featured-title a:hover {
    color: #1a73e8;
}

/* === Source Badge === */
.gn-source-badge {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
}

.gn-source-administrator { background: #4285f4; }
.gn-source-editor { background: #ea4335; }
.gn-source-author { background: #34a853; }
.gn-source-contributor { background: #fbbc04; color: #202124; }
.gn-source-subscriber { background: #9c27b0; }
.gn-source-default { background: #5f6368; }

/* Source Icon (square with initials) */
.gn-source-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #1a73e8;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Source Name */
.gn-source-name {
    font-size: 14px;
    color: #5f6368;
    font-weight: 400;
}

/* === Story Meta === */
.gn-story-source {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.gn-story-meta {
    font-size: 12px;
    color: #5f6368;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.gn-meta-dot {
    color: #dadce0;
}

/* === Related Articles List === */
.gn-story-related {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.gn-story-related-item {
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f3f4;
}

.gn-story-related-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.gn-story-related-source {
    margin-bottom: 4px;
}

.gn-story-related-title {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 4px;
}

.gn-story-related-title a {
    color: #1a73e8;
    transition: color 0.2s;
}

.gn-story-related-title a:hover {
    color: #1765cc;
    text-decoration: underline;
}

/* === See More Button === */
.gn-see-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #f1f3f4;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1a73e8;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    text-decoration: none;
}

.gn-see-more-btn:hover {
    background: #e8eaed;
    color: #1a73e8;
}

/* === Sidebar === */
.gn-sidebar {
    position: sticky;
    top: 120px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* === Sidebar Cards === */
.gn-sidebar-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.gn-sidebar-card-title {
    font-size: 20px;
    font-weight: 500;
    color: #1a73e8;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8eaed;
}

.gn-sidebar-card-title a {
    color: #1a73e8;
    transition: color 0.2s;
    text-decoration: none;
}

.gn-sidebar-card-title a:hover {
    color: #1765cc;
}

.gn-sidebar-card-title svg {
    flex-shrink: 0;
}

/* === Picks Card === */
.gn-picks-card .gn-sidebar-card-title {
    color: #1a73e8;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 8px;
}

.gn-picks-desc {
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 16px;
    line-height: 1.5;
}

.gn-sidebar-signin-btn {
    display: block;
    text-align: center;
    padding: 10px 24px;
    background: #1a73e8;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.gn-sidebar-signin-btn:hover {
    background: #1765cc;
    color: #fff;
}

/* === Sidebar News List === */
.gn-sidebar-news-list {
    display: flex;
    flex-direction: column;
}

.gn-sidebar-news-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
}

.gn-sidebar-news-divider {
    border-bottom: 1px solid #e8eaed;
}

.gn-sidebar-news-text {
    flex: 1;
    min-width: 0;
}

.gn-sidebar-news-source {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* Source Icon (small square with initials) */
.gn-source-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #1a73e8;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Source Name */
.gn-source-name {
    font-size: 14px;
    color: #5f6368;
    font-weight: 400;
}

.gn-sidebar-news-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #202124;
}

.gn-sidebar-news-title a {
    color: #202124;
    transition: color 0.2s;
    text-decoration: none;
}

.gn-sidebar-news-title a:hover {
    color: #1a73e8;
}

.gn-sidebar-news-time {
    font-size: 13px;
    color: #5f6368;
}

.gn-sidebar-news-thumb {
    flex-shrink: 0;
    width: 104px;
    height: 104px;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f3f4;
}

.gn-sidebar-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.gn-sidebar-news-thumb:hover img {
    transform: scale(1.05);
}

/* === Single Post === */
.gn-single-layout {
    max-width: 1360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

.gn-article {
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.gn-article-header {
    margin-bottom: 24px;
}

.gn-article-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #5f6368;
    flex-wrap: wrap;
}

.gn-article-title {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.3;
    color: #202124;
    margin-bottom: 12px;
}

.gn-article-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gn-article-categories a {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.gn-article-categories a:hover {
    background: #d2e3fc;
}

.gn-article-featured-image {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}

.gn-article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.gn-image-caption {
    font-size: 13px;
    color: #5f6368;
    text-align: center;
    padding: 8px 0;
    font-style: italic;
}

.gn-article-content {
    font-size: 17px;
    line-height: 1.8;
    color: #202124;
}

.gn-article-content p {
    margin-bottom: 1.5em;
}

.gn-article-content h2 {
    font-size: 24px;
    font-weight: 500;
    margin: 2em 0 0.5em;
}

.gn-article-content h3 {
    font-size: 20px;
    font-weight: 500;
    margin: 1.5em 0 0.5em;
}

.gn-article-content blockquote {
    border-left: 4px solid #1a73e8;
    padding-left: 20px;
    margin: 24px 0;
    color: #5f6368;
    font-style: italic;
}

.gn-article-content a {
    color: #1a73e8;
    text-decoration: underline;
}

.gn-article-content img {
    border-radius: 8px;
    margin: 16px 0;
}

/* Article Source Info Card */
.gn-article-source {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 32px 0 24px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 12px;
}

.gn-source-icon-large {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #1a73e8;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.gn-source-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gn-source-label {
    font-size: 11px;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.gn-source-title {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    line-height: 1.3;
}

.gn-source-domain {
    font-size: 12px;
    color: #5f6368;
    font-family: monospace;
}

.gn-source-visit-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #1a73e8;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.gn-source-visit-btn:hover {
    background: #1765cc;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
    color: #fff;
    text-decoration: none;
}

.gn-source-visit-btn svg {
    flex-shrink: 0;
}

body.dark-mode .gn-article-source {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .gn-source-label,
body.dark-mode .gn-source-domain {
    color: #9aa0a6;
}

body.dark-mode .gn-source-title {
    color: #e8eaed;
}

body.dark-mode .gn-source-icon-large {
    background: #8ab4f8;
    color: #121212;
}

body.dark-mode .gn-source-visit-btn {
    background: #8ab4f8;
    color: #121212;
}

body.dark-mode .gn-source-visit-btn:hover {
    background: #aecbfa;
    color: #121212;
}

@media (max-width: 600px) {
    .gn-article-source {
        flex-wrap: wrap;
        padding: 16px;
    }

    .gn-source-icon-large {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }

    .gn-source-details {
        flex: 1 1 60%;
    }

    .gn-source-visit-btn {
        flex: 1 0 100%;
        justify-content: center;
        margin-top: 8px;
    }
}

.gn-article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-top: 24px;
    border-top: 1px solid #e8eaed;
}

.gn-article-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gn-article-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f3f4;
    color: #5f6368;
    border-radius: 16px;
    font-size: 13px;
    transition: all 0.2s;
}

.gn-article-tags a:hover {
    background: #e8eaed;
    color: #202124;
}

.gn-article-tags .tag-icon {
    font-size: 16px;
    color: #5f6368;
}

/* === Author Bio === */
.gn-author-bio {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 24px;
}

.gn-author-avatar img {
    border-radius: 50%;
}

.gn-author-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.gn-author-desc {
    font-size: 14px;
    color: #5f6368;
}

/* === Related Posts === */
.gn-related-posts {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e8eaed;
}

.gn-related-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
}

/* === Comments Section === */
.gn-comments-section {
    margin-top: 40px;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.gn-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eaed;
}

.gn-comments-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 500;
    color: #202124;
    margin: 0;
}

.gn-comments-title svg {
    color: #1a73e8;
}

.gn-comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gn-comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f4;
}

.gn-comment-item:last-child {
    border-bottom: none;
}

.gn-comment-inner {
    display: flex;
    gap: 14px;
}

.gn-comment-avatar {
    flex-shrink: 0;
}

.gn-comment-avatar img {
    border-radius: 50%;
    width: 44px;
    height: 44px;
}

.gn-comment-body {
    flex: 1;
    min-width: 0;
}

.gn-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.gn-comment-author-name {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.gn-comment-date {
    font-size: 12px;
    color: #5f6368;
}

.gn-comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: #3c4043;
    margin-bottom: 10px;
}

.gn-comment-content p {
    margin-bottom: 8px;
}

.gn-comment-content p:last-child {
    margin-bottom: 0;
}

.gn-comment-footer {
    display: flex;
    gap: 16px;
}

.gn-comment-footer a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.gn-comment-footer a:hover {
    background: #e8f0fe;
    text-decoration: none;
}

/* Comment Form */
#respond {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e8eaed;
}

#respond h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #202124;
}

#respond h3 svg {
    color: #1a73e8;
}

#cancel-comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #5f6368;
    text-decoration: none;
    margin-left: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

#cancel-comment-reply-link:hover {
    background: #f1f3f4;
    color: #202124;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gn-comment-row {
    display: flex;
    gap: 12px;
}

.gn-comment-field {
    width: 100%;
}

.gn-comment-half {
    flex: 1;
}

.gn-comment-textarea {
    margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #202124;
    background: #f8f9fa;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    box-sizing: border-box;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #1a73e8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: #5f6368;
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.gn-comment-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 10px 24px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    line-height: 1.5;
}

.gn-comment-submit svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.gn-comment-submit:hover {
    background: #1765cc;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.gn-comment-submit:active {
    transform: scale(0.98);
}

/* Nested Comments */
.children {
    list-style: none;
    padding-left: 58px;
    margin: 0;
}

.children .gn-comment-item {
    border-bottom-color: #f8f9fa;
    background: #fafbfc;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
}

/* Comment Navigation */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e8eaed;
}

.comment-navigation a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: #1a73e8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    transition: background 0.2s;
}

.comment-navigation a:hover {
    background: #e8f0fe;
}

/* No Comments */
.gn-no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #5f6368;
    font-size: 14px;
}

/* Dark mode for comments */
body.dark-mode .gn-comments-section {
    background: #1e1e1e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .gn-comments-header {
    border-bottom-color: #333;
}

body.dark-mode .gn-comments-title {
    color: #e8eaed;
}

body.dark-mode .gn-comments-title svg {
    color: #8ab4f8;
}

body.dark-mode .gn-comment-item {
    border-bottom-color: #333;
}

body.dark-mode .gn-comment-author-name {
    color: #e8eaed;
}

body.dark-mode .gn-comment-date {
    color: #9aa0a6;
}

body.dark-mode .gn-comment-content {
    color: #e8eaed;
}

body.dark-mode .gn-comment-footer a {
    color: #8ab4f8;
}

body.dark-mode .gn-comment-footer a:hover {
    background: #292a2d;
}

body.dark-mode #respond {
    border-top-color: #333;
}

body.dark-mode #respond h3 {
    color: #e8eaed;
}

body.dark-mode #respond h3 svg {
    color: #8ab4f8;
}

body.dark-mode #cancel-comment-reply-link {
    color: #9aa0a6;
}

body.dark-mode #cancel-comment-reply-link:hover {
    background: #333;
    color: #e8eaed;
}

body.dark-mode .comment-form input,
body.dark-mode .comment-form textarea {
    background: #292a2d;
    border-color: #333;
    color: #e8eaed;
}

body.dark-mode .comment-form input:focus,
body.dark-mode .comment-form textarea:focus {
    border-color: #8ab4f8;
    background: #1e1e1e;
    box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.15);
}

body.dark-mode .comment-form input::placeholder,
body.dark-mode .comment-form textarea::placeholder {
    color: #9aa0a6;
}

body.dark-mode .gn-comment-submit {
    background: #8ab4f8;
    color: #121212;
}

body.dark-mode .gn-comment-submit:hover {
    background: #aecbfa;
}

body.dark-mode .gn-comment-submit svg {
    opacity: 0.8;
}

body.dark-mode .comment-navigation {
    border-top-color: #333;
}

body.dark-mode .comment-navigation a {
    color: #8ab4f8;
}

body.dark-mode .comment-navigation a:hover {
    background: #292a2d;
}

body.dark-mode .children .gn-comment-item {
    background: #292a2d;
    border-bottom-color: #333;
}

body.dark-mode .gn-no-comments {
    color: #9aa0a6;
}

/* Responsive */
@media (max-width: 600px) {
    .gn-comments-section {
        padding: 16px;
    }
    
    .gn-comment-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .children {
        padding-left: 30px;
    }
    
    .gn-comment-avatar img {
        width: 36px;
        height: 36px;
    }
    
    .comment-navigation {
        flex-direction: column;
        gap: 8px;
    }
    
    .comment-navigation a {
        justify-content: center;
    }
}

/* === Archive / Category === */
.gn-archive-layout,
.gn-search-layout {
    max-width: 1360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

.gn-archive-header {
    margin-bottom: 24px;
}

.gn-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 12px;
}

.gn-breadcrumb a {
    color: #1a73e8;
}

.gn-breadcrumb a:hover {
    text-decoration: underline;
}

.gn-archive-title {
    font-size: 28px;
    font-weight: 400;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gn-archive-title .material-icons-outlined {
    font-size: 32px;
    color: #1a73e8;
}

.gn-archive-desc {
    font-size: 15px;
    color: #5f6368;
    margin-top: 8px;
}

/* === Archive Single Column Layout === */
.gn-archive-single {
    grid-template-columns: 1fr !important;
    max-width: 800px;
}

.gn-news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gn-news-list-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e8eaed;
}

.gn-news-list-item:last-child {
    border-bottom: none;
}

.gn-news-list-item .gn-card-link {
    display: flex;
    gap: 16px;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.gn-news-list-item .gn-card-image {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
}

.gn-news-list-item .gn-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gn-news-list-item .gn-card-content {
    flex: 1;
    min-width: 0;
}

.gn-news-list-item .gn-card-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    margin: 6px 0;
    color: #202124;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gn-news-list-item .gn-card-title:hover {
    color: #1a73e8;
}

.gn-news-list-item .gn-card-excerpt {
    font-size: 14px;
    color: #5f6368;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gn-news-list-item .gn-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #5f6368;
}

body.dark-mode .gn-news-list-item {
    border-bottom-color: #3c4043;
}

body.dark-mode .gn-news-list-item .gn-card-title {
    color: #e8eaed;
}

body.dark-mode .gn-news-list-item .gn-card-title:hover {
    color: #8ab4f8;
}

body.dark-mode .gn-news-list-item .gn-card-excerpt,
body.dark-mode .gn-news-list-item .gn-card-meta {
    color: #9aa0a6;
}

/* === Search Results === */
.gn-search-header {
    margin-bottom: 24px;
}

.gn-search-title {
    font-size: 22px;
    font-weight: 400;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gn-search-title .material-icons-outlined {
    color: #5f6368;
}

.gn-search-title span {
    font-weight: 500;
    color: #1a73e8;
}

.gn-search-count {
    font-size: 14px;
    color: #5f6368;
    margin-top: 4px;
}

/* === No Results === */
.gn-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.gn-no-results .material-icons-outlined {
    font-size: 64px;
    color: #dadce0;
    margin-bottom: 16px;
}

.gn-no-results h3 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 8px;
}

.gn-no-results p {
    font-size: 14px;
    color: #5f6368;
}

/* === Inline Search Form === */
.gn-search-form-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 500px;
    margin: 24px auto 0;
}

.gn-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 24px;
    padding: 0 16px;
    height: 44px;
    transition: box-shadow 0.2s, background 0.2s;
}

.gn-search-input-wrap:focus-within {
    background: #fff;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.gn-search-icon-inline {
    flex-shrink: 0;
    color: #5f6368;
    margin-right: 8px;
}

.gn-search-input-inline {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: #202124;
    outline: none;
    min-width: 0;
}

.gn-search-input-inline::placeholder {
    color: #5f6368;
}

.gn-search-submit-inline {
    flex-shrink: 0;
    padding: 10px 24px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.gn-search-submit-inline:hover {
    background: #1765cc;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

/* Dark mode for inline search form */
body.dark-mode .gn-search-input-wrap {
    background: #333;
}

body.dark-mode .gn-search-input-wrap:focus-within {
    background: #1e1e1e;
    box-shadow: 0 1px 6px rgba(255, 255, 255, 0.2);
}

body.dark-mode .gn-search-icon-inline {
    color: #9aa0a6;
}

body.dark-mode .gn-search-input-inline {
    color: #e8eaed;
}

body.dark-mode .gn-search-input-inline::placeholder {
    color: #9aa0a6;
}

body.dark-mode .gn-search-submit-inline {
    background: #8ab4f8;
    color: #121212;
}

body.dark-mode .gn-search-submit-inline:hover {
    background: #aecbfa;
}

/* === Pagination === */
.gn-pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 24px 0;
}

.gn-pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gn-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    transition: all 0.2s;
}

.gn-pagination .page-numbers:hover {
    background: #e8eaed;
}

.gn-pagination .page-numbers.current {
    background: #1a73e8;
    color: #fff;
}

/* === News Grid (for category/search) === */
.gn-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* === News Card (grid style) === */
.gn-news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
}

.gn-news-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.gn-card-link {
    display: block;
}

.gn-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.gn-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gn-news-card:hover .gn-card-image img {
    transform: scale(1.03);
}

.gn-card-content {
    padding: 12px 16px 16px;
}

.gn-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #5f6368;
}

.gn-source {
    font-weight: 500;
    color: #1a73e8;
}

.gn-separator {
    color: #dadce0;
}

.gn-time {
    color: #5f6368;
}

.gn-card-title {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: #202124;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gn-card-excerpt {
    font-size: 13px;
    color: #5f6368;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === Placeholder Image === */
.gn-placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8eaed 0%, #dadce0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.gn-placeholder-img.small {
    min-height: 120px;
}

/* === Footer === */
.gn-footer {
    background: #fff;
    border-top: 1px solid #e0e0e0;
    margin-top: 48px;
}

.gn-footer-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gn-footer-menu {
    display: flex;
    gap: 24px;
}

.gn-footer-menu li a {
    font-size: 14px;
    color: #5f6368;
    transition: color 0.2s;
}

.gn-footer-menu li a:hover {
    color: #1a73e8;
}

.gn-copyright {
    font-size: 13px;
    color: #5f6368;
}

/* === Comments === */
.gn-comments {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e8eaed;
}

.comments-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-body {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-metadata {
    font-size: 12px;
    color: #5f6368;
}

.comment-content {
    font-size: 14px;
    line-height: 1.5;
}

/* === Responsive Design === */

/* Tablet */
@media (max-width: 1024px) {
    .gn-briefing-layout,
    .gn-single-layout,
    .gn-archive-layout,
    .gn-search-layout {
        grid-template-columns: 1fr;
    }

    .gn-sidebar {
        position: static;
    }

    .gn-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .gn-header-inner {
        padding: 0 16px;
        height: 56px;
    }

    .gn-header-center {
        display: none;
    }

    .gn-header-action {
        display: none;
    }

    .gn-signin-btn {
        padding: 7px 16px;
        font-size: 13px;
    }

    .gn-nav-inner {
        padding: 0 16px;
    }

    .gn-nav-menu li a {
        padding: 10px 12px;
        font-size: 13px;
    }

    .gn-main-content {
        padding: 16px;
    }

    .gn-briefing-title {
        font-size: 22px;
    }

    .gn-story-featured {
        flex-direction: column;
        gap: 12px;
    }

    .gn-story-featured-img {
        width: 100%;
        height: 200px;
    }

    .gn-story-featured-title {
        font-size: 18px;
    }

    .gn-story-section-title {
        font-size: 18px;
    }

    .gn-article {
        padding: 20px;
    }

    .gn-article-title {
        font-size: 24px;
    }

    .gn-article-content {
        font-size: 16px;
    }

    .gn-archive-title {
        font-size: 22px;
    }

    .gn-news-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gn-footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .gn-footer-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .gn-news-list-item .gn-card-image {
        width: 100px;
        height: 75px;
    }

    .gn-news-list-item .gn-card-title {
        font-size: 15px;
    }

    .gn-news-list-item .gn-card-excerpt {
        font-size: 13px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .gn-header-inner {
        height: 48px;
    }

    .gn-logo {
        font-size: 20px;
    }

    .gn-story-featured-title {
        font-size: 16px;
    }

    .gn-story-related-title {
        font-size: 14px;
    }

    .gn-article-title {
        font-size: 20px;
    }
}

/* === Utility Classes === */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* === WordPress Content Styles === */
.entry-content ul,
.entry-content ol {
    padding-left: 24px;
    margin-bottom: 1.5em;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.entry-content th,
.entry-content td {
    padding: 12px;
    border: 1px solid #dadce0;
    text-align: left;
}

.entry-content th {
    background: #f8f9fa;
    font-weight: 500;
}

/* ========================================
   Dark Mode
   ======================================== */
body.dark-mode {
    background-color: #121212;
    color: #e8eaed;
}

body.dark-mode .gn-header,
body.dark-mode .gn-nav-tabs {
    background: #1e1e1e;
    border-bottom-color: #333;
}

body.dark-mode .gn-header-action {
    color: #9aa0a6;
}

body.dark-mode .gn-header-action:hover {
    background: #333;
}

body.dark-mode .gn-search-form {
    background: #333;
}

body.dark-mode .gn-search-form:focus-within {
    background: #1e1e1e;
    box-shadow: 0 1px 6px rgba(255, 255, 255, 0.2);
}

body.dark-mode .gn-search-form input[type="search"] {
    color: #e8eaed;
}

body.dark-mode .gn-search-form input[type="search"]::placeholder {
    color: #9aa0a6;
}

body.dark-mode .gn-signin-btn {
    background: #8ab4f8;
    color: #121212;
}

body.dark-mode .gn-signin-btn:hover {
    background: #aecbfa;
}

body.dark-mode .gn-nav-menu li a {
    color: #9aa0a6;
}

body.dark-mode .gn-nav-menu li a:hover,
body.dark-mode .gn-nav-menu li.current-menu-item a,
body.dark-mode .gn-nav-menu li.current_page_item a {
    color: #8ab4f8;
    border-bottom-color: #8ab4f8;
}

body.dark-mode .gn-main-content {
    background: #121212;
}

body.dark-mode .gn-briefing-title,
body.dark-mode .gn-archive-title,
body.dark-mode .gn-search-title,
body.dark-mode .gn-article-title {
    color: #e8eaed;
}

body.dark-mode .gn-briefing-date,
body.dark-mode .gn-archive-desc,
body.dark-mode .gn-search-count {
    color: #9aa0a6;
}

body.dark-mode .gn-story-group,
body.dark-mode .gn-sidebar-card,
body.dark-mode .gn-article,
body.dark-mode .gn-news-card {
    background: #1e1e1e;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-mode .gn-story-featured-title a,
body.dark-mode .gn-story-related-title a,
body.dark-mode .gn-sidebar-news-title a,
body.dark-mode .gn-card-title,
body.dark-mode .gn-article-content {
    color: #e8eaed;
}

body.dark-mode .gn-story-related-title a:hover,
body.dark-mode .gn-sidebar-news-title a:hover,
body.dark-mode .gn-card-title a:hover {
    color: #8ab4f8;
}

body.dark-mode .gn-story-featured,
body.dark-mode .gn-story-related-item,
body.dark-mode .gn-sidebar-news-divider,
body.dark-mode .gn-sidebar-card-title,
body.dark-mode .gn-article-footer,
body.dark-mode .gn-related-posts,
body.dark-mode .gn-comments {
    border-bottom-color: #333;
}

body.dark-mode .gn-story-meta,
body.dark-mode .gn-sidebar-news-time,
body.dark-mode .gn-card-meta,
body.dark-mode .gn-source-name,
body.dark-mode .gn-card-excerpt {
    color: #9aa0a6;
}

body.dark-mode .gn-see-more-btn {
    background: #333;
    color: #8ab4f8;
}

body.dark-mode .gn-see-more-btn:hover {
    background: #444;
}

body.dark-mode .gn-sidebar-signin-btn {
    background: #8ab4f8;
    color: #121212;
}

body.dark-mode .gn-sidebar-signin-btn:hover {
    background: #aecbfa;
}

body.dark-mode .gn-picks-desc {
    color: #9aa0a6;
}

body.dark-mode .gn-footer {
    background: #1e1e1e;
    border-top-color: #333;
}

body.dark-mode .gn-footer-menu li a,
body.dark-mode .gn-copyright {
    color: #9aa0a6;
}

body.dark-mode .gn-footer-menu li a:hover {
    color: #8ab4f8;
}

body.dark-mode .gn-article-categories a {
    background: #333;
    color: #8ab4f8;
}

body.dark-mode .gn-article-categories a:hover {
    background: #444;
}

body.dark-mode .gn-article-tags a {
    background: #333;
    color: #9aa0a6;
}

body.dark-mode .gn-article-tags a:hover {
    background: #444;
    color: #e8eaed;
}

body.dark-mode .gn-author-bio {
    background: #1e1e1e;
}

body.dark-mode .gn-author-name {
    color: #e8eaed;
}

body.dark-mode .gn-author-desc {
    color: #9aa0a6;
}

body.dark-mode .gn-breadcrumb {
    color: #9aa0a6;
}

body.dark-mode .gn-breadcrumb a {
    color: #8ab4f8;
}

body.dark-mode .gn-no-results svg {
    stroke: #555;
}

body.dark-mode .gn-no-results h3 {
    color: #e8eaed;
}

body.dark-mode .gn-no-results p {
    color: #9aa0a6;
}

body.dark-mode .gn-pagination .page-numbers {
    color: #9aa0a6;
}

body.dark-mode .gn-pagination .page-numbers:hover {
    background: #333;
}

body.dark-mode .gn-pagination .page-numbers.current {
    background: #8ab4f8;
    color: #121212;
}

body.dark-mode .comment-body {
    background: #1e1e1e;
}

body.dark-mode .comment-author {
    color: #e8eaed;
}

body.dark-mode .comment-metadata {
    color: #9aa0a6;
}

body.dark-mode .comment-content {
    color: #e8eaed;
}

body.dark-mode .entry-content th {
    background: #333;
}

body.dark-mode .entry-content th,
body.dark-mode .entry-content td {
    border-color: #444;
}

body.dark-mode .gn-placeholder-img {
    background: linear-gradient(135deg, #333 0%, #444 100%);
}

body.dark-mode .gn-card-image {
    background: #333;
}

body.dark-mode .gn-sidebar-news-thumb {
    background: #333;
}

body.dark-mode .gn-mobile-menu {
    background: #1e1e1e;
}

body.dark-mode .gn-mobile-menu-header {
    border-bottom-color: #333;
}

body.dark-mode .gn-mobile-nav-list li a {
    color: #e8eaed;
    border-bottom-color: #333;
}

body.dark-mode .gn-mobile-nav-list li a:hover {
    background: #333;
    color: #8ab4f8;
}

body.dark-mode .gn-overlay {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .gn-refresh-btn svg {
    stroke: #9aa0a6;
}

body.dark-mode .gn-refresh-btn:hover {
    background: #333;
}

body.dark-mode .gn-story-section-title a,
body.dark-mode .gn-sidebar-card-title a {
    color: #8ab4f8;
}

body.dark-mode .gn-story-section-title a:hover,
body.dark-mode .gn-sidebar-card-title a:hover {
    color: #aecbfa;
}

body.dark-mode .gn-story-section-title svg {
    stroke: #8ab4f8;
}

body.dark-mode .gn-search-title svg {
    stroke: #9aa0a6;
}

body.dark-mode .gn-search-title span {
    color: #8ab4f8;
}

body.dark-mode .gn-article-tags svg {
    stroke: #9aa0a6;
}

body.dark-mode .gn-source-icon {
    background: #8ab4f8;
    color: #121212;
}

body.dark-mode .gn-source-badge {
    background: #8ab4f8;
    color: #121212;
}

body.dark-mode .gn-logo-news {
    color: #9aa0a6;
}

body.dark-mode .gn-card-link:hover .gn-card-image img {
    transform: scale(1.03);
}

body.dark-mode .gn-story-featured:hover .gn-story-featured-img img {
    transform: scale(1.03);
}

body.dark-mode .gn-sidebar-news-thumb:hover img {
    transform: scale(1.05);
}

/* Dark Mode Toggle Styles */
.gn-dark-mode-toggle {
    position: relative;
    overflow: hidden;
    color: #5f6368;
    background: transparent;
}

.gn-theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    position: relative;
}

.gn-theme-icon svg {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gn-icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.gn-icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

body.dark-mode .gn-dark-mode-toggle {
    color: #e8eaed;
}

body.dark-mode .gn-icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

body.dark-mode .gn-icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Hover animation */
.gn-dark-mode-toggle:hover .gn-icon-sun {
    transform: rotate(30deg) scale(1.1);
}

.gn-dark-mode-toggle:hover .gn-icon-moon {
    transform: rotate(-15deg) scale(1.1);
}

body.dark-mode .gn-dark-mode-toggle:hover .gn-icon-moon {
    transform: rotate(15deg) scale(1.1);
}

/* ========================================
   User Dropdown Menu
   ======================================== */
.gn-user-menu {
    position: relative;
}

.gn-user-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    background: transparent;
    transition: box-shadow 0.2s;
}

.gn-user-avatar-btn:hover {
    box-shadow: 0 0 0 2px #1a73e8;
}

.gn-user-avatar-btn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.gn-user-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.gn-user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gn-user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e8eaed;
}

.gn-user-dropdown-avatar img {
    border-radius: 50%;
}

.gn-user-dropdown-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gn-user-dropdown-name {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gn-user-dropdown-email {
    font-size: 12px;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gn-user-dropdown-body {
    padding: 8px 0;
}

.gn-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 14px;
    color: #202124;
    transition: background 0.2s;
}

.gn-user-dropdown-item:hover {
    background: #f1f3f4;
    color: #202124;
}

.gn-user-dropdown-item svg {
    flex-shrink: 0;
    stroke: #5f6368;
}

.gn-user-logout {
    color: #d93025;
}

.gn-user-logout:hover {
    background: #fce8e6;
    color: #d93025;
}

.gn-user-logout svg {
    stroke: #d93025;
}

body.dark-mode .gn-user-dropdown {
    background: #1e1e1e;
    border: 1px solid #333;
}

body.dark-mode .gn-user-dropdown-header {
    border-bottom-color: #333;
}

body.dark-mode .gn-user-dropdown-name {
    color: #e8eaed;
}

body.dark-mode .gn-user-dropdown-email {
    color: #9aa0a6;
}

body.dark-mode .gn-user-dropdown-item {
    color: #e8eaed;
}

body.dark-mode .gn-user-dropdown-item:hover {
    background: #2d2d2d;
}

body.dark-mode .gn-user-dropdown-item svg {
    stroke: #9aa0a6;
}

body.dark-mode .gn-user-logout svg {
    stroke: #d93025;
}

/* ========================================
   Auth Pages (Login / Register)
   ======================================== */
.gn-auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #fff;
}

body.dark-mode .gn-auth-page {
    background: #121212;
}

body.gn-auth-body {
    margin: 0;
    padding: 0;
}

body.gn-auth-body .gn-header,
body.gn-auth-body .gn-main-content,
body.gn-auth-body .gn-footer {
    display: none;
}

.gn-auth-container {
    width: 100%;
    max-width: 450px;
}

.gn-auth-card {
    padding: 48px 40px;
    border: 1px solid #dadce0;
    border-radius: 8px;
}

body.dark-mode .gn-auth-card {
    border-color: #333;
    background: #1e1e1e;
}

.gn-auth-logo {
    text-align: center;
    margin-bottom: 16px;
}

.gn-auth-logo .gn-logo {
    font-size: 36px;
}

.gn-auth-title {
    text-align: center;
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 4px;
}

body.dark-mode .gn-auth-title {
    color: #e8eaed;
}

.gn-auth-subtitle {
    text-align: center;
    font-size: 16px;
    color: #202124;
    margin-bottom: 32px;
}

body.dark-mode .gn-auth-subtitle {
    color: #e8eaed;
}

.gn-auth-error,
.gn-auth-success {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.gn-auth-error {
    background: #fce8e6;
    color: #d93025;
}

.gn-auth-success {
    background: #e6f4ea;
    color: #188038;
}

body.dark-mode .gn-auth-error {
    background: #332a2a;
}

body.dark-mode .gn-auth-success {
    background: #2a3330;
}

.gn-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gn-auth-row {
    display: flex;
    gap: 12px;
}

.gn-auth-field {
    position: relative;
    flex: 1;
}

.gn-auth-field-half {
    flex: 1;
}

.gn-auth-input {
    width: 100%;
    padding: 25px 12px 8px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    color: #202124;
    background: transparent;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gn-auth-input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 231, 0.2);
}

body.dark-mode .gn-auth-input {
    border-color: #555;
    color: #e8eaed;
}

body.dark-mode .gn-auth-input:focus {
    border-color: #8ab4f8;
    box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
}

.gn-auth-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #5f6368;
    pointer-events: none;
    transition: all 0.2s;
}

.gn-auth-input:focus + .gn-auth-label,
.gn-auth-input:not(:placeholder-shown) + .gn-auth-label,
.gn-auth-input.gn-has-value + .gn-auth-label {
    top: 10px !important;
    transform: translateY(0) !important;
    font-size: 11px !important;
    color: #1a73e8;
}

body.dark-mode .gn-auth-label {
    color: #9aa0a6;
}

body.dark-mode .gn-auth-input:focus + .gn-auth-label,
body.dark-mode .gn-auth-input:not(:placeholder-shown) + .gn-auth-label,
body.dark-mode .gn-auth-input.gn-has-value + .gn-auth-label {
    color: #8ab4f8;
}

.gn-auth-toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.gn-auth-toggle-pass:hover {
    opacity: 0.7;
}

.gn-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.gn-auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #202124;
}

body.dark-mode .gn-auth-checkbox {
    color: #e8eaed;
}

.gn-auth-checkbox input[type="checkbox"] {
    display: none;
}

.gn-checkbox-mark {
    width: 18px;
    height: 18px;
    border: 2px solid #5f6368;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gn-auth-checkbox input:checked + .gn-checkbox-mark {
    background: #1a73e8;
    border-color: #1a73e8;
}

.gn-auth-checkbox input:checked + .gn-checkbox-mark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

body.dark-mode .gn-checkbox-mark {
    border-color: #9aa0a6;
}

body.dark-mode .gn-auth-checkbox input:checked + .gn-checkbox-mark {
    background: #8ab4f8;
    border-color: #8ab4f8;
}

.gn-auth-link {
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.gn-auth-link:hover {
    color: #1765cc;
    text-decoration: underline;
}

body.dark-mode .gn-auth-link {
    color: #8ab4f8;
}

body.dark-mode .gn-auth-link:hover {
    color: #aecbfa;
}

.gn-auth-submit {
    width: 100%;
    padding: 12px 24px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.gn-auth-submit:hover {
    background: #1765cc;
    box-shadow: 0 1px 3px rgba(26, 115, 231, 0.3);
}

body.dark-mode .gn-auth-submit {
    background: #8ab4f8;
    color: #121212;
}

body.dark-mode .gn-auth-submit:hover {
    background: #aecbfa;
}

.gn-auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.gn-auth-divider::before,
.gn-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dadce0;
}

body.dark-mode .gn-auth-divider::before,
body.dark-mode .gn-auth-divider::after {
    background: #333;
}

.gn-auth-divider span {
    padding: 0 16px;
    font-size: 14px;
    color: #5f6368;
}

body.dark-mode .gn-auth-divider span {
    color: #9aa0a6;
}

.gn-auth-footer {
    font-size: 12px;
    color: #5f6368;
    line-height: 1.5;
}

body.dark-mode .gn-auth-footer {
    color: #9aa0a6;
}

.gn-auth-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
    font-size: 14px;
    color: #5f6368;
}

body.dark-mode .gn-auth-switch {
    color: #9aa0a6;
}

.gn-auth-page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
    font-size: 12px;
}

.gn-auth-footer-left {
    color: #5f6368;
}

body.dark-mode .gn-auth-footer-left {
    color: #9aa0a6;
}

.gn-auth-footer-right {
    display: flex;
    gap: 24px;
}

.gn-auth-footer-right a {
    color: #5f6368;
    font-size: 12px;
}

.gn-auth-footer-right a:hover {
    color: #202124;
}

body.dark-mode .gn-auth-footer-right a {
    color: #9aa0a6;
}

body.dark-mode .gn-auth-footer-right a:hover {
    color: #e8eaed;
}

/* Auth page responsive */
@media (max-width: 600px) {
    .gn-auth-card {
        padding: 32px 24px;
        border: none;
    }

    .gn-auth-row {
        flex-direction: column;
        gap: 16px;
    }

    .gn-auth-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .gn-auth-page-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .gn-auth-footer-right {
        justify-content: center;
    }
}

/* ========================================
   Trending Page
   ======================================== */
.gn-trending-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.gn-trending-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eaed;
}

body.dark-mode .gn-trending-header {
    border-bottom-color: #333;
}

.gn-trending-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 8px;
}

body.dark-mode .gn-trending-title {
    color: #e8eaed;
}

.gn-trending-title svg {
    flex-shrink: 0;
}

.gn-trending-subtitle {
    font-size: 14px;
    color: #5f6368;
    margin: 0;
}

body.dark-mode .gn-trending-subtitle {
    color: #9aa0a6;
}

.gn-trending-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
}

.gn-trending-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gn-trending-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #e8eaed;
    transition: background 0.2s;
}

.gn-trending-item:last-child {
    border-bottom: none;
}

.gn-trending-item:hover {
    background: #f8f9fa;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 8px;
}

body.dark-mode .gn-trending-item {
    border-bottom-color: #333;
}

body.dark-mode .gn-trending-item:hover {
    background: #1e1e1e;
}

.gn-trending-rank {
    flex-shrink: 0;
    width: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
}

.gn-rank-number {
    font-size: 24px;
    font-weight: 500;
    color: #5f6368;
}

.gn-trending-item:nth-child(1) .gn-rank-number {
    color: #1a73e8;
}

.gn-trending-item:nth-child(2) .gn-rank-number {
    color: #34a853;
}

.gn-trending-item:nth-child(3) .gn-rank-number {
    color: #fbbc04;
}

body.dark-mode .gn-rank-number {
    color: #9aa0a6;
}

body.dark-mode .gn-trending-item:nth-child(1) .gn-rank-number {
    color: #8ab4f8;
}

body.dark-mode .gn-trending-item:nth-child(2) .gn-rank-number {
    color: #81c995;
}

body.dark-mode .gn-trending-item:nth-child(3) .gn-rank-number {
    color: #fdd663;
}

.gn-trending-content {
    flex: 1;
    display: flex;
    gap: 16px;
    min-width: 0;
}

.gn-trending-thumb {
    flex-shrink: 0;
    width: 104px;
    height: 104px;
    border-radius: 8px;
    overflow: hidden;
}

.gn-trending-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gn-trending-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gn-trending-source {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #5f6368;
}

body.dark-mode .gn-trending-source {
    color: #9aa0a6;
}

.gn-trending-source .gn-source-icon {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

.gn-trending-time {
    color: #5f6368;
}

body.dark-mode .gn-trending-time {
    color: #9aa0a6;
}

.gn-trending-item-title {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    color: #202124;
}

body.dark-mode .gn-trending-item-title {
    color: #e8eaed;
}

.gn-trending-item-title a {
    color: inherit;
    text-decoration: none;
}

.gn-trending-item-title a:hover {
    color: #1a73e8;
}

body.dark-mode .gn-trending-item-title a:hover {
    color: #8ab4f8;
}

.gn-trending-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #5f6368;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.dark-mode .gn-trending-excerpt {
    color: #9aa0a6;
}

.gn-trending-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #5f6368;
}

body.dark-mode .gn-trending-meta {
    color: #9aa0a6;
}

.gn-trending-views,
.gn-trending-comments {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gn-trending-category {
    padding: 2px 8px;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}

.gn-trending-category:hover {
    background: #d2e3fc;
}

body.dark-mode .gn-trending-category {
    background: #1e3a5f;
    color: #8ab4f8;
}

body.dark-mode .gn-trending-category:hover {
    background: #2a4d7a;
}

.gn-trending-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
}

.gn-trending-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #202124;
    background: #fff;
    border: 1px solid #dadce0;
    text-decoration: none;
    transition: all 0.2s;
}

.gn-trending-pagination .page-numbers:hover {
    background: #f1f3f4;
    border-color: #1a73e8;
}

.gn-trending-pagination .page-numbers.current {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

body.dark-mode .gn-trending-pagination .page-numbers {
    background: #1e1e1e;
    border-color: #333;
    color: #e8eaed;
}

body.dark-mode .gn-trending-pagination .page-numbers:hover {
    background: #2d2d2d;
    border-color: #8ab4f8;
}

body.dark-mode .gn-trending-pagination .page-numbers.current {
    background: #8ab4f8;
    color: #121212;
    border-color: #8ab4f8;
}

.gn-trending-empty {
    text-align: center;
    padding: 64px 24px;
    color: #5f6368;
}

.gn-trending-empty svg {
    margin-bottom: 16px;
}

.gn-trending-empty p {
    font-size: 16px;
    margin: 0;
}

body.dark-mode .gn-trending-empty {
    color: #9aa0a6;
}

/* Trending page responsive */
@media (max-width: 1024px) {
    .gn-trending-layout {
        grid-template-columns: 1fr;
    }

    .gn-trending-sidebar {
        order: -1;
    }
}

@media (max-width: 600px) {
    .gn-trending-page {
        padding: 16px;
    }

    .gn-trending-title {
        font-size: 22px;
    }

    .gn-trending-item {
        flex-direction: column;
        gap: 12px;
    }

    .gn-trending-rank {
        width: auto;
        justify-content: flex-start;
        padding: 0;
    }

    .gn-trending-content {
        flex-direction: column;
    }

    .gn-trending-thumb {
        width: 100%;
        height: 180px;
    }

    .gn-trending-item-title {
        font-size: 16px;
    }
}

/* ========================================
   Generic Page Template
   ======================================== */
.gn-page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px;
}

.gn-page-container {
    background: #fff;
    border-radius: 8px;
    padding: 32px;
}

body.dark-mode .gn-page-container {
    background: #1e1e1e;
}

.gn-page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eaed;
}

body.dark-mode .gn-page-header {
    border-bottom-color: #333;
}

.gn-page-title {
    font-size: 32px;
    font-weight: 400;
    color: #202124;
    margin: 0;
}

body.dark-mode .gn-page-title {
    color: #e8eaed;
}

.gn-page-body {
    font-size: 16px;
    line-height: 1.6;
    color: #202124;
}

body.dark-mode .gn-page-body {
    color: #e8eaed;
}

@media (max-width: 600px) {
    .gn-page-content {
        padding: 16px;
    }

    .gn-page-container {
        padding: 24px 16px;
    }

    .gn-page-title {
        font-size: 24px;
    }
}

/* ========================================
   Source Attribution (Auto-imported)
   ======================================== */
.gn-source-attribution {
    margin-top: 32px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-left: 4px solid #1a73e8;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #5f6368;
}

.gn-source-attribution a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.gn-source-attribution a:hover {
    text-decoration: underline;
}

body.dark-mode .gn-source-attribution {
    background: #1e1e1e;
    color: #9aa0a6;
    border-left-color: #8ab4f8;
}

body.dark-mode .gn-source-attribution a {
    color: #8ab4f8;
}

/* ============================================
   SKIP TO CONTENT (Accessibility)
   ============================================ */
.gn-skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a73e8;
    color: #fff;
    padding: 8px 20px;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.2s;
}

.gn-skip-link:focus {
    top: 0;
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.gn-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: #1a73e8;
    z-index: 10001;
    transition: width 0.1s ease-out;
}

body.dark-mode .gn-progress-bar {
    background: #8ab4f8;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.gn-back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
    z-index: 999;
}

.gn-back-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gn-back-top:hover {
    background: #f1f3f4;
}

.gn-back-top svg {
    color: #5f6368;
}

body.dark-mode .gn-back-top {
    background: #292a2d;
    border-color: #3c4043;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body.dark-mode .gn-back-top:hover {
    background: #3c4043;
}

body.dark-mode .gn-back-top svg {
    color: #9aa0a6;
}

/* ============================================
   STICKY HEADER SHADOW (class-based)
   ============================================ */
.gn-header--shadow {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

body.dark-mode .gn-header--shadow {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}

/* ============================================
   SHARE BUTTONS
   ============================================ */
.gn-article-share {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gn-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #5f6368;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.gn-share-btn:hover {
    background: #f1f3f4;
}

.gn-share-btn[data-share="twitter"]:hover {
    color: #1da1f2;
    background: #e8f5fd;
}

.gn-share-btn[data-share="facebook"]:hover {
    color: #1877f2;
    background: #e8f0fe;
}

.gn-share-btn[data-share="linkedin"]:hover {
    color: #0a66c2;
    background: #e8f0fe;
}

.gn-share-btn[data-share="copy"]:hover {
    color: #1a73e8;
    background: #e8f0fe;
}

.gn-share-copy-msg {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #202124;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 6px;
}

.gn-share-copied .gn-share-copy-msg {
    opacity: 1;
}

body.dark-mode .gn-share-btn {
    color: #9aa0a6;
}

body.dark-mode .gn-share-btn:hover {
    background: #3c4043;
}

body.dark-mode .gn-share-btn[data-share="twitter"]:hover {
    color: #1da1f2;
    background: #1a2733;
}

body.dark-mode .gn-share-btn[data-share="facebook"]:hover {
    color: #8ab4f8;
    background: #1a2733;
}

body.dark-mode .gn-share-btn[data-share="linkedin"]:hover {
    color: #8ab4f8;
    background: #1a2733;
}

body.dark-mode .gn-share-btn[data-share="copy"]:hover {
    color: #8ab4f8;
    background: #1a2733;
}

body.dark-mode .gn-share-copy-msg {
    background: #e8eaed;
    color: #202124;
}

/* ============================================
   404 ERROR PAGE
   ============================================ */
.gn-error-page {
    padding: 60px 20px;
    min-height: 60vh;
}

.gn-error-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.gn-error-code {
    font-size: 120px;
    font-weight: 700;
    color: #dadce0;
    line-height: 1;
    margin-bottom: 10px;
}

.gn-error-title {
    font-size: 28px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 12px;
}

.gn-error-desc {
    font-size: 16px;
    color: #5f6368;
    margin: 0 0 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.gn-error-search {
    max-width: 480px;
    margin: 0 auto 24px;
}

.gn-error-search .gn-search-form {
    display: flex;
    border: 1px solid #dadce0;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
}

.gn-error-search input {
    flex: 1;
    border: none;
    padding: 12px 18px;
    font-size: 15px;
    outline: none;
    background: transparent;
}

.gn-error-search button {
    border: none;
    background: transparent;
    padding: 12px 16px;
    cursor: pointer;
}

.gn-error-actions {
    margin-bottom: 50px;
}

.gn-error-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a73e8;
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s;
}

.gn-error-btn:hover {
    background: #1557b0;
}

.gn-error-suggestions h3 {
    font-size: 18px;
    font-weight: 500;
    color: #202124;
    margin: 0 0 20px;
    text-align: left;
}

body.dark-mode .gn-error-code {
    color: #3c4043;
}

body.dark-mode .gn-error-title {
    color: #e8eaed;
}

body.dark-mode .gn-error-desc {
    color: #9aa0a6;
}

body.dark-mode .gn-error-search .gn-search-form {
    border-color: #3c4043;
    background: #292a2d;
}

body.dark-mode .gn-error-search input {
    color: #e8eaed;
}

body.dark-mode .gn-error-suggestions h3 {
    color: #e8eaed;
}

/* ============================================
   ARCHIVE PAGE
   ============================================ */
.gn-archive-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.gn-archive-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eaed;
}

.gn-archive-title {
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 8px;
}

.gn-archive-desc {
    font-size: 14px;
    color: #5f6368;
    line-height: 1.6;
}

.gn-archive-sidebar {
    position: relative;
}

.gn-no-results {
    text-align: center;
    padding: 60px 20px;
}

.gn-no-results svg {
    margin-bottom: 16px;
}

.gn-no-results h2 {
    font-size: 20px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 8px;
}

.gn-no-results p {
    font-size: 14px;
    color: #5f6368;
}

@media (max-width: 900px) {
    .gn-archive-layout {
        grid-template-columns: 1fr;
    }
    .gn-archive-sidebar {
        display: none;
    }
}

body.dark-mode .gn-archive-header {
    border-bottom-color: #3c4043;
}

body.dark-mode .gn-archive-title {
    color: #e8eaed;
}

body.dark-mode .gn-archive-desc {
    color: #9aa0a6;
}

body.dark-mode .gn-no-results h2 {
    color: #e8eaed;
}

body.dark-mode .gn-no-results p {
    color: #9aa0a6;
}

/* ============================================
   FOOTER WIDGETS
   ============================================ */
.gn-footer-widgets {
    background: #fff;
    border-top: 1px solid #e8eaed;
    padding: 40px 20px;
}

.gn-footer-widgets-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}

.gn-footer-widgets .widget {
    margin-bottom: 0;
}

.gn-footer-widgets .widget-title {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1a73e8;
    display: inline-block;
}

.gn-footer-widgets .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gn-footer-widgets .widget ul li {
    padding: 4px 0;
}

.gn-footer-widgets .widget ul li a {
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.gn-footer-widgets .widget ul li a:hover {
    color: #1a73e8;
}

body.dark-mode .gn-footer-widgets {
    background: #1e1e1e;
    border-top-color: #3c4043;
}

body.dark-mode .gn-footer-widgets .widget-title {
    color: #e8eaed;
    border-bottom-color: #8ab4f8;
}

body.dark-mode .gn-footer-widgets .widget ul li a {
    color: #9aa0a6;
}

body.dark-mode .gn-footer-widgets .widget ul li a:hover {
    color: #8ab4f8;
}

/* ============================================
   PAGE TEMPLATE
   ============================================ */
.gn-page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 20px;
}

.gn-page-container {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.gn-page-article {
    margin-bottom: 0;
}

.gn-page-header {
    margin-bottom: 24px;
}

.gn-page-title {
    font-size: 28px;
    font-weight: 400;
    color: #202124;
    line-height: 1.3;
}

.gn-page-body {
    font-size: 16px;
    line-height: 1.8;
    color: #3c4043;
}

.gn-page-body p {
    margin-bottom: 16px;
}

.gn-page-body h2,
.gn-page-body h3,
.gn-page-body h4 {
    margin-top: 32px;
    margin-bottom: 12px;
    color: #202124;
}

.gn-page-body a {
    color: #1a73e8;
    text-decoration: none;
}

.gn-page-body a:hover {
    text-decoration: underline;
}

.gn-page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

body.dark-mode .gn-page-container {
    background: #292a2d;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

body.dark-mode .gn-page-title {
    color: #e8eaed;
}

body.dark-mode .gn-page-body {
    color: #9aa0a6;
}

body.dark-mode .gn-page-body h2,
body.dark-mode .gn-page-body h3,
body.dark-mode .gn-page-body h4 {
    color: #e8eaed;
}

body.dark-mode .gn-page-body a {
    color: #8ab4f8;
}

/* ============================================
   BREADCRUMB DARK MODE
   ============================================ */
body.dark-mode .gn-breadcrumb {
    color: #9aa0a6;
}

body.dark-mode .gn-breadcrumb a {
    color: #8ab4f8;
}

body.dark-mode .gn-breadcrumb svg {
    stroke: #9aa0a6;
}

/* ============================================
   SEARCH FORM (global)
   ============================================ */
.gn-searchform {
    width: 100%;
}

.gn-searchform .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.gn-searchform-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #dadce0;
    border-radius: 24px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.gn-searchform-wrapper:focus-within {
    box-shadow: 0 1px 6px rgba(32,33,36,0.28);
    border-color: transparent;
}

.gn-searchform-icon {
    padding: 0 4px 0 14px;
    display: flex;
    align-items: center;
}

.gn-searchform-input {
    flex: 1;
    border: none;
    padding: 12px 8px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    background: transparent;
    color: #202124;
}

.gn-searchform-input::placeholder {
    color: #9aa0a6;
}

.gn-searchform-submit {
    border: none;
    background: transparent;
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
    border-radius: 50%;
    margin-right: 4px;
}

.gn-searchform-submit:hover {
    background: #f1f3f4;
}

body.dark-mode .gn-searchform-wrapper {
    border-color: #3c4043;
    background: #292a2d;
}

body.dark-mode .gn-searchform-wrapper:focus-within {
    box-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

body.dark-mode .gn-searchform-input {
    color: #e8eaed;
}

body.dark-mode .gn-searchform-input::placeholder {
    color: #9aa0a6;
}

body.dark-mode .gn-searchform-submit:hover {
    background: #3c4043;
}

/* 404 search form override */
.gn-error-search .gn-searchform-wrapper {
    max-width: 480px;
    margin: 0 auto;
}

/* ============================================
   LAST MODIFIED NOTICE
   ============================================ */
.gn-last-modified {
    font-size: 13px;
    color: #5f6368;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #1a73e8;
}

.gn-last-modified svg {
    vertical-align: middle;
    margin-right: 4px;
}

body.dark-mode .gn-last-modified {
    background: #1e1e1e;
    color: #9aa0a6;
    border-left-color: #8ab4f8;
}

/* ============================================
   FIGCAPTION / IMAGE CAPTION
   ============================================ */
.gn-article-featured-image figcaption,
.gn-image-caption {
    font-size: 13px;
    color: #5f6368;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
    line-height: 1.5;
}

.gn-article-content figcaption {
    font-size: 13px;
    color: #5f6368;
    text-align: center;
    margin-top: 6px;
    font-style: italic;
}

body.dark-mode .gn-article-featured-image figcaption,
body.dark-mode .gn-image-caption,
body.dark-mode .gn-article-content figcaption {
    color: #9aa0a6;
}

/* ============================================
   IFRAME / EMBED RESPONSIVE
   ============================================ */
.gn-article-content iframe,
.gn-article-content embed,
.gn-article-content object {
    max-width: 100%;
    border-radius: 8px;
}

.gn-article-content .wp-block-embed__wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
    border-radius: 8px;
}

.gn-article-content .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================================
   READING TIME BADGE
   ============================================ */
.gn-reading-time {
    font-size: 12px;
    color: #5f6368;
    white-space: nowrap;
}

body.dark-mode .gn-reading-time {
    color: #9aa0a6;
}

/* ============================================
   CAPTCHA STYLES
   ============================================ */
.gn-auth-captcha {
    margin-bottom: 8px;
}

.gn-captcha-input {
    letter-spacing: 2px;
    font-size: 18px !important;
    font-weight: 500;
    text-align: center;
}

.gn-auth-captcha .gn-auth-label {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    letter-spacing: 1px;
}

body.dark-mode .gn-auth-captcha .gn-auth-label {
    color: #e8eaed;
}

/* ============================================
   AUTH SUCCESS MESSAGE
   ============================================ */
.gn-auth-success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #e6f4ea;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #137333;
}

body.dark-mode .gn-auth-success {
    background: #1b3a2a;
    color: #81c995;
}

body.dark-mode .gn-auth-success svg {
    stroke: #81c995;
}
