/* 加载动画容器样式 */
#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: #020409;
  background-image: radial-gradient(100vw at 70% 120%, rgba(33, 39, 80, 1) 10%, #020409 100%);
  background-attachment: fixed; /* 背景固定，不随内容滚动 */
  background-repeat: no-repeat; /* 背景不重复 */
} 

#universe {
  position: absolute;;
  width: 100%;
  height: 100%;
}

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


/* Sidebar样式 */
.sidebar {
  position: fixed;
  top: 20px;
  left: 0;
  width: 200px;
  height: 100vh;
  color: gray;
  transition: transform 0.3s ease;
  transform: translateX(-100%);
  z-index: 4;
  overflow-y: auto;
  background-image: radial-gradient(100vw at 70% 120%, rgba(33, 39, 80, 0.7) 10%, rgba(2, 4, 9, 0.7) 100%);
  /* 允许侧边栏内容垂直滚动 */
}
/* Sidebar显示时的位置 */
.sidebar-open .sidebar {
  transform: translateX(0);
  
}
/* 侧边栏内容 */
.sidebar-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
}
.sidebar ul {
  padding: 0;
  margin: 0 auto;
}
/* logo配置 */
#sidebar .logo {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}
/* logo配置 */
#sidebar .logo span {
  display: block;
}
/* Sidebar下的超连结样式配置 */
#sidebar ul li a {
  padding: 10px 0;
  display: block;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
#sidebar ul li a:hover {
  color: #f8b739;
  text-decoration: none;
}
#sidebar ul li.active > a {
  background: transparent;
  color: #f8b739;
  text-decoration: none;
}
#sidebar ul li ul li a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
}



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

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


/* 切换按钮样式 */
.sidebar-toggler {
  position: absolute;
  position: fixed;
  /* 改为 fixed，使按钮固定在视窗 */
  top: 20px;
  left: 20px;
  z-index: 5;
}
/* 主内容样式 */
.main-content {
  padding: 20px;
  transition: margin-left 0.3s ease;
  position: relative;
  color: white;

}
.footer {
  margin-top: auto;
}


.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;
}
.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;
  }
}
