/* * 典狱长软件监控网关 - 最终美化版
 */

 :root {
  --color-bg: #0b1120;
  --color-surface: #1e293b;
  --color-primary: #10b981;
  --color-primary-hover: #059669;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-danger: #ef4444;
  --container-width: 1200px;
  --transition: all 0.3s ease;
}

/* 基础重置 */
body {
  margin: 0;
  padding: var(--header-offset, 90px) 0 0 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
}

h1, h2, h3, h4, p, ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center !important;
}

.section-padding {
  padding: 80px 0;
}

/* 导航栏 */
.header-top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.banner-content{
  margin-top: 100px;
}
.navbar {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-list {
  display: flex !important;
  gap: 30px;
}

.nav-link {
  color: var(--color-text) !important;
  font-weight: 500;
  font-size: 16px;
}

.nav-link:hover {
  color: var(--color-primary) !important;
}

/* 协议弹窗 */
.agreement-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
}

.agreement-content {
  background: var(--color-surface);
  margin: 5% auto;
  padding: 35px;
  width: 90%;
  max-width: 800px;
  border-radius: 16px;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.1);
}

.agree-btn {
  background: var(--color-primary);
  color: white;
  padding: 14px 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  margin-top: 25px;
}

/* 首页 Banner - 已移除打字机相关动画 */
.header-area {
  position: relative;
  min-height: 520px;
  background: linear-gradient(rgba(11, 17, 32, 0.75), rgba(11, 17, 32, 0.75)), url('assets/img/banner.jpg') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: calc(var(--header-offset, 90px) * -1);
}

.banner-title {
  font-size: 4.3rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 15px;
  letter-spacing: -1px;
}

.banner-subtitle {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 35px;
  font-weight: 500;
}

/* 首页功能介绍卡片 */
.feature-intro {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.feature-card {
  width: 100%;
  max-width: 980px;
  text-align: left;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.feature-head {
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(16,185,129,0.10), rgba(16,185,129,0.00));
}

.feature-title {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.feature-subtitle {
  margin-top: 6px;
  color: rgba(248, 250, 252, 0.78);
  font-size: 1rem;
}

.feature-table-wrap {
  padding: 16px 18px 20px;
  overflow-x: auto;
}

.feature-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
}

.feature-table th,
.feature-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: middle;
}

.feature-table th {
  text-align: left;
  color: var(--color-primary);
  font-weight: 800;
  background: rgba(16, 185, 129, 0.14);
}

.feature-table tr:last-child td {
  border-bottom: none;
}

.feature-table td:nth-child(2),
.feature-table td:nth-child(3) {
  text-align: center;
  white-space: nowrap;
  font-weight: 700;
}

.feature-table td.ok { color: rgba(248, 250, 252, 0.95); }
.feature-table td.no { color: rgba(239, 68, 68, 0.95); }

.feature-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.02);
}

/* 按钮样式 */
.btn-gradient {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-primary), #059669);
  color: white !important;
  padding: 14px 35px;
  border-radius: 50px;
  font-weight: 700;
  margin: 10px 10px; /* 增加按钮间距 */
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(16, 185, 129, 0.3);
}

/* 教学页面按钮间距增强 */
.teaching-content .center-block {
  margin: 30px 0; /* 显著拉开间隔 */
}

/* 联系方式页面居中强化 */
.service-area {
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
}

.contact-highlight {
  font-size: 32px;
  color: var(--color-primary);
  font-weight: 800;
  margin: 15px 0 30px;
}

.contact-subtitle {
  color: var(--color-text-muted);
  font-size: 16px;
}

/* 工具页卡片排版 */
.tool-card {
  background: var(--color-surface);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 40px;
}

.service-img {
  width: 100%;
  height: 350px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 20px;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 友情链接间距 */
.friendship-links {
  padding: 60px 0;
  background: #080d1a;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.link-group {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px; /* 显著增加友情链接链接间的间隔 */
}

.friendship-link {
  color: var(--color-text-muted);
  font-size: 16px;
  font-weight: 500;
}

.friendship-link:hover {
  color: var(--color-primary);
}

/* 更新日志容器 */
.markdown-card {
  background: var(--color-surface);
  border-radius: 20px;
  padding: 40px;
  margin: 40px auto;
  max-width: 1000px;
  border: 1px solid rgba(255,255,255,0.05);
}

/* 隐藏不再需要的元素 */
.scroll-area, .cd-headline i, .cd-headline b { 
  display: none !important; 
}

@media (max-width: 768px) {
  .header-area { min-height: 560px; }
  .banner-title { font-size: 2.85rem; }
  .banner-subtitle { font-size: 1.35rem; }
  .nav-list { display: none; }
  .feature-title { font-size: 1.5rem; }
}

/* Markdown 内容样式美化 */
.markdown-body {
  color: var(--color-text);
  line-height: 1.8;
  font-size: 16px;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  color: var(--color-primary);
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  font-weight: 700;
}

.markdown-body h1 { 
  font-size: 2.2rem; 
  border-bottom: 2px solid rgba(16, 185, 129, 0.2); 
  padding-bottom: 10px; 
}

.markdown-body h2 { 
  font-size: 1.8rem; 
  border-left: 4px solid var(--color-primary); 
  padding-left: 15px; 
  background: rgba(16, 185, 129, 0.05);
  padding-top: 8px;
  padding-bottom: 8px;
}

.markdown-body h3 { font-size: 1.4rem; }

.markdown-body p { margin-bottom: 1.2em; color: rgba(248, 250, 252, 0.9); }

.markdown-body ul, .markdown-body ol {
  margin-bottom: 1.2em;
  padding-left: 1.5em;
}

.markdown-body li { margin-bottom: 0.6em; }
.markdown-body ul li { list-style: disc; }
.markdown-body ol li { list-style: decimal; }

.markdown-body blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 15px 20px;
  background: rgba(30, 41, 59, 0.5);
  margin: 1.5em 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.markdown-body blockquote p { margin-bottom: 0; color: var(--color-text-muted); }

.markdown-body code {
  background: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  color: #10b981;
  font-size: 0.9em;
  border: 1px solid rgba(255,255,255,0.05);
}

.markdown-body pre {
  background: #0f172a;
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid rgba(255,255,255,0.1);
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
  display: block;
  line-height: 1.5;
  color: #e2e8f0;
  border: none;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  background: rgba(15, 23, 42, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.markdown-body th, .markdown-body td {
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: left;
}

.markdown-body th {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-primary);
  font-weight: 600;
}

.markdown-body tr:nth-child(even) {
  background: rgba(255,255,255,0.02);
}

.markdown-body hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 2.5em 0;
}

.markdown-body strong { color: var(--color-primary); }

/* 更新日志折叠功能样式 */
.markdown-wrapper {
  position: relative;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 500px; /* 初始显示高度，约10-12行内容 */
}

.markdown-wrapper.expanded {
  max-height: 5000px; /* 足够大的高度以展示全部 */
}

.markdown-mask {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--color-surface), transparent);
  pointer-events: none;
  transition: opacity 0.3s;
}

.markdown-wrapper.expanded .markdown-mask {
  opacity: 0;
}

.toggle-updates-btn {
  display: block;
  margin: 20px auto 0;
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 10px 30px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  font-size: 15px;
}

.toggle-updates-btn:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

.toggle-updates-btn i {
  margin-left: 5px;
  transition: transform 0.3s;
}

.markdown-wrapper.expanded + .toggle-updates-btn i {
  transform: rotate(180deg);
}

.updates-empty-text.updates-error {
  color: var(--color-danger);
  background: rgba(239, 68, 68, 0.1);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}
