/* 全局重置与基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  font-size: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: #FF6B6B;
  text-decoration: none;
  transition: color 0.2s;
}

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

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

/* 可访问性增强样式 */
:root {
  --primary-color: #FF6B6B;
  --secondary-color: #FFD166;
  --accent-color: #06D6A0;
  --text-color: #333;
  --bg-color: #fff;
  --link-color: #FF6B6B;
}

/* 高对比度模式 */
.high-contrast {
  --bg-color: #000;
  --text-color: #FFFF00;
  --link-color: #00FFFF;
  background-color: var(--bg-color);
  color: var(--text-color);
}

body.high-contrast a {
  color: var(--link-color);
}

.high-contrast .engagement-note {
  background-color: #444 !important;
  color: #FFD700 !important;
  border-left-color: #FFD700 !important;
}

/* 主要布局样式 */
header {
  background-color: var(--primary-color);
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

nav ul li {
  margin-right: 1.5rem;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

nav ul li a[aria-current="page"] {
  font-weight: 700;
}

nav ul li a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: white;
}

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

.hero {
  text-align: center;
  padding: 3rem 0;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #FF9F1C 100%);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #555;
  max-width: 700px;
  margin: 0 auto;
}

section {
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

h3 {
  font-size: 1.4rem;
  margin: 1.2rem 0 0.8rem;
  color: var(--primary-color);
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 1.8rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

/* 动态公告样式 */
.dynamic-notice {
  background: #F8F9FA;
  border: 1px dashed #BDBDBD;
  border-radius: 8px;
  padding: 1em;
  margin: 1.5em 0;
  font-style: italic;
  color: #555;
  transition: background-color 0.3s ease;
}

.dynamic-notice:hover {
  background: #ECEFF1;
}

.dynamic-notice p {
  margin: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.dynamic-notice.show p {
  opacity: 1;
}

/* 用户行为活跃度提示 */
.engagement-note {
  background: #E8F5E8;
  color: #2E7D32;
  padding: 0.75em 1em;
  border-left: 4px solid #4CAF50;
  font-size: 0.95rem;
  margin: 1em 0;
}

.completion-count, .download-count {
  font-weight: bold;
  color: var(--primary-color);
}

/* Vlog内容样式 */
article {
  background: #f9f9f9;
  padding: 1.2rem;
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
  margin-bottom: 1.2rem;
}

article:last-child {
  margin-bottom: 0;
}

/* 资源中心样式 */
#resources ul {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 1rem;
}

#resources li {
  padding: 0.7rem 0;
  border-bottom: 1px solid #eee;
}

#resources li:last-child {
  border-bottom: none;
}

/* 页脚样式 */
footer {
  background: #f5f5f5;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

footer a {
  color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
  }
  
  nav ul li {
    margin-right: 0;
    margin-bottom: 0.5rem;
    width: 100%;
  }
  
  nav ul li a {
    display: block;
    padding: 0.7rem 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  .dynamic-notice {
    font-size: 0.85rem;
  }
  
  .engagement-note {
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
  
  .dynamic-notice p {
    opacity: 1 !important;
  }
}

/* 高对比度模式切换按钮 */
.accessibility-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: #333;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  z-index: 1000;
  font-size: 0.9rem;
}

.accessibility-toggle:focus {
  outline: 3px solid #FFD700;
  box-shadow: 0 0 0 3px #FFD700;
}
