/* ==========================================
   Știri pe Bune - Main Stylesheet
   ========================================== */

/* ==========================================
   GLOBAL STYLES & RESET
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #576c67;
    --primary-dark: #3d4d48;
    --primary-light: #718a84;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
}

body {
    font-family: 'Courier New', Courier, 'Lucida Console', Monaco, monospace;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    transition: padding 0.3s ease;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--white);
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.center-nav {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.sources-menu,
.user-menu {
    position: relative;
}

.sources-btn,
.user-btn,
.user-btn-link {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
    color: var(--white);
    text-decoration: none;
}

.sources-btn:hover,
.user-btn:hover,
.user-btn-link:hover {
    opacity: 0.8;
}

.sources-icon,
.user-icon {
    height: 32px;
    width: auto;
    display: block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    font-weight: bold;
    border-bottom: 2px solid var(--border-color);
    background-color: var(--bg-color);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: var(--bg-color);
}

.dropdown-menu a.active {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 500;
}

.dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 0;
}

/* ==========================================
   SEARCH
   ========================================== */
.search-menu {
    position: relative;
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
    color: var(--white);
}

.search-btn:hover {
    opacity: 0.8;
}

.search-btn svg {
    stroke: var(--white);
}

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.search-modal-content {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 700px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    animation: searchModalSlideIn 0.3s ease-out;
}

@keyframes searchModalSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.search-modal-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    padding: 8px 12px;
    font-family: inherit;
}

.search-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.search-close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.search-suggestions {
    max-height: 400px;
    overflow-y: auto;
    padding: 12px 0;
}

.search-suggestions:empty {
    display: none;
}

.search-group {
    margin-bottom: 16px;
}

.search-group-title {
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-suggestion-item:hover {
    background: #f5f5f5;
}

.search-suggestion-icon {
    font-size: 18px;
}

.search-suggestion-text {
    flex: 1;
}

.search-suggestion-count {
    font-size: 13px;
    color: #999;
}

.search-results {
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
}

.search-result-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.search-result-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.search-result-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

.search-hint {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #666;
}

.search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

/* ==========================================
   LAYOUT
   ========================================== */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 3rem;
}

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

.footer-info p {
    opacity: 0.8;
    margin: 0;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-nav a:hover {
    opacity: 1;
}

/* ==========================================
   FLOATING MENU BUTTON
   ========================================== */
.floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 999;
}

.floating-btn:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.floating-btn.active {
    background-color: var(--primary-dark);
}

/* Block Confirmation Modal */
.block-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.block-modal {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.block-modal h3 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.block-modal p {
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.5;
}

.block-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.block-modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.block-modal-confirm {
    background-color: var(--primary-color);
    color: var(--white);
}

.block-modal-confirm:hover {
    opacity: 0.9;
}

.block-modal-cancel {
    background-color: var(--border-color);
    color: var(--text-color);
}

.block-modal-cancel:hover {
    background-color: #d0d0d0;
}

.floating-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.floating-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.floating-menu {
    position: fixed;
    bottom: 88px;
    right: 24px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    min-width: 220px;
}

.floating-menu.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.floating-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.floating-menu .menu-item:last-child {
    border-bottom: none;
}

.floating-menu .menu-item:hover {
    background-color: var(--background-light);
}

.floating-menu .back-to-top {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 500;
}

.floating-menu .back-to-top:hover {
    background-color: var(--primary-dark);
}

.floating-menu .back-to-top svg {
    flex-shrink: 0;
}

/* ==========================================
   COOKIE CONSENT BANNER
   ========================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(44, 62, 80, 0.98);
    color: var(--white);
    padding: 1.5rem 1rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    animation: slideUp 0.3s ease-out;
}

.cookie-banner.show {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-content a {
    color: var(--white);
    text-decoration: underline;
}

.cookie-content a:hover {
    color: var(--primary-light);
}

.cookie-accept-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.cookie-accept-btn:hover {
    background-color: var(--primary-dark);
}

/* ==========================================
   NEWS FEED
   ========================================== */
.feed-header {
    margin-bottom: 2rem;
}

.feed-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Source Detail Page */
.source-header {
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.source-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.source-title-section h1 {
    margin: 0;
    font-size: 1.75rem;
}

.source-name-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.source-name-link:hover {
    opacity: 0.7;
}

.article-count {
    color: var(--text-light);
    font-size: 0.9rem;
    white-space: nowrap;
}

.source-header .last-update {
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
    white-space: nowrap;
}

.load-more {
    text-align: center;
    margin: 2rem 0;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
    text-align: center;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.last-update {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-style: italic;
    text-align: right;
}

.feed-stats {
    color: var(--text-light);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.feed-stats > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.active-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    margin-left: 1rem;
    font-size: 0.9rem;
}

.clear-filter {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    opacity: 0.8;
}

.clear-filter:hover {
    opacity: 1;
}

.articles-grid {
    display: grid;
    gap: 1.5rem;
}

.article-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: block;
}

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

.article-topic {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.2s;
}

.article-topic:hover {
    opacity: 0.8;
    cursor: pointer;
}

.article-sources {
    color: var(--text-light);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-sources a {
    background-color: var(--text-color);
    color: var(--white) !important;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--primary-light);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
}

.article-sources a:hover {
    opacity: 0.8;
}

.article-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-left: auto;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    transition: color 0.2s;
}

.article-title:hover {
    color: var(--primary-color);
}

.article-summary {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background-color: transparent;
    border: 1px solid var(--primary-light)  ;
    color: var(--text-color);
    padding: 0.20rem 0.70rem;
    border-radius: 20px;
    font-size: 0.65rem;
    text-decoration: none;
    transition: opacity 0.2s;
    display: inline-block;
    cursor: pointer;
}

.tag:hover {
    opacity: 0.8;
}

/* Follow Icon Styles */
.follow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.2s ease;
}

