

/*非tw css部分*/
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.70), rgba(255,255,255,0.55));
  backdrop-filter: blur(6px);
}
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.thumb-mask {
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}

/* 自定义滚动条样式 - 兼容 Chrome/Safari/Firefox */
.scrollbar-custom {
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: thin;
}
/* WebKit 浏览器（Chrome、Safari、Edge） */
.scrollbar-custom::-webkit-scrollbar {
  width: 8px;
}
.scrollbar-custom::-webkit-scrollbar-track {
  background: transparent;
}
.scrollbar-custom::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.scrollbar-custom::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
  background-clip: content-box;
}

/* 缩略图响应式大小 */
.thumb-item {
  max-width: 60px;
}
@media (min-width: 640px) {
  .thumb-item {
    max-width: 150px;
  }
}

/* 虚线纯文 */
.dashed-list li {
  padding-bottom: 1rem;
  border-bottom: 1px dashed #cbd5e1;
}
/* 单列时，隐藏最后一个的虚线 */
.dashed-list li:last-child {
  border-bottom: none;
}
/* 两列时，隐藏最后两个的虚线 */
@media (min-width: 768px) {
  .dashed-list li:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

/* 侧边栏粘性定位 */
aside {
  position: relative;
}

aside > div {
  position: sticky;
  top: 32px;
  height: fit-content;
}

/* 导航样式 */
.nav-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  color: #374151;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.875rem;
  height: 2.5rem;
}

.nav-link:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s;
}

.nav-arrow svg {
  width: 1rem;
  height: 1rem;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  transition: all 0.2s;
  z-index: 50;
  padding: 0.5rem 0;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* PC端：hover时箭头旋转并保持 */
@media (min-width: 769px) {
  .nav-item:hover .nav-arrow {
    transform: rotate(180deg);
  }
}

/* 移动端：箭头不旋转，增大点击区域 */
@media (max-width: 768px) {
  /* 移动端取消 nav-link 的 hover 背景色 */
  .nav-link:hover {
    background-color: transparent;
  }
  
  .nav-item:hover .nav-arrow {
    transform: none;
  }
  
  .nav-arrow {
    position: relative;
    width: 2rem;
    height: 2rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
  }
  
  /* 点击时给箭头背景色 */
  .nav-arrow:active {
    background-color: #f3f4f6;
  }
  
  .nav-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
  }
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.875rem;
  height: auto;
}

.dropdown-item:not(:last-child) {
  margin-bottom: 0.25rem;
}

.dropdown-item:hover {
  background-color: #f9fafb;
  color: #111827;
}

.mobile-menu-toggle {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #374151;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mobile-menu-toggle:hover {
  background-color: #f3f4f6;
}

.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  height: 2.5rem;
  background-color: #f9fafb;
  border-radius: 0.375rem;
  color: #374151;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
  border: 1px solid #e5e7eb;
}

.search-btn:hover {
  background-color: #f3f4f6;
}

.search-panel {
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid #e5e7eb;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.search-panel.show {
  max-height: 100px;
  opacity: 1;
  pointer-events: auto;
}
.search-panel.hidden { display: none; }
.search-panel.mobile-search {
  position: static;
  top: auto;
  z-index: auto;
  max-height: none;
  opacity: 1;
  transform: none;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  transition: none;
  pointer-events: auto;
  overflow: hidden;
}
.search-panel.mobile-search .search-close {
  display: none;
}

.search-panel-inner {
  max-width: 80rem;
  width: 100%;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .search-panel-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .search-panel-inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  min-height: 2.5rem; /* 固定容器可视高度 */
  transition: border-color 0.2s;
}

.search-input-wrap:focus-within {
  border-color: #d1d5db;
}

.search-input {
  flex: 1;
  background: transparent;
  outline: none;
  border: none;
  color: #111827;
  font-size: 0.95rem;
  line-height: 1.5rem; /* 与容器视觉行高一致 */
  -webkit-appearance: none;
  appearance: none;
  height: 1rem; /* 强制控件高度 */
  padding-block: 0.375rem; /* 增加可见行高 */
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  box-shadow: none;
}

/* Safari/Chrome 默认 search 内边饰影响高度，移除 */
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
  display: none;
}

.search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  color: #6b7280;
  transition: background-color 0.2s;
}

