/* ----- 基础重置与变量 ----- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Alibaba PuHuiTi', '阿里巴巴普惠体', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden; scroll-behavior: smooth;
    background-color: #f0f4fa; color: #071a2b;
    transition: background-color 0.3s ease, color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; }
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
:focus-visible { outline: 3px solid var(--accent-blue); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #ffffff; }
::-webkit-scrollbar-thumb { background: #1e6df2; border-radius: 10px; }

/* 主题变量 */
:root {
    --bg-body: #f0f4fa;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --bg-card: rgba(255,255,255,0.75);
    --text-primary: #071a2b;
    --text-secondary: #1f3a4b;
    --text-muted: #4a6f8c;
    --border-light: rgba(0, 35, 70, 0.08);
    --accent-blue: #1e6df2;
    --accent-glow: #3b82f6;
    --shadow-sm: 0 8px 20px rgba(0, 20, 50, 0.06);
    --shadow-md: 0 20px 35px -12px rgba(0, 32, 64, 0.12);
    --shadow-xl: 0 25px 40px -12px rgba(0, 0, 0, 0.15);
    --overlay-dark: rgba(0, 0, 0, 0.4);
    --section-bg: rgba(255, 255, 255, 0.5);
    --footer-bg: #1a2a3a;
    --footer-text: #cbd5e1;
    --underline-color: #d1d5db;
    --btn-bg: rgba(0,0,0,0.05);
    --btn-hover: rgba(0,0,0,0.1);
    --hot-number-bg: rgba(30,109,242,0.12);
    --rank-gold: #ffc107;
    --rank-silver: #c0c0c0;
    --rank-bronze: #cd7f32;
    --modal-overlay: rgba(0,0,0,0.5);
    --float-bg: rgba(255,255,255,0.85);
    --page-bg: transparent;
    --page-hover-bg: var(--accent-blue);
}
[data-theme="dark"] {
    --bg-body: #050a12;
    --bg-surface: #0f1724;
    --bg-elevated: #1a2335;
    --bg-card: rgba(18, 26, 40, 0.85);
    --text-primary: #f0f6ff;
    --text-secondary: #c9ddf5;
    --text-muted: #b0d0f0;
    --border-light: rgba(72, 120, 184, 0.2);
    --accent-blue: #3b82f6;
    --accent-glow: #60a5fa;
    --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 20px 35px -12px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 25px 40px -12px rgba(0, 0, 0, 0.7);
    --section-bg: rgba(18, 26, 40, 0.7);
    --footer-bg: #0a0f17;
    --footer-text: #9ca3af;
    --underline-color: #374151;
    --btn-bg: rgba(255,255,255,0.1);
    --btn-hover: rgba(255,255,255,0.2);
    --hot-number-bg: rgba(59,130,246,0.2);
    --modal-overlay: rgba(0,0,0,0.7);
    --float-bg: #1a2335cc;
}
body { background-color: var(--bg-body); color: var(--text-primary); }
.noise-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1;
    opacity: 0.4; background: repeating-radial-gradient(circle at 20% 30%, rgba(59,130,246,0.02) 0px, rgba(0,0,0,0) 2px);
}
.skip-link {
    position: absolute; top: -40px; left: 0;
    background: var(--accent-blue); color: white;
    padding: 8px 12px; text-decoration: none; z-index: 10000;
    font-weight: bold; border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; outline: 2px solid white; }

