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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #f9fafb;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Navbar */
.navbar {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 10000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: calc(100% - 340px);
    width: calc(100% - 340px);
    margin-left: 320px;
    margin-right: 20px;
    padding: 0;
    flex-wrap: nowrap;
    overflow: visible;
}

.logo {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1f2937;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #1f2937;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-links {
    display: flex;
    gap: 0;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: visible;
    flex: 1;
    justify-content: space-evenly;
    padding-right: 2rem;
}

.nav-links > a {
    color: #6b7280;
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.5rem;
    font-size: 0.95rem;
}

/* Make only the first 4 icon links bigger */
.nav-links > a:nth-child(1),
.nav-links > a:nth-child(2),
.nav-links > a:nth-child(3),
.nav-links > a:nth-child(4) {
    font-size: 1.5rem;
}

.nav-links > a:hover {
    color: #1f2937;
    background: #f3f4f6;
    border-radius: 6px;
}

/* Navigation Dropdown - OVERWRITE */
.nav-links .nav-dropdown {
    position: relative !important;
    display: inline-block !important;
    z-index: 9999 !important;
    padding-bottom: 10px !important;
    flex: 1 !important;
}

.nav-links .nav-dropdown .nav-dropdown-toggle {
    color: #6b7280 !important;
    font-weight: 500 !important;
    transition: color 0.3s !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 0.5rem !important;
    padding-top: 0.65rem !important;
    background: transparent !important;
    border: none !important;
    text-align: center !important;
    width: 100% !important;
    font-size: 0.95rem !important;
}

.nav-links .nav-dropdown .nav-dropdown-toggle:hover {
    color: #1f2937 !important;
    background: #f3f4f6 !important;
    border-radius: 6px !important;
}

.nav-links .nav-dropdown .nav-dropdown-menu {
    display: none !important;
    position: absolute !important;
    top: calc(100% - 10px) !important;
    right: 0 !important;
    left: auto !important;
    background: white !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
    border-radius: 8px !important;
    min-width: 220px !important;
    padding: 0.75rem 0 !important;
    padding-top: 1rem !important;
    margin-top: 0 !important;
    z-index: 99999 !important;
    border: 1px solid #e5e7eb !important;
}

.nav-links .nav-dropdown .nav-dropdown-menu.show {
    display: block !important;
}

.nav-links .nav-dropdown:hover .nav-dropdown-menu {
    display: block !important;
}

.nav-links .nav-dropdown .nav-dropdown-menu a {
    display: block !important;
    padding: 0.75rem 1.25rem !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}

.nav-links .nav-dropdown .nav-dropdown-menu a:hover {
    background: #f3f4f6 !important;
    color: #667eea !important;
    padding-left: 1.5rem !important;
}

.nav-links .badge {
    display: inline-block;
    background: #667eea;
    color: white;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.3rem;
    font-weight: 700;
}

/* Mega Menu Dropdown */
.nav-mega-dropdown {
    position: relative;
    display: inline-block;
    flex: 1;
}

/* Bridge the gap between button and menu */
.nav-mega-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: transparent;
    display: none;
}

.nav-mega-dropdown:hover::after {
    display: block;
}

.nav-mega-toggle {
    color: #6b7280;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    white-space: nowrap;
    font-size: 0.95rem;
    border-radius: 8px;
    position: relative;
}

.nav-mega-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-mega-toggle:hover {
    color: #667eea;
    background: #f3f4f6;
    transform: translateY(-2px);
}

.nav-mega-toggle:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-mega-dropdown:hover .nav-mega-toggle {
    color: #667eea;
    background: #f3f4f6;
}

.nav-mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    margin-top: 0.5rem;
    z-index: 99999;
    border: 2px solid transparent;
    min-width: 600px;
    max-width: 800px;
    overflow: hidden;
}

/* Adjust positioning for rightmost menu to prevent cutoff */
.nav-mega-dropdown:last-of-type .nav-mega-menu {
    left: auto;
    right: 0;
    transform: none;
}

.nav-mega-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.nav-mega-dropdown:hover .nav-mega-menu {
    display: block;
    animation: fadeInDown 0.3s ease;
    border-color: rgba(102, 126, 234, 0.2);
}

/* Different animation for rightmost menu (no horizontal transform) */
.nav-mega-dropdown:last-of-type:hover .nav-mega-menu {
    animation: fadeInDownRight 0.3s ease;
}

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

@keyframes fadeInDownRight {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mega-menu-container {
    padding: 1.5rem;
}

.mega-menu-section {
    margin-bottom: 1rem;
}

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

.mega-menu-section h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
    position: relative;
    padding-left: 1rem;
}

.mega-menu-section h4::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #764ba2;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateX(0);
    }
    50% {
        opacity: 0.6;
        transform: translateX(3px);
    }
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.mega-menu-grid a {
    display: block;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    border-radius: 8px;
    text-decoration: none;
    position: relative;
    border: 2px solid transparent;
}

.mega-menu-grid a::before {
    content: '→';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    opacity: 0;
    transition: all 0.25s ease;
    color: #667eea;
    font-weight: bold;
    font-size: 1rem;
}

.mega-menu-grid a:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #faf5ff 100%);
    color: #667eea;
    transform: translateX(4px);
    border-color: #e0d4ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.mega-menu-grid a:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.mega-menu-grid a:active {
    transform: translateX(6px) scale(0.98);
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
}

.breadcrumb a:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.breadcrumb .separator {
    color: #9ca3af;
    user-select: none;
    font-size: 1.2rem;
    margin: 0 0.25rem;
}

.breadcrumb .current {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #e5e7eb;
    color: #1f2937;
    font-weight: 500;
    border-radius: 6px;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
    display: block;
}

.dropdown-toggle:hover {
    color: #1f2937;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #4b5563;
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background: #f3f4f6;
    color: #667eea;
    padding-left: 2rem;
}

/* Carousel Header */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: calc(100% - 340px);
    height: 500px;
    overflow: hidden;
    margin-bottom: 0;
    margin-left: 320px;
    margin-right: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: grid;
    gap: 10px;
    padding: 10px;
    /* Responsive grid: 1 column on mobile, 2 on tablet, 3 on desktop */
    grid-template-columns: 1fr;
}

