@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,700&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,700&family=UnifrakturMaguntia&display=swap');

:root {
    --paper: #f5f0e1;
    --paper-dark: #e8dcc8;
    --ink: #2c1810;
    --ink-light: #5a4a3a;
    --red-accent: #8b0000;
    --rule: 1px solid #2c1810;
    --rule-thick: 3px solid #2c1810;
    --rule-double: 4px double #2c1810;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lora', Georgia, serif;
    background: var(--paper);
    color: var(--ink);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: var(--ink);
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== MASTHEAD ===== */
.masthead {
    text-align: center;
    padding: 30px 20px 15px;
    border-bottom: var(--rule-thick);
    position: relative;
}

.masthead::before {
    content: '★ ★ ★';
    display: block;
    font-size: 0.7rem;
    letter-spacing: 10px;
    margin-bottom: 8px;
    color: var(--ink-light);
}

.masthead-title {
    font-family: 'UnifrakturMaguntia', cursive;
    font-size: 4rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.masthead-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem;
    font-style: italic;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--ink-light);
}

.masthead-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: var(--rule);
    border-bottom: var(--rule);
    margin-top: 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===== NAV BAR ===== */
.nav-bar {
    display: flex;
    justify-content: center;
    gap: 0;
    border-bottom: var(--rule-double);
    background: var(--ink);
}

.nav-link {
    color: var(--paper);
    padding: 10px 25px;
    font-family: 'Playfair Display', serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-right: 1px solid var(--ink-light);
    transition: background 0.2s;
}

.nav-link:last-child {
    border-right: none;
}

.nav-link:hover {
    background: var(--red-accent);
}

/* ===== BREAKING NEWS TICKER ===== */
.breaking-bar {
    background: var(--red-accent);
    color: #fff;
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
    font-family: 'Playfair Display', serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breaking-label {
    display: inline-block;
    background: #fff;
    color: var(--red-accent);
    padding: 2px 12px;
    margin-right: 15px;
    font-weight: 900;
}

.breaking-scroll {
    display: inline-block;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0;
    border-bottom: var(--rule-thick);
}

.content-area {
    border-right: var(--rule);
    padding: 30px 30px 30px 0;
}

.sidebar-area {
    padding: 30px 0 30px 25px;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    font-family: 'Playfair Display', serif;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-top: var(--rule-thick);
    border-bottom: var(--rule);
    padding: 8px 0;
    margin-bottom: 25px;
    text-align: center;
}

.section-header.red {
    color: var(--red-accent);
    border-color: var(--red-accent);
}

/* ===== HEADLINE ARTICLES (TOP 3) ===== */
.headline-article {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: var(--rule);
}

.headline-article:last-of-type {
    border-bottom: var(--rule-thick);
}

.headline-num {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    font-weight: 900;
    float: left;
    line-height: 0.85;
    margin-right: 15px;
    color: var(--red-accent);
}

.headline-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 8px;
}

.headline-title a:hover {
    color: var(--red-accent);
}

.headline-byline {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--ink-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.headline-img {
    float: right;
    width: 200px;
    height: 150px;
    object-fit: cover;
    margin: 0 0 10px 20px;
    border: 1px solid var(--ink);
    filter: sepia(30%) contrast(110%);
}

.headline-excerpt {
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
}

.headline-tags {
    margin-top: 10px;
    clear: both;
}

.headline-tag {
    font-size: 0.7rem;
    font-style: italic;
    color: var(--red-accent);
    margin-right: 8px;
}

/* ===== NEWSPAPER LISTING (Remaining) ===== */
.listing-grid {
    column-count: 2;
    column-gap: 30px;
    column-rule: var(--rule);
}

.listing-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dotted var(--ink-light);
    break-inside: avoid;
    transition: background 0.2s;
}

.listing-item:hover {
    background: var(--paper-dark);
}

.listing-rank {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 1.3rem;
    min-width: 30px;
    color: var(--red-accent);
}

.listing-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 1px solid var(--ink);
    filter: sepia(20%);
    flex-shrink: 0;
}

.listing-body {
    flex: 1;
    min-width: 0;
}

.listing-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-title a:hover {
    color: var(--red-accent);
}

.listing-meta {
    font-size: 0.7rem;
    color: var(--ink-light);
    font-style: italic;
}