/* 导航栏 */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    transition: background 0.3s, backdrop-filter 0.3s; padding: 0.8rem 2rem;
    background: transparent; backdrop-filter: none; border-bottom: 1px solid transparent;
}
.navbar.scrolled { background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.nav-container {
    max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px;
    flex-wrap: wrap;
}
.logo-area { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.logo-link { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-img { height: 32px; width: auto; display: block; }
.logo-link h1 {
    font-size: 1.8rem; font-weight: 700; margin: 0; line-height: 1;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(144,224,255,0.9));
    background-clip: text; -webkit-background-clip: text; color: transparent;
}
.navbar.scrolled .logo-link h1 { background: linear-gradient(135deg, #ffffff, #90e0ff); background-clip: text; -webkit-background-clip: text; color: transparent; }
.logo-tagline {
    font-size: 0.7rem; font-weight: 400; color: rgba(255, 255, 255, 0.7);
    white-space: nowrap; letter-spacing: 0.5px; margin-bottom: 0.15rem;
}
.navbar.scrolled .logo-tagline { color: rgba(255, 255, 255, 0.8); }
.menu-toggle {
    display: none; background: rgba(0,0,0,0.3); border: none; font-size: 1.8rem; cursor: pointer;
    color: white; border-radius: 8px; width: 42px; height: 42px; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.nav-links {
    display: flex; gap: 1.8rem; align-items: center; transition: all 0.3s ease;
}
.nav-links a {
    text-decoration: none; font-weight: 700; font-size: 1rem; transition: 0.2s;
    cursor: pointer; color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.navbar.scrolled .nav-links a { color: white; text-shadow: none; }
.nav-links a:hover { color: #90e0ff !important; }
.close-menu-btn { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: white; padding: 0.5rem; line-height: 1; position: absolute; top: 0.5rem; right: 1rem; z-index: 1001; }
@media (max-width: 768px) {
    .navbar { padding: 0.8rem 1rem; }
    .menu-toggle { display: flex; }
    .nav-links {
        position: absolute; top: 70px; left: 0; right: 0; background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(20px); flex-direction: column; padding: 1rem; gap: 1rem;
        border-radius: 0 0 1rem 1rem; transform: translateY(-120%); opacity: 0;
        pointer-events: none; transition: transform 0.3s ease, opacity 0.3s ease; z-index: 999;
    }
    .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .nav-links a { font-size: 1.1rem; padding: 0.5rem; width: 100%; text-align: center; color: white !important; }
    .close-menu-btn { display: block; }
    .logo-link h1 { font-size: 1.2rem; }
    .logo-tagline { font-size: 0.55rem; white-space: normal; max-width: 110px; margin-bottom: 0; }
    .logo-img { height: 24px; }
    .logo-area { align-items: center; }
}

/* 无轮播图时的导航栏样式 */
body.no-carousel .navbar { background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
body.no-carousel .logo-link h1 { background: linear-gradient(135deg, #ffffff, #90e0ff); background-clip: text; -webkit-background-clip: text; color: transparent; }
body.no-carousel .logo-tagline { color: rgba(255, 255, 255, 0.8); }
body.no-carousel .nav-links a { color: white; text-shadow: none; }
body.no-carousel .navbar + * { margin-top: calc(70px + 10px); }
@media (max-width: 768px) { body.no-carousel .navbar + * { margin-top: calc(60px + 10px); } }
body.no-carousel #main-content { padding-top: 0; }

/* 轮播图 */
.hero-carousel { width: 100%; position: relative; overflow: hidden; box-shadow: var(--shadow-xl); margin-bottom: 20px; }
.carousel-container { position: relative; width: 100%; }
.carousel-slides { display: flex; transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.4, 1.1); will-change: transform; }
.slide { flex: 0 0 100%; min-height: 520px; display: flex; align-items: flex-end; position: relative; background-size: cover; background-position: center 30%; }
.slide::before { content: ""; position: absolute; inset: 0; background: var(--overlay-dark); z-index: 1; }
.slide-content { margin-left: 2rem; margin-bottom: 3rem; position: relative; z-index: 5; animation: fadeSlideUp 0.7s ease; color: white; max-width: 700px; }
.slide-title-link { font-size: 3rem; font-weight: 700; background: linear-gradient(to right, #ffffff, #90e0ff); background-clip: text; -webkit-background-clip: text; color: transparent; text-decoration: none; display: inline-block; margin-bottom: 0.8rem; }
.slide-content p { font-size: 1.2rem; }
.carousel-controls { position: absolute; bottom: 20px; right: 20px; display: flex; gap: 12px; z-index: 20; }
.carousel-controls button { background: rgba(0,0,0,0.5); border: none; color: white; font-size: 1.2rem; cursor: pointer; opacity: 0.8; transition: 0.2s; border-radius: 32px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.carousel-controls button:hover { opacity: 1; background: rgba(0,0,0,0.8); color: #90e0ff; }
.carousel-pause-btn.playing .fa-pause { display: inline; }
.carousel-pause-btn.playing .fa-play { display: none; }
.carousel-pause-btn:not(.playing) .fa-pause { display: none; }
.carousel-pause-btn:not(.playing) .fa-play { display: inline; }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 700px) {
    .slide { min-height: 380px; }
    .slide-title-link { font-size: 1.8rem; }
    .slide-content p { font-size: 0.9rem; }
    .slide-content { margin-left: 1rem; margin-bottom: 1.5rem; }
    .carousel-controls button { width: 36px; height: 36px; font-size: 1rem; }
}

/* 镇街网格 */
.towns-grid-container { max-width: 1400px; margin: 0 auto 20px; padding: 0 2rem; }
.towns-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 12px; counter-reset: town-counter; }
.town-card {
    background: var(--bg-card); backdrop-filter: blur(4px); border-radius: 1rem; padding: 0.7rem 0.3rem;
    text-align: center; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
    border: 2px solid transparent; cursor: pointer; display: inline-flex; align-items: center;
    justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap;
}
.town-card::before {
    counter-increment: town-counter; content: counter(town-counter); font-weight: 700;
    color: var(--accent-blue); background: var(--hot-number-bg); width: 22px; height: 22px;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.7rem; margin-right: 2px; flex-shrink: 0;
}
.town-card:hover { border-color: var(--accent-blue); transform: translateY(-3px); box-shadow: var(--shadow-sm); color: var(--accent-blue); }
@media (max-width:1200px){.towns-grid{grid-template-columns:repeat(8,1fr);}}
@media (max-width:1000px){.towns-grid{grid-template-columns:repeat(6,1fr);}}
@media (max-width:700px){.towns-grid{grid-template-columns:repeat(4,1fr);}}
@media (max-width:640px){.towns-grid{grid-template-columns:repeat(2,1fr); gap:10px;}.town-card{font-size:0.7rem;padding:0.4rem 0.2rem;white-space:normal;}.town-card::before{width:20px;height:20px;font-size:0.65rem;}}

/* 顶部广告条 */
.ldl-container { max-width: 1400px; margin: 0 auto 20px; padding: 0 2rem; }
.ldl-item { position: relative; width: 100%; background: var(--bg-card); border-radius: 1rem; overflow: hidden; border: 1px solid var(--border-light); cursor: pointer; height: 150px; }
.ldl-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.ldl-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ldl-badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.6); color: white; font-size: 0.7rem; padding: 2px 8px; border-radius: 20px; backdrop-filter: blur(4px); font-weight: 500; }

.ldl-card { position: relative; overflow: hidden; }
.ldl-link { position: relative; display: block; }
.ldl-card .ldl-img { width: 100%; height: auto; display: block; }
.ldl-card .ldl-badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.6); color: white; font-size: 0.7rem; padding: 2px 8px; border-radius: 20px; backdrop-filter: blur(4px); font-weight: 500; z-index: 2; pointer-events: none; }

/* 主网格 */
.main-grid { max-width: 1400px; margin: 0 auto 20px; padding: 0 2rem; display: grid; grid-template-columns: 2.2fr 1.2fr; gap: 20px; }
.left-col { display: flex; flex-direction: column; gap: 20px; }
.sidebar { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 1000px) { .main-grid { grid-template-columns: 1fr; padding: 0 1.5rem; } }
@media (max-width: 640px) { .main-grid { padding: 0 1rem; } }

/* 慈溪市介绍卡片 */
.cixi-text p { margin-bottom: 0.8rem; line-height: 1.6; text-indent: 2em; }
.highlight-number { font-weight: 700; color: var(--accent-blue); background: rgba(30,109,242,0.12); padding: 0 2px; border-radius: 4px; }

.info-card, .featured-headline, .widget, .ldl-card { background: var(--bg-card); backdrop-filter: blur(6px); border-radius: 1.5rem; border: 1px solid var(--border-light); }
.info-card, .featured-headline, .widget, .ldl-card { padding: 1.5rem; }

/* 精选推荐网格 */
.headline-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.headline-item { position: relative; border-radius: 0.8rem; overflow: hidden; cursor: pointer; transition: 0.2s; border: 1px solid var(--border-light); aspect-ratio: 2/1; display: block; text-decoration: none; }
.headline-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.headline-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); color: white; text-align: center; padding: 0.5rem; font-size: 0.75rem; font-weight: 600; transition: 0.3s; }
.headline-item:hover .headline-caption { transform: translateY(-50%); top: 50%; bottom: auto; background: rgba(0,0,0,0.6); font-size: 0.8rem; }
@media (max-width: 700px) { .headline-grid { grid-template-columns: 1fr; } }

.headline-header, .cixi-header, .section-header, .widget-header {
    display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
    gap: 1rem; padding-bottom: 10px; border-bottom: 2px solid var(--underline-color);
}
.widget-header { margin-bottom: 1rem; }
.headline-header, .cixi-header { margin-bottom: 1rem; }
.headline-title, .cixi-title, .section-title, .widget-header h3 {
    font-size: 1.8rem; font-weight: 700; color: var(--text-primary);
    display: inline-flex; align-items: center; gap: 0.5rem; margin: 0;
}
.headline-title i, .cixi-title i, .section-title i, .widget-header h3 i { color: var(--accent-blue); }

/* 筛选按钮 */
.filter-buttons, .rank-tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.filter-btn, .rank-tab { background: var(--btn-bg); border: 1px solid var(--border-light); padding: 0.3rem 0.9rem; border-radius: 40px; font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all 0.2s; color: var(--text-secondary); }
.filter-btn.active, .rank-tab.active, .filter-btn:hover, .rank-tab:hover { background: var(--accent-blue); color: white; border-color: var(--accent-blue); }
.category-group { display: none; animation: fadeIn 0.25s ease; }
.category-group.active-group { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ========================================
   最新文章模块 - 图片右置样式（核心修改）
   ======================================== */
.featured-recommend {
    background: var(--bg-card);
    backdrop-filter: blur(6px);
    border-radius: 1.5rem;
    border: 1px solid var(--border-light);
    padding: 0 0 1.5rem 0;
    overflow: hidden;
}
.featured-recommend .section-header {
    padding: 0.75rem 1.5rem;
    margin-bottom: 0;
    border-bottom: 2px solid var(--underline-color);
}
.featured-recommend .card-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}
/* 卡片容器：使用 flex 水平布局，图片在右侧 */
.featured-recommend .tech-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    padding: 0.75rem 1.5rem;
    margin: 0;
    box-shadow: none;
}
.featured-recommend .tech-card:first-child { border-top: none; }
.featured-recommend .tech-card:last-child { border-bottom: none; }
.featured-recommend .tech-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 2;
    background: var(--bg-card);
}
/* 内容区域：放在左侧 */
.featured-recommend .tech-card .card-content {
    flex: 1;
    padding: 0.25rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}
/* 图片容器：通过 order: 2 强制显示在右侧 */
.featured-recommend .tech-card .card-img {
    order: 2;
    width: 180px;
    min-width: 180px;
    flex-shrink: 0;
    align-self: center;
    aspect-ratio: 2/1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0.75rem;
}
/* 卡片内文字样式 */
.featured-recommend .card-title { font-size: 1.1rem; font-weight: 700; line-height: 1.45; margin-bottom: 0.1rem; }
.featured-recommend .card-title a { color: var(--text-primary); text-decoration: none; transition: color 0.2s; }
.featured-recommend .card-title a:hover { color: var(--accent-blue); text-decoration: underline; }
.featured-recommend .card-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.featured-recommend .card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.3rem; flex-wrap: wrap; gap: 0.5rem; }
.featured-recommend .card-category-link { background: rgba(30,109,242,0.12); padding: 0.3rem 0.8rem; border-radius: 40px; font-size: 0.7rem; font-weight: 600; color: var(--text-primary); text-decoration: none; transition: background 0.2s, color 0.2s; }
.featured-recommend .card-category-link:hover { background: var(--accent-blue); color: white; }
.featured-recommend .card-date { font-size: 0.7rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.3rem; }

/* 移动端响应式：恢复图片在上方 */
@media (max-width: 640px) {
    .featured-recommend .section-header { padding-left: 0.75rem; padding-right: 0.75rem; }
    .featured-recommend .card-grid { gap: 0.9rem; }
    .featured-recommend .tech-card {
        flex-direction: column;
        border-radius: 1.2rem;
        border: 1px solid var(--border-light);
        margin: 0 0.5rem;
        padding: 0.75rem;
        box-shadow: var(--shadow-sm);
    }
    .featured-recommend .tech-card:first-child, 
    .featured-recommend .tech-card:last-child { border: 1px solid var(--border-light); }
    .featured-recommend .tech-card .card-img {
        order: 0;
        width: 100%;
        min-width: unset;
        margin-bottom: 0.75rem;
    }
    .featured-recommend .tech-card .card-content {
        order: 1;
        padding: 0;
    }
    .featured-recommend .card-title { font-size: 1rem; }
    .featured-recommend .card-desc { font-size: 0.8rem; }
}
/* 平板设备图片宽度微调 */
@media (min-width: 641px) and (max-width: 900px) {
    .featured-recommend .tech-card .card-img {
        width: 150px;
        min-width: 150px;
    }
}

/* 分页样式 */
.epages { text-align: center; color: var(--text-muted); width: 100%; clear: both; padding-top: 20px; margin-top: 10px; }
.epages a, .epages > b {
    display: inline-block; margin: 0 4px; padding: 4px 10px; background: var(--page-bg);
    color: var(--text-secondary); border-radius: 4px; transition: all 0.2s;
    text-decoration: none; font-size: 0.85rem; border: 1px solid var(--border-light);
}
.epages a:hover, .epages > b { background: var(--page-hover-bg); color: white; border-color: var(--page-hover-bg); }
.epages > b { background: var(--page-hover-bg); color: white; border-color: var(--page-hover-bg); font-weight: 500; }
.epages a:first-child {
    background: transparent; border: none; margin: 0; padding: 0 50px 0 0;
    position: relative; color: var(--text-muted);
}
.epages a:first-child:after { position: absolute; content: "篇文章"; right: 0; bottom: 0; font-size: 0.85rem; }
.epages a:first-child:hover { background: transparent; color: var(--text-muted); }

/* 热点排行 */
.hot-list-ul { list-style: none; margin-top: 12px; }
.hot-list-item { border-bottom: 1px solid var(--border-light); position: relative; }
.hot-item-content { padding: 0.7rem 0.5rem 0.7rem 2.2rem; display: block; position: relative; }
.hot-list-item .hot-index {
    position: absolute; left: 0.5rem; top: 0.7rem; width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.75rem;
    background: var(--hot-number-bg); color: var(--accent-blue);
}
.hot-list-ul .hot-list-item:nth-child(1) .hot-index { background: var(--rank-gold); color: #333; }
.hot-list-ul .hot-list-item:nth-child(2) .hot-index { background: var(--rank-silver); color: #333; }
.hot-list-ul .hot-list-item:nth-child(3) .hot-index { background: var(--rank-bronze); color: white; }
.hot-item-main { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.hot-title { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); text-decoration: none; flex: 1 1 auto; min-width: 0; word-break: break-word; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hot-title:hover { color: var(--accent-blue); text-decoration: underline; }
.hot-meta { display: flex; flex-shrink: 0; gap: 0.6rem; font-size: 0.65rem; color: var(--text-muted); white-space: nowrap; align-items: baseline; }

/* 热点精选网格 */
.hot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 0.8rem; }
.hot-card-link { text-decoration: none; display: block; transition: transform 0.2s ease; color: inherit; background: transparent; border-radius: 0.8rem; overflow: hidden; }
.hot-card-link:hover { transform: translateY(-3px); background: transparent; }
.hot-img { width: 100%; aspect-ratio: 2/1; object-fit: cover; border-radius: 0.8rem; border: 1px solid var(--border-light); background-color: transparent; }
.hot-card-caption { margin-top: 0.4rem; font-size: 0.75rem; font-weight: 600; color: var(--text-primary); }

/* 城市服务 */
.service-grid { display: flex; flex-direction: column; gap: 1.2rem; }
.service-category h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.6rem; border-left: 4px solid var(--accent-blue); padding-left: 0.8rem; }
.service-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.service-card-link { background: var(--bg-surface); border-radius: 0.8rem; padding: 0.5rem 0.2rem; text-align: center; font-size: 0.7rem; font-weight: 500; border: 1px solid var(--border-light); cursor: pointer; transition: 0.2s; text-decoration: none; color: var(--text-secondary); display: block; }
.service-card-link:hover { background: var(--accent-blue); color: white; border-color: var(--accent-blue); transform: translateY(-2px); }
@media (max-width: 550px) { .service-items { grid-template-columns: repeat(2, 1fr); } }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; }
.tag-link { background: var(--bg-surface); border-radius: 0.8rem; padding: 0.5rem 0.8rem; font-size: 0.7rem; font-weight: 500; border: 1px solid var(--border-light); cursor: pointer; transition: 0.2s; text-decoration: none; color: var(--text-secondary); display: inline-block; white-space: nowrap; flex: 0 0 auto; min-width: 70px; text-align: center; }
.tag-link:hover { background: var(--accent-blue); color: white; transform: translateY(-2px); }

/* 合作机构 */
.coop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.coop-img { width: 100%; height: 70px; object-fit: cover; border: 1px solid var(--border-light); background: var(--bg-surface); border-radius: 0; }

/* 页脚 */
.footer { background: var(--footer-bg); color: var(--footer-text); margin-top: 20px; padding: 2rem 2rem 1rem; border-top: 1px solid var(--border-light); }
.footer-container { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, auto)); gap: 60px; justify-content: space-between; }
.footer-section h3 { font-size: 1rem; margin-bottom: 0.8rem; color: white; position: relative; display: inline-block; font-weight: 600; }
.footer-section h3:after { content: ''; position: absolute; bottom: -4px; left: 0; width: 25px; height: 2px; background: var(--accent-blue); }
.footer-desc { margin: 0.5rem 0 1rem; line-height: 1.5; }
.footer-logo img { width: 48px; height: 48px; border-radius: 12px; margin-top: 0.5rem; background: rgba(255,255,255,0.1); padding: 4px; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.4rem; }
.footer-section ul li a { color: var(--footer-text); text-decoration: none; transition: color 0.2s; }
.footer-section ul li a:hover, .footer-extra a:hover { color: var(--accent-blue); text-decoration: underline; }
.partner-grid { display: grid; grid-template-columns: repeat(6, 70px); gap: 16px; margin-top: 0.5rem; }
.partner-img-link { display: block; width: 70px; height: 20px; border-radius: 4px; overflow: hidden; transition: transform 0.2s; }
.partner-img-link:hover { transform: scale(1.05); }
.partner-img { width: 100%; height: 100%; object-fit: cover; }
.footer-extra { text-align: center; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.7rem; display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.footer-extra a { color: var(--footer-text); text-decoration: underline; text-underline-offset: 2px; transition: color 0.2s; }
.footer-extra a:hover { color: var(--accent-blue); }
@media (max-width:1000px) { .footer-container { grid-template-columns: repeat(2,1fr); gap: 40px; } .partner-grid { grid-template-columns: repeat(4,70px); } }
@media (max-width:650px) { .footer-container { grid-template-columns: 1fr; text-align: center; } .partner-grid { justify-content: center; } .headline-title, .cixi-title, .section-title, .widget-header h3 { font-size: 1.5rem; } .footer-section h3:after { left: 50%; transform: translateX(-50%); width: 40px; } .footer-logo img { margin: 0 auto; } }

/* 模态框 */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--modal-overlay); backdrop-filter: blur(4px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    visibility: hidden; opacity: 0; transition: visibility 0.2s, opacity 0.2s;
}
.modal-overlay.active { visibility: visible; opacity: 1; }
.modal-container {
    background: var(--bg-elevated); border-radius: 2rem; width: 90%; max-width: 500px;
    padding: 1.8rem; border: 1px solid var(--border-light); box-shadow: var(--shadow-xl);
    position: relative; transform: scale(0.95); transition: transform 0.2s ease;
}
.modal-overlay.active .modal-container { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; }
.modal-header h3 { font-size: 1.4rem; font-weight: 600; color: var(--text-primary); }
.modal-close { background: transparent; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); transition: color 0.2s; }
.modal-close:hover { color: var(--accent-blue); }
.modal-search-form {
    display: flex; gap: 8px; align-items: center; background: var(--bg-surface);
    border-radius: 3rem; border: 1px solid var(--border-light); overflow: hidden; padding: 4px;
}
.modal-search-form input[type="text"] {
    flex: 1; background: transparent; border: none; padding: 0.8rem 1rem;
    font-size: 1rem; color: var(--text-primary); outline: none;
}
.modal-search-form button {
    background: var(--accent-blue); border: none; width: 48px; height: 48px;
    border-radius: 48px; cursor: pointer; display: flex; align-items: center;
    justify-content: center; color: white; font-size: 1.2rem; flex-shrink: 0;
    transition: transform 0.2s, background-color 0.2s;
}
.modal-search-form button:hover { transform: scale(0.96); background-color: var(--accent-glow); }
.hot-tags-inline {
    margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center;
    gap: 8px; font-size: 0.7rem; color: var(--text-muted);
}
.hot-tags-inline .hot-keyword {
    background: var(--bg-surface); border: 1px solid var(--border-light);
    padding: 4px 12px; border-radius: 40px; font-size: 0.7rem; font-weight: 500;
    color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.hot-tags-inline .hot-keyword:hover {
    background: var(--accent-blue); color: white; border-color: var(--accent-blue);
    transform: translateY(-2px);
}

/* 悬浮按钮 */
.float-control-card {
    position: fixed; bottom: 24px; right: 24px; z-index: 1001;
    background: var(--float-bg); backdrop-filter: blur(20px);
    width: 70px; border-radius: 20px; padding: 8px 6px;
    border: 1px solid rgba(255,255,255,0.3); box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transition: opacity 0.25s, visibility 0.25s, transform 0.2s;
    text-align: center; opacity: 0; visibility: hidden; transform: translateY(10px) scale(0.96);
    display: flex; flex-direction: column; gap: 6px;
}
.float-control-card.visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.float-top, .float-user, .float-search-btn, .theme-toggle-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    cursor: pointer; padding: 6px; border-radius: 12px; transition: all 0.2s;
    color: var(--text-secondary); font-weight: 500; font-size: 10px;
    background: transparent; border: none; width: 100%;
    text-decoration: none;
}
.float-top i, .float-user i, .float-search-btn i, .theme-toggle-btn i { font-size: 14px; color: var(--accent-blue); }
.float-top:hover, .float-user:hover, .float-search-btn:hover, .theme-toggle-btn:hover { background: var(--btn-hover); transform: translateY(-1px); }
@media (max-width: 550px) {
    .float-control-card { bottom: 16px; right: 16px; width: 64px; padding: 6px 4px; border-radius: 16px; }
    .float-top i, .float-user i, .float-search-btn i, .theme-toggle-btn i { font-size: 12px; }
}

