:root{
  /* 可替换背景变量（JS 会修改这行） */
  --bg-img: url('https://images.unsplash.com/photo-1540666191-1e7e5d69357f?q=80&w=1600&auto=format&fit=crop');

  --panel-radius: 20px;
  --gap: 20px;
  --panel-bg: rgba(12,16,20,0.45); /* 深色磨砂底，确保文字可见（避免白底导致白字不可见） */
  --panel-border: rgba(255,255,255,0.06);
  --text: #ffffff;
  --muted: rgba(255,255,255,0.7);
}

/* Reset */
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family: Inter, "PingFang SC", "Noto Sans CJK SC", system-ui, -apple-system, Arial;
  color:var(--text);
  /* 背景：深色渐变叠加在图片上，图片找不到时也不会出现全白 */
  background:
    linear-gradient(rgba(6,10,14,0.6), rgba(6,10,14,0.6)),
    var(--bg-img) center/cover no-repeat;
  -webkit-font-smoothing:antialiased;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 14px;
}

/* 主容器：与原设计一致（3 列，右侧跨两行，底部跨两列） */
.board{
  width: min(1400px, 98vw);
  height: min(820px, 92vh);
  display: grid;
  grid-template-columns: 38% 34% 28%;
  grid-template-rows: 55% 45%;
  gap: var(--gap);
}

/* 通用面板 */
.panel{
  position: relative;
  border-radius: var(--panel-radius);
  padding: 15px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  overflow: hidden;
}

/* subtle highlight overlay */
.panel::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));
}

/* 布局区域 */
.left { grid-column: 1; grid-row: 1; }
.center { grid-column: 2; grid-row: 1; }
.right { grid-column: 3; grid-row: 1 / span 2; }
.bottom { grid-column: 1 / span 2; grid-row: 2; }

/* 时间样式 */
.date{ 
  color:var(--muted); 
  font-size:40px; 
  margin-bottom:8px; 
}
.date span + span{ 
  margin-left:8px; 
  font-weight:600; 
  font-size:22px; 
}
.time {
  font-size: 92px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
}

.time-part {
  min-width: 24px;
  text-align: center;
  padding: 0 2px;
  transition: opacity 0.4s ease-in-out; /* 使用 ease-in-out 曲线 */
}
.weekday{ 
  margin-top:8px; 
  color:var(--muted); 
  font-size: 20px;
}

.weekday{ 
  margin-top:8px; 
  color:var(--muted); 
  font-size: 20px;
  text-align: left;
}
/* 每日英语样式 */
.daily-en {
  font-size: 1.5em;
  margin-bottom: 8px;
  color: var(--text);
  font-style: italic;
  text-align: center;
  margin-top: 5px;
  /* margin-left: 7px; */
}

.daily-zh {
  font-size: 1.3em;
  color: var(--muted);
  text-align: center;
  margin-top: 5px;
  /* margin-left: 7px; */
  margin-bottom: 8px;
}

.yiyan-container {
  padding: 5px;
  line-height: 1.5;
  margin-top: 40px;
  border: #0aa83f4f 2px solid;
  border-radius: var(--panel-radius);
}

/* 响应式（窄屏时堆叠） */
@media (max-width: 980px){
  .board{
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: 96vh;
  }
  .right{ grid-column: 1; grid-row: auto; }
  .bottom{ grid-column: 1; grid-row: auto; }
  .time{ font-size:56px; }
  .weather-temp {
    font-size: 36px;
  }
  .forecast-list {
    flex-wrap: wrap;
  }
  .forecast-item {
    flex-basis: calc(50% - 5px);
    margin-bottom: 5px;
  }
  .yiyan-text {
    font-size: 14px;
  }
}
/* 标题 */

