:root {
  --primary-bg: #ffffff;
  --secondary-bg: #1d1d1f;
  --text-color: #1d1d1f;
  --header-height: 60px;
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  color: var(--text-color);
}

/* 通用工具类 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  color: #333;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #4a90e2;
  border-radius: 2px;
}

/* 动画 */
@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.loading {
  position: relative;
  display: inline-block;
  min-height: 200px;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #1d1d1f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 🎨 优雅公告横幅样式 */

#announcement-banner {
  max-width: 1200px;
  width: 100%;
  margin: 20px auto;
  padding: 0;
  background: linear-gradient(135deg, #14532d 0%, #22c55e 100%); /* 墨绿色到浅绿色 */
  border-radius: 16px;
  box-shadow: 
    0 8px 32px rgba(34, 197, 94, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.announcement-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  color: white;
  position: relative;
  background: linear-gradient(135deg, #14532d 0%, #22c55e 100%); /* 墨绿色到浅绿色 */
  backdrop-filter: blur(10px);
}

.announcement-wrapper.urgent {
  background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
  animation: urgentGlow 2s ease-in-out infinite alternate;
}

@keyframes urgentGlow {
  0% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.4); }
  100% { box-shadow: 0 0 30px rgba(255, 165, 0, 0.6); }
}

.announcement-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.announcement-content-wrapper {
  flex: 1;
  min-width: 0;
}

.announcement-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 16px;
}

.announcement-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  line-height: 1.3;
}

.announcement-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 12px;
  white-space: nowrap;
  font-weight: 500;
  backdrop-filter: blur(5px);
}

.announcement-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.announcement-text {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}

.announcement-expand-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(5px);
  align-self: flex-start;
  font-weight: 500;
}

.announcement-expand-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.announcement-expand-btn:active {
  transform: translateY(0);
}

.announcement-expand-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.expand-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.announcement-expand-btn.expanded .expand-icon {
  transform: rotate(180deg);
}

.announcement-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.announcement-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.announcement-close-btn:active {
  transform: scale(0.95);
}

/* ✨ 公告系统额外特效 */
.announcement-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.6) 50%, 
    transparent 100%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.announcement-wrapper.urgent::before {
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.9) 50%, 
    transparent 100%);
  animation: urgentShimmer 1.5s ease-in-out infinite;
}

@keyframes urgentShimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}



/* 📱 移动端适配 */
@media (max-width: 768px) {
  #announcement-banner {
    margin: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #14532d 0%, #22c55e 100%); /* 保持与PC一致 */
  }
  
  .announcement-wrapper {
    padding: 16px;
    gap: 12px;
    background: linear-gradient(135deg, #14532d 0%, #22c55e 100%) !important; /* 强制与PC一致 */
  }
  
  .announcement-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .announcement-title {
    font-size: 16px;
  }
  
  .announcement-text {
    font-size: 14px;
  }
  
  .announcement-date {
    font-size: 11px;
    padding: 3px 10px;
  }
  
  .announcement-icon {
    font-size: 20px;
  }
  
  .announcement-close-btn {
    width: 28px;
    height: 28px;
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 480px) {
  #announcement-banner {
    margin: 12px;
    border-radius: 8px;
  }
  
  .announcement-wrapper {
    padding: 12px;
    gap: 10px;
  }
  
  .announcement-title {
    font-size: 15px;
  }
  
  .announcement-text {
    font-size: 13px;
  }
}

/* 📱 增强移动端交互 */
@media (max-width: 768px) {
  .announcement-wrapper {
    background: linear-gradient(135deg, #14532d 0%, #22c55e 100%) !important; /* 强制与PC一致 */
  }
  .announcement-expand-btn {
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
  }
  .announcement-close-btn {
    backdrop-filter: blur(8px);
  }
}

/* 🎨 浅色主题适配 */
@media (prefers-color-scheme: light) {
  #announcement-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    box-shadow: 
      0 8px 32px rgba(79, 70, 229, 0.2),
      0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .announcement-wrapper.urgent {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  }
}

/* 🌟 高对比度模式支持 */
@media (prefers-contrast: high) {
  #announcement-banner {
    background: #000;
    border: 2px solid #fff;
  }
  
  .announcement-wrapper {
    background: rgba(0, 0, 0, 0.9);
  }
  
  .announcement-title,
  .announcement-text {
    color: #fff;
    text-shadow: none;
  }
}

/* 🎨 深色模式支持 */
@media (prefers-color-scheme: dark) {
  #announcement-banner {
    background: linear-gradient(135deg, #2d3561 0%, #3d2a4f 100%);
  }
}
