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

:root {
    --ink-black: #1a1a1a;
    --paper-white: #fafaf8;
    --racing-red: #dc2626;
    --cricket-green: #16a34a;
    --border-gray: #d4d4d4;
    --text-gray: #525252;
    --search-bg: #ffffff;
    --live-pulse: #ef4444;
}

[data-theme="dark"] {
    --ink-black: #e5e5e5;
    --paper-white: #0f0f0f;
    --racing-red: #ef4444;
    --cricket-green: #22c55e;
    --border-gray: #404040;
    --text-gray: #a3a3a3;
    --search-bg: #1a1a1a;
    --live-pulse: #f87171;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: var(--paper-white);
    color: var(--ink-black);
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
}

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

/* Breaking News Banner */
.breaking-banner {
    background: linear-gradient(135deg, var(--racing-red) 0%, #991b1b 100%);
    color: white;
    padding: 12px 0;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.breaking-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.breaking-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.breaking-label {
    background: white;
    color: var(--racing-red);
    padding: 4px 12px;
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.breaking-text {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Header */
header {
    border-bottom: 4px double var(--ink-black);
    padding: 40px 0 20px;
    margin-bottom: 20px;
}

.masthead {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.masthead h1 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -3px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.tagline {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-gray);
    font-weight: 400;
    border-top: 1px solid var(--border-gray);
    border-bottom: 1px solid var(--border-gray);
    padding: 8px 0;
    margin-top: 10px;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: 2px solid var(--ink-black);
    color: var(--ink-black);
    padding: 8px 16px;
    cursor: pointer;
    font-family: Georgia, serif;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.dark-mode-toggle:hover {
    background: var(--ink-black);
    color: var(--paper-white);
}

.meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid var(--border-gray);
    font-size: 0.85rem;
    color: var(--text-gray);
    flex-wrap: wrap;
    gap: 10px;
}

/* Trending Bar */
.trending-bar {
    background: var(--ink-black);
    color: var(--paper-white);
    padding: 10px 0;
    margin-bottom: 30px;
    font-size: 0.85rem;
    border-top: 3px solid var(--ink-black);
    border-bottom: 3px solid var(--ink-black);
}

.trending-content {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.trending-content::-webkit-scrollbar {
    display: none;
}

.trending-label {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    font-size: 0.75rem;
}

.trending-topics {
    display: flex;
    gap: 15px;
    white-space: nowrap;
}

.trending-topic {
    cursor: pointer;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

.trending-topic:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Newspaper-style Divider */
.newspaper-divider {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.newspaper-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: var(--ink-black);
}

.newspaper-divider::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% + 4px);
    height: 1px;
    background: var(--border-gray);
}

.newspaper-divider span {
    background: var(--paper-white);
    padding: 0 20px;
    position: relative;
    font-size: 1.5rem;
    color: var(--ink-black);
}

/* Search Bar */
.search-container {
    margin: 30px 0;
    text-align: center;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid var(--ink-black);
    font-size: 1rem;
    font-family: Georgia, serif;
    background: var(--search-bg);
    color: var(--ink-black);
    transition: border-color 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--racing-red);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--ink-black);
    color: var(--paper-white);
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Date Filters */
.date-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.date-btn {
    padding: 6px 16px;
    border: 1px solid var(--ink-black);
    background: transparent;
    color: var(--ink-black);
    cursor: pointer;
    font-family: Georgia, serif;
    font-size: 0.85rem;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-btn:hover,
.date-btn.active {
    background: var(--ink-black);
    color: var(--paper-white);
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    padding-bottom: 30px;
    border-bottom: 3px double var(--ink-black);
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 20px;
    border: 2px solid var(--ink-black);
    background: transparent;
    color: var(--ink-black);
    cursor: pointer;
    font-family: Georgia, serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background: var(--ink-black);
    color: var(--paper-white);
}

.category-btn.f1 {
    border-color: var(--racing-red);
    color: var(--racing-red);
}

.category-btn.f1:hover,
.category-btn.f1.active {
    background: var(--racing-red);
    color: white;
}

.category-btn.cricket {
    border-color: var(--cricket-green);
    color: var(--cricket-green);
}

.category-btn.cricket:hover,
.category-btn.cricket.active {
    background: var(--cricket-green);
    color: white;
}

/* Live Badge */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--live-pulse);
    color: white;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 8px;
    animation: livePulse 2s infinite;
}

.live-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    animation: blink 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Hot Badge */
.hot-badge {
    display: inline-block;
    background: var(--racing-red);
    color: white;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 8px;
}

/* Tag System */
.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tag {
    font-size: 0.7rem;
    padding: 3px 10px;
    border: 1px solid var(--ink-black);
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--ink-black);
    color: var(--paper-white);
}

/* Article Stats */
.article-stats {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-gray);
    padding-top: 8px;
    border-top: 1px solid var(--border-gray);
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

/* Main Content with Sidebar */
.main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 50px;
    margin-bottom: 50px;
}

