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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #839496;
    background: #002b36;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: #073642;
    color: #93a1a1;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.header-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0;
    color: #268bd2;
}

header h1 a {
    color: #268bd2;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

header h1 a:hover {
    opacity: 0.8;
}

.logo-icon {
    height: 2rem;
    width: 2rem;
    vertical-align: middle;
    border: 1px solid #586e75;
    border-radius: 3px;
}

.tagline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    color: #93a1a1;
    margin: 0;
}

.refresh-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #839496;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.refresh-toggle input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.refresh-toggle:hover {
    color: #93a1a1;
}

.social-link,
.rss-link {
    color: #268bd2;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(38, 139, 210, 0.15);
    border: 1px solid #268bd2;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.social-link:hover,
.rss-link:hover {
    background: rgba(38, 139, 210, 0.25);
}

.social-link i {
    margin-right: 0.25rem;
}

/* Search Box */
.search-box {
    background: #073642;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #586e75;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    background: #002b36;
    border: 1px solid #586e75;
    border-radius: 4px;
    color: #93a1a1;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #268bd2;
}

.search-input::placeholder {
    color: #586e75;
}

.search-button {
    padding: 0.75rem 1.5rem;
    background: #268bd2;
    color: #fdf6e3;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-button:hover {
    background: #2aa198;
}

.search-button i {
    margin-right: 0.25rem;
}

.clear-search {
    padding: 0.75rem 1rem;
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.clear-search:hover {
    background: rgba(220, 53, 69, 0.25);
}

.search-results-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #586e75;
    color: #93a1a1;
    font-size: 0.95rem;
}

/* Inline search form (for article pages) */
.search-form-inline {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-input-inline {
    padding: 0.5rem 0.75rem;
    background: #002b36;
    border: 1px solid #586e75;
    border-radius: 4px;
    color: #93a1a1;
    font-size: 0.9rem;
    width: 250px;
}

.search-input-inline:focus {
    outline: none;
    border-color: #268bd2;
}

.search-input-inline::placeholder {
    color: #586e75;
}

.search-button-inline {
    padding: 0.5rem 0.75rem;
    background: #268bd2;
    color: #fdf6e3;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-button-inline:hover {
    background: #2aa198;
}

/* No results message */
.no-results {
    background: #073642;
    padding: 3rem 2rem;
    border-radius: 8px;
    border: 1px solid #586e75;
    text-align: center;
}

.no-results p {
    font-size: 1.1rem;
    color: #93a1a1;
    margin-bottom: 1rem;
}

/* Source Filter */
.source-filter {
    background: #073642;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #586e75;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.filter-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: #002b36;
    color: #839496;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #586e75;
}

.filter-badge:hover {
    background: #586e75;
    color: #fdf6e3;
}

.filter-badge.active {
    background: #268bd2;
    color: #fdf6e3;
    border-color: #268bd2;
}

/* Articles */
.articles {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-card {
    background: #073642;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #586e75;
    transition: all 0.2s;
}

.article-card:hover {
    border-color: #268bd2;
    box-shadow: 0 0 20px rgba(38, 139, 210, 0.2);
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.source-badge {
    background: #268bd2;
    color: #fdf6e3;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.source-badge:hover {
    background: #2aa198;
}

.article-time {
    color: #586e75;
    font-size: 0.9rem;
}

.article-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-title a {
    color: #93a1a1;
    text-decoration: none;
    transition: color 0.2s;
    flex: 1;
}

.article-title a:hover {
    color: #268bd2;
}

.article-description {
    color: #839496;
    line-height: 1.6;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0.25rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.copy-btn:hover {
    opacity: 1;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0;
    padding: 1.5rem;
    background: #073642;
    border-radius: 8px;
    border: 1px solid #586e75;
}

.page-link {
    color: #268bd2;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: #002b36;
    border: 1px solid #268bd2;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 600;
}

.page-link:hover {
    background: #268bd2;
    color: #fdf6e3;
}

.page-info {
    color: #93a1a1;
    font-weight: 600;
}

/* Footer */
footer {
    background: #073642;
    color: #586e75;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

footer p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

footer .contact-link {
    color: #268bd2;
    text-decoration: none;
    transition: color 0.2s;
}

footer .contact-link:hover {
    color: #2aa198;
}

/* Article Page */
.article-page {
    background: #073642;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #586e75;
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-meta time {
    color: #586e75;
}

.article-page-title {
    font-size: 2rem;
    color: #93a1a1;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.article-page-description {
    color: #839496;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #002b36;
    border-radius: 8px;
    border-left: 4px solid #268bd2;
}

.article-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.read-full-article {
    display: inline-block;
    background: #268bd2;
    color: #fdf6e3;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.read-full-article:hover {
    background: #2aa198;
}

.share-buttons .copy-btn {
    background: rgba(38, 139, 210, 0.15);
    border: 1px solid #268bd2;
    color: #268bd2;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 1;
}

.share-buttons .copy-btn:hover {
    background: rgba(38, 139, 210, 0.25);
}

.back-link {
    padding-top: 2rem;
    border-top: 1px solid #586e75;
}

.back-link a {
    color: #268bd2;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
}

.back-link a:hover {
    color: #2aa198;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .article-title {
        font-size: 1.2rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-input {
        min-width: 100%;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-button,
    .clear-search {
        width: 100%;
    }
    
    .search-input-inline {
        width: 100%;
    }
}