/* 图片预览模态框 */
.image-preview-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9); z-index: 3000; display: none;
    align-items: center; justify-content: center; backdrop-filter: blur(8px);
}
.image-preview-modal.active { display: flex; }
.preview-container { width: 90%; height: 85%; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.preview-image { max-width: 90vw; max-height: 85vh; object-fit: contain; cursor: grab; transition: transform 0.1s ease; }
.preview-image:active { cursor: grabbing; }
.preview-controls {
    position: absolute; bottom: 20px; right: 20px; background: rgba(0, 0, 0, 0.6);
    border-radius: 40px; display: flex; gap: 12px; padding: 8px 16px; z-index: 3010; backdrop-filter: blur(8px);
}
.preview-controls button { background: transparent; border: none; color: white; font-size: 1.2rem; cursor: pointer; padding: 6px; transition: 0.2s; border-radius: 50%; width: 36px; height: 36px; }
.preview-controls button:hover { background: rgba(255, 255, 255, 0.2); }
.preview-close { position: absolute; top: 20px; right: 30px; color: white; font-size: 2rem; cursor: pointer; background: none; border: none; z-index: 3010; }
@media (max-width: 640px) { .preview-controls button { width: 30px; height: 30px; font-size: 1rem; } }

/* 文章详情页样式 */
.article-detail-card {
    background: var(--bg-card); backdrop-filter: blur(6px);
    border-radius: 1.5rem; border: 1px solid var(--border-light);
    padding: 2rem; width: 100%;
}
.article-header { border-bottom: 1px solid var(--border-light); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.article-title { font-size: 1.8rem; font-weight: 800; line-height: 1.25; margin-bottom: 0.75rem; color: var(--text-primary); }
.article-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--text-muted); }
.article-meta i { margin-right: 4px; color: var(--accent-blue); }
.article-body { font-size: 1rem; line-height: 1.75; color: var(--text-secondary); }
.article-body p { margin-bottom: 1.25rem; text-indent: 2em; }
.article-body h2 { font-size: 1.5rem; margin: 1.5rem 0 0.75rem; padding-left: 0.5rem; border-left: 4px solid var(--accent-blue); color: var(--text-primary); }
.article-body img { border-radius: 1rem; margin: 1rem 0; width: 100%; cursor: pointer; border: 1px solid var(--border-light); transition: 0.2s; }
.article-body img:hover { opacity: 0.95; transform: scale(1.01); }

