@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100..900&display=swap');

@font-face {
  font-family: 'Eulyoo1945';
  src: url('Eulyoo1945-Regular.ttf') format('truetype');
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 400;
  font-size: 16px;
  background: white;
  color: black;
  word-break: keep-all;
}

ul {
  padding-left: 0;
  list-style: none;
}

body {
  opacity: 0;
  transition: opacity 0.8s ease;
}
 
body.fade-in {
  opacity: 1;
}

#sticky-header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 100;
  padding-top: 15px;
  padding-bottom: 20px;
  text-align: center;
}

#sticky-header h1 {
  font-weight: 400;
  font-size: 16px;
  margin-top: 15px;
  margin-bottom: 3px;
}

#sticky-header h2 {
  font-weight: 400;
  font-size: 14px;
  margin-top: 0;
  margin-bottom: 20px;
  color: darkgray;
  line-height: 1.5rem;
}

#book-header {
  display: grid;
  grid-template-columns: 4fr 2fr 2fr 2fr;
  gap: 20px;
  text-align: left;
  padding: 10px 0;
  font-weight: 400;
  font-size: 16px;
  z-index: 10;
}

.main-container {
  position: relative;
  padding-left: 2.5vw;
  padding-right: 2.5vw;
}

#book-list, #curated-book-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.book-row {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  will-change: opacity, transform;
  display: grid;
  grid-template-columns: 4fr 2fr 2fr 2fr;
  gap: 20px;
  font-family: 'Eulyoo1945', serif;
  font-size: 16px;
  line-height: 1.5em;
  color: black;
  padding: 10px 0;
  border-bottom: 1px solid black;
  word-break: keep-all;
}

.book-row.visible {
  opacity: 1;
  transform: translateY(0);
}

.book-row:first-child {
  border-top: 1px solid black;
}

.book-row:hover {
  background-color: lawngreen;
  transition: background 0.3s ease;
}

.book-title, .book-author, .book-pub, .book-path {
  white-space: pre-wrap;
  text-align: left;
}

.category-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
  margin-bottom: 30px;
  padding: 40px 0;
}

.category-books {
  position: relative;
  z-index: 1;
}

.overlay-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 95px;
  font-weight: 800;
  color: #73E107;
  opacity: 0.8;
  z-index: 0;
  text-align: center;
  pointer-events: none;
  white-space: pre-wrap;
}

.back {
  position: fixed;
  top: 20px;
  left: 0;
  padding-left: 2.5vw;
  z-index: 1000;
}

.back a {
  font-size: 16px;
  color: black;
  text-decoration: none;
}

.back a:hover {
  color: darkgray;
}

.category-btn-group {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 1000;
}

.new-category-btn,
.prev-category-btn {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: lawngreen;
  color: black;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
  transition: background 0.3s ease, transform 0.3s ease;
}

.new-category-btn:hover,
.prev-category-btn:hover {
  background-color: darkgray;
}

.rotate-infinite {
  animation: spin-infinite 4s linear infinite;
}

@keyframes spin-infinite {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#random-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: #FF7F50;
  color: black;
  font-weight: bold;
  border: none;
  font-size: 16px;
  font-family: 'Noto Sans KR', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: transform 0.35s ease;
  cursor: pointer;
}

#random-btn:hover {
  background-color: darkgray;
}

body.curating-page #sticky-header {
  padding: 0;
  width: 100%;
}

body.curating-page .book-row::before {
  content: none !important;
}

body.curating-page .book-row:hover {
  background-color: transparent;
}

body.curating-page #category-input {
  margin-bottom: 40px;
  text-align: center;
}

body.curating-page #category-input input {
  padding: 8px;
  font-size: 16px;
  width: 60%;
  max-width: 400px;
  border: 1px solid black;
}

body.curating-page #category-input button {
  padding: 8px 16px;
  font-size: 16px;
  margin-left: 10px;
  background-color: black;
  color: white;
  border: none;
  cursor: pointer;
}

body.curating-page #category-input button:hover {
  background-color: darkgray;
}

#category {
  font-family: 'Eulyoo1945', serif;
  font-size: 16px;
  font-weight: 400;
  padding: 8px 16px;
  border: none;
  border-bottom: 1px solid black;
  background: transparent;
  color: black;
  width: 250px;
}