
/* 定义全局变量 */
:root {
  --primary-color: #0074D9; /* 科技蓝 */
  --secondary-color: #FFFFFF; /* 暖白 */
  --accent-color: #FF851B;   /* 点缀橙色 */
  --background-gradient: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  --font-primary: 'Roboto', sans-serif;
  --font-secondary: 'Helvetica', sans-serif;
  --transition-speed: 0.3s;
}

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

body {
  font-family: var(--font-secondary);
  background: var(--background-gradient);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

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

header {
  background: rgba(255, 255, 255, 0.8);
  padding: 20px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header .logo {
  font-family: var(--font-primary);
  font-size: 24px;
  color: var(--primary-color);
}

nav {
  margin-top: 10px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  transition: color var(--transition-speed);
}

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

.hero {
  height: 100vh;
  background: url('https://images.gptkong.com/demo/sample1.png') center center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-gradient);
  opacity: 0.6;
}

.hero-content {
  position: relative;
  text-align: center;
  color: #fff;
  z-index: 1;
}

.hero-content h1 {
  font-family: var(--font-primary);
  font-size: 48px;
  margin-bottom: 20px;
  animation: fadeInDown 1s ease-out forwards;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out forwards;
}

.hero-content .button {
  padding: 10px 20px;
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color var(--transition-speed);
  animation: fadeInUp 1s ease-out forwards;
}

.hero-content .button:hover {
  background-color: darken(var(--accent-color), 10%);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  padding: 80px 0;
}

.section:nth-child(even) {
  background: rgba(255, 255, 255, 0.8);
}

.section h2 {
  font-family: var(--font-primary);
  font-size: 32px;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--secondary-color);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

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

.card h3 {
  font-family: var(--font-primary);
  font-size: 24px;
  margin: 15px 0;
  color: var(--accent-color);
}

.card p {
  font-size: 16px;
  color: #555;
}

.button-group {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.button-group a {
  margin: 0 10px;
  text-decoration: none;
  color: #fff;
  padding: 10px 20px;
  background-color: var(--accent-color);
  border-radius: 4px;
  transition: background-color var(--transition-speed);
}

.button-group a:hover {
  background-color: darken(var(--accent-color), 10%);
}

.footer {
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 20px 0;
}

.footer p {
  margin-bottom: 10px;
}

.footer a {
  color: #fff;
  text-decoration: none;
  margin: 0 5px;
  transition: color var(--transition-speed);
}

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

/* 动画与动态交互 */
.animate-element {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.icon {
  width: 48px;
  height: 48px;
  fill: var(--primary-color);
  transition: transform var(--transition-speed);
}

.icon:hover {
  transform: scale(1.2);
}

@media (max-width: 1440px) {
  .hero-content h1 {
    font-size: 40px;
  }

  .section h2 {
    font-size: 28px;
  }
}

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

  .hero-content h1 {
    font-size: 36px;
  }
}

@media (max-width: 1024px) {
  .nav ul {
    flex-direction: column;
    align-items: center;
  }

  nav ul li {
    margin: 10px 0;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 28px;
  }

  .section h2 {
    font-size: 24px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  header {
    padding: 10px 0;
  }

  header .logo {
    font-size: 20px;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
  }

  nav ul li {
    margin: 5px 0;
  }

  .hero-content h1 {
    font-size: 24px;
  }

  .section h2 {
    font-size: 20px;
  }

  .card h3 {
    font-size: 20px;
  }

  .button-group a {
    padding: 8px 16px;
    font-size: 14px;
  }
}

@media (max-width: 320px) {
  .hero-content h1 {
    font-size: 20px;
  }

  .section h2 {
    font-size: 18px;
  }

  .card h3 {
    font-size: 18px;
  }

  .button-group a {
    padding: 6px 12px;
    font-size: 12px;
  }
}