/* ===== SIDEBAR ===== */
.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    padding: 6px;
    border-top: var(--rule-thick);
    border-bottom: var(--rule);
    margin-bottom: 15px;
}

/* Categories as Newspaper Sections */
.sidebar-cat {
    display: block;
    padding: 8px 0;
    border-bottom: 1px dotted var(--ink-light);
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 0.85rem;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.sidebar-cat:hover {
    color: var(--red-accent);
}

.sidebar-cat .cat-tooltip {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: var(--ink);
    color: var(--paper);
    padding: 8px 12px;
    font-family: 'Lora', serif;
    font-size: 0.75rem;
    font-weight: 400;
    font-style: italic;
    white-space: normal;
    width: 240px;
    z-index: 50;
    line-height: 1.4;
}

.sidebar-cat:hover .cat-tooltip {
    display: block;
}

/* Random Games — "Lottery" */
.lottery-card {
    border: var(--rule);
    padding: 12px;
    margin-bottom: 12px;
    text-align: center;
    transition: background 0.2s;
}

.lottery-card:hover {
    background: var(--paper-dark);
}

.lottery-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border: 1px solid var(--ink);
    filter: sepia(20%);
    margin-bottom: 8px;
}

.lottery-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-read-more {
    display: inline-block;
    background: var(--ink);
    color: var(--paper);
    padding: 6px 16px;
    font-family: 'Playfair Display', serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-read-more:hover {
    background: var(--red-accent);
}

/* Ad Slot */
.ad-slot {
    border: var(--rule-double);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--ink-light);
    font-size: 0.9rem;
    background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 10px, var(--paper-dark) 10px, var(--paper-dark) 20px);
}

/* ===== CLASSIFIEDS (TAG CLOUD) ===== */
.classifieds {
    background: var(--paper-dark);
    padding: 30px;
    border-top: var(--rule-thick);
    border-bottom: var(--rule-thick);
}

.classifieds-grid {
    column-count: 4;
    column-gap: 20px;
    column-rule: 1px dotted var(--ink-light);
}

.classified-item {
    display: block;
    padding: 4px 0;
    font-size: 0.8rem;
    font-style: italic;
    break-inside: avoid;
    border-bottom: 1px dotted transparent;
    transition: all 0.2s;
}

.classified-item:hover {
    color: var(--red-accent);
    border-bottom-color: var(--red-accent);
}

/* ===== FOOTER ===== */
.paper-footer {
    text-align: center;
    padding: 25px 20px;
    font-size: 0.75rem;
    color: var(--ink-light);
    font-style: italic;
    line-height: 1.8;
}

.paper-footer::before {
    content: '— § —';
    display: block;
    margin-bottom: 10px;
    font-style: normal;
    font-size: 1rem;
    letter-spacing: 5px;
}

/* ===== TOP USERS SLIDER ===== */
.users-strip {
    display: flex;
    gap: 0;
    overflow: hidden;
    border-bottom: var(--rule);
    padding: 10px 0;
}

.users-scroll-track {
    display: flex;
    gap: 15px;
    animation: scrollUsers 30s linear infinite;
    width: max-content;
}

.users-scroll-track:hover {
    animation-play-state: paused;
}

@keyframes scrollUsers {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 5px 15px;
    border-right: 1px dotted var(--ink-light);
}

.user-badge img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--ink);
    filter: sepia(30%);
}

.user-badge-info {
    font-size: 0.7rem;
}

.user-badge-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.user-badge-score {
    font-style: italic;
    color: var(--ink-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .content-area {
        border-right: none;
        padding: 20px 0;
    }

    .sidebar-area {
        padding: 20px 0;
        border-top: var(--rule-thick);
    }

    .listing-grid {
        column-count: 1;
    }

    .classifieds-grid {
        column-count: 2;
    }

    .masthead-title {
        font-size: 2.5rem;
    }

    .headline-img {
        float: none;
        width: 100%;
        height: 200px;
        margin: 0 0 10px 0;
    }

    .headline-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 600px) {
    .nav-bar {
        flex-wrap: wrap;
    }

    .nav-link {
        flex: 1;
        text-align: center;
        padding: 8px 10px;
        font-size: 0.7rem;
    }

    .classifieds-grid {
        column-count: 1;
    }

    .masthead-meta {
        flex-direction: column;
        gap: 5px;
    }
}