/* ========================================
   AI News Site - Dark Theme CSS
   Colors: #0f172a (bg), #1e293b (card), #3b82f6 (accent)
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --border-color: #334155;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--accent-hover); }

::selection {
    background: var(--accent);
    color: #fff;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- Navbar (Glassmorphism) ---------- */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.6rem 0;
    transition: var(--transition);
    z-index: 1050;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.navbar-brand:hover {
    -webkit-text-fill-color: transparent;
    filter: brightness(1.2);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(59, 130, 246, 0.1);
}

.navbar-toggler {
    border: 1px solid var(--glass-border);
    padding: 0.4rem 0.8rem;
}

.search-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    min-width: 180px;
}
.search-input:focus {
    background: var(--bg-secondary);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    color: var(--text-primary);
    outline: none;
}
.search-input::placeholder { color: var(--text-muted); }

.btn-search {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 0.4rem 0.8rem;
}
.btn-search:hover { background: var(--accent-hover); color: #fff; }

/* ---------- Main Content ---------- */
.main-content {
    min-height: 100vh;
}

/* ---------- Hero Banner ---------- */
.hero-banner {
    position: relative;
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content { position: relative; z-index: 2; }

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}
.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2rem;
}
.stat-item {
    text-align: center;
}
.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-actions .btn {
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-md);
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border: none;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
    color: #fff;
}
.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    background: transparent;
}
.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.hero-visual {
    animation: float 6s ease-in-out infinite;
}
.hero-icon {
    font-size: 12rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(167, 139, 250, 0.2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ---------- Sections ---------- */
.section {
    padding: 60px 0;
}
.categories-section {
    background: var(--bg-secondary);
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.section-link {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.95rem;
}
.section-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.section-desc {
    color: var(--text-muted);
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
}

/* ---------- Category Quick Cards ---------- */
.category-quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}
.category-quick-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--cat-color, var(--accent));
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-primary);
}
.category-quick-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--cat-color, var(--accent)), rgba(99, 102, 241, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 0.8rem;
}
.category-quick-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}
.category-quick-count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---------- News Cards ---------- */
.news-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(59, 130, 246, 0.3);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 180px;
}
.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.news-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}
.card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-tertiary), #1e1b4b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.4;
}
.card-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 1rem 1.2rem;
    flex: 1;
}
.card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title a {
    color: var(--text-primary);
    text-decoration: none;
}
.card-title a:hover { color: var(--accent); }

.card-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.card-footer {
    background: rgba(0, 0, 0, 0.15);
    padding: 0.7rem 1.2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-muted);
}
.card-source, .card-date, .card-views {
    color: var(--text-muted);
}
.featured-badge {
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.78rem;
}

/* ---------- Popular Cards (Home) ---------- */
.popular-card {
    display: flex;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    align-items: flex-start;
}
.popular-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
    background: rgba(59, 130, 246, 0.05);
}
.popular-rank {
    flex-shrink: 0;
}
.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
}
.popular-content { flex: 1; min-width: 0; }
.popular-category {
    font-size: 0.78rem;
    font-weight: 600;
}
.popular-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.3rem 0;
    line-height: 1.4;
}
.popular-title a {
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.popular-title a:hover { color: var(--accent); }
.popular-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.popular-meta span { margin-right: 1rem; }

/* ---------- Sidebar ---------- */
.sidebar-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.sidebar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Category List in Sidebar */
.category-list { display: flex; flex-direction: column; gap: 0.5rem; }
.category-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}
.category-item:hover,
.category-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
}
.category-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #fff;
    flex-shrink: 0;
}
.category-item-name { flex: 1; font-weight: 500; font-size: 0.9rem; }
.category-item-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Popular List in Sidebar */
.popular-list { display: flex; flex-direction: column; gap: 0.6rem; }
.popular-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
    align-items: flex-start;
}
.popular-item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-primary);
}
.popular-item-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.popular-item:nth-child(1) .popular-item-rank { background: #f59e0b; color: #fff; }
.popular-item:nth-child(2) .popular-item-rank { background: #94a3b8; color: #fff; }
.popular-item:nth-child(3) .popular-item-rank { background: #b45309; color: #fff; }
.popular-item-content { flex: 1; min-width: 0; }
.popular-item-title {
    font-size: 0.88rem;
    font-weight: 500;
    margin: 0 0 0.2rem;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.popular-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------- List Header ---------- */
.list-header { }
.list-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}
.list-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}
.empty-state h4 { color: var(--text-secondary); }

/* ---------- Category Grid ---------- */
.category-grid-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}
.category-grid-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}
.category-grid-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    flex-shrink: 0;
}
.category-grid-content { flex: 1; }
.category-grid-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.category-grid-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}
.category-grid-arrow {
    color: var(--text-muted);
    transition: var(--transition);
}
.category-grid-card:hover .category-grid-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* ---------- Category Header ---------- */
.category-header {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}
.category-header-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}
.category-header-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}
.category-header-count {
    color: var(--text-muted);
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
}

