:root {
  --ami-bg: #020409;
  --ami-panel: rgba(12, 18, 34, 0.72);
  --ami-panel-border: rgba(255, 255, 255, 0.12);
  --ami-text: rgba(255, 255, 255, 0.88);
  --ami-muted: rgba(255, 255, 255, 0.6);
  --ami-accent: #f8b739;
  --ami-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* 加载动画容器样式 */
#loading-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 4;
  /* 确保加载动画在最上层 */
}
.loading-animation p{            
  color: white;
}
.loader {
  width: 100px;
  height: 100px;
  display: inline-block;
  position: relative;
  border: 3px solid;
  border-color: #de3500 #0000 #fff #0000;
  border-radius: 50%;
  box-sizing: border-box;
  animation: 1s rotate linear infinite;
}
.loader:before,
.loader:after {
  content: '';
  top: 0;
  left: 0;
  position: absolute;
  border: 10px solid transparent;
  border-bottom-color: #fff;
  transform: translate(-4px, 64px) rotate(-45deg);
}
.loader:after {
  border-color: #de3500 #0000 #0000 #0000;
  transform: translate(75px, 10px) rotate(-35deg);
}
@keyframes rotate {
  100% {
      transform: rotate(360deg)
  }
}


/* body 样式 */
html,
body {
  padding: 0px;
  margin: 0px;
  width: 100%;
  height: 100%;
  /* position: fixed; */
}

body {
  filter: contrast(120%);
  background-color: var(--ami-bg);
  background-image: radial-gradient(100vw at 70% 120%, rgba(33, 39, 80, 1) 10%, #020409 100%);
  background-attachment: fixed; /* 背景固定，不随内容滚动 */
  background-repeat: no-repeat; /* 背景不重复 */
  color: var(--ami-text);
  overflow-x: hidden;
} 

#universe {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.img {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}


/* Sidebar样式 */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  color: gray;
  z-index: 20;
  overflow: visible;
  background: linear-gradient(180deg, rgba(7, 12, 24, 0.78) 0%, rgba(7, 12, 24, 0.62) 100%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 9, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 15;
}
.sidebar-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}
/* Sidebar显示时的位置 */
.sidebar-open .sidebar {
  transform: translateY(0);
}
.sidebar-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.sidebar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 1rem;
}
.sidebar ul {
  padding: 0;
  margin: 0;
  width: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ami-text);
  text-decoration: none;
  flex-shrink: 0;
}
.sidebar-brand:hover {
  color: var(--ami-text);
  text-decoration: none;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.brand-copy strong {
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: 0.03em;
}
.brand-copy small {
  color: var(--ami-muted);
  font-size: 0.78rem;
  line-height: 1.3;
}
/* logo配置 */
#sidebar .logo {
  display: block;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  background-size: 170%;
  background-position: center 16%;
}
.sidebar-nav-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-nav-group-primary {
  min-width: 0;
  flex: 1;
}

.sidebar-nav-group-secondary {
  position: relative;
}

.sidebar-section-label {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: none;
}
.sidebar-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sidebar-nav-primary {
  flex-wrap: wrap;
}

.sidebar-nav-secondary {
  position: relative;
}
/* Sidebar下的超连结样式配置 */
#sidebar ul li a {
  padding: 0.65rem 0.85rem;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
#sidebar ul li a:hover {
  color: var(--ami-accent);
  text-decoration: none;
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.06);
}
#sidebar ul li.active > a {
  background: transparent;
  color: var(--ami-accent);
  text-decoration: none;
}
#sidebar ul li a.active-link {
  color: var(--ami-accent);
  font-weight: 600;
  background: rgba(248, 183, 57, 0.06);
  border-color: rgba(248, 183, 57, 0.12);
  box-shadow: inset 0 -2px 0 rgba(248, 183, 57, 0.72);
}
#sidebar ul li > a[aria-expanded="true"] {
  color: var(--ami-accent);
  background: rgba(255, 255, 255, 0.035);
}
.sidebar-dropdown-item {
  position: relative;
}

#RefSubmenu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  min-width: 220px;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(7, 12, 24, 0.92);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

