/* ============================================================
   style.css - 全国天气预报平台 Main Stylesheet
   Blue Weather Theme
   ============================================================ */

/* ---------------------------------------------------------------
   1. CSS VARIABLES
   --------------------------------------------------------------- */
:root {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --primary-darker: #1d4ed8;
    --primary-bg: rgba(59, 130, 246, 0.08);
    --primary-bg-hover: rgba(59, 130, 246, 0.12);

    --bg-body: #f0f5ff;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --bg-footer: #1e293b;

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --text-white: #ffffff;

    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --transition: all 0.3s ease;
    --container-width: 1200px;
}

/* ---------------------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica,
        Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--primary);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    outline: none;
    border: none;
    background: none;
}

button {
    cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.8;
}

::selection {
    background-color: var(--primary);
    color: var(--text-white);
}

/* ---------------------------------------------------------------
   3. CONTAINER
   --------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* ---------------------------------------------------------------
   4. HEADER / NAVBAR
   --------------------------------------------------------------- */
.navbar {
    background: var(--bg-header);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary);
}

.navbar .container {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 15px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar-logo .logo-icon {
    font-size: 24px;
    color: var(--primary);
}

.navbar-logo .logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
}

.navbar-nav a {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: var(--transition);
}

.navbar-nav a:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

.navbar-nav a.active {
    color: var(--primary);
    background: var(--primary-bg);
    font-weight: 600;
}

.navbar-search {
    flex-shrink: 0;
}

.navbar-search form {
    display: flex;
    align-items: center;
    background: var(--bg-body);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar-search form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.navbar-search input {
    width: 180px;
    padding: 7px 14px;
    font-size: 13px;
    background: transparent;
    color: var(--text-primary);
}

.navbar-search input::placeholder {
    color: var(--text-muted);
}

.navbar-search .search-btn {
    padding: 7px 12px;
    color: var(--primary);
    background: transparent;
    transition: var(--transition);
}

.navbar-search .search-btn:hover {
    color: var(--primary-dark);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.user-greeting {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

.user-greeting:hover {
    color: var(--primary);
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-white);
    background: var(--primary);
    border-radius: 20px;
    transition: var(--transition);
    text-decoration: none;
}

.btn-login:hover {
    background: var(--primary-dark);
    color: var(--text-white);
}

/* Hamburger menu */
.navbar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: transparent;
    cursor: pointer;
}

.navbar-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.navbar-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.navbar-mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--bg-header);
    border-top: 1px solid var(--border-color);
    padding: 10px 15px;
    box-shadow: var(--shadow-md);
}

.navbar-mobile-menu.active {
    display: flex;
}

.navbar-mobile-menu a {
    padding: 10px 15px;
    font-size: 15px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}

.navbar-mobile-menu a:hover,
.navbar-mobile-menu a.active {
    color: var(--primary);
    background: var(--primary-bg);
}

.mobile-search {
    padding: 10px 0;
}

.mobile-search form {
    display: flex;
    background: var(--bg-body);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.mobile-search input {
    flex: 1;
    padding: 10px 14px;
    background: transparent;
}

.mobile-search button {
    padding: 10px 15px;
    color: var(--primary);
    background: transparent;
}

.mobile-login-link {
    padding: 10px 15px;
    font-size: 15px;
    color: var(--primary) !important;
    font-weight: 500;
    border-top: 1px solid var(--border-color);
    margin-top: 5px;
}

/* ---------------------------------------------------------------
   5. MAIN CONTENT AREA
   --------------------------------------------------------------- */
.site-main {
    min-height: calc(100vh - 60px - 200px);
    padding-bottom: 40px;
}

/* ---------------------------------------------------------------
   6. HERO SECTION (Carousel + Hot Articles)
   --------------------------------------------------------------- */
.hero-section {
    padding: 20px 0 0;
}

.hero-layout {
    display: flex;
    gap: 20px;
    min-height: 380px;
}

.hero-carousel {
    flex: 0 0 60%;
    max-width: 60%;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}

.hero-hot-list {
    flex: 0 0 calc(40% - 20px);
    max-width: calc(40% - 20px);
}

/* Banner slides */
.banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 380px;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.banner-slide.active {
    opacity: 1;
    z-index: 1;
}

.banner-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-placeholder {
    width: 100%;
    height: 100%;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--text-white);
    font-size: 80px;
    opacity: 0.6;
}

.banner-placeholder-full {
    width: 100%;
    height: 100%;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--text-white);
    gap: 15px;
}

.banner-placeholder-full i {
    font-size: 60px;
    opacity: 0.7;
}