/* Desktop: Hide follow icon by default, animate on hover */
@media (min-width: 769px) {

    .follow-icon {
        margin-right: 0;
        width: 0;
        opacity: 0;
        overflow: hidden;
    }

    .article-topic:hover .follow-icon,
    .tag:hover .follow-icon,
    .article-sources a:hover .follow-icon,
    .article-topic-badge:hover .follow-icon,
    .tag-full:hover .follow-icon,
    .source-name:hover .follow-icon {
        margin-right: 4px;
        width: 18px;
        opacity: 1;
    }

    .follow-icon.following {
        margin-right: 4px;
        width: 18px;
        opacity: 1;
    }
}

.follow-icon:hover {
    transform: scale(1.15);
}

.follow-icon svg {
    display: block;
    color: var(--primary);
    flex-shrink: 0;
}

.follow-icon.following svg {
    fill: var(--primary);
}

/* Block Icon Styles */
.block-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.article-topic {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Desktop: Hide block icon by default, animate on hover */
@media (min-width: 769px) {
    .block-icon {
        margin-left: 0;
        width: 0;
        opacity: 0;
        overflow: hidden;
    }

    .article-topic:hover .block-icon,
    .tag:hover .block-icon,
    .article-sources a:hover .block-icon,
    .article-topic-badge:hover .block-icon,
    .tag-full:hover .block-icon,
    .source-name:hover .block-icon {
        margin-left: 6px;
        width: 18px;
        opacity: 1;
    }
}

/* Mobile: Always show block icon */
@media (max-width: 768px) {
    .block-icon {
        margin-left: 6px;
        width: 18px;
        opacity: 1;
    }
}

.block-icon:hover {
    transform: scale(1.15);
}

.block-icon svg {
    display: block;
    color: #ff4444;
    flex-shrink: 0;
}

/* Follow Button Styles */
.follow-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 16px;
    flex-shrink: 0;
    order: -1;
}

.follow-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.follow-btn svg {
    flex-shrink: 0;
}

