/* Common styles for both PC and H5 */

/* Material Symbols Outlined Font */
/* fallback */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v303/kJEPBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oDMzBwG-RpA6RzaxHMPdY40KH8nGzv3fzfVJO1Q.woff2) format('woff2');
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Public Sans Font */
/* vietnamese */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNJfJ7Cww.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNIfJ7Cww.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNGfJ4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 500;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNJfJ7Cww.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 500;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNIfJ7Cww.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 500;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNGfJ4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNJfJ7Cww.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNIfJ7Cww.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNGfJ4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 900;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNJfJ7Cww.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 900;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNIfJ7Cww.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 900;
  src: url(https://fonts.gstatic.com/s/publicsans/v21/ijwRs572Xtc6ZYQws9YVwnNGfJ4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Common body styles */
body {
  font-family: "Noto Sans SC", "Public Sans", sans-serif;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Glass effect styles */
.glass-icon {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Dark mode glass effect */
.dark .glass-icon {
  background: rgba(30, 39, 50, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Shimmer animation for glass effect */
.glass-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.glass-icon:hover::before {
  opacity: 1;
  animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* Category icon styles */
.category-icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(246, 247, 248, 0.8) 100%);
  border: 1.5px solid rgba(10, 48, 105, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dark mode category icon */
.dark .category-icon {
  background: linear-gradient(135deg, rgba(30, 39, 50, 0.7) 0%, rgba(26, 32, 44, 0.8) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.category-icon::after {
  display: none;
}

.category-icon img {
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

/* Category icon hover effect */
.category-icon:hover {
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(230, 240, 255, 0.5) 100%);
  border-color: rgba(10, 48, 105, 0.4);
  box-shadow: 0 6px 16px rgba(10, 48, 105, 0.12), 0 0 0 1px rgba(10, 48, 105, 0.1) inset;
}

.dark .category-icon:hover {
  background: linear-gradient(135deg, rgba(30, 39, 50, 0.85) 0%, rgba(10, 48, 105, 0.15) 100%);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 6px 16px rgba(96, 165, 250, 0.15), 0 0 0 1px rgba(96, 165, 250, 0.1) inset;
}

.category-icon:hover img {
  transform: scale(1);
}

.dark .category-icon:hover img {
  filter: drop-shadow(0 4px 12px rgba(96, 165, 250, 0.25));
}

/* Fixed icon styles (for online service, AI recommendation) */
.fixed-icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(10, 48, 105, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Dark mode fixed icon */
.dark .fixed-icon {
  background: linear-gradient(135deg, rgba(30, 39, 50, 0.9) 0%, rgba(17, 23, 33, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Fixed icon hover effect */
.fixed-icon:hover {
  transform: translateX(-4px) translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
              0 0 20px rgba(10, 48, 105, 0.3),
              0 0 0 1px rgba(10, 48, 105, 0.3) inset;
  border-color: rgba(10, 48, 105, 0.4);
}

.dark .fixed-icon:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
              0 0 20px rgba(96, 165, 250, 0.3),
              0 0 0 1px rgba(96, 165, 250, 0.3) inset;
  border-color: rgba(96, 165, 250, 0.5);
}

/* H5 specific styles */
@media (max-width: 768px) {
  /* Mobile menu animation */
  .mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-menu.open {
    transform: translateX(0);
  }

  /* Filter menu animation */
  .filter-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
  }

  .filter-menu.open {
    max-height: 500px;
  }

  /* Book card hover effect for mobile */
  .book-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  }

  /* Search input styles for mobile */
  .search-input {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 12px 16px 12px 48px;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
  }

  .search-input:focus {
    outline: none;
    border-color: #0A3069;
    box-shadow: 0 0 0 3px rgba(10, 48, 105, 0.1);
  }

  /* Filter tag styles */
  .filter-tag {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
  }

  .filter-tag.active {
    background-color: #0A3069;
    color: white;
  }

  .filter-tag.inactive {
    background-color: #f1f3f5;
    color: #617189;
  }

  .filter-tag.inactive:hover {
    background-color: #e9ecef;
  }

  /* Price tag styles */
  .price-tag {
    font-size: 16px;
    font-weight: 700;
    color: #FF7D00;
  }

  /* Scrollable filter container */
  .filter-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .filter-scroll::-webkit-scrollbar {
    display: none;
  }
  
  /* Category icon styles for H5 */
  .category-icon {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .dark .category-icon {
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .category-icon:hover {
    transform: translateY(-2px) scale(1.05);
    background: transparent;
    box-shadow: none;
  }

  .category-icon img {
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .category-icon:hover img {
    transform: scale(1.08);
  }
}

/*空列表样式*/
.list-none {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
  color: #617189; /* text-muted color */
  min-height: 200px;
  background-color: white;
  border-radius: 8px;
}

/* Layer弹窗样式 - 确保弹窗居中且不受其他因素影响 */
.layui-layer{
  top:150px !important;
}
.dropdown .selector{
  display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 12px;
}
.dropdown .dropdown-tree{
  z-index: 300 !important;
}

.pl-40{
  padding-left: 40px  !important;
}

/* 书名最多显示2行，超出部分显示省略号 */
.book-title-line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 作者最多显示1行，超出部分显示省略号 */
.author-line-clamp-1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
/* 资源标签样式 */
.resource-labels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #f0f0f0;
}

.resource-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}

.resource-label:hover {
  opacity: 0.8;
}

.resource-label.abook {
  background-color: #e3f2fd;
  color: #1976d2;
}

.resource-label.cloud {
  background-color: #e8f5e9;
  color: #388e3c;
}

.resource-label.qrcode {
  background-color: #fff3e0;
  color: #f57c00;
}

.resource-label.video {
  background-color: #fce4ec;
  color: #c2185b;
}

.resource-label.chapter {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.resource-label svg {
  width: 14px;
  height: 14px;
}