/* ЗА ДНЕСЪ — вестникарски стил от старо време */

:root {
    --paper: #ffffff;
    --paper-edge: #e0e0e0;
    --ink: #1a1a1a;
    --ink-faded: #6b6b6b;
    --rule: #b0b0b0;
}

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

body {
    background: #eeeeee;
    background-image: radial-gradient(ellipse at center, #f5f5f5 0%, #dddddd 100%);
    font-family: 'Old Standard TT', 'Times New Roman', serif;
    color: var(--ink);
    min-height: 100vh;
    padding: 24px 12px;
    display: flex;
    justify-content: center;
}

.paper {
    background: var(--paper);
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.015) 3px),
        radial-gradient(ellipse at top left, rgba(255,255,255,0.5), transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(0, 0, 0, 0.05), transparent 55%);
    max-width: 960px;
    width: 100%;
    padding: 32px 40px;
    border: 1px solid var(--paper-edge);
    box-shadow: 0 3px 24px rgba(43, 34, 22, 0.35);
}

/* --- Глава на вестника --- */

.topline {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 4px;
}

.masthead {
    font-family: 'Oranienbaum', serif;
    font-weight: 400;
    font-size: clamp(48px, 10vw, 84px);
    text-align: center;
    line-height: 1;
    margin-top: 32px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.motto {
    text-align: center;
    font-size: 13px;
    letter-spacing: 4px;
    margin: 8px 0 14px;
}

.dateline {
    border-top: 4px double var(--ink);
    border-bottom: 1px solid var(--ink);
    font-size: 15px;
    letter-spacing: 1px;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.dateline-text { flex: 1; text-align: center; }
.dateline-share { font-size: 12px; letter-spacing: normal; white-space: nowrap; }

.holiday-banner {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ink);
    color: var(--ink);
}

/* --- Колони --- */

.columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 0.7fr;
    margin-top: 24px;
}

.col { padding: 0 20px; border-right: 1px solid var(--rule); }
.col:first-child { padding-left: 0; }
.col:last-child { padding-right: 0; border-right: none; }

.rubric {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.city-tag { font-size: 11px; letter-spacing: 1px; text-transform: none; color: var(--ink-faded); }
p { font-size: 16px; line-height: 1.55; margin-bottom: 8px; text-align: justify; hyphens: auto; }
.center { text-align: center; }
.muted { color: var(--ink-faded); font-style: italic; }

.fleuron {
    text-align: center;
    font-size: 0;
    height: 18px;
    margin: 14px 0;
    background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAgMjAiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAiPgogIDxjaXJjbGUgY3g9Ijg1IiBjeT0iMTAiIHI9IjIuNSIgZmlsbD0iIzFhMWExYSIvPgogIDxjaXJjbGUgY3g9IjEwMCIgY3k9IjEwIiByPSIyLjUiIGZpbGw9IiMxYTFhMWEiLz4KICA8Y2lyY2xlIGN4PSIxMTUiIGN5PSIxMCIgcj0iMi41IiBmaWxsPSIjMWExYTFhIi8+Cjwvc3ZnPgo=") no-repeat center;
    background-size: 60px 18px;
}

/* --- Времето и небето --- */

.weather-widget { text-align: center; }
.weather-now { display: flex; align-items: center; justify-content: center; gap: 10px; }
.weather-now-symbol { font-size: 40px; line-height: 1; }
.weather-now-temp { font-size: 42px; font-weight: 700; line-height: 1; }
.weather-now-text { text-align: center; font-size: 13px; color: var(--ink-faded); margin: 4px 0 2px; font-style: italic; }
.weather-minmax { font-size: 14px; margin-bottom: 12px; }
.weather-minmax strong { font-weight: 700; }

.weather-forecast {
    display: flex;
    border-top: 1px solid var(--rule);
    padding-top: 10px;
}
.weather-forecast-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.weather-minmax { text-align: center; font-size: 14px; margin-bottom: 12px; }

.weather-forecast-day:first-child { border-right: 1px solid var(--rule); }
.wf-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-faded); }
.wf-symbol { font-size: 24px; line-height: 1.3; }
.wf-range { font-size: 13px; font-weight: 700; }
.moon-svg { display: inline-block; margin: 4px 0; }

.rates { width: 100%; font-size: 15px; border-collapse: collapse; }
.rates td { padding: 3px 0; border-bottom: 1px dotted var(--rule); }
.rates .num { text-align: right; font-variant-numeric: tabular-nums; }
.matches { width: 100%; font-size: 13px; border-collapse: collapse; }
.matches td { padding: 3px 0; border-bottom: 1px dotted var(--rule); }
.matches .match-time { color: var(--ink-faded); width: 44px; }
.matches .match-teams { padding-left: 6px; }
.matches .match-score { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.matches .live { color: #c0392b; font-weight: 700; }

.weather-stats {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 12px;
    margin-bottom: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--rule);
    font-size: 12px;
    color: var(--ink-faded);
}

.birthday-row { display: flex; align-items: center; gap: 8px; }
.birthday-photo {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--ink);
    filter: sepia(0.6) contrast(1.05);
    flex-shrink: 0;
}

