
/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #4a64f7, #8a2be2);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

h1,
h2,
h3 {
  font-family: 'Roboto', sans-serif;
  color: #fff;
}

p {
  color: #555;
}

a {
  text-decoration: none;
  color: #ff9800;
}

button {
  background: #ff9800;
  border: none;
  color: white;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  background: #e68a00;
}

/* 头部样式 */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 20px;
}

.nav-links a {
  color: #fff;
  font-size: 18px;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ff9800;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #ff9800;
}

/* 主体部分 */
.main-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 80px;
}

.section-left {
  background: #4a64f7;
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.section-right {
  background: #fff;
  color: #333;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.card {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.card h3 {
  margin: 10px 0;
}

.card p {
  font-size: 14px;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .main-section {
    grid-template-columns: 1fr;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* 示例文章样式 */
.example-article {
  margin-top: 40px;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.example-article h2 {
  color: #4a64f7;
}

.example-article pre {
  background: #f4f4f4;
  padding: 10px;
  border-radius: 5px;
  overflow: auto;
}

/* 提示信息 */
.tip {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: #ff9800;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
}