.update-time {
    font-size: 12px;
    color: var(--muted);
    margin-left: 15px;
    margin-top: -20px;
    font-weight: normal;
    white-space: nowrap;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-title{ font-size:30px; font-weight:700; margin-bottom:8px; }

.news-hot {
  font-size: 0.85em;
  margin-left: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.hot-high {
  color: #ff4d4f;
  background-color: rgba(255, 77, 79, 0.1);
}

.hot-medium {
  color: #faad14;
  background-color: rgba(250, 173, 20, 0.1);
}

.hot-low {
  color: #1890ff;
  background-color: rgba(24, 144, 255, 0.1);
}

/* 悬停效果 */
.news-item:hover .news-hot {
  opacity: 0.8;
}

/* 新闻模块：上下渐变遮罩与无缝向上滚动 */
.news-list {
  position: relative;
  height: calc(100% - 48px);
  margin-top: 20px;
  overflow: hidden;
}

.news-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 10px;
}

/* 顶部淡入遮罩 */
/* .news-list::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 60px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(12,16,20,0.85) 0%, rgba(12,16,20,0.0) 100%);
} */

/* 底部淡出遮罩 */
/* .news-list::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 60px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(to top, rgba(12,16,20,0.85) 0%, rgba(12,16,20,0.0) 100%);
} */

/* 鼠标悬停暂停动画 */
/* .news-list:hover .news-inner {
  animation-play-state: paused;
} */

/* 新闻项样式和悬停动画 */
.news-item {
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.03);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.news-item.show {
  opacity: 1;
  transform: translateY(0);
}

.news-item:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border-color: rgba(255,255,255,0.1);
}


/* 日历 */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.calendar-month {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-weekday {
  padding: 8px 0;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
  font-size: 14px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.cal-day {
  padding: 8px 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.cal-day.today {
  background: #177dd5;
  color: #ffffff;
  font-weight: 700;
}

.cal-day-prev,
.cal-day-next {
  opacity: 0.4;
}
.cal-day-next {
  opacity: 0.4;
}

/* 响应式（窄屏时堆叠） */
@media (max-width: 980px){
  .board{
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: 96vh;
  }
  .right{ grid-column: 1; grid-row: auto; }
  .bottom{ grid-column: 1; grid-row: auto; }
  .time{ font-size:56px; }
  .weather-temp {
    font-size: 36px;
  }
  .forecast-list {
    flex-wrap: wrap;
  }
  .forecast-item {
    flex-basis: calc(50% - 5px);
    margin-bottom: 5px;
  }
  .yiyan-text {
    font-size: 14px;
  }
  .news-inner {
    animation-duration: 30s;
  }
  .news-item {
    animation-duration: 6s;
  }
}

/* 天气模块样式 */
#weatherInfo {
  height: calc(100% - 40px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.weather-main {
  text-align: center;
  padding: 10px 0;
}

.temp-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}
.weather-icon img {
  margin-top: 5px;
  margin-right: -10px;
  width: 80px;
  height: 80px;
}

.weather-temp {
  font-size: 68px;
  font-weight: 700;
  margin: 0px 0;
}

.weather-city {
  font-size: 30px;
  color: var(--muted);
  margin-top: -10px;
  text-decoration: dashed;
}

.weather-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.weather-item {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  display: flex;
  justify-content: space-between;
}

.weather-label {
  color: var(--muted);
}

.weather-value {
  font-weight: 600;
}

/* 天气预报样式 */
.weather-forecast {
  margin-top: 10px;
  margin-bottom: 10px;
}

.forecast-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.forecast-list {
  display: flex;
  justify-content: space-between;
  gap: 5px;
}

.forecast-item {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  background: rgba(113, 113, 113, 0.159);
}

.forecast-day {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}

.forecast-temp {
  font-size: 16px;
  margin: 3px 0;
}

.forecast-weather {
  font-size: 14px;
  color: var(--muted);
}

/* 更新时间样式 */
.weather-update-time {
  position: absolute;
  top: -45px;
  right: 0;
  font-size: 12px;
  color: var(--muted);
}

/* 响应式（窄屏时堆叠） */
@media (max-width: 980px){
  .board{
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: 96vh;
  }
  .right{ grid-column: 1; grid-row: auto; }
  .bottom{ grid-column: 1; grid-row: auto; }
  .time{ font-size:56px; }
  .weather-temp {
    font-size: 36px;
  }
  .forecast-list {
    flex-wrap: wrap;
  }
  .forecast-item {
    flex-basis: calc(50% - 5px);
    margin-bottom: 5px;
  }
}