/* ---------- Article Detail ---------- */
.article-detail {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--accent); }
.breadcrumb-item.active { color: var(--text-secondary); }

.article-category-badge {
    display: inline-block;
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.article-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
}
.article-content p { margin-bottom: 1.2rem; }
.article-content h2, .article-content h3 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.article-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}
.article-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
}
.article-content code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent);
}
.article-content pre {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    overflow-x: auto;
}

.article-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.share-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}
.share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    margin: 0 0.3rem;
    transition: var(--transition);
}
.share-link:hover {
    background: var(--accent);
    color: #fff;
}
.article-source-link {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.article-source-link a { color: var(--accent); }

/* ---------- Related Section ---------- */
.related-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* ---------- Quick Nav ---------- */
.quick-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.quick-nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}
.quick-nav-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
}
.quick-nav-item i {
    width: 20px;
    text-align: center;
    color: var(--accent);
}

/* ---------- Pagination ---------- */
.custom-pagination {
    gap: 0.4rem;
}
.custom-pagination .page-link {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm) !important;
    padding: 0.5rem 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}
.custom-pagination .page-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.custom-pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-glow);
}
.custom-pagination .page-item.disabled .page-link {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-muted);
    opacity: 0.5;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}
.footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}
.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}
.footer-subtitle {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--accent); padding-left: 4px; }

.social-links {
    display: flex;
    gap: 0.8rem;
}
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}
.social-link:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

.footer-divider {
    border-color: var(--border-color);
    opacity: 0.5;
}
.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: 0.5rem;
}

/* ---------- Error Page ---------- */
.error-page { padding: 3rem 0; }
.error-code {
    font-size: 5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}
.error-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.error-text {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ---------- Buttons ---------- */
.btn-primary {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    border: none;
    font-weight: 600;
    transition: var(--transition);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-outline-primary {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}
.btn-outline-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ---------- Breadcrumb overrides ---------- */
.breadcrumb-item a {
    color: var(--text-muted);
}
.breadcrumb-item a:hover {
    color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .hero-title { font-size: 2.5rem; }
    .hero-stats { gap: 1.5rem; }
    .stat-number { font-size: 1.5rem; }
    .article-title { font-size: 1.6rem; }
    .article-detail { padding: 1.5rem; }
}

@media (max-width: 767.98px) {
    .hero-banner { padding: 120px 0 60px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { gap: 1rem; }
    .stat-number { font-size: 1.3rem; }
    .hero-actions .btn { display: block; width: 100%; margin-bottom: 0.8rem; }
    .hero-actions .btn.me-3 { margin-right: 0 !important; }
    .section-title { font-size: 1.3rem; }
    .card-img-wrapper { height: 150px; }
    .article-title { font-size: 1.4rem; }
    .article-meta { gap: 0.8rem; font-size: 0.8rem; }
    .article-detail { padding: 1.2rem; }
    .category-grid-card { padding: 1.2rem; gap: 1rem; }
    .category-grid-icon { width: 48px; height: 48px; font-size: 1.2rem; }
    .popular-card { padding: 1rem; }
    .sidebar-card { padding: 1.2rem; }
    .list-title { font-size: 1.4rem; }
    .footer { padding: 2rem 0 1rem; }
}

@media (max-width: 575.98px) {
    .hero-banner { padding: 100px 0 50px; }
    .hero-title { font-size: 1.7rem; }
    .search-input { min-width: 120px; }
    .category-quick-card { padding: 1rem 0.5rem; }
    .category-quick-icon { width: 44px; height: 44px; font-size: 1.1rem; }
    .card-img-wrapper { height: 130px; }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.news-card,
.category-quick-card,
.popular-card,
.category-grid-card {
    animation: fadeInUp 0.5s ease-out;
}

/* ---------- Print ---------- */
@media print {
    .navbar, .footer, .sidebar-card, .hero-banner { display: none !important; }
    body { background: #fff; color: #000; }
    .main-content { padding-top: 0 !important; }
}