#sidebar ul li ul li a {
  width: 100%;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 0.1rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  justify-content: flex-start;
}
.footer {
  margin-left: auto;
  padding-left: 1rem;
}

.sidebar-footer-title {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.58);
}
.sidebar-footer-copy {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.34);
  line-height: 1.5;
  font-size: 0.74rem;
}



/* Sidebar打开时的主内容样式 */
@media (min-width: 992px) {
  .sidebar-open .main-content {
    margin-left: 0;
  }

  /* 使Sidebar在大屏幕上默认显示 */
  .sidebar {
    transform: translateY(0);
  }

  .sidebar-toggler {
    display: none;
  }
}


/* 切换按钮样式 */
.sidebar-toggler {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 25;
  min-width: 48px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(9, 14, 28, 0.75);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
}
/* 主内容样式 */
.main-content {
  padding: 112px 20px 24px;
  transition: margin-left 0.3s ease;
  position: relative;
  color: white;
  z-index: 1;

}

.service-item {
  height: 100%;
  border: 1px solid var(--ami-panel-border);
  border-radius: 22px;
  overflow: hidden;
  background: var(--ami-panel);
  box-shadow: var(--ami-shadow);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.service-item:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 183, 57, 0.35);
}

.service-item .overflow-hidden {
  aspect-ratio: 16 / 10;
}

.service-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-item h6 {
  color: var(--ami-text);
}

.content-shell {
  max-width: 1400px;
  margin: 0 auto;
}

.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--ami-panel-border);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(16, 24, 44, 0.88), rgba(8, 12, 24, 0.72));
  box-shadow: var(--ami-shadow);
  backdrop-filter: blur(14px);
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: #ffd687;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.page-description {
  max-width: 56rem;
  margin: 0.75rem 0 0;
  color: var(--ami-muted);
  font-size: 1rem;
}

.page-hero-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meta-pill {
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ami-text);
  font-size: 0.92rem;
  white-space: nowrap;
}

.media-grid {
  row-gap: 1.5rem;
}

.media-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.media-card-link:hover {
  color: inherit;
  text-decoration: none;
}

.media-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.media-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.media-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(248, 183, 57, 0.14);
  color: #ffd687;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.media-card-action {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.media-card-copy {
  margin: 0;
  color: var(--ami-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}


.calendar-container {
  max-width: 105%;
  margin: 20px auto;
  background-color: transparent;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  overflow: hidden;
  padding: 10px;
}
.calendar-header {
  background-color: transparent;
  color: #fff;
  text-align: center;
  padding: 20px;
}
.calendar-header h2 {
  margin: 0;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr); /* 默认7列布局 */
  width: 100%;
}
.day-weekday {
  display: none;
}
.weekday {
  background-color: #1e1e1e;
  height: 50px;
  /* 固定高度 */
  text-align: center;
  position: relative;
  transition: background-color 0.3s;
}
.day {
  height: 130px;
  /* 固定高度 */
  text-align: center;
  position: relative;
  transition: background-color 0.3s;
  border: 1px solid rgba(122, 122, 122, 0.2);; /* 添加外框 */
}
.day:hover {
  background-color: rgba(122, 122, 122, 0.2);
}
.weekday {
  background-color: #333;
  font-weight: bold;
  text-transform: uppercase;
  padding: 10px;
  border-bottom: 2px solid #444;
}
.day-number {
  font-size: 20px;
  margin-bottom: 5px;
}
.day-weekday {
  font-size: 12px;
  position: absolute;
  top: 5px;
  left: 5px;
  color: #ccc;
}
.event {
  font-size: 12px;
  background-color: #444;
  color: #fff;
  border-radius: 5px;
  padding: 2px 5px;
  margin-top: 5px;
}
.prev-month,
.next-month {
  color: #777;
}
.sunTimes,
.moonTimes {
  font-size: 12px;
  position: absolute;
  bottom: 0;
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;

}

