/* ===== 全局配色 ===== */
:root {
  --bg-color: #14141a;
  --card-bg: #1e1e28;
  --text-color: #e8e4dc;
  --accent: #c9a227;
  --muted: #8a8578;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Saira", "yyb", serif;
  line-height: 1.7;
}

/* ===== 导航栏 ===== */
.navbar {
  position: sticky; top: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  background-color: rgba(20, 20, 26, 0.92);
  border-bottom: 1px solid rgba(201, 162, 39, 0.3);
  backdrop-filter: blur(8px);
  z-index: 100;
}
.logo { height: 36px; width: auto; }
.site-name { font-weight: bold; color: var(--accent); margin-right: auto; }
.navbar nav { display: flex; gap: 20px; flex-wrap: wrap; }
.navbar nav a { color: var(--text-color); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.navbar nav a:hover { color: var(--accent); }

/* ===== 欢迎区 ===== */
.welcome {
  text-align: center;
  padding: 80px 24px 40px;
}
.welcome-title {
  font-size: 3rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.welcome-sub {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 28px;
}

/* ===== 乌努斯滚动时钟 ===== */
.unus-clock-bar {
  text-align: center;
  padding: 0;
}
.unus-clock {
  display: inline-block;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  background: var(--card-bg);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 10px;
  padding: 10px 24px;
}

/* ===== 分隔线 ===== */
.divider {
  border: none;
  border-top: 1px solid rgba(201, 162, 39, 0.25);
  max-width: 1100px;
  margin: 20px auto 40px;
}

/* ===== 公告板区 ===== */
.bulletin-section {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 24px;
}
.section-title {
  color: var(--accent);
  font-size: 1.6rem;
  margin-bottom: 20px;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

/* ===== 公告板主体：两列等高 ===== */
.bulletin-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  /* 整个区域高度固定 */
  height: 520px; 
  /* 【改这里】520px 你可以按需改成 600px 等 */
  margin-top: 20px;
}

/* ===== 左侧轮播：填满高度 ===== */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(201,162,39,0.2);
  background: #0e0e12;
  height: 100%; /* 跟随父元素 520px */
}
.carousel-track { display: flex; height: 100%; transition: transform 0.4s ease; }
.carousel-slide { flex: 0 0 100%; height: 100%; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5); color: #fff; border: none;
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.5rem;
  cursor: pointer; z-index: 2; line-height: 1;
}
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
.carousel-btn:hover { background: var(--accent); color: #14141a; }
.carousel-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 2;
}
.carousel-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer;
}
.carousel-dots span.active { background: var(--accent); }


/* ===== 右侧容器 ===== */
.event-list-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden; /* 防止内容撑开父容器 */
}
.event-list-wrapper h2 {
  color: var(--accent);
  font-size: 1.4rem;
  margin-bottom: 16px;
  flex-shrink: 0; /* 标题不压缩 */
}

/* ===== 右侧滚动列表 ===== */
.event-list {
  flex: 1; /* 占据剩余全部高度 */
  overflow-y: auto; /* 超出滚轮滚动 */
  padding-right: 6px;
  
  /* 隐藏滚动条 */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.event-list::-webkit-scrollbar {
  display: none;
}

.event-item {
  background: var(--card-bg);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 14px;
  transition: transform 0.2s, border-color 0.2s;
}
.event-item:hover { transform: translateX(4px); border-left-color: #e8c44a; }
.event-time { color: var(--accent); font-size: 0.85rem; margin-bottom: 4px; }
.event-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.event-item p { color: var(--muted); font-size: 0.9rem; }


/* ===== 手机适配 ===== */
@media (max-width: 800px) {
  .bulletin-body {
    grid-template-columns: 1fr;
    height: auto; /* 手机上取消固定高度 */
  }
  .carousel {
    height: 240px;
  }
  .event-list-wrapper {
    height: auto;
    overflow: visible;
  }
  .event-list {
    height: auto;
    overflow-y: visible;
  }
}

/* ===== 页脚 ===== */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid rgba(201,162,39,0.2);
  color: var(--muted);
  font-size: 0.85rem;
}

/* ===== 手机适配 ===== */
@media (max-width: 800px) {
  .welcome { padding: 60px 20px 30px; }
  .welcome-title { font-size: 2.2rem; }
  .bulletin-body {
    grid-template-columns: 1fr;
  }
  .carousel {
    /* 【改这里】手机上图片高度 */
    height: 240px;
  }
  .event-list {
    height: auto;
    overflow-y: visible;
  }
}
@media (max-width: 600px) {
  .unus-clock { font-size: 1.1rem; padding: 8px 14px; }
}

/* ===== 换算器版块 ===== */
.converter-section {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.converter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: 10px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-color);
  font-family: inherit;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  background: #23232d;
}
.tool-card h3 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.tool-card p {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ===== 工具弹窗 ===== */
.tool-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tool-overlay.active {
  display: flex;
}
.tool-modal {
  background: #14141a;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 14px;
  width: 100%;
  max-width: 960px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}
.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #1e1e28;
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
  color: var(--accent);
  font-weight: bold;
}
.close-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}
.close-btn:hover { color: #ff6b6b; }
.tool-content {
  flex: 1;
  overflow: hidden;
  background: #fff; /* 大部分工具原本是白底或深色底，作为 iframe 基础 */
}
.tool-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}