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

body {
    background: #e8e3d3;
    font-family: 'Old Standard TT', 'Times New Roman', serif;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Input Form Styling */
.input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.input-box {
    background: #f9f7f1;
    border: 3px double #333;
    padding: 40px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.input-box h1 {
    font-family: 'Libre Baskerville', serif;
    font-size: 3em;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.input-box p {
    margin: 15px 0;
    font-size: 1.1em;
}

.input-box form {
    margin: 25px 0;
}

.input-box input[type="url"] {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 2px solid #333;
    background: #fff;
    font-family: 'Old Standard TT', serif;
    margin-bottom: 15px;
}

.input-box button {
    background: #1a1a1a;
    color: #fff;
    padding: 12px 30px;
    border: none;
    font-size: 1.1em;
    font-family: 'Libre Baskerville', serif;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
}

.input-box button:hover {
    background: #333;
}

.input-box .example {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Error Styling */
.error-container {
    text-align: center;
    padding: 50px 20px;
    max-width: 600px;
    margin: 50px auto;
    background: #f9f7f1;
    border: 2px solid #d00;
}

.error-container h1 {
    color: #d00;
    font-size: 2em;
    margin-bottom: 20px;
}

.error-container a {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
}

/* Newspaper Container */
.newspaper {
    max-width: 1200px;
    margin: 30px auto;
    background: #f9f7f1;
    padding: 40px;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    border: 1px solid #ccc;
}

/* Masthead */
.masthead {
    text-align: center;
    border-bottom: 4px double #000;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.ornament-top, .ornament-bottom {
    font-size: 1.5em;
    margin: 10px 0;
    letter-spacing: 10px;
}

.newspaper-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 4em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin: 15px 0;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.newspaper-subtitle {
    font-style: italic;
    font-size: 1.2em;
    margin: 10px 0;
    color: #333;
}

.newspaper-date {
    font-size: 1.1em;
    margin-top: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Share Box */
.share-box {
    background: #fff;
    border: 2px solid #333;
    padding: 15px;
    margin: 20px auto;
    text-align: center;
    max-width: 800px;
}

.share-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-box input {
    width: 100%;
    padding: 8px;
    border: 1px solid #999;
    background: #fafafa;
    font-family: monospace;
    font-size: 0.9em;
    text-align: center;
}

/* Weather Item (integrated as news article) */
.news-item.weather-item {
    border: 2px solid #333;
    padding: 15px;
    background: #fafaf5;
}

.news-item.weather-item .headline {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.news-item.weather-item .article-content {
    line-height: 1.8;
}

/* Columns Layout */
.columns {
    column-count: 4;
    column-gap: 30px;
    clear: both;
    position: relative;
}

/* News Items */
.news-item {
    margin-bottom: 25px;
    page-break-inside: avoid;
    break-inside: avoid;
    padding: 0 10px;
}

/* Two-column span - feature articles break out of column flow */
.news-item.span-2 {
    column-span: all;
    border-left: 3px solid #000;
    border-right: 3px solid #000;
    border-top: 3px solid #000;
    border-bottom: 3px solid #000;
    padding: 15px;
    margin: 30px 0;
    background: #f5f3eb;
}

.headline {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    hyphens: auto;
}

.headline a {
    color: #000;
    text-decoration: none;
}

.headline a:hover {
    text-decoration: underline;
}

.category {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}

.article-content {
    font-size: 1em;
    text-align: justify;
    margin-bottom: 8px;
    hyphens: auto;
}

.pubdate {
    font-size: 0.85em;
    font-style: italic;
    color: #666;
    text-align: right;
    border-top: 1px dotted #ccc;
    padding-top: 5px;
    margin-top: 8px;
}

/* Article Style Variations */

/* Snippet - short articles with larger font */
.news-item.snippet .headline {
    font-size: 1.2em;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.news-item.snippet .article-content {
    font-size: 1.1em;
    line-height: 1.5;
}

/* Big Headline - emphasis on the title */
.news-item.big-headline {
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    padding-top: 12px;
    padding-bottom: 12px;
}

.news-item.big-headline .headline {
    font-size: 1.8em;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 10px;
}

.news-item.big-headline .category {
    text-align: center;
}

.news-item.big-headline .article-content {
    font-size: 0.95em;
    columns: 1;
}

/* Feature Article - spans 2 columns */
.news-item.feature-article .headline {
    font-size: 2em;
    margin-bottom: 15px;
    text-align: left;
    border-bottom: 3px double #000;
    padding-bottom: 10px;
}

.news-item.feature-article .article-content {
    font-size: 1.05em;
    line-height: 1.7;
    columns: 2;
    column-gap: 20px;
}

.news-item.feature-article .category {
    font-size: 1em;
    margin-bottom: 12px;
}

/* Long Article - smaller font to fit more text */
.news-item.long-article .headline {
    font-size: 1.3em;
}

.news-item.long-article .article-content {
    font-size: 0.9em;
    line-height: 1.5;
}

/* Standard Article - default styling */
.news-item.standard {
    /* Uses default styles */
}

/* Footer */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 4px double #000;
    text-align: center;
}

.footer a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px 20px;
    border: 2px solid #000;
    display: inline-block;
    transition: all 0.3s;
}

.footer a:hover {
    background: #000;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 1100px) {
    .columns {
        column-count: 3;
    }

    .newspaper-title {
        font-size: 3em;
        letter-spacing: 6px;
    }
}

@media (max-width: 900px) {
    .columns {
        column-count: 2;
    }

    .newspaper-title {
        font-size: 2.5em;
        letter-spacing: 4px;
    }

    .news-item.feature-article .article-content {
        columns: 1;
    }
}

@media (max-width: 600px) {
    .columns {
        column-count: 1;
    }

    .newspaper {
        padding: 20px;
        margin: 10px;
    }

    .newspaper-title {
        font-size: 2em;
        letter-spacing: 2px;
    }

    .input-box {
        padding: 20px;
    }

    .input-box h1 {
        font-size: 2em;
    }

    .news-item.big-headline .headline {
        font-size: 1.4em;
    }

    .news-item.feature-article .headline {
        font-size: 1.5em;
    }
}

/* Print Styles */
@media print {
    body {
        background: #fff;
    }

    .newspaper {
        box-shadow: none;
        border: none;
    }

    .share-box {
        display: none;
    }

    .footer a {
        display: none;
    }
}