@media (max-width: 991px) {
  .sidebar {
    transform: translateY(0);
  }

  .sidebar-shell {
    align-items: flex-start;
    padding: 0.85rem 1rem;
  }

  .sidebar-content {
    position: absolute;
    top: calc(100% + 0.65rem);
    left: 14px;
    right: 14px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(7, 12, 24, 0.94);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .sidebar-open .sidebar-content {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .sidebar-nav-group,
  .sidebar-nav,
  .sidebar-nav-primary,
  .sidebar-nav-secondary {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .sidebar-section-label {
    display: block;
    padding: 0 0.15rem;
  }

  .sidebar-nav-group {
    gap: 0.45rem;
  }

  #sidebar ul li a {
    width: 100%;
    justify-content: flex-start;
    border-radius: 16px;
  }

  #sidebar ul li a.active-link {
    box-shadow: inset 3px 0 0 rgba(248, 183, 57, 0.72);
  }

  .sidebar-nav-group-secondary {
    position: static;
  }

  #RefSubmenu {
    position: static;
    min-width: 0;
    margin-top: 0.35rem;
    padding: 0.35rem;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.03);
  }

  .footer {
    margin-left: 0;
    padding-left: 0;
    padding-top: 0.35rem;
  }

  .main-content {
    margin-left: 0 !important;
    padding-top: 96px;
  }
}

@media (max-width: 767px) {
  .sidebar-brand {
    align-items: center;
  }

  .brand-copy strong {
    font-size: 0.95rem;
  }

  .sidebar-toggler {
    top: 14px;
    right: 14px;
  }

  .main-content {
    padding-inline: 14px;
  }

  .calendar {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .weekday {
    display: none;
  }

  .day-weekday {
    display: block;
  }

  .day {
    min-height: 140px;
    height: auto;
    border-radius: 14px;
  }

  .page-hero {
    padding: 1.2rem;
  }

  .page-hero,
  .page-hero-meta {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .page-hero {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.modal-content {
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
  color: #e0e0e0;
}
.modal-close {
  background-color: #333;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
}
.today {
  border: 2px solid #ffd700;
  /* 粗框，使用金黄色 */
  border-radius: 5px;
  /* 可选：为框添加圆角 */
}
.moonSizer {
  display: block;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 95%;
  min-height: 10%;
  font-size: 0.275em;
  padding: 2%;
  text-align: center;
  z-index: 1;
}
.bottomHalf {
  display: inline-block;
  position: relative;
  width: 48%;
  text-align: right;
  vertical-align: bottom;
  font-family: "Roboto Mono", monospace;
  transition: opacity 350ms;
  opacity: 1;
}
.bottomHalfLeft {
  text-align: left;
}
.moonHolder {
  display: inline-block;
  position: relative;
  width: 6em;
  height: 6em;
  vertical-align: middle;
  margin: 0.5em;
}
.moon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-image: url("../images/moon.png");
  background-size: 100% 100%;
  /* 亮黄色 */
  position: absolute;
  top: 0;
  left: 0;
  /* 用画的月相底图 */
  /* box-shadow: inset 0 0 20px rgba(255, 215, 0, 1); */
}
.shadow {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: absolute;
  top: 0;
  background: #000;
  transform-origin: center left;
}
.moonTimes {
  display: inline-block;
  position: relative;
  z-index: 2;
  vertical-align: middle;
  /* font-size: 6em; */
  /* margin: .2em; */
}
.sunHolder {
  display: inline-block;
  position: relative;
  width: 6em;
  height: 6em;
  vertical-align: middle;
  margin: 0.5em;
}
.sun {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url("../images/sun.png");
  background-size: 100% 100%;
}
.sunTimes {
  display: inline-block;
  position: relative;
  z-index: 2;
  vertical-align: middle;
  /* font-size: 6em; */
  /* margin: .2em; */
}
/* Event Calendar 响应式设计 */
@media (max-width: 768px) {
  .calendar {
    grid-template-columns: repeat(4, 1fr);
    /* 切换为4列布局 */
  }

  .weekday {
    display: none;
    /* 隐藏星期几标题 */
  }

  .day .day-weekday {
    display: block;
    /* 显示星期几缩写 */
  }
}
/* Event Calendar 响应式设计 */
@media (max-width: 480px) {
  .calendar {
    grid-template-columns: repeat(2, 1fr);
    /* 切换为2列布局 */
  }

  .day-number {
    font-size: 16px;
  }

  .event {
    font-size: 10px;
    padding: 1px 3px;
  }
}