/* Tablet: 2 articles per slide */
@media (min-width: 768px) {
    .carousel-slide {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 3 articles per slide */
@media (min-width: 1200px) {
    .carousel-slide {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop: 4 articles per slide */
@media (min-width: 1800px) {
    .carousel-slide {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Ultra-wide: 5 articles per slide */
@media (min-width: 2400px) {
    .carousel-slide {
        grid-template-columns: repeat(5, 1fr);
    }
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-article-item {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    min-height: 480px;
    position: relative;
}

.country-flag-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 3;
    transition: transform 0.2s ease;
}

.country-flag-badge:hover {
    transform: scale(1.1);
}

.carousel-content {
    text-align: center;
    color: white;
    max-width: 100%;
    padding: 1.5rem;
    z-index: 2;
}

.trending-badge {
    display: inline-block;
    background: rgba(255, 59, 48, 0.9);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.carousel-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

/* Larger title on bigger screens */
@media (min-width: 768px) {
    .carousel-title {
        font-size: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .carousel-title {
        font-size: 1.4rem;
    }
}

.carousel-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.carousel-source {
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.carousel-bias {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.carousel-read-btn {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 0.65rem 1.25rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.carousel-read-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    background: #f3f4f6;
}

/* Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.3);
    color: white;
    border: none;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    padding-bottom: 5px;
}

.carousel-nav:hover {
    background: rgba(255,255,255,0.5);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 20px;
}

.carousel-nav.next {
    right: 20px;
}

/* Indicator Dots */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.indicator-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.indicator-dot:hover {
    transform: scale(1.2);
    background: rgba(255,255,255,0.8);
}

.indicator-dot.active {
    background: white;
    width: 40px;
    border-radius: 10px;
}

/* Hero Actions (Download Button) */
.hero-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.download-btn {
    background: rgba(255,255,255,0.95);
    color: #667eea;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.download-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.scrape-status {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 20px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

/* Stats Bar */
.stats-bar {
    background: white;
    padding: 1rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 600;
    color: #667eea;
    margin-bottom: 2rem;
    margin-left: 320px;
    margin-right: 20px;
    border-radius: 8px;
}

/* Word Cloud Sidebar - Independent Fixed Position */
.word-cloud-sidebar {
    position: fixed;
    left: 20px;
    top: 100px;
    width: 280px;
    height: auto;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 50;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    color: #1f2937;
}

.clear-btn {
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.3s;
}

.clear-btn:hover {
    background: #dc2626;
}

.selected-words {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.selected-words p {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.selected-word {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #667eea;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    margin: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: capitalize;
}

.remove-word {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.3s;
}

.remove-word:hover {
    background: rgba(255,255,255,0.5);
}

.word-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0;
    line-height: 2;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.word-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    user-select: none;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: center;
}

.word-tag:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.word-tag.active {
    background: #667eea;
    color: white;
}

.word-tag.active:hover {
    background: #5568d3;
}

.word-cloud-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.word-cloud-info p {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

/* Top Contributors Section */
.top-contributors-section {
    margin-left: 320px;
    margin-right: 20px;
    padding: 0 20px;
    margin-bottom: 3rem;
}

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

.top-contributors-section h2 {
    font-size: 1.8rem;
    margin: 0;
    color: #1f2937;
}

.view-more-btn {
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.contributors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.contributor-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s;
    overflow: hidden;
}

.contributor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.contributor-card a {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
}

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

.contributor-rank {
    font-size: 2rem;
    font-weight: 800;
    color: #667eea;
    line-height: 1;
}

.contributor-flag {
    font-size: 2.5rem;
    line-height: 1;
}

.contributor-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    min-height: 2.5rem;
}

.contributor-count {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.contributor-bias {
    display: flex;
    justify-content: center;
}

.bias-indicator-mini {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Bias Sections */
.bias-sections {
    margin-left: 320px;  /* Make space for fixed sidebar */
    margin-right: 20px;
    padding: 0 20px;
}

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

.bias-section h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.bias-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.article-image-wrapper {
    position: relative;
    width: 100%;
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.article-flag-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: transform 0.2s ease;
}

.article-flag-badge:hover {
    transform: scale(1.15);
}

.article-content {
    padding: 1.5rem;
}

.source-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.source-name {
    font-weight: 600;
    color: #6b7280;
}

.bias-indicator {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.article-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-card h3 a {
    color: #1f2937;
    transition: color 0.3s;
}

.article-card h3 a:hover {
    color: #667eea;
}

.summary {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Article Detail Page */
.article-layout {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.article-detail {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.article-header {
    margin-bottom: 2rem;
}

.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.reliability {
    color: #059669;
    font-weight: 600;
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-meta-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #6b7280;
    font-size: 0.95rem;
}

.article-image-container {
    margin: 2rem 0;
}

.article-image-container img {
    width: 100%;
    border-radius: 8px;
}

.article-summary {
    background: #f3f4f6;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 4px solid #667eea;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
}

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

/* Continue Reading CTA Box */
.continue-reading-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.cta-content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.cta-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.cta-text {
    flex: 1;
}

.cta-text h4 {
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cta-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.cta-button {
    display: inline-block;
    background: #ffffff;
    color: #667eea;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

.article-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.read-original {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s;
}

.read-original:hover {
    background: #5568d3;
}

/* Article Right Sidebar */
.article-sidebar-right {
    width: 320px;
    flex-shrink: 0;
}

.sidebar-sticky {
    position: sticky;
    top: 80px;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-sticky h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.sidebar-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

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

.sidebar-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.other-sources-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.other-source-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.other-source-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.other-source-link {
    display: block;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
}

.source-info-small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.source-name-small {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.bias-indicator-tiny {
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    letter-spacing: 0.3px;
}

.other-source-card h4 {
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.other-source-link:hover h4 {
    color: #667eea;
}

.other-meta {
    font-size: 0.75rem;
    color: #9ca3af;
}

.no-results {
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
    padding: 1rem;
}

/* Related Articles */
.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.related-articles h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.related-card {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.related-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.related-card h4 a:hover {
    color: #667eea;
}

.related-card p {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Sources Page */
.sources-layout {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
}

.sources-page {
    flex: 1;
}

.sources-page h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.sources-page > p {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Sources Right Sidebar */
.sources-sidebar-right {
    width: 320px;
    flex-shrink: 0;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    transition: all 0.3s;
}

.stat-item:hover {
    background: #f3f4f6;
}

.stat-item.clickable-stat {
    cursor: pointer;
}

.stat-item.clickable-stat:hover {
    background: #e5e7eb;
    transform: translateX(3px);
}

.stat-item.clickable-stat.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-left: 4px solid #667eea;
}

.stat-item.clickable-stat.active .stat-link {
    color: white !important;
}

.stat-item.clickable-stat.active .stat-label,
.stat-item.clickable-stat.active .stat-value {
    color: white !important;
    font-weight: 600;
}

.stat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: #1f2937 !important;
}

.stat-link .stat-label {
    font-size: 0.85rem;
    color: #1f2937 !important;
    font-weight: 500;
}

.stat-link .stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #667eea !important;
}

.stat-label {
    font-size: 0.85rem;
    color: #1f2937 !important;
    font-weight: 500;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #667eea !important;
}

.top-sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.top-source-item {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s;
}

.top-source-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.top-source-item a {
    display: block;
    padding: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.top-source-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.top-source-item:hover .top-source-name {
    color: #667eea;
}

.top-source-count {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Bias Distribution Header */
.bias-distribution-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.bias-column-header {
    padding: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    border-radius: 8px;
}

.left-header {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.center-left-header {
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
}

.center-header {
    background: linear-gradient(135deg, #9ca3af 0%, #d1d5db 100%);
}

.center-right-header {
    background: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);
}

.right-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Sources Grid Layout */
.sources-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 1rem;
    background: #f3f4f6;
    padding: 2rem;
    border-radius: 8px;
}

.sources-column {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: 8px;
    align-content: flex-start;
    justify-content: center;
}

.left-column {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.12) 0%, rgba(96, 165, 250, 0.06) 100%);
}

.center-left-column {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.06) 0%, rgba(156, 163, 175, 0.04) 100%);
}

.center-column {
    background: linear-gradient(180deg, rgba(156, 163, 175, 0.1) 0%, rgba(209, 213, 219, 0.05) 100%);
}

.center-right-column {
    background: linear-gradient(180deg, rgba(156, 163, 175, 0.04) 0%, rgba(220, 38, 38, 0.06) 100%);
}

.right-column {
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.12) 0%, rgba(239, 68, 68, 0.06) 100%);
}

/* Center Column Subgroups */
.center-subgroup {
    margin-bottom: 1.5rem;
}

.center-subgroup-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    text-align: center;
}

.source-grid-item {
    text-align: center;
    margin-bottom: 0.5rem;
}

.source-grid-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.source-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    /* background set dynamically via inline style based on bias */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: 3px solid #e5e7eb;
    position: relative;
}

.source-flag {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 1.5rem;
    background: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border: 2px solid white;
}

.article-count-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 0.65rem;
    font-weight: 700;
    background: #667eea;
    color: white;
    border-radius: 10px;
    min-width: 24px;
    height: 18px;
    padding: 2px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
    border: 2px solid white;
    line-height: 1;
    z-index: 2;
}

.source-grid-item:hover .source-circle {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.source-initial {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.source-grid-item .source-name-small {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4b5563;
    max-width: 80px;
    line-height: 1.2;
}

.source-grid-item:hover .source-name-small {
    color: #667eea;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.source-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s;
}

.source-card:hover {
    transform: translateX(5px);
}

.source-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.source-info h3 a:hover {
    color: #667eea;
}

.source-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.reliability-badge, .country-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.reliability-badge {
    background: #d1fae5;
    color: #059669;
}

.country-badge {
    background: #e0e7ff;
    color: #4338ca;
}

.source-domain {
    color: #6b7280;
    font-size: 0.9rem;
}

.source-stats {
    text-align: center;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat strong {
    font-size: 1.5rem;
    color: #667eea;
}

.stat span {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Source Detail Page */
.source-detail {
    padding: 2rem 0;
}

.source-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.source-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.source-info-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.language-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}

.source-url a {
    color: #667eea;
}

.source-url a:hover {
    text-decoration: underline;
}

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

.article-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s;
}

.article-item:hover {
    transform: translateX(5px);
}

.article-thumb {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.article-info {
    flex: 1;
}

.article-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.article-info h3 a:hover {
    color: #667eea;
}

.source-link-small {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.bias-indicator-small {
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Search Page */
.search-page {
    padding: 2rem 0;
}

.search-page h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-input {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #667eea;
}

.search-button {
    padding: 1rem 2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: #5568d3;
}

.search-results-info {
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Search History */
.search-history-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.search-history-title {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.search-history-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    color: #4b5563;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.search-history-tag:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: #d1d5db;
    margin-top: 4rem;
    border-top: 4px solid #667eea;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #f3f4f6;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #f3f4f6;
    font-weight: 600;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #9ca3af;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: -0.25rem -0.5rem;
    border-radius: 4px;
}

.footer-section ul li a:hover {
    color: #667eea;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

.footer-stats {
    font-size: 0.85rem;
    line-height: 1.8;
    margin: 0;
}

.footer-stats-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0.75rem;
    margin: -0.75rem;
    border-radius: 6px;
    transition: all 0.3s;
}

.footer-stats-link:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

.footer-stats-link:hover .footer-stats {
    color: #667eea;
}

.footer-bottom {
    background: #111827;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid #374151;
}

.footer-legal {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-legal-links a:hover {
    color: #667eea;
}

.footer-legal-links .separator {
    color: #4b5563;
}

.footer-bottom p {
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.disclaimer-text {
    font-size: 0.75rem !important;
    color: #4b5563 !important;
    max-width: 800px;
    margin: 1rem auto 0 !important;
    line-height: 1.5;
}

/* Newsletter Subscription Form */
.newsletter-section {
    background: rgba(102, 126, 234, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.newsletter-section h4 {
    color: #667eea !important;
    margin-bottom: 0.5rem;
}

.newsletter-section p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #f3f4f6;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}

.newsletter-form input[type="email"]::placeholder {
    color: #9ca3af;
}

.newsletter-form input[type="email"]:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.newsletter-form button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.newsletter-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.newsletter-message {
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
    min-height: 20px;
    transition: all 0.3s;
}

.newsletter-message.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.newsletter-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }
}

/* Legal Pages */
.legal-page {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.legal-page h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 1rem;
}

.legal-page .last-updated {
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 2rem;
}

.legal-page section {
    margin-bottom: 2.5rem;
}

.legal-page h2 {
    font-size: 1.5rem;
    color: #374151;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.legal-page p {
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 1rem;
}

.legal-page ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-page ul li {
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.legal-page strong {
    color: #1f2937;
    font-weight: 600;
}

.legal-page a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.legal-page a:hover {
    text-decoration: underline;
}

.important-notice {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.important-notice h2 {
    color: #92400e;
    margin-top: 0;
}

.note {
    background: #e0e7ff;
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #4338ca;
}

.contact-notice {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.contact-notice p {
    margin: 0;
    color: #92400e;
    font-weight: 500;
}

.contact-info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.contact-info-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.contact-info-box p {
    margin: 0.5rem 0;
    color: white;
}

.contact-info-box a {
    color: #fef3c7;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid #fef3c7;
}

.contact-info-box a:hover {
    color: white;
    border-bottom-color: white;
}

/* About Page Specific Styles */
.about-section {
    margin-bottom: 3rem;
}

.lead {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 2rem;
    font-weight: 300;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.feature-list {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.feature-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f9fafb;
    border-left: 4px solid #667eea;
    border-radius: 6px;
}

.feature-list li strong {
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}

.bias-explanation {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.bias-explanation li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f9fafb;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.bias-explanation .bias-badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.back-link {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.back-link a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s;
}

.back-link a:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

/* All Articles Page */
.all-articles-page {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.page-description {
    font-size: 1.1rem;
    color: #6b7280;
}

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

.article-card-masonry {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.article-card-masonry:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.article-card-masonry .article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-masonry .article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-masonry .article-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.article-card-masonry .article-flag {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.article-card-masonry h3 {
    font-size: 1.2rem;
    margin: 0.75rem 0;
    line-height: 1.4;
}

.article-card-masonry h3 a {
    color: #1f2937;
    text-decoration: none;
}

.article-card-masonry h3 a:hover {
    color: #667eea;
}

.article-card-masonry .summary {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.article-card-masonry .article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: auto;
}

.loading-indicator {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    color: #6b7280;
    font-size: 1rem;
}

.end-message {
    text-align: center;
    padding: 3rem;
    background: #f9fafb;
    border-radius: 12px;
    margin: 2rem 0;
}

.end-message p {
    color: #6b7280;
    font-size: 1.1rem;
    margin: 0;
}

@media (max-width: 768px) {
    .legal-page {
        margin: 1rem;
        padding: 1.5rem;
    }

    .legal-page h1 {
        font-size: 2rem;
    }

    .legal-page h2 {
        font-size: 1.3rem;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .navbar .container {
        width: 90% !important;
        max-width: 90% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .nav-links > a {
        font-size: 0.9rem;
        padding: 0.5rem 0.4rem;
    }

    .nav-links .nav-dropdown .nav-dropdown-toggle {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.4rem !important;
    }

    .word-cloud-sidebar {
        position: static;
        width: 100%;
        height: auto;
        max-height: 400px;
        left: 0;
        top: 0;
        margin: 1rem;
    }

    .stats, .bias-sections {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-item {
        flex-direction: column;
    }

    .article-thumb {
        width: 100%;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .navbar .container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0.5rem 1rem !important;
        position: relative;
    }

    .logo {
        font-size: 1.2rem;
        flex: 1;
    }

    .logo-img {
        height: 30px;
    }

    /* Show hamburger menu */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide nav links by default on mobile */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        gap: 0;
        z-index: 9999;
    }

    /* Show nav links when active */
    .nav-links.active {
        display: flex;
    }

    .nav-links > a {
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-bottom: 1px solid #f3f4f6;
    }

    .nav-links > a:hover {
        background: #f9fafb;
        border-radius: 0;
    }

    .nav-links .nav-dropdown {
        width: 100%;
        position: static !important;
    }

    .nav-links .nav-dropdown .nav-dropdown-toggle {
        width: 100%;
        text-align: left !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
        border-bottom: 1px solid #f3f4f6;
    }

    .nav-links .nav-dropdown .nav-dropdown-menu {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        box-shadow: none !important;
        background: #f9fafb !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .nav-links .nav-dropdown .nav-dropdown-menu a {
        padding-left: 2rem !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    .source-card {
        flex-direction: column;
        text-align: center;
    }

    /* Word Cloud Sidebar */
    .word-cloud-sidebar {
        position: static !important;
        width: calc(100% - 2rem) !important;
        height: auto !important;
        max-height: 500px !important;
        left: 0 !important;
        top: 0 !important;
        margin: 1rem !important;
    }

    .word-cloud {
        max-height: none;
    }

    /* Adjust content margins for mobile */
    .stats, .bias-sections, .top-contributors-section {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 1rem !important;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .navbar .container {
        padding: 0.5rem !important;
    }

    .logo {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .logo-img {
        height: 25px;
    }

    .nav-links {
        padding: 0.5rem;
    }

    .nav-links > a {
        padding: 0.65rem 0.75rem;
        font-size: 0.9rem;
    }

    .nav-links .nav-dropdown .nav-dropdown-toggle {
        padding: 0.65rem 0.75rem !important;
        font-size: 0.9rem !important;
    }

    .nav-links .nav-dropdown .nav-dropdown-menu a {
        font-size: 0.9rem !important;
    }

    .word-cloud-sidebar {
        padding: 1rem !important;
        margin: 0.5rem !important;
        width: calc(100% - 1rem) !important;
    }

    .sidebar-header h3 {
        font-size: 1rem;
    }

    .clear-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .word-tag {
        padding: 0.2rem 0.5rem;
        font-size: 0.85rem;
        max-width: 100%;
        word-break: break-word;
    }
}

/* Article Reactions */
.article-reactions {
    margin: 2.5rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 16px;
    border: 2px solid #e5e7eb;
}

.reactions-title {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.reactions-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.reaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 90px;
}

.reaction-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.reaction-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.reaction-emoji {
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.reaction-btn:hover .reaction-emoji {
    transform: scale(1.2);
}

.reaction-btn.active .reaction-emoji {
    transform: scale(1.3);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.reaction-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    transition: color 0.3s ease;
}

.reaction-btn.active .reaction-label {
    color: white;
}

.reaction-count {
    font-size: 0.875rem;
    font-weight: 700;
    color: #667eea;
    background: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    min-width: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.reaction-btn.active .reaction-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

@media (max-width: 768px) {
    .reactions-container {
        gap: 0.75rem;
    }

    .reaction-btn {
        min-width: 70px;
        padding: 0.75rem 1rem;
    }

    .reaction-emoji {
        font-size: 1.5rem;
    }

    .reaction-label {
        font-size: 0.75rem;
    }
}

/* Social Share Buttons */
.social-share-buttons {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.share-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.share-buttons-row {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.75rem;
    visibility: visible !important;
    opacity: 1 !important;
}

.share-btn {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white !important;
    text-decoration: none !important;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 120px;
    min-height: 40px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

.twitter-btn {
    background: #1DA1F2 !important;
}

.twitter-btn:hover {
    background: #1a8cd8 !important;
}

.facebook-btn {
    background: #1877F2 !important;
}

.facebook-btn:hover {
    background: #1664d9 !important;
}

.linkedin-btn {
    background: #0A66C2 !important;
}

.linkedin-btn:hover {
    background: #0958a8 !important;
}

.reddit-btn {
    background: #FF4500 !important;
}

.reddit-btn:hover {
    background: #e03d00 !important;
}

.email-btn {
    background: #6b7280 !important;
}

.email-btn:hover {
    background: #4b5563 !important;
}

/* Sidebar Share Section */
.sidebar-share-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.2);
}

.sidebar-share-section h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.sidebar-share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.sidebar-share-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.sidebar-share-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.sidebar-share-btn svg {
    width: 22px;
    height: 22px;
    position: relative;
    z-index: 1;
}

/* Brand-specific button backgrounds and icon colors */
.sidebar-share-btn.twitter-btn {
    background: linear-gradient(135deg, #1DA1F2 0%, #0d8bd9 100%);
}

.sidebar-share-btn.twitter-btn svg {
    color: white;
    fill: white;
}

.sidebar-share-btn.facebook-btn {
    background: linear-gradient(135deg, #1877F2 0%, #0e5fd1 100%);
}

.sidebar-share-btn.facebook-btn svg {
    color: white;
    fill: white;
}

.sidebar-share-btn.linkedin-btn {
    background: linear-gradient(135deg, #0A66C2 0%, #084d91 100%);
}

.sidebar-share-btn.linkedin-btn svg {
    color: white;
    fill: white;
}

.sidebar-share-btn.reddit-btn {
    background: linear-gradient(135deg, #FF4500 0%, #d93900 100%);
}

.sidebar-share-btn.reddit-btn svg {
    color: white;
    fill: white;
}

.sidebar-share-btn.email-btn {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.sidebar-share-btn.email-btn svg {
    color: white;
    stroke: white;
}

/* Hover effects with subtle shine */
.sidebar-share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.sidebar-share-btn:hover::before {
    left: 100%;
}

/* Article Attribution & Disclaimer */
.article-attribution {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.attribution-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #cbd5e1;
}

.attribution-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.attribution-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.attribution-section {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.attribution-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem 0;
}

.attribution-section p {
    font-size: 1rem;
    color: #334155;
    margin: 0;
    font-weight: 500;
}

.source-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.source-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.bias-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.disclaimer-box {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.disclaimer-icon {
    flex-shrink: 0;
    font-size: 2rem;
    line-height: 1;
}

.disclaimer-text h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 0.75rem 0;
}

.disclaimer-text p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1e3a8a;
    margin: 0 0 0.75rem 0;
}

.disclaimer-text p:last-child {
    margin-bottom: 0;
}

.disclaimer-text strong {
    font-weight: 700;
    color: #1e40af;
}

/* Responsive adjustments for attribution */
@media (max-width: 768px) {
    .article-attribution {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .attribution-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .disclaimer-box {
        flex-direction: column;
        padding: 1.25rem;
    }

    .disclaimer-icon {
        font-size: 1.5rem;
    }
}

/* Analytics Page */
.analytics-page {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.analytics-header {
    text-align: center;
    margin-bottom: 3rem;
}

.analytics-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.analytics-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 400;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

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

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea !important;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    font-size: 1rem;
    color: #6b7280 !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.chart-container:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.chart-container h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: center;
}

.chart-container canvas {
    max-height: 400px;
    width: 100% !important;
    height: auto !important;
}

.chart-wide {
    grid-column: span 2;
}

/* Responsive Design for Analytics */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .analytics-page {
        padding: 0 1rem;
    }

    .analytics-header h1 {
        font-size: 2rem;
    }

    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-card .stat-value {
        font-size: 2rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .chart-container {
        padding: 1rem;
    }

    .chart-container canvas {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .analytics-page {
        padding: 0 0.5rem;
    }

    .analytics-header h1 {
        font-size: 1.5rem;
    }

    .stats-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-icon {
        font-size: 2rem;
    }

    .stat-card .stat-value {
        font-size: 1.75rem;
    }

    .stat-card .stat-label {
        font-size: 0.85rem;
    }

    .charts-grid {
        gap: 1rem;
    }

    .chart-container {
        padding: 0.75rem;
    }

    .chart-container h3 {
        font-size: 1rem;
    }

    .chart-container canvas {
        max-height: 250px;
    }
}

/* Prediction Page */
.prediction-page {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.prediction-header {
    text-align: center;
    margin-bottom: 3rem;
}

.prediction-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.prediction-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 400;
}

/* Prediction Info Bar */
.prediction-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    border-radius: 12px;
    color: white;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.confidence-high {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.confidence-medium {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.confidence-low {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Methodology Section */
.methodology-section {
    margin-bottom: 3rem;
}

.methodology-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.method-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.method-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

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

.method-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.method-card p {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
}

/* Predictions Section */
.predictions-section {
    margin-bottom: 3rem;
}

.predictions-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f3f4f6;
    border-color: #667eea;
    color: #667eea;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    gap: 1rem;
}

.trending-up-grid,
.trending-down-grid,
.hot-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

/* Topic Cards */
.topic-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.topic-card.trend-up {
    border-left: 4px solid #10b981;
}

.topic-card.trend-down {
    border-left: 4px solid #ef4444;
}

.topic-card.hot {
    border-left: 4px solid #f59e0b;
}

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

.topic-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    text-transform: capitalize;
}

/* Trend Badges */
.trend-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
}

.trend-badge.up {
    background: #d1fae5;
    color: #059669;
}

.trend-badge.down {
    background: #fee2e2;
    color: #dc2626;
}

.trend-badge.hot {
    background: #fef3c7;
    color: #d97706;
}

/* Topic Bars */
.topic-bar {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.topic-bar-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.topic-bar-fill.up {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.topic-bar-fill.down {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.topic-bar-fill.hot {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.topic-prediction {
    font-size: 0.9rem;
    color: #6b7280;
    font-style: italic;
}

/* Category Content */
.category-content {
    margin-top: 1rem;
}

.category-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 1rem;
}

/* Hot Section */
.hot-section {
    background: linear-gradient(to bottom, rgba(245, 158, 11, 0.05), transparent);
    padding: 2rem;
    border-radius: 12px;
}

/* Prediction Disclaimer */
.prediction-disclaimer {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.prediction-disclaimer h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.75rem;
}

.prediction-disclaimer p {
    font-size: 0.95rem;
    color: #78350f;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.prediction-disclaimer p:last-child {
    margin-bottom: 0;
}

/* Insufficient Data Warning */
.insufficient-data-warning {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.insufficient-data-warning h2 {
    font-size: 2rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.insufficient-data-warning p {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* Responsive Design for Predictions */
@media (max-width: 1200px) {
    .topics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .prediction-page {
        padding: 0 1rem;
    }

    .prediction-header h1 {
        font-size: 2rem;
    }

    .prediction-info-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .methodology-grid {
        grid-template-columns: 1fr;
    }

    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .tab-btn {
        white-space: nowrap;
    }
}

/* ===== ENHANCED PREDICTION CARDS ===== */

.topic-card-enhanced {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-left: 5px solid #10b981;
    transition: all 0.3s;
}

.topic-card-enhanced:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.topic-card-enhanced.hot {
    border-left-color: #f59e0b;
}

.topic-card-enhanced.trend-down {
    border-left-color: #ef4444;
}

.topic-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.topic-name-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    flex: 1;
}

.topic-scores {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.velocity-badge, .momentum-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.sentiment-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sentiment-badge.sentiment-negative {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.sentiment-badge.sentiment-positive {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.sentiment-badge.sentiment-neutral {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.topic-insight {
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.95rem;
    line-height: 1.8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
}

.topic-insight.sentiment-negative {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #7f1d1d;
    border-left-color: #dc2626;
}

.topic-insight.sentiment-positive {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #064e3b;
    border-left-color: #10b981;
}

.topic-insight.sentiment-neutral {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e3a8a;
    border-left-color: #3b82f6;
}

.insight-content strong {
    font-weight: 700;
}

.topic-insight-small {
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.5;
    font-style: italic;
}

/* Mini Charts */
.mini-chart {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.chart-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 120px;
    margin-bottom: 1rem;
}

.chart-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.chart-bar {
    width: 100%;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    transition: all 0.3s;
}

.chart-bar:hover {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
}

.chart-bar-hot {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.chart-bar-hot:hover {
    background: linear-gradient(180deg, #d97706 0%, #b45309 100%);
}

.chart-bar-down {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.chart-bar-down:hover {
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
}

.growth-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.bar-value {
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding-top: 0.25rem;
}

.bar-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}

.chart-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #6b7280;
}

.chart-stats strong {
    color: #1f2937;
}

/* Related Articles */
.related-articles {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed #e5e7eb;
}

.related-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-list li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.article-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.article-list a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
}

.article-list a:hover {
    text-decoration: underline;
}

.article-source {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
}

.topic-growth {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .topic-header-enhanced {
        flex-direction: column;
    }

    .topic-name-large {
        font-size: 1.25rem;
    }

    .chart-bars {
        height: 80px;
        gap: 0.5rem;
    }

    .bar-value {
        font-size: 0.65rem;
    }

    .chart-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===== ADMIN DASHBOARD ===== */

.admin-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

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

.admin-header > div {
    text-align: left;
}

.admin-header h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.admin-subtitle {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Modern Admin Navigation Buttons */
.admin-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.admin-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.admin-nav-btn:hover::before {
    left: 100%;
}

.admin-nav-btn .btn-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.admin-nav-btn .btn-text {
    line-height: 1;
}

/* Analytics Button */
.analytics-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.analytics-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Chat Logs Button */
.chat-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 172, 254, 0.4);
}

/* Logout Button */
.logout-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 87, 108, 0.4);
}

/* Legacy button styles for compatibility */
.btn-logout {
    background: #ef4444;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-logout:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.stat-content p {
    color: #6b7280;
    margin: 0;
    font-size: 0.9rem;
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.chart-card h2 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.75rem;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-content {
    min-height: 200px;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f9fafb;
}

.data-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.page-url {
    color: #667eea;
    font-family: monospace;
    font-size: 0.9rem;
}

.views-count {
    font-weight: 600;
    color: #1f2937;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    width: 100px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-fill.device-mobile {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.progress-fill.device-desktop {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.progress-fill.device-tablet {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.progress-fill.browser-chrome {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.progress-fill.browser-firefox {
    background: linear-gradient(90deg, #f97316 0%, #ea580c 100%);
}

.progress-fill.browser-safari {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.progress-fill.browser-edge {
    background: linear-gradient(90deg, #06b6d4 0%, #0891b2 100%);
}

/* Share platform colors */
.progress-fill.share-twitter {
    background: linear-gradient(90deg, #1DA1F2 0%, #0d8bd9 100%);
}

.progress-fill.share-facebook {
    background: linear-gradient(90deg, #1877F2 0%, #0d5dbf 100%);
}

.progress-fill.share-linkedin {
    background: linear-gradient(90deg, #0077B5 0%, #005885 100%);
}

.progress-fill.share-reddit {
    background: linear-gradient(90deg, #FF4500 0%, #cc3700 100%);
}

.progress-fill.share-email {
    background: linear-gradient(90deg, #9333ea 0%, #7e22ce 100%);
}

.article-title-cell {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Pie Chart Data */
.pie-chart-data {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pie-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pie-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.pie-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.pie-stats .count {
    font-weight: 700;
    color: #1f2937;
}

.pie-stats .percentage {
    color: #6b7280;
}

/* Sessions Table */
.sessions-table {
    font-size: 0.9rem;
}

.session-id {
    font-family: monospace;
    color: #667eea;
}

.visit-count {
    font-weight: 600;
    color: #10b981;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.device-badge {
    background: #dbeafe;
    color: #1e40af;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
    font-style: italic;
}

/* Newsletter Subscribers Section */
.subscriber-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.subscribers-table {
    margin-top: 1rem;
}

.email-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #374151;
}

.active-badge {
    background: #d1fae5;
    color: #065f46;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.inactive-badge {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .charts-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-page {
        padding: 1rem;
    }

    .data-table {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }

    .subscriber-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-box {
        padding: 0.75rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

/* Date Filter Section */
.date-filter-section {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid #e5e7eb;
}

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

.filter-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.25rem;
}

.clear-filter-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.clear-filter-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.filter-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    background: white;
    color: #4b5563;
    border: 2px solid #d1d5db;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.filter-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.custom-date-filter {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}

.date-inputs {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.date-input-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.date-input {
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    min-width: 160px;
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.apply-custom-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.apply-custom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.filter-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    color: #374151;
    font-size: 0.95rem;
}

.filter-info strong {
    color: #667eea;
}

/* Bias Information Modal */
.bias-info-btn {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 8px;
    vertical-align: middle;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.bias-info-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Modal Overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

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

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Content Box */
.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

/* Modal Header */
.modal-content h2 {
    font-size: 1.75rem;
    margin: 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal Body */
.modal-content > div {
    padding: 2rem;
    line-height: 1.8;
    color: #374151;
}

.modal-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.modal-content strong {
    color: #1f2937;
    font-weight: 600;
}

.modal-content ul {
    margin: 1rem 0 1.5rem 1.5rem;
    list-style-type: disc;
}

.modal-content li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

/* Close Button */
.close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
    .date-inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .date-input {
        min-width: 100%;
    }

    .filter-options {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-content h2 {
        font-size: 1.5rem;
        padding: 1.25rem 1.5rem;
    }

    .modal-content > div {
        padding: 1.5rem;
    }

    .close {
        top: 1.25rem;
        right: 1.5rem;
    }
}

/* External Data Section Styles */
.external-data-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.external-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.external-header h3 {
    font-size: 1.75rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.external-description {
    color: #6b7280;
    font-size: 0.95rem;
}

.external-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.external-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.external-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.external-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.external-icon {
    font-size: 1.5rem;
}

.external-card-header h4 {
    font-size: 1.1rem;
    color: #1f2937;
    margin: 0;
}

.external-card-body {
    color: #4b5563;
    font-size: 0.95rem;
}

.external-card-body p {
    margin: 0.5rem 0;
}

.external-card-body strong {
    color: #1f2937;
}

.external-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.external-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.external-list li:last-child {
    border-bottom: none;
}

.external-list a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.external-list a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.external-list small {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.market-item {
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 6px;
    margin: 0.5rem 0;
    border: 1px solid #e5e7eb;
}

.economic-item {
    margin: 1rem 0;
}

.economic-item ul {
    margin-top: 0.5rem;
}

.external-card-body details {
    margin: 0.75rem 0;
}

.external-card-body summary {
    cursor: pointer;
    padding: 0.5rem;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    transition: background 0.2s;
}

.external-card-body summary:hover {
    background: #f3f4f6;
}

.external-card-body details[open] summary {
    margin-bottom: 0.75rem;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.external-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
}

.external-footer p {
    margin: 0.25rem 0;
}

/* Responsive External Data */
@media (max-width: 768px) {
    .external-data-section {
        padding: 1.25rem;
    }

    .external-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .external-header h3 {
        font-size: 1.5rem;
    }
}


/* External Content Box for GitHub/HackerNews/Mastodon/arXiv */
.external-content-box {
    background: #2d3748;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.external-content-text {
    color: #e2e8f0;
    font-size: 1.1rem;
    line-height: 1.8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.external-content-text p {
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.external-content-text br {
    display: block;
    margin: 0.5rem 0;
}


/* arXiv Scientific Paper Formatting - Academic Style */
.arxiv-content-box {
    background: linear-gradient(to bottom, #fdfbf7 0%, #f5f3ed 100%);
    border-radius: 2px;
    padding: 3rem 2.5rem;
    margin: 2rem 0;
    border: 1px solid #d4a574;
    border-top: 3px solid #b8860b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.arxiv-notice {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    padding: 1.2rem 1.8rem;
    margin-bottom: 2rem;
    border-radius: 2px;
    border-left: 5px solid #ffd700;
    box-shadow: 0 2px 8px rgba(26, 35, 126, 0.15);
}

.arxiv-notice h4 {
    margin: 0 0 0.6rem 0;
    color: #ffd700;
    font-size: 1.15rem;
    font-weight: 600;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.3px;
}

.arxiv-notice p {
    margin: 0;
    color: #e3f2fd;
    font-size: 0.95rem;
    line-height: 1.5;
    font-family: Georgia, serif;
}

.arxiv-abstract {
    background: #ffffff;
    padding: 2.5rem 3rem;
    border-radius: 2px;
    border: 1px solid #d0cfc8;
    font-size: 1rem;
    line-height: 1.75;
    color: #2c3e50;
    font-family: Georgia, "Times New Roman", serif;
    text-align: justify;
    hyphens: auto;

    /* Two-column layout like real papers */
    column-count: 2;
    column-gap: 3rem;
    column-rule: 1px solid #e8e6e0;
}

.arxiv-abstract p {
    margin-bottom: 1.2rem;
    text-indent: 1.5em;
    orphans: 3;
    widows: 3;
}

.arxiv-abstract p:first-child {
    text-indent: 0;
    font-weight: 500;
}

.arxiv-abstract br {
    display: block;
    margin: 0.3rem 0;
}

/* Responsive: Single column on smaller screens */
@media (max-width: 1024px) {
    .arxiv-abstract {
        column-count: 1;
        padding: 2rem;
    }
}

/* ===========================================
   BIOINFORMATICS SECTION - DNA/Green Theme
   =========================================== */

/* Bioinformatics Page - Main Layout */
.bioinformatics-page .container {
    max-width: 1400px;
}

.bio-hero {
    background: linear-gradient(135deg, #0f5132 0%, #198754 50%, #20c997 100%);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 6px 20px rgba(15, 81, 50, 0.3);
}

.bio-hero h1 {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.bio-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin: 0;
}

/* Error Display */
.bio-error {
    background: #f8d7da;
    border: 2px solid #f5c2c7;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    color: #842029;
}

.bio-error h3 {
    margin-top: 0;
}

.bio-error-hint {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Section Headers */
.bio-section {
    margin-bottom: 4rem;
}

.bio-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #198754;
}

.bio-section-header h2 {
    margin: 0;
    color: #0f5132;
    font-size: 1.8rem;
}

.bio-count {
    background: #d1e7dd;
    color: #0f5132;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Grid Layout for Cards */
.bio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Bio Cards */
.bio-card {
    background: white;
    border-radius: 12px;
    border: 2px solid #d1e7dd;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(15, 81, 50, 0.15);
    border-color: #198754;
}

.bio-card-header {
    background: linear-gradient(135deg, #d1e7dd 0%, #f8f9fa 100%);
    padding: 1.2rem;
    border-bottom: 2px solid #198754;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.bio-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.bio-card-header h3 a {
    color: #0f5132;
    text-decoration: none;
    font-weight: 600;
}

.bio-card-header h3 a:hover {
    color: #198754;
    text-decoration: underline;
}

.bio-badge {
    background: #198754;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.iris-badge {
    background: #20c997;
}

.bio-card-content {
    padding: 1.5rem;
}

.bio-meta {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.bio-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.bio-meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bio-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.bio-value {
    color: #0f5132;
    font-weight: 600;
    font-family: 'Consolas', 'Monaco', monospace;
}

.bio-card-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.bio-link {
    color: #198754;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.bio-link:hover {
    color: #0f5132;
    transform: translateX(4px);
}

/* Empty State */
.bio-empty {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #d1e7dd;
}

/* Info Box */
.bio-info-box {
    background: linear-gradient(135deg, #d1e7dd 0%, #f8f9fa 100%);
    border: 2px solid #198754;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
}

.bio-info-box h3 {
    color: #0f5132;
    margin-top: 0;
}

.bio-info-box ul {
    margin: 1rem 0;
}

.bio-info-box li {
    margin-bottom: 0.8rem;
}

.bio-disclaimer {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 0;
}

/* ===========================================
   BIOINFORMATICS ARTICLE PAGE (Detail View)
   =========================================== */

.bio-article {
    max-width: 1200px;
    margin: 0 auto;
}

.bio-breadcrumb {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.bio-breadcrumb a {
    color: #198754;
    text-decoration: none;
}

.bio-breadcrumb a:hover {
    text-decoration: underline;
}

.bio-article-header {
    background: linear-gradient(135deg, #0f5132 0%, #198754 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 6px 20px rgba(15, 81, 50, 0.3);
}

.bio-article-header.iris-header {
    background: linear-gradient(135deg, #20c997 0%, #198754 100%);
}

.bio-article-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.bio-article-subtitle {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.bio-article-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Details Card */
.bio-details-card {
    background: white;
    border: 2px solid #d1e7dd;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bio-details-card h2 {
    color: #0f5132;
    margin-top: 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #198754;
}

.bio-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.bio-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bio-detail-label {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bio-detail-value {
    color: #0f5132;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* DNA Sequence Card */
.bio-sequence-card {
    background: #0f5132;
    color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(15, 81, 50, 0.3);
}

.bio-sequence-card h2 {
    color: #20c997;
    margin-top: 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #198754;
}

.bio-sequence-wrapper {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    overflow-x: auto;
    border: 2px solid #198754;
}

.bio-sequence {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #20c997;
    margin: 0;
    word-break: break-all;
    white-space: pre-wrap;
}

.bio-sequence-stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #198754;
}

.bio-sequence-stats p {
    margin: 0.5rem 0;
    color: #d1e7dd;
    font-size: 0.9rem;
}

/* Analysis Card */
.bio-analysis-card {
    background: white;
    border: 2px solid #d1e7dd;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bio-analysis-card h2 {
    color: #0f5132;
    margin-top: 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #198754;
}

.bio-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.bio-analysis-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #d1e7dd 0%, #f8f9fa 100%);
    border-radius: 8px;
    border: 2px solid #198754;
}

.bio-analysis-item h3 {
    color: #0f5132;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bio-analysis-value {
    font-size: 2rem;
    font-weight: 700;
    color: #198754;
    margin: 0.5rem 0;
    font-family: 'Consolas', 'Monaco', monospace;
}

.bio-analysis-desc {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

/* Info Card */
.bio-info-card {
    background: linear-gradient(135deg, #d1e7dd 0%, #f8f9fa 100%);
    border: 2px solid #198754;
    border-radius: 12px;
    padding: 2rem;
}

.bio-info-card h2 {
    color: #0f5132;
    margin-top: 0;
}

.bio-info-card p {
    line-height: 1.8;
    color: #495057;
}

/* Article Footer */
.bio-article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #d1e7dd;
}

.bio-back-link {
    display: inline-flex;
    align-items: center;
    color: #198754;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.bio-back-link:hover {
    color: #0f5132;
    transform: translateX(-4px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .bio-hero h1 {
        font-size: 1.8rem;
    }

    .bio-grid {
        grid-template-columns: 1fr;
    }

    .bio-details-grid {
        grid-template-columns: 1fr;
    }

    .bio-analysis-grid {
        grid-template-columns: 1fr;
    }

    .bio-article-header h1 {
        font-size: 1.5rem;
    }
}

/* Bioinformatics Search Styles */
.bio-search-container {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.bio-search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    border: 2px solid #198754;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.bio-search-input:focus {
    border-color: #0f5132;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
}

.bio-search-select {
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border: 2px solid #198754;
    border-radius: 8px;
    background: white;
    color: #0f5132;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.bio-search-select:hover {
    background: #d1e7dd;
}

.bio-search-select:focus {
    border-color: #0f5132;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
}

.bio-search-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #198754 0%, #0f5132 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.bio-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.bio-search-btn:active {
    transform: translateY(0);
}

.bio-search-info {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: #d1e7dd;
    border-left: 4px solid #198754;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.bio-search-info p {
    margin: 0;
    color: #0f5132;
    font-size: 0.95rem;
}

.bio-clear-search {
    color: #198754;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: white;
}

.bio-clear-search:hover {
    background: #f8f9fa;
    color: #0f5132;
}

/* Empty state for search results */
.bio-empty {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.bio-empty p {
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive Search Form */
@media (max-width: 768px) {
    .bio-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .bio-search-input,
    .bio-search-select,
    .bio-search-btn {
        width: 100%;
    }

    .bio-search-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   BIOINFORMATICS CARD IMAGE STYLING
   Pokemon Card-Like Appearance
   ============================================ */

.bio-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 3px solid #198754;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bio-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

/* Hover effect - zoom in slightly like a Pokemon card */
.bio-card:hover .bio-card-image img {
    transform: scale(1.05);
}

/* DNA Card specific styling */
.dna-card .bio-card-image {
    border-bottom-color: #0d6efd;
    background: linear-gradient(135deg, #cfe2ff 0%, #9ec5fe 100%);
}

/* Iris Card specific styling */
.iris-card .bio-card-image {
    border-bottom-color: #d63384;
    background: linear-gradient(135deg, #f7d6e6 0%, #f1acd1 100%);
}

/* Protein Card specific styling (for future use) */
.protein-card .bio-card-image {
    border-bottom-color: #fd7e14;
    background: linear-gradient(135deg, #ffe5d0 0%, #ffc9a3 100%);
}

/* Image overlay effect on hover */
.bio-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bio-card:hover .bio-card-image::after {
    opacity: 1;
}

/* Fallback for missing images */
.bio-card-image:empty::before {
    content: '🧬';
    font-size: 4rem;
    opacity: 0.3;
}

.dna-card .bio-card-image:empty::before {
    content: '🧬';
}

.iris-card .bio-card-image:empty::before {
    content: '🌸';
}

.protein-card .bio-card-image:empty::before {
    content: '⚛️';
}

/* Image loading state */
.bio-card-image img[loading="lazy"] {
    background: #f8f9fa;
}

/* Responsive image sizing */
@media (max-width: 768px) {
    .bio-card-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .bio-card-image {
        height: 160px;
    }
}
