
/* 重置默认样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 字体设置 */
body {
  font-family: 'Roboto', sans-serif;
  color: #333;
  background: linear-gradient(135deg, #87CEEB, #90EE90);
  line-height: 1.6;
  padding: 20px;
}

h1, h2, h3, h4 {
  font-family: 'Futura', sans-serif;
  color: #2F4F4F;
}

h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

h3 {
  font-size: 2rem;
  margin-bottom: 10px;
}

h4 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

p {
  margin-bottom: 1.5em;
}

pre {
  background: #f4f4f4;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 1.5em;
}

code {
  font-family: 'Courier New', Courier, monospace;
  color: #d14;
}

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

th, td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

th {
  background-color: #4682B4;
  color: #fff;
}

/* 图片样式 */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 20px;
}

/* 互动按钮 */
.button {
  position: relative;
  display: inline-block;
  padding: 10px 20px;
  background-color: #4682B4;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #5A9BD4;
}

.button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.button:hover::before {
  width: 200px;
  height: 200px;
}

/* 渐变背景与动画 */
header {
  background: radial-gradient(circle, rgba(255,87,34,1), transparent);
  animation: aurora-move 15s linear infinite;
  padding: 20px;
  text-align: center;
  color: #fff;
  border-radius: 10px;
  margin-bottom: 30px;
}

@keyframes aurora-move {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 主要内容布局 */
main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* 响应式设计 */
@media (min-width: 480px) {
  main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  main {
    grid-template-columns: 2fr 1fr;
  }
}

@media (min-width: 1024px) {
  main {
    grid-template-columns: 3fr 1fr;
  }
}

@media (min-width: 1200px) {
  body {
    padding: 40px;
  }
}

@media (min-width: 1440px) {
  main {
    grid-template-columns: 4fr 1fr;
  }
}

/* 示例展示样式 */
.sample-display {
  background: rgba(255, 255, 255, 0.8);
  padding: 20px;
  border-radius: 10px;
  position: relative;
}

.sample-display::before {
  content: '这是一个网页样式设计参考';
  position: absolute;
  top: -20px;
  left: 20px;
  background: #4682B4;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9rem;
}

/* 表单禁用样式（避免出现输入栏） */
input, textarea, select, button {
  border: none;
  outline: none;
  background: none;
  font: inherit;
}

/* 链接样式 */
a {
  color: #4682B4;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 代码块美化 */
pre code {
  background: #2d2d2d;
  color: #ccc;
  display: block;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
}

/* 增加页面留白 */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* 优化导航栏 */
nav {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

nav a {
  margin: 0 15px;
  font-size: 1.1rem;
}


