@font-face {
  font-family: 'Walone';
  src: url('/static/fonts/walone-thin.woff2') format('woff2');
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Walone';
  src: url('/static/fonts/walone-bold.woff2') format('woff2');
  font-weight: 600 700 800;
  font-style: normal;
  font-display: swap;
}
body, button, input, select, textarea, h1, h2, h3, h4, h5, h6, p, span, div {
  font-family: 'Walone', 'Noto Sans Myanmar', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  transition: background-color 0.2s ease, color 0.2s ease;
}
html.dark body {
  background-color: #0c0f17;
  color: #e2e8f0;
}
html.light body {
  background-color: #f1f5f9;
  color: #0f172a;
}
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #283344;
  border-radius: 4px;
}
html.light .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
html.light header {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}
html.light nav {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}
html.light footer {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}
html.light header .text-white,
html.light nav .text-white,
html.light footer .text-white,
html.light main > div h2.text-white {
  color: #0f172a !important;
}
.category-chip {
  background-color: #121622;
  border: 1px solid #1e2535;
  color: #94a3b8;
  line-height: 1.6;
}
.category-chip:hover {
  background-color: #1e2535;
  color: #f1f5f9;
}
.category-chip.active {
  background-color: #f1f5f9;
  border-color: #f1f5f9;
  color: #090d16;
  font-weight: 700;
}
html.light .category-chip {
  background-color: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}
html.light .category-chip:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}
html.light .category-chip.active {
  background-color: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}
html.light #searchInput,
html.light #mobileSearchInput,
html.light #drawerSearchInput {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
html.light #searchInput::placeholder,
html.light #mobileSearchInput::placeholder,
html.light #drawerSearchInput::placeholder {
  color: #94a3b8 !important;
}
.editorial-book {
  position: relative;
  aspect-ratio: 2 / 2.9;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 12px;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    -3px 5px 12px rgba(0, 0, 0, 0.45),
    0 1px 3px rgba(0, 0, 0, 0.3),
    inset 2px 0 3px rgba(255, 255, 255, 0.08),
    inset -1px 0 2px rgba(0, 0, 0, 0.4);
}
.editorial-book:hover {
  transform: translateY(-5px);
  box-shadow: 
    -5px 10px 20px rgba(0, 0, 0, 0.65),
    0 3px 6px rgba(0, 0, 0, 0.4);
}
html.light .editorial-book {
  box-shadow: 
    0 10px 25px -5px rgba(0, 0, 0, 0.25),
    0 8px 10px -6px rgba(0, 0, 0, 0.2),
    inset 2px 0 3px rgba(255, 255, 255, 0.1),
    inset -1px 0 2px rgba(0, 0, 0, 0.3);
}
html.light .editorial-book:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 20px 30px -10px rgba(0, 0, 0, 0.35),
    0 10px 12px -5px rgba(0, 0, 0, 0.2);
}
.editorial-book .book-cover-title {
  color: #f8fafc !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.editorial-book .book-cover-meta {
  color: #cbd5e1 !important;
}
.book-inner-frame {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
  border-radius: 3px;
}
.book-external-title {
  color: #e2e8f0;
  transition: color 0.15s ease;
}
html.light .book-external-title {
  color: #0f172a !important;
  font-weight: 600;
}
html.light .book-external-title:hover {
  color: #d97706 !important;
}
html.light .book-action-btn {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}
html.light .book-action-btn:hover {
  background-color: #d97706 !important;
  border-color: #d97706 !important;
  color: #ffffff !important;
}
html.light .book-action-btn i {
  color: #d97706 !important;
}
html.light .book-action-btn:hover i {
  color: #ffffff !important;
}
html.light .bg-\[\#121622\],
html.light .bg-\[\#141923\] {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
html.light #filteredCountBadge {
  background-color: #fef3c7 !important;
  border-color: #fde68a !important;
  color: #b45309 !important;
}
html.light #categoryDrawerModal > div {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}
.book-title-text {
  line-height: 1.65 !important;
  word-break: break-word;
}
.book-loader {
  position: relative;
  width: 48px;
  height: 34px;
  perspective: 150px;
}
.book-loader .book-spine {
  position: absolute;
  left: 23px;
  top: 0;
  width: 2px;
  height: 100%;
  background: #f59e0b;
  border-radius: 1px;
}
.book-loader .book-page {
  position: absolute;
  top: 0;
  width: 23px;
  height: 100%;
  border-radius: 0 3px 3px 0;
  transform-origin: left center;
}
.book-loader .page-left {
  left: 0;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(to left, #d97706, #b45309);
  transform: rotateY(0deg);
}
.book-loader .page-right {
  right: 0;
  background: linear-gradient(to right, #d97706, #b45309);
  transform: rotateY(0deg);
}
.book-loader .page-flipping {
  right: 0;
  background: #fbbf24;
  animation: flipBook 1.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
@keyframes flipBook {
  0% {
    transform: rotateY(0deg);
    background: #fbbf24;
  }
  50% {
    background: #f59e0b;
  }
  100% {
    transform: rotateY(-180deg);
    background: #d97706;
  }
}
html.light .category-drawer-btn {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 600;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
html.light .category-drawer-btn:hover {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #d97706 !important;
}
html.light .category-drawer-btn i {
  color: #d97706 !important;
}
html.light #drawerCategoryList button {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}
html.light #drawerCategoryList button:hover {
  background-color: #f1f5f9 !important;
  color: #d97706 !important;
  border-color: #cbd5e1 !important;
}
html.light #drawerCategoryList button span.font-mono {
  background-color: #e2e8f0 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
}
#loadMoreBtn {
  transition: all 0.2s ease;
}
#loadMoreBtn:active {
  transform: scale(0.97);
}
html.light #loadMoreBtn {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 600;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
}
html.light #loadMoreBtn:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #d97706 !important;
}
html.light #loadMoreBtn i {
  color: #d97706 !important;
}
.book-card-animate {
  animation: cardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
html.dark .theme-icon-sun {
  display: block !important;
}
html.dark .theme-icon-moon {
  display: none !important;
}
html.light .theme-icon-sun {
  display: none !important;
}
html.light .theme-icon-moon {
  display: block !important;
}
