* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: #f9fafb;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
}

.container {
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 24px !important;
  width: 100% !important;
}

/* 内容包装器 */
.content-wrapper {
  display: flex !important;
  flex-direction: row !important;
  gap: 24px !important;
  align-items: flex-start !important;
  margin-top: 24px !important;
}

/* 页面头部 */
.page-header {
  background-image: url('/static/img/系统公告.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.5) 100%);
  z-index: 1;
}

.page-header .page-title,
.page-header .page-subtitle {
  position: relative;
  z-index: 2;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.page-subtitle {
  font-size: 15px;
  color: #4b5563;
}

/* 左侧内容区 */
.announcements-main {
  flex: 1;
  min-width: 0;
}

/* 右侧边栏 */
.announcements-sidebar {
  width: 380px;
  flex-shrink: 0;
}

/* 卡片样式 */
.section {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 公告项 */
.announcement-item {
  padding: 24px;
  border-bottom: 1px solid #f3f4f6;
  background: #ffffff;
  border-radius: 12px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.announcement-item:hover {
  border-color: #e5e7eb;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.announcement-item:last-child {
  margin-bottom: 0;
}

/* 公告头部 */
.announcement-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.announcement-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.announcement-date {
  font-size: 13px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 公告类型标签 */
.announcement-type {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  color: #fff;
}

.type-important {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.type-notice {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* 公告内容 */
.announcement-content {
  color: #4b5563;
  line-height: 1.8;
  font-size: 14px;
  margin-top: 12px;
}

/* 公告底部 */
.announcement-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.announcement-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #6b7280;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.announcement-stats {
  font-size: 13px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 热门公告 */
.popular-item {
  display: flex;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.3s ease;
  gap: 12px;
}

.popular-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.popular-item:hover {
  padding-left: 8px;
}

.popular-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.popular-item:nth-child(1) .popular-number {
  background: linear-gradient(135deg, #f87171, #ef4444);
}

.popular-item:nth-child(2) .popular-number {
  background: linear-gradient(135deg, #fb923c, #f97316);
}

.popular-item:nth-child(3) .popular-number {
  background: linear-gradient(135deg, #facc15, #eab308);
}

.popular-item:nth-child(n+4) .popular-number {
  background: linear-gradient(135deg, #d1d5db, #9ca3af);
}

.popular-content {
  flex: 1;
  min-width: 0;
}

.popular-title {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  margin: 0 0 6px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.popular-title a {
  color: inherit;
  text-decoration: none;
}

.popular-title a:hover {
  color: #4b5563;
}

.popular-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9ca3af;
}

.popular-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 归档 */
.archive-year {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 10px;
}

.archive-year::after {
  content: '▼';
  font-size: 12px;
  color: #9ca3af;
}

.archive-year:first-child {
  margin-top: 0;
}

.archive-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.archive-item {
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.archive-item:hover {
  padding-left: 8px;
}

.archive-link {
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  flex: 1;
}

.archive-link:hover {
  color: #111827;
}

.archive-date {
  color: #9ca3af;
  font-size: 13px;
  flex-shrink: 0;
}



/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #52b788 0%, #40916c 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 24px rgba(82, 183, 136, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 12px 32px rgba(82, 183, 136, 0.35);
}

.back-to-top:active {
  transform: scale(0.95);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .content-wrapper {
    flex-direction: column !important;
  }
  
  .announcements-sidebar {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 16px !important;
  }
  
  .content-wrapper {
    gap: 16px !important;
  }
  
  .page-header {
    padding: 24px 16px;
  }
  
  .section {
    padding: 16px;
  }
  
  .announcement-item {
    padding: 16px;
  }
}