.search-close:hover { background: #f3f4f6; }

/* PC端隐藏关闭按颁 */
.search-panel:not(.mobile-search) .search-close {
  display: none;
}

/* 移动端搜索面板：全宽 */
@media (max-width: 768px) {
  .search-panel-inner { 
    padding: 0;
  }
  .search-panel.mobile-search{
    border-bottom:none;
  }
  .search-input { font-size: 1rem; }
  #search-toggle-mobile { display: none; }
}

.subscribe-btn {
  padding: 0.5rem 1rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.subscribe-btn:hover {
  background-color: #2563eb;
}

/* 移动端样式 */
@media (max-width: 768px) {
  .nav-container {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 20rem;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    transition: left 0.3s;
    z-index: 100;
    overflow-y: auto;
  }

  .nav-container.mobile-open {
    left: 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-item {
    position: static;
    width: 100%;
    padding: 0 10px;
  }

  .nav-link {
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    width: 100%;
    border-radius: 0;
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    display: none;
    margin-top: 0.5rem;
    margin-left: 1rem;
  }

  .nav-dropdown.mobile-open {
    display: block;
  }

  .dropdown-item {
    padding: 0.5rem 0;
    font-size: 0.875rem;
  }

  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    display: none;
    pointer-events: auto; /* 遮罩层接收点击事件 */
  }

  .mobile-overlay.mobile-open {
    display: block;
  }

  /* 确保导航容器在遮罩层之上 */
  .nav-container {
    z-index: 100;
    pointer-events: auto; /* 导航容器接收所有点击事件 */
  }
}

/* PC端样式 */
@media (min-width: 769px) {
  .nav-container {
    display: flex !important;
  }
}
.calendartop,
.calendar {
    width: 100%;
    text-align: center;
}

.calendartop {
    line-height: 1.6;
}

.calendar {
    line-height: 2;
}

.calendartop tbody tr:first-child td a {
    padding: .25em .65em;
}

.calendar tbody tr:first-child td {
    background-color: rgb(241 245 249);
}

.calendar tbody tr:first-child td:first-child {
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
}

.calendar tbody tr:first-child td:last-child {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

.calendar .day,
.calendar td a{
    position: relative;
    color: #3b82f6;
}
.calendar .day{
    color: #b69206;
}
.calendar .day::after,
.calendar td a::after {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    position: absolute;
    left: calc(50% - 12px);
    top: calc(50% - 12px);
    border: 1px solid #3b82f6;
    border-radius: 100%;
}
.calendar .day::after{
    border: 1px solid #ffd52d
}
/* 暗夜模式样式 */
body.dark-mode .logo{filter: invert(1) brightness(2) grayscale(100%);}
body.dark-mode {
  background-color: #1a1a1a;
  color: #e5e7eb;
}
@media (max-width: 768px) {
  body.dark-mode .nav-container {
    background: #2d2d2d;
  }

  body.dark-mode .nav-link {
    border-bottom-color: #3d3d3d;
  }

  body.dark-mode .mobile-menu-toggle {
    background-color: #3d3d3d !important;
    border-color: #4d4d4d !important;
    color: #d1d5db !important;
  }

  body.dark-mode .mobile-menu-toggle:hover {
    background-color: #4d4d4d !important;
  }
}
body.dark-mode header {
  background-color: rgba(26, 26, 26, 0.8);
  border-color: #333333;
}

body.dark-mode .nav-link {
  color: #d1d5db;
}

body.dark-mode .mobile-menu-toggle {
  color: #d1d5db;
}

body.dark-mode .mobile-menu-toggle:hover {
  background-color: #3d3d3d;
}

body.dark-mode .nav-link:hover {
  background-color: #2d2d2d;
  color: #f3f4f6;
}

body.dark-mode .nav-dropdown {
  background-color: #2d2d2d;
  border-color: #444444;
}

body.dark-mode .dropdown-item {
  color: #d1d5db;
}

body.dark-mode .dropdown-item:hover {
  background-color: #3d3d3d;
}

body.dark-mode .search-btn {
  background-color: #2d2d2d;
  border-color: #444444;
  color: #d1d5db;
}

body.dark-mode .search-btn:hover {
  background-color: #3d3d3d;
}

body.dark-mode section,
body.dark-mode .bg-white {
  background-color: #2d2d2d;
  border-color: #444444;
  color: #e5e7eb;
}

body.dark-mode .text-slate-600 {
  color: #a1a5b0;
}

body.dark-mode .text-slate-700 {
  color: #d1d5db;
}

body.dark-mode .text-slate-500 {
  color: #9ca3af;
}

body.dark-mode .border-slate-200 {
  border-color: #444444;
}

body.dark-mode .border-slate-100 {
  border-color: #3d3d3d;
}

body.dark-mode .border-slate-300 {
  border-color: #4d4d4d;
}

body.dark-mode .divide-slate-100 > * {
  border-color: #3d3d3d !important;
}

body.dark-mode .dashed-list li {
  border-bottom-color: #4d4d4d;
}

body.dark-mode .hover\:shadow-md:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

body.dark-mode .shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
}

body.dark-mode .shadow-card {
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .bg-slate-200 {
  background-color: #3d3d3d;
}
body.dark-mode .bg-slate-50 {
  background-color: #1a1a1a;
}
body.dark-mode .bg-gray-100 {
  background-color: #1a1a1a;
}
body.dark-mode .border-gray-100 {
  border-color: #444444;
}
body.dark-mode .border-gray-200 {
  border-color: #444444;
}
body.dark-mode .bg-slate-100 {
  background-color: #1e1e1e;
}
body.dark-mode .text-gray-700 {
  color: #d1d5db;
}
body.dark-mode .text-slate-900{
  color: #d1d5db;
}
body.dark-mode .hover\:bg-slate-50:hover {
  background-color: #3d3d3d;
}

body.dark-mode .hover\:bg-slate-100:hover {
  background-color: #3d3d3d;
}

/* NewsPro 分页样式 */
.pagebar-detail a,
.pagebar-detail span {
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.2s;
  text-decoration: none;
}

.pagebar-detail a {
  background-color: #f1f5f9;
  color: #64748b;
}

.pagebar-detail a:hover {
  background-color: #e2e8f0;
}

.pagebar-detail span {
  background-color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-weight: 600;
  color: #1e293b;
}

/* 暗夜模式分页样式 */
body.dark-mode .pagebar-detail a {
  background-color: #3d3d3d;
  color: #a8a8a8;
}

body.dark-mode .pagebar-detail a:hover {
  background-color: #4a4a4a;
}

body.dark-mode .pagebar-detail span {
  background-color: #2a2a2a;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  color: #e5e5e5;
}

body.dark-mode .glass {
  background: linear-gradient(180deg, rgba(45, 45, 45, 0.70), rgba(45, 45, 45, 0.55));
}

body.dark-mode .scrollbar-custom {
  scrollbar-color: #5d5d5d transparent;
}

body.dark-mode .scrollbar-custom::-webkit-scrollbar-thumb {
  background: #5d5d5d;
}

body.dark-mode .scrollbar-custom::-webkit-scrollbar-thumb:hover {
  background: #7d7d7d;
}

body.dark-mode #prevBtn,
body.dark-mode #nextBtn {
  background-color: rgba(45, 45, 45, 0.85) !important;
  color: #d1d5db;
}

body.dark-mode #prevBtn:hover,
body.dark-mode #nextBtn:hover {
  background-color: #2d2d2d !important;
}

body.dark-mode .search-panel {
  background: rgba(26, 26, 26, 0.95);
  border-bottom-color: #444444;
}

body.dark-mode .search-panel.mobile-search {
  background: #1a1a1a;
}


body.dark-mode #search-input::placeholder {
  color: #9ca3af !important;
}

body.dark-mode .search-input-wrap {
  background: #3d3d3d !important;
  border-color: #4d4d4d !important;
}

body.dark-mode .search-input-wrap:focus-within {
  border-color: #5d5d5d !important;
}

body.dark-mode .search-input-wrap svg {
  color: #6b7280 !important;
}

body.dark-mode .nav-container {
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .nav-dropdown {
  background-color: #3d3d3d;
  border-color: #4d4d4d;
}

body.dark-mode footer {
  border-color: #444444;
}

body.dark-mode input {
  background-color: #3d3d3d;
  border-color: #444444;
  color: #e5e7eb;
}

body.dark-mode button {
  color: #e5e7eb;
}

/* 暗夜模式图标切换 */
body.dark-mode .dark-icon {
  display: inline !important;
}

body.dark-mode .light-icon {
  display: none !important;
}