@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* -----------------------------------------------------------
   global & body setup
----------------------------------------------------------- */

body {
  background-image: url(/media/backgrounds/pinkcheck.png) !important;
  background-size: 40px !important;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Nunito', sans-serif !important;
  color: #8d7c76;
  min-height: 100vh;
  margin: 0;
}

h3, span, div {
  font-family: 'Nunito', sans-serif !important;
}

/* -----------------------------------------------------------
   global cursor setup
----------------------------------------------------------- */

html, body {
  cursor: url(/media/cursor/melody.webp), auto !important;
}

a, button, .dropdown-selected, .option, .book-card, .kindle-home-btn {
  cursor: url(/media/cursor/melody.webp), pointer !important;
}

body:wait {
  cursor: url(/media/cursor/melody.webp), progress !important;
}

/* -----------------------------------------------------------
   SELECTION & SCROLLBARS
----------------------------------------------------------- */

::selection {
  background-color: #feeef6;
  color: #616161;
}

::-moz-selection {
  background-color: #feeef6;
  color: #616161;
}

::-webkit-scrollbar {
    width: 10px;               
    height: 10px;        
}

::-webkit-scrollbar-track {
    background: transparent;   
    margin: 5px;               
}

::-webkit-scrollbar-thumb {
    background-color: #ffcce6; 
    border-radius: 50px;     
    border: 2px solid transparent;
    background-clip: content-box; 
}

::-webkit-scrollbar-thumb:hover {
    background-color: #ffb3d9; 
}

/* -----------------------------------------------------------
   kindle device styling
----------------------------------------------------------- */

.kindle-device {
  width: 455px; 
  height: 615px; 
  background: linear-gradient(145deg, #ffebf3, #ffd8e9); 
  border-radius: 30px; 
  padding: 22px 22px 40px 22px; 
  position: relative;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.12), 
    0 8px 12px rgba(0, 0, 0, 0.06), 
    inset 0 2px 4px rgba(255, 255, 255, 0.9), 
    inset 0 -2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  border: 1px solid #ffcae1;
}

.kindle-screen {
  flex: 1;
  background: #fff;
  border-radius: 8px; 
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* layered shadows for realistic depth */
  box-shadow: 
    inset 0 6px 12px rgba(0, 0, 0, 0.08), 
    inset 0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 -2px 5px rgba(255, 255, 255, 0.5);
  border: 1px solid #fce4ec;
}

.kindle-header {
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #888; 
  border-bottom: 1px solid #fef2f4;
  letter-spacing: 0.5px;
  background: #fff;
  z-index: 10;
  /* matching inset shadow for the top edge */
  box-shadow: 
    inset 0 4px 6px -2px rgba(0, 0, 0, 0.05),
    inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.kindle-status-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #888; 
}

.battery-icon {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
  font-size: 17px !important; 
  margin-left: 5px;
  vertical-align: middle;
  color: #888 !important; 
}

/* -----------------------------------------------------------
   library content & books
----------------------------------------------------------- */

.kindle-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 25px 25px 0 25px; 
  overflow: hidden; 
}

.library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 20px 0;
  flex-shrink: 0; 
  background: #fff;
  z-index: 5;
}

.library-header h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-transform: lowercase;
  font-weight: 800;
  font-size: 24px;
  margin: 0;
  color: #333;
}

.book-count {
  font-size: 14px;
  font-weight: 400;
  color: #a0a0a0;
  letter-spacing: 0;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 18px; 
  flex-grow: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding-top: 10px !important; 
  padding-bottom: 10px !important; 
  box-sizing: border-box;
}

.book-grid::-webkit-scrollbar {
  display: none;
}

.book-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative; 
  z-index: 1;
}

.book-card:hover {
  transform: translateY(-6px); 
  z-index: 10; 
}

.book-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 4px 8px 8px 4px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15), 
    inset 0 0 0 1px rgba(0, 0, 0, 0.05); 
  border: none; 
}

.book-cover::before {
  content: "";
  position: absolute;
  top: 0.5px;
  bottom: 0.5px;
  left: 0;
  right: 0;
  border-radius: inherit; 
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.02) 0%,
    rgba(0, 0, 0, 0.05) 0.75%,
    rgba(255, 255, 255, 0.5) 1.0%,
    rgba(255, 255, 255, 0.6) 1.3%,
    rgba(255, 255, 255, 0.5) 1.4%,
    rgba(255, 255, 255, 0.3) 1.5%,
    rgba(255, 255, 255, 0.3) 2.4%,
    rgba(0, 0, 0, 0.05) 2.7%,
    rgba(0, 0, 0, 0.05) 3.5%,
    rgba(255, 255, 255, 0.3) 4%,
    rgba(255, 255, 255, 0.3) 4.5%,
    transparent 5.4%,
    transparent 99%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.book-info {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  padding-bottom: 5px;
}

.book-title {
  display: block; 
  font-size: 11px;
  font-weight: 700;
  color: #444;
  line-height: 1.3;
}

.fav-heart {
  width: 14px; 
  height: auto;
  display: inline-block;
  vertical-align: middle;
  margin-left: 1px; 
  margin-bottom: 4px;
}

.book-author {
  font-size: 10px;
  font-weight: 400;
  color: #a0a0a0;
  margin-top: 0px;
  padding-bottom: 2px;
}

/* -----------------------------------------------------------
   device details
----------------------------------------------------------- */

.kindle-home-btn {
  width: 50px;
  height: 6px;
  background: #fbc6dd;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.8);
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
}

/* -----------------------------------------------------------
   custom dropdown
----------------------------------------------------------- */

/* -----------------------------------------------------------
   custom dropdown (merged style)
----------------------------------------------------------- */

.custom-dropdown {
  position: relative;
  z-index: 100;
}

.dropdown-selected {
  font-size: 12px;
  font-weight: 700;
  color: #888;
  background: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  cursor: pointer;
  text-transform: lowercase;
  min-width: 70px;
  text-align: center;
  transition: border-color 0.2s;
}

.dropdown-options {
  display: none; 
  position: absolute;
  background-color: #fff;
  min-width: 130px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
  z-index: 999;
  border: 1px solid lightgray;
  border-radius: 12px;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-top: 10px solid transparent; 
  background-clip: padding-box; 
  padding-bottom: 8px;
  padding-top: 4px; 
}

.custom-dropdown.active .dropdown-options {
  display: flex;
  flex-direction: column;
}

.option {
  font-size: 13px;
  color: #8c8c8c; 
  cursor: pointer;
  padding: 6px 15px; 
  margin: 4px 10px;  
  transition: 0.2s ease;
  text-align: left;
  display: block;
  font-weight: 700;
  border-radius: 20px; 
  cursor: url(/media/cursor/melody.webp), progress;
}

.option:hover {
  background-color: #feeef6; 
  color: #8c8c8c;
  font-style: italic;
  font-weight: 700;
  cursor: url(/media/cursor/melody.webp), progress;
}

.option[data-value="all"] {
  display: none;
}