/* 全局布局样式 */
:root {
  --container-width: 1200px;
  --container-padding: 0 20px;
  --header-height: 70px;
  --footer-padding: 40px 0;
  --section-spacing: 60px 0;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--secondary-color);
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* 容器 */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

/* 头部导航 */
header {
  background-color: var(--text-light);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.logo i {
  margin-right: 10px;
  font-size: 1.8rem;
}

nav ul {
  display: flex;
  gap: 30px;
}

nav a {
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* 头部操作区域 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 语言切换 */
.language-switch {
  display: flex;
  gap: 10px;
}

.language-switch button {
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.language-switch button.active {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.language-switch button:not(.active):hover {
  background-color: var(--secondary-color);
}

/* 主题切换 */
.theme-switch {
  display: flex;
  gap: 5px;
  padding: 4px;
  background-color: var(--secondary-color);
  border-radius: var(--border-radius-sm);
}

.theme-switch button {
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.theme-switch button.active {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.theme-switch button:not(.active):hover {
  background-color: var(--border-color);
  color: var(--text-dark);
}

.theme-switch i {
  font-size: 1.1rem;
}

/* 页脚 */
footer {
  background-color: var(--text-dark);
  color: var(--text-light);
  padding: var(--footer-padding);
  margin-top: var(--section-spacing);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.footer-logo i {
  margin-right: 10px;
  font-size: 1.5rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-column h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--text-light);
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column a {
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer-column a:hover {
  color: var(--text-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  color: var(--text-light);
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

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

/* 响应式布局 */
@media (max-width: 1024px) {
  :root {
    --container-width: 100%;
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    height: auto;
    padding: 15px 0;
  }
  
  .logo {
    margin-bottom: 15px;
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
  }
  
  .header-actions {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  
  .footer-content {
    flex-direction: column;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    margin-top: 30px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

/* 辅助类 */
.text-center {
  text-align: center;
}

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

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

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 1rem; }
.ml-4 { margin-left: 1.5rem; }
.ml-5 { margin-left: 3rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 1rem; }
.mr-4 { margin-right: 1.5rem; }
.mr-5 { margin-right: 3rem; }

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

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-none { display: none; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }

.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-md { border-radius: var(--border-radius-md); }
.rounded-lg { border-radius: var(--border-radius-lg); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); } 