:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* 交互元素的鼠标样式 */
.platform-item, .website-item {
  cursor: pointer;
}

/* 社交平台和个人网站链接的手型鼠标 */
.platform-item, .website-item {
  cursor: pointer !important;
}

/* 卡片悬停效果 */
.card-hover {
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.card-hover:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* 主容器样式 */
.container {
  min-height: 100vh;
  width: 100%;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
  overflow: visible; /* 确保固定定位的页脚可见 */
  margin-bottom: 0;
  padding-bottom: 16px; /* 保持正常的底部内边距 */
}

/* 背景图容器 */
.bg-container {
  position: absolute;
  inset: 0;
  z-index: -10;
}

.bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
   background-repeat: no-repeat;
   /* 保持原始滤镜，但调整为更轻的设置 */
   filter: brightness(1.0) contrast(1.0);
   transition: opacity 2000ms ease-in-out, transform 2000ms ease-in-out;
}

/* 渐变覆盖层 - 完全移除以避免背景变暗 */
.bg-overlay {
  display: none; /* 完全隐藏覆盖层 */
}

/* 内容网格 */
.content-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 24px;
  }
  .content-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

/* 卡片样式 */
.card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 16px;
}

/* 卡片内容样式 */
.card-title {
  display: flex;
  align-items: center;
  color: white;
  font-weight: bold;
  margin-bottom: 12px;
}

.card-title-icon {
  margin-right: 8px;
}

/* 用户卡片样式 */
.user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.user-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid white;
  margin-bottom: 16px;
  overflow: hidden;
}

.user-avatar-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom right, #60a5fa, #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar-text {
  color: white;
  font-size: 24px;
  font-weight: bold;
}

.user-name {
  color: white;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}

.user-bio {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  text-align: center;
}

/* 网格布局 */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

/* 动态网格，支持1-10列 */
.grid-n {
  display: grid;
  gap: 12px;
}