.articles-grid {
    min-width: 0;
    border-right: 1px solid var(--border-gray);
    padding-right: 50px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-section {
    border: 3px double var(--ink-black);
    padding: 25px;
    margin-bottom: 30px;
}

.sidebar-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--ink-black);
    padding-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.trending-article {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.trending-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.trending-article:hover {
    padding-left: 12px;
    background: linear-gradient(90deg, var(--border-gray) 0%, transparent 100%);
}

.trending-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: var(--ink-black);
    color: var(--paper-white);
    text-align: center;
    line-height: 28px;
    font-weight: 900;
    font-size: 0.9rem;
    margin-right: 12px;
    border: 2px solid var(--ink-black);
}

.trending-article-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.trending-views {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 5px;
}

/* Featured Article */
.featured-article {
    border: 4px solid var(--ink-black);
    padding: 40px;
    margin-bottom: 50px;
    background: var(--paper-white);
    transition: all 0.4s ease;
}

.featured-article:hover {
    transform: translateY(-4px);
    border-color: var(--racing-red);
}

.featured-article .category-tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 5px 12px;
    margin-bottom: 20px;
    font-weight: 600;
    border: 2px solid currentColor;
}

.featured-article .category-tag.f1 {
    color: var(--racing-red);
}

.featured-article .category-tag.cricket {
    color: var(--cricket-green);
}

.featured-article h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 900;
    letter-spacing: -2px;
    text-transform: uppercase;
}

.featured-article .excerpt {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 18px;
    line-height: 1.7;
    border-left: 4px solid var(--ink-black);
    padding-left: 20px;
}

.article-meta {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

/* Regular Articles */
.articles-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.article-card {
    border-bottom: 2px solid var(--ink-black);
    padding-bottom: 30px;
    transition: all 0.4s ease;
}

.article-card:hover {
    border-bottom-color: var(--racing-red);
    transform: translateX(8px) translateY(-2px);
    padding-left: 12px;
}

.article-card .category-tag {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    margin-bottom: 15px;
    font-weight: 600;
}

.article-card .category-tag.f1 {
    background: var(--racing-red);
    color: white;
}

.article-card .category-tag.cricket {
    background: var(--cricket-green);
    color: white;
}

.article-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 12px;
    font-weight: 700;
}

.article-card .excerpt {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 12px;
    line-height: 1.6;
}

.article-card a {
    color: var(--ink-black);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card a:hover {
    color: var(--racing-red);
}

.article-card:hover a {
    color: var(--racing-red);
}

/* Footer */
footer {
    border-top: 4px double var(--ink-black);
    padding: 40px 0;
    text-align: center;
    margin-top: 60px;
}

footer p {
    font-size: 0.85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hidden class for filtering */
.hidden {
    display: none;
}

/* Responsive Design - Tablet (iPad) */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .articles-grid {
        border-right: none;
        padding-right: 0;
        border-bottom: 3px double var(--ink-black);
        padding-bottom: 40px;
    }

    .sidebar {
        position: static;
    }

    .masthead h1 {
        font-size: 3.5rem;
    }

    .featured-article h2 {
        font-size: 2.8rem;
    }

    .featured-article {
        padding: 30px;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .breaking-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .breaking-text {
        font-size: 0.85rem;
    }

    .trending-bar {
        padding: 8px 0;
    }

    .trending-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    header {
        padding: 30px 0 15px;
        margin-bottom: 20px;
    }

    .masthead h1 {
        font-size: 2.8rem;
        letter-spacing: -2px;
    }

    .tagline {
        font-size: 0.75rem;
        letter-spacing: 2px;
    }

    .dark-mode-toggle {
        position: static;
        margin: 15px auto 0;
        display: block;
        width: fit-content;
    }

    .meta-info {
        justify-content: center;
        text-align: center;
        font-size: 0.75rem;
    }

    .search-bar input {
        padding: 10px 40px 10px 15px;
        font-size: 0.9rem;
    }

    .search-bar button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .date-filters {
        gap: 8px;
        margin: 15px 0;
    }

    .date-btn {
        padding: 5px 12px;
        font-size: 0.75rem;
    }

    .category-filters {
        gap: 10px;
        margin: 20px 0;
        padding-bottom: 20px;
    }

    .category-btn {
        padding: 6px 15px;
        font-size: 0.8rem;
    }

    .newspaper-divider {
        margin: 30px 0;
    }

    .featured-article {
        padding: 25px;
        margin-bottom: 35px;
        border-width: 3px;
    }

    .featured-article h2 {
        font-size: 2rem;
    }

    .featured-article .excerpt {
        font-size: 1.05rem;
    }

    .article-card h3 {
        font-size: 1.5rem;
    }

    .article-card .excerpt {
        font-size: 0.95rem;
    }

    .article-tags {
        gap: 6px;
    }

    .tag {
        font-size: 0.65rem;
        padding: 2px 8px;
    }

    .sidebar-section {
        padding: 20px;
    }

    footer {
        margin-top: 40px;
        padding: 30px 0;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .masthead h1 {
        font-size: 2.2rem;
    }

    .featured-article h2 {
        font-size: 1.7rem;
    }

    .article-card h3 {
        font-size: 1.3rem;
    }

    .category-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .category-btn {
        width: 100%;
        text-align: center;
    }
}