
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Roboto:wght@400;700&display=swap');

:root {
  --primary-color: #003f5c; /* 深蓝色 */
  --secondary-color: #665191; /* 银灰色 */
  --accent-color: #ffa600; /* 金黄色点缀 */
  --background-gradient: linear-gradient(135deg, #003f5c, #665191);
  --font-color: #333;
  --header-height: 60px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', 'Open Sans', sans-serif;
  line-height: 1.6;
  color: var(--font-color);
  background: var(--background-gradient);
  background-attachment: fixed;
  min-height: 100vh;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(0, 63, 92, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  transition: background 0.3s ease;
}

header.scrolled {
  background: var(--primary-color);
}

nav a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
  font-weight: 600;
}

nav a:hover {
  color: var(--accent-color);
}

.container {
  max-width: 1200px;
  margin: 100px auto 50px auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

h1, h2, h3, h4 {
  color: white;
  margin-bottom: 20px;
}

h2 {
  font-size: 2.5em;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
}

h3 {
  font-size: 1.8em;
  margin-top: 30px;
}

h4 {
  font-size: 1.5em;
  margin-top: 20px;
}

p {
  margin-bottom: 15px;
  color: #f0f0f0;
}

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

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

table th {
  background-color: var(--primary-color);
}

pre {
  background: rgba(0, 0, 0, 0.7);
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  color: #f8f8f2;
  font-family: 'Courier New', Courier, monospace;
}

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

button {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
  border-radius: 5px;
}

button:hover {
  background-color: var(--accent-color);
  transform: scale(1.1);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 10px 0;
}

.line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 2s linear forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.graphic {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.graphic img {
  width: 320px;
  height: 320px;
}

.footer {
  text-align: center;
  padding: 20px;
  color: white;
  border-top: 1px solid #444;
  margin-top: 50px;
}

@media (max-width: 1440px) {
  .container {
    max-width: 1024px;
  }
}

@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }
}

@media (max-width: 1024px) {
  .container {
    max-width: 720px;
  }
}

@media (max-width: 768px) {
  .container {
    max-width: 90%;
  }
  
  nav a {
    margin-left: 10px;
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  header {
    flex-direction: column;
    height: auto;
    padding: 10px;
  }
  
  nav a {
    margin: 5px 0;
    font-size: 0.8em;
  }
  
  .graphic img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 320px) {
  h1 {
    font-size: 1.5em;
  }
  
  h2 {
    font-size: 2em;
  }
  
  h3 {
    font-size: 1.5em;
  }
  
  h4 {
    font-size: 1.2em;
  }
  
  button {
    padding: 8px 16px;
    font-size: 0.9em;
  }
}