.follow-btn.following {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.follow-btn.following svg {
    fill: currentColor;
}

.follow-btn.following:hover {
    background: var(--card-bg);
    color: var(--primary);
    transform: translateY(0);
}

.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.end-of-feed {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.no-articles {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-articles-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ==========================================
   ARTICLE DETAIL
   ========================================== */
.article-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

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

.article-topic-badge {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.35rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
}

.article-topic-badge:hover {
    opacity: 0.8;
}

.article-date-badge {
    color: var(--text-light);
    font-size: 0.95rem;
}

.article-title-full {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.clickbait-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: help;
    white-space: nowrap;
}

.clickbait-badge-small {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: help;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.article-content {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.article-summary-full {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-color);
    font-weight: 500;
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    background-color: rgba(87, 108, 103, 0.05);
    padding: 1.5rem;
    border-radius: 4px;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-tags-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.article-tags-section h3 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-full {
    background-color: var(--bg-color);
    color: var(--primary-color);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.tag-full:hover {
    opacity: 0.8;
}

.sources-section {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.sources-section h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sources-list {
    list-style: none;
}

.source-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.source-item:last-child {
    border-bottom: none;
}

.source-item:hover {
    background-color: rgba(87, 108, 103, 0.05);
}

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

.source-name {
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
}

.source-name:hover {
    opacity: 0.8;
}

.source-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.source-title {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.source-original-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #f0f0f0;
    color: #666;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: help;
    white-space: nowrap;
}

.source-clickbait-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: help;
    white-space: nowrap;
}

.source-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.source-link:hover {
    text-decoration: underline;
}

/* ==========================================
   AUTHENTICATION (LOGIN/REGISTER)
   ========================================== */
.auth-container {
    max-width: 450px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-form button {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.auth-form button:hover {
    background-color: var(--primary-dark);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.form-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* ==========================================
   MESSAGES & ALERTS
   ========================================== */
.messages {
    margin-bottom: 1.5rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.info-banner {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.info-banner p {
    margin: 0;
    color: #1976d2;
}

/* ==========================================
   ACCOUNT PAGE
   ========================================== */
.account-container {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.account-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.account-header h1 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.account-info {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 4px;
}

.info-label {
    font-weight: 600;
    color: var(--text-color);
}

.info-value {
    color: var(--text-light);
}

.account-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.logout-form {
    display: inline-block;
}

.logout-form button {
    padding: 0.75rem 1.5rem;
    background-color: #dc3545;
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.logout-form button:hover {
    background-color: #c82333;
}

/* ==========================================
   SETTINGS PAGE
   ========================================== */
.settings-container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.settings-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.settings-header h1 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.settings-section {
    margin-bottom: 2.5rem;
}

.settings-section h2 {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.settings-section p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.topic-checkbox {
    position: relative;
}

.topic-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.topic-label {
    display: block;
    padding: 1rem;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-weight: 500;
}

.topic-checkbox input[type="checkbox"]:checked + .topic-label {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.topic-label:hover {
    border-color: var(--primary-color);
}

.save-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-btn:hover {
    background-color: var(--primary-dark);
}

.search-container {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    box-shadow: var(--shadow);
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--bg-color);
}

.selected-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 60px;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.selected-topic {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
}

.remove-topic {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    opacity: 0.8;
    line-height: 1;
}

.remove-topic:hover {
    opacity: 1;
}

.empty-state {
    color: var(--text-light);
    font-style: italic;
}

/* ==========================================
   CONTACT PAGE
   ========================================== */
.contact-page {
    max-width: 700px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.contact-success {
    background: var(--white);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.contact-success h2 {
    color: var(--success-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-success p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.contact-form-container {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.form-errors {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.form-errors p {
    color: #c00;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.form-errors li {
    color: #c00;
    padding: 0.25rem 0;
}

/* ==========================================
   ABOUT PAGE
   ========================================== */
.about-page {
    max-width: 1300px;
    margin: 0 auto;
}

.about-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.about-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.about-content {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.about-section {
    margin-bottom: 3rem;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.about-section h3 {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin: 1.5rem 0 0.75rem;
}

.about-section p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.about-section ul,
.about-section ol {
    margin: 1rem 0 1rem 1.5rem;
    line-height: 1.8;
}

.about-section li {
    margin-bottom: 0.5rem;
}

.disclaimer-section {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.contact-info {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--primary-color);
    font-weight: 600;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    main {
        padding: 0;
    }
    /* Base font size reduction */
    body {
        font-size: 14px;
    }

    /* Container padding */
    .container {
        padding: 0.75rem;
        max-width: 100%;
    }

    /* Header adjustments */
    header {
        padding: 5px;
    }



    header.scrolled .logo {
        font-size: 1.1rem;
    }

    header.scrolled .logo-img {
        height: 28px;
    }

    header.scrolled .hamburger-btn {
        font-size: 1.4rem;
        padding: 0.35rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 0.75rem;
        transition: all 0.3s ease;
    }

    header.scrolled .header-content {
        gap: 0.25rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo-img {
        height: 35px;
    }

    /* Navigation */
    nav a {
        margin-left: 0;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Feed header */
    .feed-header {
        padding: 1rem 0.75rem;
        margin-bottom: 0.75rem;
    }

    .feed-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .feed-subtitle {
        font-size: 0.85rem;
    }

    /* Article cards */
    .article-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .article-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .article-summary {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }

    .article-meta {
        font-size: 0.8rem;
        margin-top: 0.5rem;
        gap: 0.5rem;
    }

    .article-date {
        margin-left: 0;
        flex-basis: 100%;
    }

    .article-source {
        font-size: 0.8rem;
    }
    .article-topic-badge {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.article-date-badge {
  color: var(--text-light);
  font-size: 0.75rem;
}
    /* Article detail page */
    .article-title-full {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }

    .clickbait-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .clickbait-badge-small {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        margin-left: 0.3rem;
    }

    .article-meta-full {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .article-summary-full {
        font-size: 0.80rem;
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .article-body {
  font-size: 0.85rem;
  line-height: 1.5rem;
}
    .article-content {
        padding: 0.75rem;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .article-content p {
        margin-bottom: 0.75rem;
    }

    /* Sources section */
    .sources-section {
        padding: 0.75rem;
        margin-top: 1.5rem;
    }

    .sources-section h2 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .source-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .source-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 0.5rem;
    }

    .source-name {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }

    .source-link {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }

    .source-original-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }

    .source-clickbait-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.45rem;
    }

    .source-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .source-snippet {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    /* Footer */
    footer {
        padding: 1rem 0;
        font-size: 0.8rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Floating menu - mobile adjustments */
    .floating-btn {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .floating-menu {
        bottom: 76px;
        right: 16px;
        left: 16px;
        min-width: unset;
        max-width: calc(100% - 32px);
    }

    /* Cookie banner - mobile adjustments */
    .cookie-banner {
        padding: 1rem;
    }

    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .cookie-content p {
        font-size: 0.85rem;
    }

    .cookie-accept-btn {
        width: 100%;
        padding: 0.875rem 2rem;
    }

    /* Contact page */
    .contact-header h1 {
        font-size: 1.75rem;
    }

    .contact-form-container {
        padding: 1rem;
    }

    .contact-success {
        padding: 2rem 1rem;
    }

    /* About page */
    .about-header h1 {
        font-size: 1.75rem;
    }

    .about-content {
        padding: 1rem;
    }

    .about-section {
        margin-bottom: 2rem;
    }

    .about-section h2 {
        font-size: 1.4rem;
    }

    .about-section h3 {
        font-size: 1.1rem;
    }

    /* Buttons */
    .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ==========================================
   Story Page Styles
   ========================================== */

.story-page {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
}

.story-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    line-height: 1.8;
}

.story-content h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #2c3e50;
    text-align: center;
    border-bottom: 3px solid #4CAF50;
    padding-bottom: 20px;
}

.story-content h2 {
    font-size: 1.5em;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #34495e;
}

.story-content p {
    margin-bottom: 20px;
    color: #444;
    font-size: 1.1em;
}

.translator-list {
    background: #f8f9fa;
    padding: 30px 40px;
    border-left: 4px solid #e74c3c;
    margin: 30px 0;
    list-style: none;
}

.translator-list li {
    margin: 15px 0;
    font-style: italic;
    color: #e74c3c;
    font-size: 1.05em;
}

.translator-list li:before {
    content: "💬 ";
    margin-right: 8px;
}

.features-list {
    background: #e8f5e9;
    padding: 20px 40px;
    border-left: 4px solid #27ae60;
    margin: 30px 0;
}

.features-list li {
    margin: 12px 0;
    color: #27ae60;
    font-weight: 500;
}

.story-footer {
    margin-top: 50px;
    padding: 30px;
    background: linear-gradient(135deg, #576c67 0%, #3d504b 100%);
    border-radius: 8px;
    text-align: center;
}

.story-footer p {
    color: white;
    font-size: 1.2em;
    margin: 0;
}

@media (max-width: 768px) {
    .story-content {
        padding: 20px;
    }

    .story-content h1 {
        font-size: 1.6em;
    }

    .story-content h2 {
        font-size: 1.3em;
    }
    .story-content p{
        font-size: 0.9em;
    }
    .translator-list,
    .features-list {
        padding: 20px;
    }
    .story-page {
        max-width: 1400px;
        margin: 20px 5px;
        padding: 0 20px;
    }
}
