
/* 全局样式重置与基础设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #1a237e, #3949ab);
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 20px;
}

h1, h2, h3 {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

h1 {
  font-size: 3rem;
  text-align: center;
  color: #ffeb3b;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to right, #3f51b5, #5c6bc0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s ease-in-out;
}

.navbar a:hover {
  color: #ffeb3b;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar .cta {
  background: #ffeb3b;
  color: #1a237e;
  padding: 10px 20px;
  border-radius: 5px;
  transition: transform 0.3s ease-in-out;
}

.navbar .cta:hover {
  transform: scale(1.05);
}

/* 模块化布局 */
.grid-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 40px 0;
}

.card {
  background: linear-gradient(135deg, #3949ab, #5c6bc0);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in-out;
}

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

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

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #ffeb3b;
}

.card p {
  font-size: 1rem;
  color: #e3f2fd;
}

/* 文章排版 */
.article-container {
  background: linear-gradient(135deg, #303f9f, #3949ab);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  margin-top: 80px;
}

.article-container h2 {
  color: #ffeb3b;
  margin-bottom: 20px;
}

.article-container p {
  font-size: 1.1rem;
  color: #e3f2fd;
  margin-bottom: 15px;
}

.article-container pre {
  background: #1a237e;
  color: #ffeb3b;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  font-size: 1rem;
}

.article-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.article-container th,
.article-container td {
  border: 1px solid #e3f2fd;
  padding: 10px;
  text-align: left;
}

.article-container th {
  background: #3949ab;
  color: #ffeb3b;
}

/* 动画与交互效果 */
.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #ffeb3b;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 2s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

button {
  background: #ffeb3b;
  color: #1a237e;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}

button:hover {
  transform: scale(1.05);
}

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

  h1 {
    font-size: 2rem;
  }

  .article-container {
    padding: 20px;
  }

  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar .cta {
    margin-top: 10px;
  }
}

@media (max-width: 400px) {
  body {
    font-size: 0.9rem;
  }

  .article-container pre {
    font-size: 0.9rem;
  }
}