.banner-placeholder-full p {
    color: var(--text-white);
    opacity: 0.8;
    font-size: 16px;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 25px 25px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: var(--text-white);
}

.banner-overlay h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
    line-height: 1.4;
}

.banner-overlay p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
    line-height: 1.6;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.banner-arrow:hover {
    background: var(--text-white);
    box-shadow: var(--shadow-md);
}

.banner-arrow.prev {
    left: 12px;
}

.banner-arrow.next {
    right: 12px;
}

.banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 8px;
}

.banner-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.banner-dots .dot.active {
    background: var(--text-white);
    width: 24px;
    border-radius: 4px;
}

/* ---------------------------------------------------------------
   7. CATEGORY BADGE
   --------------------------------------------------------------- */
.category-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-white);
    background: var(--primary);
    border-radius: 3px;
    text-decoration: none;
    transition: var(--transition);
}

.category-badge:hover {
    background: var(--primary-dark);
    color: var(--text-white);
}

/* ---------------------------------------------------------------
   8. SECTION HEADERS
   --------------------------------------------------------------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.section-header h2,
.section-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h2 i,
.section-header h3 i {
    color: var(--primary);
}

.section-header.center {
    flex-direction: column;
    text-align: center;
    border-bottom: none;
}

.section-header.center h2 {
    font-size: 26px;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 0;
}

.view-all {
    font-size: 13px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.view-all:hover {
    color: var(--primary-dark);
}

/* ---------------------------------------------------------------
   9. CATEGORY SHOWCASE (5 columns)
   --------------------------------------------------------------- */
.category-showcase {
    padding: 40px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.category-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    margin-bottom: 15px;
    font-size: 24px;
    color: var(--text-white);
    transition: var(--transition);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.category-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.category-card p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.5;
}

/* ---------------------------------------------------------------
   10. LAYOUT (content + sidebar)
   --------------------------------------------------------------- */
.layout-with-sidebar {
    display: flex;
    gap: 24px;
    margin-top: 20px;
}

.layout-with-sidebar .content-area {
    flex: 1;
    min-width: 0;
}

.layout-with-sidebar .sidebar-right {
    flex: 0 0 300px;
    max-width: 300px;
}

/* ---------------------------------------------------------------
   11. ARTICLE CARD GRID
   --------------------------------------------------------------- */
.article-grid {
    display: grid;
    gap: 20px;
}

.article-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-image-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .card-image {
    transform: scale(1.05);
}

.card-image-placeholder {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0ecff 0%, #c7d9f7 100%);
    color: var(--primary-light);
    font-size: 40px;
}

.card-image-link .category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.card-body {
    padding: 15px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.45;
}

.card-title a {
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a:hover {
    color: var(--primary);
}

.card-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-meta i {
    font-size: 12px;
}

/* ---------------------------------------------------------------
   12. SIDEBAR
   --------------------------------------------------------------- */
.sidebar .sidebar-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.sidebar .section-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.sidebar .section-header h3 {
    font-size: 16px;
}

/* Hot list */
.hot-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.hot-list li:last-child {
    border-bottom: none;
}

.hot-list li.empty-item {
    color: var(--text-muted);
    font-size: 13px;
    justify-content: center;
    padding: 15px 0;
}

.rank-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--border-light);
    border-radius: 4px;
}

.rank-num.top {
    color: var(--text-white);
    background: var(--primary);
}

.hot-item-info {
    flex: 1;
    min-width: 0;
}

.hot-item-title {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.hot-item-title:hover {
    color: var(--primary);
}

.hot-list.compact li {
    padding: 6px 0;
}

.hot-list.compact .hot-item-title {
    -webkit-line-clamp: 1;
}

/* Tag cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-bg);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: var(--transition);
    text-decoration: none;
}

.tag-item:hover {
    color: var(--text-white);
    background: var(--primary);
    border-color: var(--primary);
}

.empty-text {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

/* ---------------------------------------------------------------
   13. HERO HOT LIST (right side of carousel on homepage)
   --------------------------------------------------------------- */
.hero-hot-list .sidebar-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    height: 100%;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.hero-hot-list .section-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.hero-hot-list .hot-list {
    flex: 1;
    overflow-y: auto;
}

/* ---------------------------------------------------------------
   14. LATEST SECTION
   --------------------------------------------------------------- */
.latest-section {
    padding: 30px 0;
}

/* ---------------------------------------------------------------
   15. BREADCRUMB
   --------------------------------------------------------------- */
.breadcrumb-section {
    padding: 15px 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    color: var(--text-muted);
    font-size: 10px;
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ---------------------------------------------------------------
   16. LISTING SECTION (category, tag, search, articles)
   --------------------------------------------------------------- */
.listing-section {
    padding: 25px 0;
}

.page-header {
    margin-bottom: 25px;
    display: flex;
    align-items: baseline;
    gap: 15px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    color: var(--primary);
}

.page-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 0;
    flex-basis: 100%;
}

.result-count {
    font-size: 13px;
    color: var(--text-muted);
    padding: 3px 10px;
    background: var(--primary-bg);
    border-radius: 20px;
}

/* ---------------------------------------------------------------
   17. ARTICLE DETAIL
   --------------------------------------------------------------- */
.article-section {
    padding: 25px 0;
}

.article-detail {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.article-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.article-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.article-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-muted);
}