/* 引用块样式 */
.article-body blockquote { margin: 1rem 0; padding: 0.8rem 1.2rem; border-radius: 0.8rem; font-style: italic; transition: all 0.2s; }
.blockquote-blue { border-left: 4px solid #1e6df2; background: rgba(30,109,242,0.08); }
.blockquote-green { border-left: 4px solid #10b981; background: rgba(16,185,129,0.08); }
.blockquote-orange { border-left: 4px solid #f59e0b; background: rgba(245,158,11,0.08); }
.blockquote-purple { border-left: 4px solid #8b5cf6; background: rgba(139,92,246,0.08); }
.blockquote-red { border-left: 4px solid #ef4444; background: rgba(239,68,68,0.08); }
.blockquote-elegant { position: relative; background: var(--bg-surface); border: none; padding: 1.2rem 1.8rem; text-align: center; box-shadow: var(--shadow-sm); }
.blockquote-elegant::before { content: "“"; font-size: 3rem; position: absolute; left: 10px; top: -10px; color: var(--accent-blue); opacity: 0.5; }
.blockquote-elegant::after { content: "”"; font-size: 3rem; position: absolute; right: 10px; bottom: -20px; color: var(--accent-blue); opacity: 0.5; }
.blockquote-company {
    display: block; width: 100%; border: 1px solid var(--border-light); background: var(--bg-surface);
    padding: 1.2rem 1.5rem; border-radius: 1rem; font-style: normal; box-shadow: var(--shadow-sm); line-height: 1.6;
}
.blockquote-company p { margin: 0 0 0.3rem 0; text-indent: 0; }
.blockquote-company i { width: 1.4rem; margin-right: 0.3rem; color: var(--accent-blue); }

/* 分享与版权 */
.share-copyright-section {
    margin-top: 1rem; padding: 0.5rem 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.share-text { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; flex: 1 1 auto; }
.share-text .link { color: var(--accent-blue); text-decoration: none; }
.share-icons { display: flex; gap: 1.2rem; align-items: center; flex-shrink: 0; position: relative; }
.share-icon { background: transparent !important; border: none !important; border-radius: 0 !important; width: auto; height: auto; padding: 0; font-size: 1.2rem; cursor: pointer; transition: color 0.2s; color: var(--text-secondary); position: relative; }
.share-icon:hover { background: transparent !important; transform: none; color: var(--accent-blue); }
.share-icon[data-tooltip]::before {
    content: attr(data-tooltip); position: absolute; bottom: 150%; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8); color: #fff; font-size: 0.7rem; padding: 4px 8px; border-radius: 6px;
    white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.2s; z-index: 20;
}
.share-icon[data-tooltip]:hover::before { opacity: 1; }
.wechat-qrcode-popup {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); padding: 12px; border-radius: 16px;
    box-shadow: var(--shadow-md); display: none; text-align: center; width: 140px; z-index: 20;
    border: 1px solid rgba(255,255,255,0.2);
}
[data-theme="light"] .wechat-qrcode-popup { background: rgba(255, 255, 255, 0.95); border-color: var(--border-light); }
.wechat-qrcode-popup img { width: 100px; height: 100px; margin: 0 auto; border-radius: 8px; }
.wechat-qrcode-popup p { font-size: 0.7rem; margin-top: 8px; color: white; font-weight: 500; }
[data-theme="light"] .wechat-qrcode-popup p { color: #1a2a3a; }
.wechat-icon:hover .wechat-qrcode-popup { display: block; }
.copy-feedback {
    position: absolute; background: rgba(0, 0, 0, 0.75); color: white; font-size: 0.7rem;
    padding: 4px 8px; border-radius: 20px; white-space: nowrap; top: -28px; left: 50%;
    transform: translateX(-50%); pointer-events: none; z-index: 30; backdrop-filter: blur(4px);
    display: none;
}
@media (max-width: 640px) { .share-copyright-section { flex-direction: column; align-items: flex-start; } .share-icons { align-self: flex-start; } }

/* 相关文章卡片 */
.related-posts-card {
    background: var(--bg-card); backdrop-filter: blur(6px);
    border-radius: 1.5rem; border: 1px solid var(--border-light);
    padding: 1.5rem; width: 100%;
}
.related-title-wrapper { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--underline-color); padding-bottom: 8px; margin-bottom: 1rem; }
.related-title { font-size: 1.3rem; font-weight: 700; display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-primary); }
.related-title i { color: var(--accent-blue); }
.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.article-tag { background: var(--bg-surface); border: 1px solid var(--border-light); padding: 0.2rem 0.8rem; border-radius: 30px; font-size: 0.7rem; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: all 0.2s; }
.article-tag:hover { background: var(--accent-blue); color: white; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.related-item { background: var(--bg-surface); border-radius: 1rem; overflow: hidden; border: 1px solid var(--border-light); text-decoration: none; color: inherit; transition: 0.2s; }
.related-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.related-img { width: 100%; aspect-ratio: 2/1; object-fit: cover; }
.related-info { padding: 0.5rem; }
.related-info h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.2rem; }
.related-info p { font-size: 0.7rem; color: var(--text-muted); }
@media (max-width: 700px) { .related-grid { grid-template-columns: 1fr; } }

/* 暗色模式引用块适配 */
[data-theme="dark"] .blockquote-blue { background: rgba(59, 130, 246, 0.25); border-left-color: #3b82f6; }
[data-theme="dark"] .blockquote-green { background: rgba(16, 185, 129, 0.25); border-left-color: #10b981; }
[data-theme="dark"] .blockquote-orange { background: rgba(245, 158, 11, 0.25); border-left-color: #f59e0b; }
[data-theme="dark"] .blockquote-purple { background: rgba(139, 92, 246, 0.25); border-left-color: #8b5cf6; }
[data-theme="dark"] .blockquote-red { background: rgba(239, 68, 68, 0.25); border-left-color: #ef4444; }
[data-theme="dark"] .blockquote-elegant { background: var(--bg-surface); box-shadow: var(--shadow-md); }
[data-theme="dark"] .blockquote-company { background: var(--bg-surface); border-color: var(--border-light); }

img { max-width: 100%; height: auto; display: block; }
@font-face { font-family: 'Alibaba PuHuiTi'; font-display: swap; }