/* 全站通用样式 - UI Style 3 - Layout C */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.ui-style-3 {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #27ae60;
  --bg-light: #ecf0f1;
  --text-color: #333;
  --text-light: #666;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #2980b9;
  text-decoration: underline;
}

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

.header {
  background: var(--secondary-color);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 1px;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.nav a {
  flex: 1 1 0;
  min-width: 0;
  color: white;
  padding: 8px 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
  transition: background 0.3s;
}

.nav a:hover {
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

main {
  min-height: 60vh;
}

section {
  margin-bottom: 2rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

p {
  line-height: 1.8;
  margin-bottom: 1rem;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.3s;
}

.btn:hover {
  background: #2980b9;
  text-decoration: none;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--bg-light);
  border-radius: 4px;
  font-size: 0.85rem;
  margin: 0.2rem;
}

ul, ol {
  list-style: none;
}

@media (max-width: 768px) {
  .nav a {
    font-size: 0.85rem;
    padding: 6px 3px;
  }

  .logo {
    font-size: 1.2rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .container {
    padding: 0 15px;
  }

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

@media (max-width: 480px) {
  .nav a {
    font-size: 0.75rem;
    padding: 5px 2px;
  }

  .logo {
    font-size: 1rem;
    margin-bottom: 0.8rem;
  }

  h1 {
    font-size: 1.3rem;
  }
}