.grid-1 { grid-template-columns: repeat(1, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.grid-7 { grid-template-columns: repeat(7, 1fr); }
.grid-8 { grid-template-columns: repeat(8, 1fr); }
.grid-9 { grid-template-columns: repeat(9, 1fr); }
.grid-10 { grid-template-columns: repeat(10, 1fr); }

@media (min-width: 768px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .grid-5 {
    grid-template-columns: repeat(5, 1fr);
  }
  .grid-n {
    grid-template-columns: repeat(5, 1fr);
  }
  .grid-6 { grid-template-columns: repeat(6, 1fr); }
  .grid-7 { grid-template-columns: repeat(7, 1fr); }
  .grid-8 { grid-template-columns: repeat(8, 1fr); }
  .grid-9 { grid-template-columns: repeat(9, 1fr); }
  .grid-10 { grid-template-columns: repeat(10, 1fr); }
}

@media (max-width: 767px) {
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-5 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-n {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-5 { grid-template-columns: 1fr 1fr; }
  .grid-6 { grid-template-columns: 1fr 1fr; }
  .grid-7 { grid-template-columns: 1fr 1fr; }
  .grid-8 { grid-template-columns: 1fr 1fr; }
  .grid-9 { grid-template-columns: 1fr 1fr; }
  .grid-10 { grid-template-columns: 1fr 1fr; }
}

/* 平台图标样式 */
.platform-item {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 12px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.platform-item:hover {
  background: rgba(255, 255, 255, 0.3);
}

.platform-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.platform-name {
  color: white;
  font-size: 14px;
}

/* 每日一句样式 */
.quote-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.quote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  font-weight: bold;
  margin-bottom: 12px;
}

.quote-title {
  display: flex;
  align-items: center;
}

.quote-icon {
  margin-right: 8px;
}

.refresh-btn {
  color: white;
  background: none;
  border: none;
  padding: 4px;
  transition: color 0.3s ease;
}

.refresh-btn:hover {
  color: #facc15;
}

.quote-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quote-text {
  color: white;
  font-style: italic;
  text-align: center;
  margin-bottom: 16px;
}

.quote-date {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  text-align: right;
}

/* 日历样式 */
.calendar-container {
  display: flex;
  flex-direction: column;
}

.calendar-header {
  display: flex;
  align-items: center;
  color: white;
  font-weight: bold;
  margin-bottom: 16px;
}

.calendar-icon {
  margin-right: 8px;
}

.time-display {
  text-align: center;
  margin-bottom: 16px;
}

.current-date {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  margin-bottom: 4px;
  font-weight: bold;
}

.lunar-date {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  font-weight: 500;
}

.lunar-date.holiday-highlight {
  color: #ff6b6b; /* 节假日时显示红色 */
  font-weight: bold;
  animation: holiday-pulse 1s infinite alternate; /* 添加轻微脉冲效果 */
  font-size: 18px;
}

/* 回到今天按钮样式 */
.back-to-today-btn {
  background: rgba(59, 130, 246, 0.2);
  color: white;
  border: 1px solid rgba(59, 130, 246, 0.5);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
  backdrop-filter: blur(10px);
}

.back-to-today-btn:hover {
  background: rgba(59, 130, 246, 0.4);
  border-color: rgba(59, 130, 246, 0.8);
  transform: translateY(-1px);
}

.back-to-today-btn:active {
  transform: translateY(0);
}

@keyframes holiday-pulse {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

/* 宜忌信息样式 */
.yi-ji-info {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.yi-section, .ji-section {
  margin: 4px 0;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.yi-section {
  border-left: 3px solid #10b981;
}

.ji-section {
  border-left: 3px solid #ef4444;
}

.yi-ji-info {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.3;
  height: 95px; /* 固定高度，设置为80px */
  overflow: hidden; /* 隐藏超出部分 */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.yi-section, .ji-section {
  margin: 3px 0;
}

.yi-section {
  color: #90ee90; /* 宜事项显示绿色 */
}

.ji-section {
  color: #ffcccb; /* 忌事项显示红色 */
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.weekday-item {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  text-align: center;
  padding: 4px;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.day-item {
  color: white;
  font-size: 14px;
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer; /* 鼠标悬停时显示为小手 */
  transition: all 0.2s ease; /* 添加过渡效果 */
  background: rgba(255, 255, 255, 0.1); /* 添加默认背景 */
}

.day-item:hover {
  background: rgba(59, 130, 246, 0.3); /* 悬停时的背景色 */
  transform: scale(1.05); /* 悬停时稍微放大 */
}

.day-item.today {
  background: #3b82f6;
  color: white;
}

/* 节假日高亮样式 */
.day-item.holiday {
  background: #ff4757 !important; /* 红色背景 */
  color: white !important;
  font-weight: bold;
  position: relative;
}

.day-item.holiday::after {
  content: "假";
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ff4757;
  color: white;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* 补班日高亮样式 */
.day-item.workday {
  background: #4a90e2 !important; /* 蓝色背景 */
  color: white !important;
  font-weight: bold;
  border: 2px dashed #ffffff !important; /* 虚线边框表示需要补班 */
  position: relative;
}

.day-item.workday::after {
  content: "补";
  position: absolute;
  top: -2px;
  right: -2px;
  background: #4a90e2;
  color: white;
  font-size: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 1px solid white;
}

/* 节假日文字标识 */
.holiday-badge {
  display: none; /* 隐藏HTML方式的标识 */
}

/* 日期选中样式 */
.day-item.day-selected {
  background: #3b82f6;
  color: white;
  transform: scale(1.05);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* 补班日文字标识 */
.workday-badge {
  display: none; /* 隐藏HTML方式的标识 */
}

/* 当前日期样式（今天） */
.day-item.today {
  background: #3b82f6;
  color: white;
  animation: today-pulse 1s infinite alternate;
}

@keyframes today-pulse {
  from { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
  to { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
}



.day-item.day-selected {
  background: #3b82f6; /* 使用与当前日期相同的蓝色背景 */
  color: white;
  font-weight: bold;
  transform: scale(1.1); /* 稍微放大以突出选中状态 */
  transition: all 0.2s ease;
}

/* 搜索框样式 */
.search-form {
  width: 100%;
}

.search-input-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 8px;
  display: flex;
  align-items: center;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  padding: 8px 16px;
  font-size: 16px;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.clear-btn {
  color: white;
  background: none;
  border: none;
  padding: 4px;
  transition: color 0.3s ease;
}
.clear-btn:hover {
  color: #d1d5db;
}

.search-btn {
  background: linear-gradient(to right, #3b82f6, #a78bfa);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: opacity 0.3s ease;
}

.search-btn:hover {
  opacity: 0.9;
}

/* 页脚样式 - 固定在浏览器视窗底部 */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  padding: 12px 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-sizing: border-box;
}

/* 访问统计样式 */
.stats-container {
  display: flex;
  flex-direction: column;
}

.stats-header {
  display: flex;
  align-items: center;
  color: white;
  font-weight: bold;
  margin-bottom: 16px;
}

.stats-icon {
  margin-right: 8px;
}

.stats-grid {
  display: flex;
  justify-content: space-around;
}

.stat-item {
  text-align: center;
}

.stat-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-bottom: 8px;
}

.stat-value-today {
  color: #ffa500;
  font-size: 24px;
  font-weight: bold;
}

.stat-value-total {
  color: #4a90e2;
  font-size: 24px;
  font-weight: bold;
}

/* 微信公众号样式 */
.wechat-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wechat-header {
  display: flex;
  align-items: center;
  color: white;
  font-weight: bold;
  margin-bottom: 16px;
  width: 100%;
}

.wechat-icon {
  margin-right: 8px;
}

.qrcode-container {
  background: white;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.qrcode-image {
  width: 100%;
  height: auto;
  max-width: 120px;
  max-height: 120px;
  display: block;
  margin: 0 auto;
}

/* 替代原来的占位符样式 */
.qrcode-placeholder {
  display: none; /* 隐藏原来的占位符 */
}

.wechat-note {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  text-align: center;
  margin-bottom: 16px;
}

/* 访问统计样式 */
.stats-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-header {
  display: flex;
  align-items: center;
  color: white;
  font-weight: bold;
  margin-bottom: 12px;
  width: 100%;
}

.stats-icon {
  margin-right: 8px;
}

.stats-grid {
  display: flex;
  justify-content: space-around;
}

.stat-item {
  text-align: center;
}

.stat-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin-bottom: 4px;
}

.stat-value-today {
  color: #ffa500;
  font-size: 18px;
  font-weight: bold;
}

.stat-value-total {
  color: #4a90e2;
  font-size: 18px;
  font-weight: bold;
}

/* 列跨设置 */
.col-span-1 {
  grid-column: span 1;
}

.col-span-2 {
  grid-column: span 2;
}

.col-span-3 {
  grid-column: span 3;
}

.col-span-full {
  grid-column: 1 / -1;
}

@media (min-width: 1024px) {
  .lg\:col-span-1 {
    grid-column: span 1;
  }
  .lg\:col-span-2 {
    grid-column: span 2;
  }
  .lg\:col-span-3 {
    grid-column: span 3;
  }
  .lg\:col-span-full {
    grid-column: 1 / -1;
  }
}

/* 雪花效果样式 - 纯白色，但降低透明度以减少视觉干扰 */
.snowflake {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  z-index: -5; /* 放在背景层之上，但在内容之下 */
  opacity: 0.6; /* 降低透明度以减少对背景的干扰 */
}

/* 雪花动画关键帧 */
@keyframes snowfall {
  0% {
    transform: translateY(-10%) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(110vh) translateX(var(--sway)) rotate(var(--rotation));
    opacity: 0;
  }
}