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

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #2980b9;
}

nav {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
}

nav a:hover,
nav a.active {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  nav {
    padding: 0.6rem 0.8rem;
  }

  nav a {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 0.5rem 0.5rem;
  }

  nav a {
    padding: 0.3rem 0.3rem;
    font-size: 0.7rem;
  }
}

main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 {
  font-size: 2rem;
  color: #1a1a1a;
}

h2 {
  font-size: 1.5rem;
  color: #2c3e50;
}

h3 {
  font-size: 1.2rem;
  color: #34495e;
}

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

section {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

section:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-color: #3498db;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

@media (max-width: 768px) {
  main {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .grid {
    gap: 1rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  section {
    padding: 1.2rem;
  }
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-right: 0.5rem;
  margin-bottom: 0.3rem;
}

.badge-primary {
  background: #3498db;
  color: #fff;
}

.badge-success {
  background: #2ecc71;
  color: #fff;
}

.badge-danger {
  background: #e74c3c;
  color: #fff;
}

.badge-warning {
  background: #f39c12;
  color: #fff;
}

.badge-info {
  background: #e8f4fd;
  color: #3498db;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: #fff;
}

.btn-success:hover {
  background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
  color: #999;
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
  border-top: 4px solid #3498db;
}

footer p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

table tr {
  border-bottom: 1px solid #eee;
}

table td {
  padding: 0.8rem 0;
  vertical-align: top;
}

table td:first-child {
  font-weight: bold;
  color: #555;
  width: 20%;
}

table td:last-child {
  color: #333;
}

@media (max-width: 768px) {
  table td:first-child {
    width: 30%;
  }
}

.ui-style-0 { --primary-color: #3498db; }
.ui-style-1 { --primary-color: #e74c3c; }
.ui-style-2 { --primary-color: #2ecc71; }
.ui-style-3 { --primary-color: #f39c12; }
.ui-style-4 { --primary-color: #9b59b6; }
.ui-style-5 { --primary-color: #1abc9c; }
.ui-style-6 { --primary-color: #34495e; }
.ui-style-7 { --primary-color: #e67e22; }
.ui-style-8 { --primary-color: #16a085; }
.ui-style-9 { --primary-color: #c0392b; }
.ui-style-10 { --primary-color: #8e44ad; }
.ui-style-11 { --primary-color: #27ae60; }
.ui-style-12 { --primary-color: #2980b9; }
.ui-style-13 { --primary-color: #d35400; }
.ui-style-14 { --primary-color: #7f8c8d; }
.ui-style-15 { --primary-color: #c0392b; }

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

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

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

article {
  transition: all 0.3s ease;
}

article:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.highlight {
  background: linear-gradient(120deg, transparent 0%, transparent 50%, #fff8dc 50%);
  background-size: 200% 100%;
  transition: background-position 0.3s ease;
}

.highlight:hover {
  background-position: 100% 0;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}
