/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #f8f9fa;
    --bg-alt: #eef0f2;
    --fg: #151a1e;
    --fg-muted: #5f6b7a;
    --accent: #e63946;
    --accent-dark: #c5303c;
    --accent-light: #ff6b6b;
    --blue: #2563eb;
    --border: #dfe3e8;
    --card-bg: #ffffff;
    --card-hover: #ffffff;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
    --shadow-hover: 0 8px 32px rgba(0,0,0,.1);
    --transition: 0.2s cubic-bezier(.4,0,.2,1);
    --hero-bg: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --nav-bg: rgba(255,255,255,.92);
    --footer-bg: #0f0c29;
}

[data-theme="dark"] {
    --bg: #0d1117;
    --bg-alt: #151b23;
    --fg: #e2e8f0;
    --fg-muted: #7c8a9a;
    --border: #2a3040;
    --card-bg: #151b23;
    --card-hover: #1a2130;
    --shadow: 0 1px 2px rgba(0,0,0,.2), 0 4px 16px rgba(0,0,0,.15);
    --shadow-hover: 0 8px 32px rgba(0,0,0,.3);
    --nav-bg: rgba(13,17,23,.92);
    --footer-bg: #010409;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 720px; }

/* === Breaking News Ticker === */
.ticker {
    background: linear-gradient(90deg, var(--accent) 0%, #d62839 100%);
    color: #fff;
    display: none;
    align-items: center;
    height: 34px;
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: 500;
}
.ticker.active { display: flex; }
.ticker-label {
    background: rgba(0,0,0,.25);
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    flex-shrink: 0;
}
.ticker-wrap { overflow: hidden; flex: 1; position: relative; }
.ticker-wrap::before, .ticker-wrap::after {
    content: '';
    position: absolute; top: 0; bottom: 0; width: 40px; z-index: 1;
    pointer-events: none;
}
.ticker-wrap::before { left: 0; background: linear-gradient(90deg, var(--accent), transparent); }
.ticker-wrap::after { right: 0; background: linear-gradient(-90deg, #d62839, transparent); }
.ticker-content {
    display: flex;
    animation: ticker 45s linear infinite;
    white-space: nowrap;
    gap: 2.5rem;
    padding: 0 1rem;
}
.ticker-content span { display: inline-block; line-height: 34px; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* === Navbar === */
.navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: 1rem;
}
.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 900;
    display: flex;
    gap: 1px;
    align-items: baseline;
    flex-shrink: 0;
    color: var(--fg);
}
.nav-logo:hover { color: var(--fg); }
.logo-the { color: var(--fg); }
.logo-last { color: var(--accent); }
.logo-web { color: var(--fg); }
.logo-news {
    font-family: 'Inter', sans-serif;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-left: 4px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.nav-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--fg-muted);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    transition: all var(--transition);
}
.nav-link:hover { color: var(--fg); background: var(--bg-alt); }
.nav-submit {
    background: var(--accent);
    color: #fff !important;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
}
.nav-submit:hover { background: var(--accent-dark); color: #fff !important; }
.nav-admin { color: var(--blue) !important; font-weight: 600; }
.nav-login, .nav-logout {
    background: var(--fg);
    color: var(--bg) !important;
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
}
.nav-login:hover, .nav-logout:hover { opacity: .85; color: var(--bg) !important; }
.nav-user {
    font-size: 0.72rem;
    color: var(--fg-muted);
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-search {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 9px;
    color: var(--fg-muted);
    pointer-events: none;
}
.search-input {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.32rem 0.6rem 0.32rem 28px;
    font-size: 0.78rem;
    width: 120px;
    outline: none;
    transition: all var(--transition);
    background: var(--bg);
    color: var(--fg);
    font-family: inherit;
}
.search-input:focus { border-color: var(--accent); width: 170px; box-shadow: 0 0 0 3px rgba(230,57,70,.08); }
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 34px; height: 34px;
    cursor: pointer;
    color: var(--fg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 6px 7px;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
}
.nav-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--fg);
    border-radius: 2px;
}
.nav-right-mobile { display: none; align-items: center; gap: 6px; }

@media (max-width: 860px) {
    .nav-right-mobile { display: flex; }
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0; right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border);
        gap: 0.5rem;
        box-shadow: 0 8px 24px rgba(0,0,0,.1);
        z-index: 100;
    }
    .nav-links.open { display: flex; }
    .nav-links .theme-toggle { display: none; }
    .nav-link { width: 100%; padding: 0.5rem; }
}