.article-meta .meta-item i {
    font-size: 13px;
}

/* Article content */
.article-content {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-secondary);
}

.article-content h2 {
    margin: 25px 0 15px;
    font-size: 22px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

.article-content h3 {
    margin: 20px 0 12px;
    font-size: 18px;
}

.article-content h4 {
    margin: 18px 0 10px;
    font-size: 16px;
}

.article-content p {
    margin-bottom: 15px;
    color: var(--text-secondary);
    line-height: 1.9;
}

.article-content img {
    border-radius: var(--radius);
    margin: 15px 0;
    max-width: 100%;
}

.article-content blockquote {
    margin: 15px 0;
    padding: 15px 20px;
    background: var(--primary-bg);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article-content pre {
    margin: 15px 0;
    padding: 15px;
    background: #1e293b;
    border-radius: var(--radius);
    overflow-x: auto;
    color: #e2e8f0;
    font-size: 13px;
    line-height: 1.6;
}

.article-content code {
    padding: 2px 6px;
    background: var(--primary-bg);
    border-radius: 3px;
    font-size: 13px;
    color: var(--primary-dark);
}

.article-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.article-content ul,
.article-content ol {
    margin: 10px 0;
    padding-left: 25px;
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: 6px;
    line-height: 1.8;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.article-content table th,
.article-content table td {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.article-content table th {
    background: var(--primary-bg);
    font-weight: 600;
}

/* Article tags */
.article-tags {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-label {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Article actions */
.article-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-body);
    border-radius: 25px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-bg);
}

.action-btn.active {
    color: var(--text-white);
    background: var(--primary);
    border-color: var(--primary);
}

.action-btn i {
    font-size: 16px;
}

/* Article navigation */
.article-nav {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
}

.article-nav .nav-item {
    flex: 1;
    min-width: 0;
}

.article-nav .nav-item.next {
    text-align: right;
}

.article-nav .nav-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.article-nav .nav-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-nav .nav-title:hover {
    color: var(--primary);
}

.article-nav .nav-none {
    font-size: 13px;
    color: var(--text-muted);
}

/* Related articles */
.related-articles {
    margin-top: 30px;
}

/* ---------------------------------------------------------------
   18. PAGINATION
   --------------------------------------------------------------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    padding-top: 20px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
}

.page-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-bg);
}

.page-link.active {
    color: var(--text-white);
    background: var(--primary);
    border-color: var(--primary);
}

.page-link.prev,
.page-link.next {
    gap: 5px;
}

.pagination .dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ---------------------------------------------------------------
   19. SEARCH HERO
   --------------------------------------------------------------- */
.search-hero {
    padding: 40px 0 20px;
    text-align: center;
}

.search-hero-title {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.search-hero-title i {
    color: var(--primary);
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.search-box input {
    flex: 1;
    padding: 14px 24px;
    font-size: 15px;
    background: transparent;
    color: var(--text-primary);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-white);
    background: var(--primary);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* ---------------------------------------------------------------
   20. EMPTY STATE
   --------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--text-light);
    display: block;
}

.empty-state p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.empty-hint {
    font-size: 13px;
    color: var(--text-light);
}

/* ---------------------------------------------------------------
   21. AUTH PAGES (Login / Register)
   --------------------------------------------------------------- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 15px;
    min-height: 60vh;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px 35px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    font-size: 28px;
    color: var(--text-white);
}

.auth-header h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

.auth-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-wrapper i {
    padding: 0 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.input-wrapper input {
    flex: 1;
    padding: 10px 12px 10px 0;
    font-size: 14px;
    background: transparent;
    color: var(--text-primary);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: none;
}

.btn-primary {
    color: var(--text-white);
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-white);
}

.btn-outline {
    color: var(--primary);
    background: transparent;
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    color: var(--text-white);
    background: var(--primary);
}

.btn-block {
    display: flex;
    width: 100%;
    padding: 12px;
    font-size: 15px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alert messages */
.alert {
    padding: 12px 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-success a {
    color: var(--primary);
    font-weight: 500;
    margin-left: 5px;
}

/* ---------------------------------------------------------------
   22. ERROR / 404 PAGE
   --------------------------------------------------------------- */
.error-section {
    padding: 60px 0;
}

.error-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.error-icon {
    font-size: 80px;
    color: var(--primary-light);
    margin-bottom: 10px;
}

.error-code {
    font-size: 100px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 10px;
}

.error-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.error-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.error-search {
    margin-top: 20px;
}

.error-search p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.error-search-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 25px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.error-search-form input {
    flex: 1;
    padding: 10px 18px;
    font-size: 14px;
    background: transparent;
}

.error-search-form button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 18px;
    color: var(--text-white);
    background: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.error-search-form button:hover {
    background: var(--primary-dark);
}

/* ---------------------------------------------------------------
   23. FOOTER
   --------------------------------------------------------------- */
.footer {
    background: var(--bg-footer);
    color: #94a3b8;
    padding-top: 40px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-logo .logo-icon {
    font-size: 22px;
    color: var(--primary-light);
}

.footer-logo .logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
}

.footer-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 0;
}

.footer-links h4 {
    color: var(--text-white);
    font-size: 15px;
    margin-bottom: 15px;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    font-size: 13px;
    color: #94a3b8;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary-light);
    padding-left: 3px;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding: 18px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 0;
}

/* ---------------------------------------------------------------
   24. BACK TO TOP
   --------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--text-white);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 999;
    font-size: 18px;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ---------------------------------------------------------------
   25. ANIMATION: SHAKE (for empty search)
   --------------------------------------------------------------- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

.shake {
    animation: shake 0.4s ease;
}

/* ---------------------------------------------------------------
   26. RESPONSIVE: TABLET (max-width: 992px)
   --------------------------------------------------------------- */
@media (max-width: 992px) {
    .hero-layout {
        flex-direction: column;
    }

    .hero-carousel {
        flex: none;
        max-width: 100%;
    }

    .hero-hot-list {
        flex: none;
        max-width: 100%;
    }

    .banner-slides {
        min-height: 300px;
    }

    .banner-placeholder {
        min-height: 300px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .article-grid.grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .layout-with-sidebar {
        flex-direction: column;
    }

    .layout-with-sidebar .sidebar-right {
        flex: none;
        max-width: 100%;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------------------------------------------------------------
   27. RESPONSIVE: MOBILE (max-width: 768px)
   --------------------------------------------------------------- */
@media (max-width: 768px) {
    .navbar-nav {
        display: none;
    }

    .navbar-search {
        display: none;
    }

    .navbar-actions {
        display: none;
    }

    .navbar-hamburger {
        display: flex;
    }

    .navbar .container {
        justify-content: space-between;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        padding: 20px 15px;
    }

    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .article-grid.grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card-image,
    .card-image-placeholder {
        height: 140px;
    }

    .article-detail {
        padding: 20px 15px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-meta {
        gap: 10px;
    }

    .article-nav {
        flex-direction: column;
        gap: 12px;
    }

    .article-nav .nav-item.next {
        text-align: left;
    }

    .article-actions {
        gap: 10px;
    }

    .action-btn {
        padding: 8px 18px;
        font-size: 13px;
    }

    .section-header.center h2 {
        font-size: 22px;
    }

    .page-title {
        font-size: 20px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .error-code {
        font-size: 70px;
    }

    .banner-slides {
        min-height: 250px;
    }

    .banner-placeholder {
        min-height: 250px;
    }

    .banner-overlay h2 {
        font-size: 18px;
    }

    .search-box {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }

    .search-box input {
        padding: 12px 20px;
    }

    .search-box button {
        justify-content: center;
        padding: 12px;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
}

/* ---------------------------------------------------------------
   28. RESPONSIVE: SMALL MOBILE (max-width: 480px)
   --------------------------------------------------------------- */
@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 15px 10px;
    }

    .category-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
        margin-bottom: 10px;
    }

    .category-card h3 {
        font-size: 14px;
    }

    .category-card p {
        display: none;
    }

    .article-grid.grid-3 {
        grid-template-columns: 1fr;
    }

    .card-image,
    .card-image-placeholder {
        height: 180px;
    }

    .article-title {
        font-size: 20px;
    }

    .article-content {
        font-size: 14px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .error-code {
        font-size: 50px;
    }

    .error-actions {
        flex-direction: column;
    }

    .banner-slides {
        min-height: 200px;
    }

    .banner-placeholder {
        min-height: 200px;
    }

    .banner-overlay {
        padding: 20px 15px 15px;
    }

    .banner-overlay h2 {
        font-size: 16px;
    }

    .banner-overlay p {
        display: none;
    }
}
