/* 一起学习网 · 科技风模板 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background: #f2f5f8; color: #222; font-size: 15px; line-height: 1.7; }
a { color: #0b5cab; text-decoration: none; }
a:hover { color: #00a0e9; }
img { max-width: 100%; }
ul { list-style: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.empty-tip { color: #999; padding: 20px 0; }

/* 页头 */
.site-header { background: linear-gradient(90deg, #081426, #0d2b4d 60%, #0e3a5c); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.header-inner { display: flex; align-items: center; height: 64px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 22px; font-weight: bold; letter-spacing: 2px; white-space: nowrap; }
.logo img { width: 40px; height: 40px; border-radius: 8px; }
.logo:hover { color: #7dd3fc; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid #3b82f6; color: #fff; font-size: 20px; width: 40px; height: 40px; border-radius: 6px; cursor: pointer; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a { display: block; padding: 8px 14px; color: #dbeafe; font-size: 15px; border-radius: 6px; white-space: nowrap; }
.main-nav a:hover { color: #fff; background: rgba(0, 180, 255, .25); }

/* 首页 Banner */
.hero { position: relative; height: 380px; overflow: hidden; background: #081426; }
.hero-slider, .hero-slide { position: absolute; inset: 0; }
.hero-slide { opacity: 0; transition: opacity .8s ease; }
.hero-slide:first-child { opacity: 1; }
.hero-slider.js .hero-slide:first-child { opacity: 0; }
.hero-slider.js .hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption { position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%); width: 100%; max-width: 1200px; padding: 0 16px; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.hero-caption h1 { font-size: 38px; letter-spacing: 4px; }
.hero-caption p { font-size: 16px; color: #bae6fd; margin-top: 8px; }

/* 快捷栏目 */
.quick-nav { margin: 20px 0 0; }
.quick-nav ul { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-nav a { display: block; padding: 10px 22px; background: #fff; border: 1px solid #dbe4ee; border-radius: 20px; font-size: 15px; color: #0d2b4d; }
.quick-nav a:hover { border-color: #00b4ff; color: #0284c7; }

/* 区块标题 */
.section-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #0d2b4d; padding-bottom: 8px; margin: 28px 0 12px; }
.section-head h2 { font-size: 20px; color: #0d2b4d; border-left: 4px solid #00b4ff; padding-left: 10px; }
.section-head h2 a { color: #0d2b4d; }
.section-head .more { font-size: 13px; color: #64748b; }

/* 最新文章 */
.latest-list { background: #fff; border-radius: 8px; padding: 6px 20px; box-shadow: 0 1px 4px rgba(15, 40, 70, .06); }
.latest-list li { display: flex; align-items: baseline; gap: 10px; padding: 11px 0; border-bottom: 1px dashed #e2e8f0; }
.latest-list li:last-child { border-bottom: 0; }
.item-sort { flex: none; font-size: 12px; color: #0284c7; background: #e0f2fe; border-radius: 4px; padding: 1px 7px; }
.latest-list li a { flex: 1; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest-list li a:hover { color: #0284c7; }
.item-date { flex: none; font-size: 13px; color: #94a3b8; }

/* 栏目分区 */
.col-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.col-section { background: #fff; border-radius: 8px; padding: 4px 20px 14px; box-shadow: 0 1px 4px rgba(15, 40, 70, .06); }
.col-section .section-head { margin-top: 14px; }
.col-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #e2e8f0; }
.col-list li:last-child { border-bottom: 0; }
.col-list li a { color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-list li a:hover { color: #0284c7; }
.col-list li span { flex: none; font-size: 13px; color: #94a3b8; }

/* 列表页 */
.page-head { padding: 28px 0 8px; }
.page-head h1 { font-size: 26px; color: #0d2b4d; }
.page-head p { color: #64748b; margin-top: 6px; }
.breadcrumb { font-size: 13px; color: #94a3b8; margin-bottom: 8px; }
.breadcrumb a { color: #64748b; }
.news-list { background: #fff; border-radius: 8px; padding: 8px 20px; box-shadow: 0 1px 4px rgba(15, 40, 70, .06); }
.news-item { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid #eef2f7; }
.news-item:last-child { border-bottom: 0; }
.news-thumb { flex: none; width: 180px; height: 120px; border-radius: 6px; background: linear-gradient(135deg, #0d2b4d, #0369a1 70%, #00b4ff); background-size: cover; background-position: center; }
.news-body { flex: 1; min-width: 0; }
.news-body h2 { font-size: 18px; line-height: 1.5; }
.news-body h2 a { color: #1e293b; }
.news-body h2 a:hover { color: #0284c7; }
.news-body p { color: #64748b; font-size: 14px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-date { font-size: 13px; color: #94a3b8; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 24px 0 32px; color: #64748b; }
.pagination a { padding: 6px 16px; background: #fff; border: 1px solid #dbe4ee; border-radius: 6px; color: #0d2b4d; }
.pagination a:hover { border-color: #00b4ff; color: #0284c7; }

/* 详情页 */
.article-detail { background: #fff; border-radius: 8px; padding: 28px 32px; margin: 24px 0; box-shadow: 0 1px 4px rgba(15, 40, 70, .06); }
.article-detail h1 { font-size: 26px; line-height: 1.4; color: #0f172a; }
.article-meta { color: #94a3b8; font-size: 13px; margin: 12px 0 4px; display: flex; gap: 16px; flex-wrap: wrap; }
.article-meta a { color: #0284c7; }
.article-cover { margin: 16px 0; }
.article-cover img { border-radius: 6px; }
.article-content { font-size: 16px; color: #334155; margin-top: 12px; }
.article-content h2, .article-content h3 { color: #0f172a; margin: 22px 0 10px; }
.article-content p { margin: 12px 0; }
.article-content pre { background: #0d1117; color: #c9d1d9; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 14px 0; }
.article-content code { font-family: Consolas, "Courier New", monospace; }
.article-content p code { background: #f1f5f9; color: #be123c; padding: 1px 6px; border-radius: 4px; font-size: 14px; }
.article-content pre code { background: none; color: inherit; padding: 0; }
.article-content img { border-radius: 6px; margin: 10px 0; }
.article-content table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.article-content th, .article-content td { border: 1px solid #e2e8f0; padding: 8px 12px; text-align: left; }
.article-content ul, .article-content ol { margin: 12px 0 12px 22px; }
.tags { color: #64748b; font-size: 14px; margin-top: 18px; }
.prev-next { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #e2e8f0; margin-top: 24px; padding-top: 16px; font-size: 14px; color: #64748b; }
.prev-next span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related { background: #fff; border-radius: 8px; padding: 20px 28px; margin-bottom: 30px; box-shadow: 0 1px 4px rgba(15, 40, 70, .06); }
.related h2 { font-size: 18px; color: #0d2b4d; border-left: 4px solid #00b4ff; padding-left: 10px; margin-bottom: 10px; }
.related-list li { padding: 8px 0; border-bottom: 1px dashed #e2e8f0; }
.related-list li:last-child { border-bottom: 0; }
.related-list a { color: #1e293b; }
.related-list a:hover { color: #0284c7; }

/* 广告位 */
.ad-slot { margin: 20px 0; text-align: center; overflow: hidden; }
.ad-slot > div { margin: 0 auto; }
.ad-reserved { min-height: 90px; border: 1px dashed #cbd5e1; border-radius: 6px; background: #f8fafc; }

/* 单页 */
.page-single { background: #fff; border-radius: 8px; padding: 28px 32px; margin: 24px 0 30px; box-shadow: 0 1px 4px rgba(15, 40, 70, .06); }
.page-single h1 { font-size: 26px; color: #0f172a; margin-bottom: 14px; }
.single-content { font-size: 16px; color: #334155; }
.single-content p { margin: 12px 0; }

/* 留言 */
.feedback-form { background: #fff; border-radius: 8px; padding: 28px 32px; margin: 20px 0 30px; box-shadow: 0 1px 4px rgba(15, 40, 70, .06); }
.feedback-form label { display: block; font-size: 14px; color: #334155; margin: 14px 0 6px; }
.feedback-form input[type="text"], .feedback-form textarea { width: 100%; border: 1px solid #dbe4ee; border-radius: 6px; padding: 10px 12px; font-size: 15px; outline: none; }
.feedback-form input[type="text"]:focus, .feedback-form textarea:focus { border-color: #00b4ff; }
.feedback-captcha { display: flex; align-items: center; gap: 12px; }
.feedback-captcha input { flex: 1; }
.feedback-captcha-image { height: 42px; border: 1px solid #dbe4ee; border-radius: 6px; cursor: pointer; }
.feedback-submit { margin-top: 20px; background: #0284c7; color: #fff; border: 0; border-radius: 6px; padding: 11px 34px; font-size: 16px; cursor: pointer; }
.feedback-submit:hover { background: #0369a1; }
.feedback-submit:disabled { opacity: .6; cursor: default; }
#success-message { color: #15803d; margin-top: 14px; }
#error-message { color: #b91c1c; margin-top: 14px; }

/* 页脚 */
.site-footer { background: #081426; color: #94a3b8; margin-top: 10px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 36px 16px 24px; }
.footer-inner h3 { color: #e2e8f0; font-size: 16px; margin-bottom: 12px; }
.footer-inner li { padding: 3px 0; }
.footer-inner a { color: #94a3b8; }
.footer-inner a:hover { color: #7dd3fc; }
.footer-bottom { border-top: 1px solid #1e3a52; text-align: center; padding: 16px; font-size: 13px; }
.footer-bottom a { color: #94a3b8; }

@media (max-width: 768px) {
  .header-inner { height: 56px; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 56px; left: 0; right: 0; background: #0d2b4d; margin-left: 0; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px 16px 14px; }
  .hero { height: 230px; }
  .hero-caption { bottom: 24px; }
  .hero-caption h1 { font-size: 26px; }
  .hero-caption p { font-size: 14px; }
  .col-sections { grid-template-columns: 1fr; }
  .news-thumb { width: 120px; height: 84px; }
  .article-detail, .page-single, .feedback-form, .related { padding: 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .prev-next { flex-direction: column; gap: 6px; }
}