/* === Hero === */
.hero {
    background: var(--hero-bg);
    color: #fff;
    padding: 4.5rem 0 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -60%; left: -30%;
    width: 160%; height: 220%;
    background: radial-gradient(ellipse at 30% 40%, rgba(230,57,70,.12) 0%, transparent 55%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -60%; right: -30%;
    width: 160%; height: 220%;
    background: radial-gradient(ellipse at 70% 60%, rgba(99,102,241,.1) 0%, transparent 55%);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.12);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.2px;
}
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}
.hero-title span { color: var(--accent); }
.hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,.6);
    max-width: 480px;
    margin: 0 auto 2rem;
    line-height: 1.65;
}
.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}
.hero-stat { text-align: center; }
.hero-stat strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
}
.hero-stat span {
    font-size: 0.68rem;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}
@media (max-width: 600px) {
    .hero { padding: 3rem 0 2.5rem; }
    .hero-title { font-size: 2.2rem; }
    .hero-sub { font-size: 0.95rem; }
    .hero-stats { gap: 1.5rem; }
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.55rem 1.3rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    font-family: inherit;
    white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(230,57,70,.3); }
.btn-glass {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-color: rgba(255,255,255,.18);
    backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: #fff; }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-outline:hover { border-color: var(--fg-muted); transform: translateY(-1px); }
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.75rem; }
.btn-lg { padding: 0.7rem 1.8rem; font-size: 0.92rem; }
.btn-full { width: 100%; }
.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }

/* === Sections === */
.section { padding: 3rem 0; }
.section-alt { background: var(--bg-alt); }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
}
.section-header .section-title { margin-bottom: 0; }
.section-link {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.section-link:hover { color: var(--accent-dark); }
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 800;
}
.page-sub { color: var(--fg-muted); margin-bottom: 1.5rem; font-size: 0.95rem; }

/* === Cards === */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.featured-grid .card-hero {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    min-height: 340px;
}
.featured-grid .card-hero > img.card-img,
.featured-grid .card-hero > div.card-img {
    height: 100%;
    min-height: 340px;
    border-radius: var(--radius) 0 0 var(--radius);
}
.featured-grid .card-hero .card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.featured-grid .card-hero .card-title { font-size: 1.35rem; line-height: 1.3; }
.featured-grid .card-hero .card-summary { font-size: 0.9rem; }
@media (max-width: 700px) {
    .featured-grid .card-hero { grid-template-columns: 1fr; min-height: auto; }
    .featured-grid .card-hero > img.card-img,
    .featured-grid .card-hero > div.card-img { min-height: 200px; border-radius: var(--radius) var(--radius) 0 0; }
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
img.card-img {
    height: 190px;
    width: 100%;
    object-fit: cover;
    background: var(--bg-alt);
    flex-shrink: 0;
}
div.card-img {
    height: 190px;
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--border) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.card-body {
    padding: 1.1rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}
.badge {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    line-height: 1.4;
}
.badge-sm { font-size: 0.55rem; padding: 0.12rem 0.35rem; }
.badge-official { background: #dbeafe; color: #1e40af; }
.badge-people { background: #fce7f3; color: #9d174d; }
[data-theme="dark"] .badge-official { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .badge-people { background: #4a1942; color: #f9a8d4; }
.card-category {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--fg-muted);
    letter-spacing: 0.3px;
}
.card-time {
    font-size: 0.7rem;
    color: var(--fg-muted);
}
.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title a { color: var(--fg); }
.card-title a:hover { color: var(--accent); }
.card-summary {
    font-size: 0.82rem;
    color: var(--fg-muted);
    line-height: 1.5;
    margin-bottom: 0.4rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border);
}
.card-author {
    font-size: 0.75rem;
    color: var(--fg-muted);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}
.card-reading { font-size: 0.7rem; color: var(--fg-muted); flex-shrink: 0; }
.bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--fg-muted);
    padding: 4px;
    border-radius: 6px;
    transition: all var(--transition);
    display: flex;
    flex-shrink: 0;
}
.bookmark-btn:hover, .bookmark-btn.active { color: var(--accent); }
.bookmark-btn.active svg { fill: var(--accent); }

/* === Trending === */
.trending-list { display: flex; flex-direction: column; }
.trending-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0.5rem;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
    color: var(--fg);
    border-radius: var(--radius-sm);
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { background: var(--card-bg); }
.trending-num {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent);
    min-width: 36px;
    text-align: center;
    line-height: 1;
}
.trending-info { flex: 1; min-width: 0; }
.trending-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0.2rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.trending-img {
    width: 72px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* === Filter Bar === */
.filter-bar {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.filter-tag {
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--card-bg);
    color: var(--fg-muted);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.filter-tag:hover { border-color: var(--fg-muted); color: var(--fg); }
.filter-tag.active {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}
.page-num { font-size: 0.82rem; color: var(--fg-muted); font-weight: 500; }

/* === Article Detail === */
.reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    width: 0;
    z-index: 200;
    transition: width 0.1s;
}
.article-detail { padding: 2.5rem 0; }
.article-header { margin-bottom: 1.5rem; }
.article-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.3rem;
    font-weight: 900;
    line-height: 1.15;
    margin: 0.6rem 0 0.75rem;
    letter-spacing: -0.3px;
}
.article-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    color: var(--fg-muted);
    font-size: 0.85rem;
}
.article-author { font-weight: 600; color: var(--fg); }
.article-hero-img {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}
.article-hero-img img { width: 100%; max-height: 500px; object-fit: cover; }
.article-body { margin-bottom: 1.5rem; }
.article-summary {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--fg);
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.article-content {
    font-size: 1rem;
    line-height: 1.8;
    white-space: pre-wrap;
}
.article-link { margin-top: 1.5rem; }

