:root {
  --primary-color: #6574ec;
  --secondary-color: #6a5acd;
  --text-color: #2c3e50;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, 'Microsoft YaHei', sans-serif;
}

body {
  background: rgba(101, 116, 236, 0.08);
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.time-container {
  display: flex;
  align-items: baseline;
  gap: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gregorian {
  font-size: 1.4em;
  color: var(--secondary-color);
  font-weight: 500;
}

.holiday {
  color: #e74c3c;
  font-size: 1.4em;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

.signature {
  flex: 1;
  text-align: right;
  font-style: italic;
  color: var(--primary-color);
  max-width: 500px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.9);
}

.search-box {
  text-align: center;
  margin: 40px 0;
}

#searchInput {
  width: 60%;
  max-width: 600px;
  padding: 15px 25px;
  border: 2px solid var(--primary-color);
  border-radius: 30px;
  font-size: 16px;
  outline: none;
  transition: all 0.3s;
}

#searchInput:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 10px rgba(106, 90, 205, 0.3);
}

.category {
  margin: 30px 0;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.category-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 15px 25px;
  font-size: 1.2em;
}

.links-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  padding: 20px;
}

.link-item {
  padding: 12px 20px;
  border-radius: 8px;
  background: #f8f9fa;
  transition: all 0.2s;
  text-decoration: none;
  color: #333;
  display: flex;
  align-items: center;
}

.link-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  background: var(--primary-color);
  color: white;
}

.link-item::before {
  content: '➤';
  margin-right: 10px;
  color: var(--secondary-color);
}

.link-item:hover::before {
  color: white;
}

footer {
    color: #555; /* 更深的文字颜色 */
    padding: 20px 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 右侧侧边栏 */
.sidebar {
  position: fixed;
  top: 80px;
  right: 0;
  width: 125px;
  background: linear-gradient(0deg, rgba(101,116,236,0.96) 0%, rgba(106,90,205,0.96) 100%);
  /* border-left: 1px solid #eee; */
  box-shadow: -2px 0 12px rgba(106,90,205,0.10);
  z-index: 1000;
  padding: 20px 0 20px 10px;
  height: auto;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 12px 0 0 12px;
}
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar li {
  margin: 12px 0;
}
.sidebar a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.sidebar a:hover {
  color: #ffe066;
}

/* 旋转动画风格的折叠按钮 */
.toggle-btn {
  background: none;
  border: none;
  font-size: 1em;
  cursor: pointer;
  margin-left: 8px;
  color: #BEB8E0;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}
.toggle-btn:hover {
  color: #BEB8E0;
}
.toggle-btn.expanded {
  transform: rotate(90deg);
  color: #BEB8E0;
}

/* 栏目内容折叠动画 */
.links-container {
  transition: max-height 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s;
  overflow: hidden;
  max-height: 1000px;
  opacity: 1;
}
.links-container.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* 适配移动端 */
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    text-align: center;
  }

  .signature {
    text-align: center;
    max-width: 100%;
  }

  .time-container {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  #searchInput {
    width: 80%;
  }
}