
/* 整体页面样式设置 */
/* 设置box-sizing为border-box，方便布局 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 设置body的背景色、字体、颜色以及基础排版 */
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #1E3A8A, #2E4B9E, #3C5BAA);
  color: #FFFFFF;
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  letter-spacing: 0.5px;
  /* 确保内容不会因为视口大小变化而被裁剪 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(30, 58, 138, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 导航栏中的链接样式 */
.navbar a {
  color: #FFFFFF;
  text-decoration: none;
  margin: 0 15px;
  transition: color 0.3s ease;
  font-size: 16px;
}

.navbar a:hover {
  color: #8A2BE2;
}

/* 主内容区样式 */
.main-content {
  flex: 1;
  padding: 100px 40px 40px 40px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

/* 文章内容样式 */
article {
  max-width: 800px;
}

/* 文章标题样式 */
article h2, article h3 {
  font-family: 'Orbitron', sans-serif;
  color: #FFFFFF;
  margin-top: 40px;
  margin-bottom: 20px;
}

/* 段落样式 */
article p {
  font-size: 16px;
  color: #FFFFFF;
  margin-bottom: 20px;
}

/* 代码块样式 */
article pre {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin-bottom: 20px;
}

article code {
  color: #1E90FF;
  font-family: 'Courier New', Courier, monospace;
  font-size: 15px;
}

/* 图片样式 */
.article-image {
  max-width: 650px;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
}

.article-image:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .main-content {
    grid-template-columns: 1fr;
    padding: 100px 20px 20px 20px;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
  }

  .navbar a {
    margin: 10px 0;
    font-size: 18px;
  }

  .main-content {
    padding: 100px 20px 20px 20px;
  }

  article {
    max-width: 100%;
  }

  .article-image {
    max-width: 100%;
  }
}

/* 顶部提示信息样式 */
#banner {
  background: rgba(138, 43, 226, 0.8);
  text-align: center;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 40px;
  border-radius: 5px;
}

/* 按钮样式 */
.button {
  background: #8A2BE2;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  color: #FFFFFF;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  font-size: 16px;
  text-decoration: none;
  display: inline-block;
}

.button:hover {
  background: #4B0082;
  transform: scale(1.05);
}

/* 折叠区域样式 */
.collapsible {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 18px;
  transition: background 0.3s ease;
  border-radius: 5px;
  margin-bottom: 10px;
}

.collapsible:hover {
  background: rgba(138, 43, 226, 0.8);
}

.collapsible:after {
  content: '\002B';
  color: #FFFFFF;
  font-weight: bold;
  float: right;
  margin-left: 5px;
}

.collapsible.active:after {
  content: "\2212";
}

.content {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  margin-bottom: 20px;
}

/* 代码示例块样式 */
.code-example {
  background: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.code-example pre {
  margin: 0;
}

/* 侧边栏样式 */
.sidebar {
  display: none;
}

@media (min-width: 1201px) {
  .sidebar {
    display: block;
    background: rgba(30, 58, 138, 0.9);
    padding: 20px;
    border-radius: 10px;
    height: fit-content;
  }

  .sidebar img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
  }
}

/* 页脚样式 */
.footer {
  background: rgba(30, 58, 138, 0.9);
  text-align: center;
  padding: 20px;
  color: #FFFFFF;
  font-size: 16px;
  position: relative;
}

/* 链接样式，强制添加rel="nofollow" */
a[rel="nofollow"] {
  color: #1E90FF;
  text-decoration: none;
}

a[rel="nofollow"]:hover {
  color: #8A2BE2;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 2s ease-in-out;
}

/* 栅格布局调整 */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 20px;
  width: 100%;
}

/* 标题字体大小调整 */
h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

@media (max-width: 768px) {
  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 18px;
  }
}

/* 代码块高亮样式 */
code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 4px;
  border-radius: 4px;
}

/* Button 链接样式 */
.button-link {
  display: inline-block;
  background: #8A2BE2;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.button-link:hover {
  background: #4B0082;
  transform: scale(1.05);
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

table, th, td {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

th, td {
  padding: 12px;
  text-align: left;
  font-size: 16px;
}

th {
  background: rgba(138, 43, 226, 0.8);
}

tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

/* 列表样式 */
ul, ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

li {
  margin-bottom: 10px;
}

/* 强调文本样式 */
strong {
  color: #1E90FF;
}

em {
  color: #8A2BE2;
}

/* 链接按钮样式 */
.link-button {
  background: #1E90FF;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease;
  font-size: 16px;
}

.link-button:hover {
  background: #1C86EE;
}

/* 图片浮动样式 */
.float-image {
  float: left;
  margin: 0 20px 20px 0;
  max-width: 300px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.float-image:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

/* 清除浮动 */
.clearfix::after {
  content: "";
  clear: both;
  display: table;
}

/* 引用样式 */
blockquote {
  background: rgba(255, 255, 255, 0.1);
  border-left: 5px solid #8A2BE2;
  padding: 10px 20px;
  margin: 20px 0;
  border-radius: 5px;
}

/* 表单样式（确保不包含文本输入框等元素） */
/* 隐藏表单元素 */
form {
  display: none;
}