/* Share & Actions */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}
.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.share-label { font-size: 0.82rem; font-weight: 600; color: var(--fg-muted); margin-right: 0.2rem; }
.share-btn {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--fg-muted);
    background: var(--card-bg);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.share-twitter:hover { color: #000; border-color: #000; background: #f7f7f7; }
.share-facebook:hover { color: #1877F2; border-color: #1877F2; background: #e7f3ff; }
.share-linkedin:hover { color: #0A66C2; border-color: #0A66C2; background: #e8f4fd; }
.share-copy:hover { color: var(--accent); border-color: var(--accent); }
[data-theme="dark"] .share-twitter:hover { background: #1a1a1a; color: #fff; }
[data-theme="dark"] .share-facebook:hover { background: #1a2a4a; }
[data-theme="dark"] .share-linkedin:hover { background: #0a2a4a; }
.bookmark-btn-lg {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--fg-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}
.bookmark-btn-lg:hover { border-color: var(--accent); color: var(--accent); }
.bookmark-btn-lg.active { color: var(--accent); border-color: var(--accent); }
.bookmark-btn-lg.active svg { fill: var(--accent); }

/* Related */
.related-section { margin-bottom: 2rem; }
.related-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}
.related-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-alt);
    transition: all var(--transition);
    align-items: center;
    border: 1px solid transparent;
}
.related-card:hover { border-color: var(--border); background: var(--card-bg); color: var(--fg); }
.related-img {
    width: 64px; height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.related-info { flex: 1; min-width: 0; }
.related-info h4 {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0.15rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
    .article-title { font-size: 1.65rem; }
    .article-hero-img img { max-height: 300px; }
}

/* === Submit Form === */
.form { margin-top: 1.5rem; }
.form-group { margin-bottom: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.form-input {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border var(--transition), box-shadow var(--transition);
    background: var(--card-bg);
    color: var(--fg);
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(230,57,70,.08); }
textarea.form-input { resize: vertical; }
.form-hint { font-size: 0.72rem; color: var(--fg-muted); margin-top: 0.25rem; }

.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
[data-theme="dark"] .alert-success { background: #052e16; color: #86efac; border-color: #166534; }
[data-theme="dark"] .alert-error { background: #450a0a; color: #fca5a5; border-color: #7f1d1d; }

.login-prompt {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.login-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.login-prompt h3 { margin-bottom: 0.4rem; }
.login-prompt p { margin-bottom: 1.25rem; color: var(--fg-muted); }

/* === Search === */
.search-form-lg {
    display: flex;
    gap: 0.6rem;
    margin: 1.25rem 0 1.5rem;
}
.search-input-lg { flex: 1; padding: 0.7rem 1rem; font-size: 1rem; }
.search-results-count { color: var(--fg-muted); margin-bottom: 1.25rem; font-size: 0.9rem; }

/* === Admin === */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
}
.stat-card-warn { border-color: var(--accent); }
.stat-num { font-size: 1.8rem; font-weight: 800; }
.stat-label { font-size: 0.75rem; color: var(--fg-muted); font-weight: 500; margin-top: 0.15rem; }
.admin-actions { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.admin-hint { font-size: 0.78rem; color: var(--fg-muted); }
.admin-table { display: flex; flex-direction: column; gap: 0.75rem; }
.admin-row {
    background: var(--card-bg);
    padding: 1.1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-row-info { flex: 1; min-width: 200px; }
.admin-row-info h3 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.admin-row-info p { font-size: 0.78rem; color: var(--fg-muted); }
.admin-row-actions { display: flex; gap: 0.4rem; flex-shrink: 0; flex-wrap: wrap; }

/* === CTA === */
.section-cta { padding: 3rem 0; }
.cta-box {
    background: var(--hero-bg);
    color: #fff;
    padding: 3rem 2rem;
    border-radius: var(--radius);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-box::before {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(ellipse at 70% 50%, rgba(230,57,70,.15) 0%, transparent 55%);
    pointer-events: none;
}
.cta-icon { font-size: 2.5rem; margin-bottom: 0.75rem; position: relative; z-index: 1; }
.cta-box h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
    position: relative; z-index: 1;
}
.cta-box p {
    color: rgba(255,255,255,.6);
    margin-bottom: 1.25rem;
    position: relative; z-index: 1;
    font-size: 0.92rem;
}
.cta-box .btn { position: relative; z-index: 1; }

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state h3 { margin-bottom: 0.3rem; font-size: 1.1rem; }
.empty-state p { color: var(--fg-muted); font-size: 0.9rem; }
.empty-state a { color: var(--accent); font-weight: 600; }

/* === Footer === */
.footer {
    background: var(--footer-bg);
    color: rgba(255,255,255,.75);
    margin-top: auto;
    padding: 3rem 0 1.25rem;
}
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.8fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p {
    color: rgba(255,255,255,.4);
    font-size: 0.8rem;
    margin-top: 0.6rem;
    line-height: 1.5;
}
.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 900;
}
.footer-logo .logo-the { color: #fff; }
.footer-logo .logo-last { color: var(--accent); }
.footer-logo .logo-web { color: #fff; }
.footer-logo .logo-news { color: rgba(255,255,255,.35); }
.footer-social { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.footer-social a {
    color: rgba(255,255,255,.4);
    width: 32px; height: 32px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.footer-social a:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.footer-links h4, .footer-newsletter h4 {
    color: #fff;
    font-size: 0.82rem;
    margin-bottom: 0.65rem;
    letter-spacing: 0.3px;
    font-weight: 700;
}
.footer-links a {
    display: block;
    color: rgba(255,255,255,.45);
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
    transition: color var(--transition);
}
.footer-links a:hover { color: rgba(255,255,255,.9); }
.footer-newsletter p {
    font-size: 0.8rem;
    color: rgba(255,255,255,.4);
    margin-bottom: 0.65rem;
}
.newsletter-form { display: flex; gap: 0.4rem; }
.newsletter-input {
    flex: 1;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 0.8rem;
    outline: none;
    font-family: inherit;
    transition: border var(--transition);
}
.newsletter-input::placeholder { color: rgba(255,255,255,.3); }
.newsletter-input:focus { border-color: var(--accent); }
.newsletter-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition);
    flex-shrink: 0;
}
.newsletter-btn:hover { background: var(--accent-dark); }
.newsletter-msg { font-size: 0.75rem; margin-top: 0.4rem; min-height: 1em; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.06);
    padding-top: 1.25rem;
    text-align: center;
}
.footer-bottom p { font-size: 0.75rem; color: rgba(255,255,255,.25); }

/* === Back to Top === */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--fg-muted);
    transition: all var(--transition);
    z-index: 50;
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { color: var(--fg); transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* === Toast === */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--fg);
    color: var(--bg);
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 200;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.main-content { flex: 1; }

/* === Card Animations === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.card { animation: fadeInUp 0.35s ease backwards; }
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.04s; }
.card:nth-child(3) { animation-delay: 0.08s; }
.card:nth-child(4) { animation-delay: 0.12s; }
.card:nth-child(5) { animation-delay: 0.16s; }
.card:nth-child(6) { animation-delay: 0.2s; }
.trending-item { animation: fadeInUp 0.35s ease backwards; }
.trending-item:nth-child(1) { animation-delay: 0s; }
.trending-item:nth-child(2) { animation-delay: 0.05s; }
.trending-item:nth-child(3) { animation-delay: 0.1s; }
.trending-item:nth-child(4) { animation-delay: 0.15s; }
.trending-item:nth-child(5) { animation-delay: 0.2s; }
