:root {
  --background: #020101;
  --surface: #090909;
  --surface-light: #0e0e0e;
  --border: #2b2b2b;
  --border-light: #363636;
  --text: #f5f5f5;
  --muted: #979797;
  --muted-light: #c2c2c2;
  --accent: #f4c400;
  --accent-hover: #ffd51b;
}

/* cyrillic-ext */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIuaomQNQcsA88c7O9yZ4KMCoOg4Koz4yOqhMva.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIuaomQNQcsA88c7O9yZ4KMCoOg4Koz4yGqhMva.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: "Plus Jakarta Sans";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIuaomQNQcsA88c7O9yZ4KMCoOg4Koz4yCqhMva.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: "Plus Jakarta Sans";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIuaomQNQcsA88c7O9yZ4KMCoOg4Koz4y6qhA.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;
}
/* cyrillic-ext */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko70yyygA.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko50yyygA.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: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.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: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.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;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
  font-family: "Plus Jakarta Sans", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% -20%, rgba(244, 196, 0, 0.025), transparent 35%), var(--background);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.book-search-page {
  min-height: 100vh;
  padding: 30px 0 42px;
}

.page-container {
  width: min(1580px, calc(100% - 80px));
  margin: 0 auto;
}

.back-button {
  width: max-content;
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: #ddd;
  font-size: 12px;
  font-weight: 600;
  transition: 0.2s ease;
}

.back-button:hover {
  border-color: #555;
  background: #0b0b0b;
  color: #fff;
}

.back-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-heading {
  margin-top: 27px;
}

.eyebrow-text {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.heading-row {
  display: grid;
  grid-template-columns: 310px minmax(400px, 850px);
  align-items: end;
  gap: 70px;
}

.heading-row h1 {
  margin-bottom: 7px;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.heading-row p {
  color: #aaa;
  font-size: 15px;
}

.heading-row p strong {
  color: #eee;
  font-weight: 700;
}

.search-bar {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 105px;
  gap: 7px;
}

.search-input-wrapper {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid #343434;
  border-radius: 7px;
  background: rgba(10, 10, 10, 0.82);
  transition: 0.2s ease;
}

.search-input-wrapper:focus-within {
  border-color: #555;
  background: #0c0c0c;
}

.search-input-wrapper > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: #b7b7b7;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.search-input-wrapper input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
}

.search-input-wrapper input::placeholder {
  color: #626262;
}

.clear-search {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #333;
  color: #aaa;
  opacity: 0;
  visibility: hidden;
  transition: 0.15s ease;
}

.clear-search.show {
  opacity: 1;
  visibility: visible;
}

.clear-search:hover {
  background: #444;
  color: #fff;
}

.clear-search svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.search-button {
  height: 48px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #111;
  font-size: 13px;
  font-weight: 800;
  transition: 0.18s ease;
}

.search-button:hover {
  background: var(--accent-hover);
}

.search-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 20px;
  margin-top: 34px;
}

.filter-panel {
  height: max-content;
  position: sticky;
  top: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(145deg, #0b0b0b, #070707);
  overflow: hidden;
}

.filter-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px;
}

.filter-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-title svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #eee;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.filter-title h2 {
  font-size: 14px;
  font-weight: 700;
}

.filter-header button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

.filter-header button:hover {
  color: #ffe04d;
}

.clear-searchFilter {
  display: block;
  margin: 10px 18px 0 auto;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  position: absolute;
  top: 16px;
  right: 8px;
}

.clear-searchFilter:hover {
  color: #ffe04d;
}

.filter-toggle {
  display: none;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light) !important;
  border-radius: 5px;
  font-size: 17px !important;
  line-height: 1;
}

.filter-group {
  margin: 0 18px;
  padding: 15px 0;
  border-top: 1px solid #202020;
}

.filter-group h3 {
  margin-bottom: 10px;
  color: #e8e8e8;
  font-size: 12px;
  font-weight: 700;
}

.filter-description {
  color: #969696;
  font-size: 11px;
  line-height: 1.55;
}

.filter-option {
  min-height: 27px;
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  color: #b5b5b5;
  font-size: 11px;
  cursor: pointer;
}

.filter-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  position: relative;
  border: 1px solid #454545;
  border-radius: 3px;
  background: #0b0b0b;
  transition: 0.15s ease;
}

.filter-option input:checked + .custom-checkbox {
  border-color: var(--accent);
  background: var(--accent);
}

.filter-option input:checked + .custom-checkbox::after {
  content: "";
  width: 7px;
  height: 4px;
  position: absolute;
  left: 4px;
  top: 4px;
  border-left: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: rotate(-45deg);
}

.filter-option:hover {
  color: #eee;
}

.filter-option strong {
  margin-left: auto;
  color: #9a9a9a;
  font-size: 10px;
  font-weight: 500;
}

.filter-option input:checked ~ strong {
  color: #d8c052;
}

.year-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.year-inputs input {
  width: 100%;
  height: 37px;
  padding: 0 10px;
  border: 1px solid #282828;
  border-radius: 5px;
  background: #0b0b0b;
  color: #ddd;
  font-size: 10px;
}

.year-inputs input::placeholder {
  color: #777;
}

.year-inputs input:focus {
  border-color: #454545;
}

.results-area {
  min-width: 0;
}