.birthday-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper-edge);
    font-family: 'Oranienbaum', serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-faded);
}

.rate-flag { width: 26px; }
.rate-flag img { border-radius: 2px; vertical-align: middle; }
.team-crest { width: 18px; height: 18px; vertical-align: middle; object-fit: contain; }

/* --- Хороскоп --- */

.zodiac-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.zodiac-picker button {
    font-family: 'Segoe UI Symbol', 'Noto Sans Symbols', 'DejaVu Sans', sans-serif;
    font-size: 24px;
    line-height: 1;
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink);
    padding: 8px 0;
    cursor: pointer;
    transition: background 0.15s;
}

.zodiac-picker button:hover  { background: rgba(184, 168, 126, 0.25); }
.zodiac-picker button.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.zodiac-glyph { font-family: 'Segoe UI Symbol', 'Noto Sans Symbols', 'DejaVu Sans', sans-serif; }

.banner-box {
    display: block;
    border: 1px solid var(--ink);
    padding: 10px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
}
.banner-box:hover { background: rgba(184, 168, 126, 0.15); }
.banner-box img { max-width: 100%; height: 130px; object-fit: cover; display: block; margin: 0 auto 6px; }
.banner-box .banner-text { font-size: 14px; font-style: italic; line-height: 1.4; }

.banner-large {
    padding: 14px;
    border: 1px solid var(--ink);
    background: transparent;
}
.banner-large img {
    max-width: 100%;
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}
.banner-large .banner-text {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 8px;
}
.banner-large .banner-premium-tag {
    display: block;
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--ink-faded);
    margin-bottom: 8px;
    white-space: nowrap;
    text-align: center;
}
.banner-large .banner-text { font-size: 19px; font-weight: 700; line-height: 1.4; }

.joke { font-style: italic; }
.quote { font-style: italic; text-align: center; }
.quote .author { display: block; font-style: normal; font-size: 14px; margin-top: 4px; }
.prayer { font-size: 13px; font-style: italic; line-height: 1.5; color: var(--ink-faded); }
.prayer strong { color: var(--ink); font-style: normal; }

.next-quote-btn {
    display: block;
    margin: 8px auto 0;
    background: transparent;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    font-size: 13px;
    font-style: italic;
    color: var(--ink-faded);
    cursor: pointer;
    padding: 4px 0;
}
.next-quote-btn:hover { color: var(--ink); text-decoration: underline; }
.next-quote-btn:disabled { opacity: 0.5; cursor: default; }
.history { font-size: 15px; }

/* --- Подножие --- */

footer {
    display: flex;
    justify-content: space-between;
    border-top: 4px double var(--ink);
    margin-top: 28px;
    padding-top: 8px;
    font-size: 12px;
    letter-spacing: 1.5px;
}

/* --- Малки екрани: вестникът става една колона --- */

@media screen and (max-width: 900px) and (min-width: 721px) {
    .columns { grid-template-columns: 1fr 1fr; }
    .col:nth-child(2n) { border-right: none; padding-right: 0; }
    .col:nth-child(2n+1) { padding-left: 0; }
    .col:nth-child(n+3) { border-top: 1px solid var(--rule); margin-top: 16px; padding-top: 16px; }
}

@media screen and (max-width: 720px) {
    .dateline {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
    .dateline-text {
        text-align: center;
    }
    .dateline-share {
        white-space: normal;
        text-align: center;
    }    

    .paper { padding: 20px 18px; }
    .columns { grid-template-columns: 1fr; }
    .col {
        padding: 0;
        border-right: none;
        border-bottom: 1px solid var(--rule);
        padding-bottom: 18px;
        margin-bottom: 18px;
    }
    .col:last-child { border-bottom: none; margin-bottom: 0; }
}

@media print {
    body { background: #fff; padding: 0; }
    .paper { box-shadow: none; border: none; max-width: 100%; }
    .col-ads, .next-quote-btn, .zodiac-picker, .banner-box { display: none !important; }
    .no-print { display: none !important; }
    a { color: inherit; text-decoration: none; }
}

.print-btn {
    display: block;
    margin: 10px auto 0;
    padding: 6px 14px;
    background: none;
    border: 1px solid var(--rule);
    color: var(--ink);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}
.print-btn:hover { background: rgba(0,0,0,0.04); }

.matches { font-size: 12px; }
.matches .match-time { width: 38px; }
.matches .match-teams { padding-left: 4px; }
.team-crest { width: 14px; height: 14px; }

.apod-photo {
    width: 100%;
    height: auto;
    border-radius: 2px;
    margin-top: 4px;
    border: 1px solid var(--ink);
    filter: grayscale(0.75) sepia(0.35) contrast(1.1) brightness(0.95);
}

.apod-caption { text-align: center; font-size: 12px; font-style: italic; margin-top: 4px; }
.apod-credit { text-align: center; font-size: 10px; color: var(--ink-faded); }