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

:root {
    --paper-bg: #faf9f6;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --border-color: #333;
    --shadow: rgba(0, 0, 0, 0.1);
    --accent: #2c2c2c;
}

body {
    font-family: 'Libre Baskerville', 'Times New Roman', serif;
    background: #e8e6e1;
    color: var(--text-dark);
    line-height: 1.6;
    padding: 20px;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.03) 2px, rgba(0,0,0,.03) 4px);
}

.newspaper-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--paper-bg);
    box-shadow: 0 4px 20px var(--shadow);
    padding: 40px;
    position: relative;
}

/* Header */
.newspaper-header {
    border-bottom: 3px double var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.masthead {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: var(--text-dark);
}

.tagline {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 15px;
    letter-spacing: 0.05em;
}

.date-line {
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Breaking News */
.breaking-news {
    background: var(--accent);
    color: white;
    padding: 15px;
    margin-bottom: 30px;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.breaking-news-content {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.breaking-label {
    background: white;
    color: var(--accent);
    padding: 5px 15px;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Main Layout */
.newspaper-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-bottom: 40px;
}

.newspaper-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Articles */
.article-card {
    background: white;
    border: 1px solid var(--border-color);
    padding: 25px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    break-inside: avoid;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.article-card.breaking {
    border-left: 4px solid var(--accent);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
    filter: grayscale(100%);
    border: 1px solid var(--border-color);
}

.article-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--text-dark);
}

.article-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.article-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    border-top: 1px solid #ddd;
    padding-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.image-caption {
    font-size: 0.7rem;
    font-style: italic;
    color: var(--text-light);
    margin-top: 5px;
    text-align: center;
    border-top: 1px dotted #ccc;
    padding-top: 5px;
}

.file-link {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid var(--border-color);
    background: #f9f9f9;
    text-align: center;
}

.file-download {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.file-download:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Reactions */
.reactions-bar {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reaction-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.reaction-item:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

.reaction-item.active {
    background: #e8e6e1;
    border-color: var(--accent);
}

.reaction-emoji {
    font-size: 1rem;
    filter: grayscale(100%);
}

.reaction-count {
    font-size: 0.8rem;
    color: var(--text-dark);
    font-weight: 500;
}

.reaction-picker {
    position: relative;
    display: inline-block;
}

.reaction-picker-trigger {
    padding: 4px 8px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.reaction-picker-trigger:hover {
    background: #f5f5f5;
}

.reaction-picker-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 5px;
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px;
    display: none;
    gap: 5px;
    flex-wrap: wrap;
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 10;
}

.reaction-picker-menu.show {
    display: flex;
}

.reaction-option {
    padding: 6px 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-size: 1.2rem;
    filter: grayscale(100%);
}

.reaction-option:hover {
    background: #f5f5f5;
    border-color: var(--border-color);
    transform: scale(1.1);
}

/* Sidebar */
.sidebar {
    border-left: 2px solid var(--border-color);
    padding-left: 30px;
}

.stats-box {
    background: white;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
}

.section-header {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted #ccc;
    font-size: 0.9rem;
}

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

.stat-label {
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.stat-value {
    font-weight: 700;
    color: var(--text-dark);
}

/* Footer */
.newspaper-footer {
    border-top: 3px double var(--border-color);
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
}

.footer-content {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 2;
}

.footer-text {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .newspaper-main {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-left: none;
        border-top: 2px solid var(--border-color);
        padding-left: 0;
        padding-top: 30px;
    }

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

    .masthead {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    .newspaper-container {
        padding: 20px;
    }

    .masthead {
        font-size: 2rem;
    }

    .article-title {
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .newspaper-container {
        box-shadow: none;
        padding: 20px;
    }

    .reactions-bar {
        display: none;
    }

    .sidebar {
        border: none;
        page-break-inside: avoid;
    }
}