.results-toolbar {
  height: 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 12px;
}

.results-toolbar > span {
  display: none;
  color: #888;
  font-size: 11px;
}

.results-toolbar select {
  width: 230px;
  height: 40px;
  padding: 0 35px 0 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #080808;
  color: #bbb;
  font-size: 10px;
  cursor: pointer;
}

.results-toolbar select:hover,
.results-toolbar select:focus {
  border-color: #414141;
}

.results-toolbar select option {
  background: #0b0b0b;
  color: #ddd;
}

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

.book-card {
  min-width: 0;
  height: 245px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 15px;
  position: relative;
  padding: 14px;
  border: 1px solid #292929;
  border-radius: 8px;
  background: linear-gradient(145deg, #0b0b0b, #070707);
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.book-card:hover {
  border-color: #444;
  background: linear-gradient(145deg, #0e0e0e, #080808);
  transform: translateY(-2px);
}

.book-grid.is-loading .book-card {
  border-color: #242424;
  background: #111;
  pointer-events: none;
  transform: none;
}

.book-grid.is-loading .book-card::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(
    100deg,
    #111 20%,
    #292929 40%,
    #111 60%
  );
  background-size: 200% 100%;
  content: "";
  animation: book-card-loading 1.2s ease-in-out infinite;
}

@keyframes book-card-loading {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-grid.is-loading .book-card::after {
    animation: none;
  }
}

.book-cover {
  width: 112px;
  height: 160px;
  border-radius: 4px;
  overflow: hidden;
  background: #121212;
}

.book-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.book-info {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.book-main-info {
  min-width: 0;
}

.book-main-info h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 5px 0 7px;
  color: #f4f4f4;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
}

.book-author {
  display: block;
  overflow: hidden;
  margin-bottom: 16px;
  color: #a5a5a5;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-main-info p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  color: #969696;
  font-size: 11px;
  line-height: 1.55;
}

.book-type {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: #d5d5d5;
  font-size: 10px;
}

.book-type svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state {
  min-height: 400px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  border: 1px solid #252525;
  border-radius: 8px;
  background: #070707;
}

.empty-state.show {
  display: flex;
}

.empty-icon {
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  border: 1px solid #292929;
  border-radius: 50%;
  color: var(--accent);
}

.empty-icon svg {
  width: 24px;
  height: 24px;
  /* fill: none; */
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state h2 {
  margin-bottom: 6px;
  font-size: 17px;
}

.empty-state p {
  color: #777;
  font-size: 11px;
}

.empty-state button {
  margin-top: 17px;
  padding: 9px 15px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: transparent;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

.empty-state button:hover {
  background: var(--accent);
  color: #111;
}

.pagination-wrapper {
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 5px;
}

.pagination {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.pagination button {
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  border: 1px solid #292929;
  border-radius: 6px;
  background: #080808;
  color: #bbb;
  font-size: 10px;
  transition: 0.15s ease;
}

.pagination button:hover:not(:disabled) {
  border-color: #555;
  color: #fff;
}

.pagination button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #111;
  font-weight: 800;
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}

.pagination-wrapper > span {
  grid-column: 3;
  justify-self: end;
  color: #888;
  font-size: 10px;
}

@media (max-width: 1400px) {
  .page-container {
    width: min(1350px, calc(100% - 50px));
  }

  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .heading-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .search-bar {
    max-width: 760px;
  }

  .search-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .book-search-page {
    padding-top: 18px;
  }

  .page-container {
    width: calc(100% - 24px);
  }

  .search-heading {
    margin-top: 22px;
  }

  .heading-row h1 {
    font-size: 34px;
  }

  .clear-searchFilter {
    position: relative;
    top: auto;
    right: auto;
    margin-right: 85.5%;
  }

  .heading-row p {
    font-size: 13px;
  }

  .search-bar {
    grid-template-columns: 1fr 75px;
  }

  .search-layout {
    display: block;
    margin-top: 24px;
  }

  .filter-panel {
    position: relative;
    top: auto;
    margin-bottom: 16px;
  }

  .filter-toggle {
    display: flex;
    align-items: center;
  }

  .filter-content {
    display: none;
  }

  .filter-panel.is-expanded .filter-content {
    display: block;
  }

  .results-toolbar {
    justify-content: space-between;
  }

  .results-toolbar > span {
    display: block;
  }

  .results-toolbar select {
    width: 175px;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .book-card {
    height: 220px;
  }

  .pagination-wrapper {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 15px;
  }

  .pagination {
    grid-column: 1;
  }

  .pagination-wrapper > span {
    grid-column: 1;
    justify-self: center;
  }
}

@media (max-width: 430px) {
  .search-bar {
    grid-template-columns: 1fr;
  }

  .search-button {
    width: 100%;
  }

  .book-card {
    height: 210px;
    grid-template-columns: 95px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .book-cover {
    width: 95px;
    height: 145px;
  }
}
/* sweet desing */
.swal2-popup {
  background-color: rgba(128, 128, 128, 0.281);
  backdrop-filter: blur(12px);
  color: #ffffff;
  border-radius: 12px;
  border: #8b8b8b 1px solid;
}

.swal2-popup .swal2-title {
  color: #ffffff;
  font-size: 18px;
}

.swal2-popup .swal2-html-container {
  color: #cccccc;
}
