/* -----------------------------------------------------------
   VARIABLES & IMPORTS
----------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

@font-face {
  src: url(/fonts/dingbats.woff2);
  font-family: 'puf';
}

:root {
  --background: #f0f0f0;
  --content-background: #fff;
  --text: #616161;
  --links: #8c8c8c;
  --title: #212121;
  --borders: #e0e0e0;
  --accent: #9fa8da;
  --gradient-1: #7986cb;
  --gradient-2: #e1bee7;
  --icon-background: #f5f6ff;
  --sidebar-link-background: #f5f5f5;
  --statistics-background: #f5f5f5;

  --fave-colour-one: #a1cdf7;
  --fave-colour-two: #f5bad9;
  --fave-colour-three: #abb6ff;
  --fave-colour-four: #ffc9dd;
}

/* -----------------------------------------------------------
  GLOBAL STYLES
----------------------------------------------------------- */

body {
  background-image: url(/media/backgrounds/pinkcheck.png);
  background-size: 40px;
  overflow-x: hidden;
  font-family: 'nunito';
  color: #6d6d6d;
  font-size: 15px;
  padding-top: 40px;
}

html {
  scroll-behavior: smooth;
}

mark {
  background-color: #feeef6;
  color: #6d6d6d;
  font-weight: bold;
}

body,
a,
button {
  cursor: url(/media/cursor/melody.webp), progress;
}

a:hover,
button:hover,
img:hover {
  cursor: url("/media/cursor/melody.webp"), pointer;
}

.text {
  color: #616161;
  font-size: 18px;
  font-weight: 900;
}

#context_menu, 
#context_menu ul, 
#context_menu li {
    margin: 0;
    padding: 0;
    list-style: none;
    box-sizing: border-box;
}

#s-m-t-tooltip {
    max-width: 150px;
    background-color: white;
    border: 7px solid;
    border-image: url(/media/borders/pink.png) 5 fill round;
    border-image-outset: 2px;
    outline: 1px dashed #e1b3c7;
    outline-offset: -6px;
    border-radius: 4px;
    font-family: tahoma;
    font-size: 7px;
    letter-spacing: 2px;
    color: #848484;
    position: fixed;    
    z-index: 100000 !important;
    pointer-events: none;
    padding: 4px;
    text-align: center;
    margin: 0; 
}

/* -----------------------------------------------------------
   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; 
}

/* -----------------------------------------------------------
   LINKS & HOVERS
----------------------------------------------------------- */

a {
  color: #616161;
  text-decoration: none;
  font-weight: 800;
  transition: .1s;
}

a:link,
a:visited,
a:active {
  color: #616161;
  font-weight: 800;
  background-color: transparent;
  text-decoration: none;
}

a:hover {
  color: #ff94bf;
  font-weight: 800;
  background-color: transparent;
  text-decoration: underline;
  font-style: italic;
}

/* -----------------------------------------------------------
   MAIN SIDEBAR & ICON
----------------------------------------------------------- */

#sidebar {
  width: 260px;
  text-align: center;
  height: 100%;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  padding: 30px;
  background-color: var(--content-background);
  overflow: hidden;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  border: 35px solid;
  border-image: url('/media/borders/renda-bg.png') 18 repeat;
  border-image-outset: 5px;
  border-top: 0px;
  border-bottom: 0px;
  border-left: 0px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

#sidebar .icon-wrapper {
  position: relative;
  display: inline-block;
}

#sidebar .icon {
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  padding: 4px;
  border: 6px solid #ffd8e9;
}

#sidebar .icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

#sidebar .icon .status-icon {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: white;
  border: 2px solid white;
  padding: 3px;
  bottom: 0px;
  right: 8px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
  background-image: url('/media/graphics/heart.png');
  background-size: 85%;
  background-repeat: no-repeat;
  background-position: center;
}

.sidebar-buttons {
  margin-top: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-btn:before {
  content: "";
  width: 20px;
  height: 20px;
  background-image: url(/media/graphics/white-heart.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 16px;
  border: 3px solid #ffffff;
  outline: 1px solid #c3c3c3;
  font-size: 14px;
  font-weight: 700;
  color: #5c5c5c;
  background: #fff3f9;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.85),  
    inset -1px -1px 0 rgba(0,0,0,0.18),      
    inset 0 -2px 3px rgba(0,0,0,0.12),       
    inset 0 2px 2px rgba(255,255,255,0.4);    
  transition: background .15s ease, box-shadow .15s ease;
  text-decoration: none;
}


.sidebar-buttons a.sidebar-btn {
  background-color: #feeef6;
  color: #616161;
}

.sidebar-buttons a.sidebar-btn:hover {
  background-color: #ffe7f3;
}

.sidebar-btn:hover {
  background: #ffe7f3;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.95),
    inset -2px -2px 0 rgba(0,0,0,0.2),
    inset 0 -3px 4px rgba(0,0,0,0.16),
    inset 0 2px 3px rgba(255,255,255,0.45);
  font-style: italic;
}

.sidebar-buttons a {
  text-decoration: none;
}

/* -----------------------------------------------------------
   TOP NAVIGATION HEADER
----------------------------------------------------------- */

#top-header {
  margin-left: 260px;
  padding: 0 40px 20px 40px;
  display: flex;
  justify-content: center;
}

.header-nav {
  background-color: var(--content-background);
  border-radius: 18px;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--borders);
}

.header-nav .sep {
  font-size: 16px;
  user-select: none;
}

.header-nav a {
  font-family: 'nunito';
  font-size: 14px;
  font-weight: 700;
  color: #616161;
  text-decoration: none;
  position: relative;
}

.header-nav a:hover {
  font-style: italic;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 4px;
  background-color: var(--fave-colour-two);
  transition: width 0.2s ease;
}

.header-nav a:hover::after {
  width: 100%;
}

/* -----------------------------------------------------------
   PAGE LAYOUT & CONTENT BOX
----------------------------------------------------------- */

#page {
  margin-left: 260px;
  padding: 30px 40px;
  display: flex;
  justify-content: center;
  gap: 0;
  align-items: flex-start;
  transition: gap .35s ease;
  position: relative;
}

.content-box {
  flex: 1;
  max-width: 900px;
  background: #fff;
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  border: 1px solid var(--borders);
  transition: max-width .35s ease;
  position: relative;
  overflow: hidden;
}

#home {
  display: block;
}

/* -------------------- 
   DEFAULT CONTENT TEXT 
   -------------------- */

.default-content {
  width: 100%;
  font-size: 16px;
  transition: opacity .25s ease;
}

.default-inner {
  display: flex;
  align-items: center;          
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 260px;            
}

.top-img {
  width: 380px;    
  height: auto;
  align-self: flex-start;
}

.welcome-img {
  width: 250px;
  max-width: 40%;
  height: auto;
}

.default-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  color: #6f6f6f;
  padding-left: 50px;
  padding-right: 40px;
}

.default-text h2 {
  font-size: 20px;
  color: #616161;
  margin-bottom: 10px;
  text-align: left;
}

.default-text p {
  font-size: 15px;
  text-align: left;
}

#anime .animes-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  color: #6f6f6f;
}

#anime .default-inner {
    display: flex !important;
    align-items: flex-start;
    gap: 20px;
    justify-content: space-between;
}

#anime .anime-img {
    width: 230px;
    height: auto;
    margin-left: 20px;
    flex-shrink: 0;
}

#manga .manga-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  color: #6f6f6f;
}

#manga .default-inner {
    display: flex !important;
    align-items: flex-start;
    gap: 20px;
    justify-content: space-between;
}

#manga .manga-img {
    width: 250px;
    height: auto;
    margin-left: 20px;
    flex-shrink: 0;
}

#star {
  font-size: 18px;
  font-family: puf;
  margin-bottom: 15px;
  letter-spacing: 0.1em;
}

.review-gallery summary h2::before {
  content: "› "; 
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.2s ease;
}

.review-gallery[open] summary h2::before {
  content: "» ";
  transform: rotate(90deg); 
}

.review-gallery summary h2 {
  display: flex;
  align-items: center;
  cursor: url(/media/cursor/melody.webp), progress;
}

.nav-search {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 10px 0;
}

.menu-search {
    background: #fff;
    border: 1px solid #ffbcd9;
    border-radius: 15px;
    padding: 3px 10px;
    font-size: 11px;
    font-family: inherit;
    color: #666;
    outline: none;
    width: 150px;
    cursor: url(/media/cursor/melody.webp), progress;
}

#anime-search-grid, #manga-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); 
    gap: 15px;
}

.dropdown {
    display: inline-block;
    position: relative;
}

.dropdown-content {
    display: none; 
    position: absolute;
    background-color: #fff;
    min-width: 160px;
    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;
}

.dropdown-content.active {
    display: flex;
    flex-direction: column;
}

.dropdown-content span {
    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;
}

.dropdown-content span:hover {
    background-color: #feeef6; 
    font-style: italic;
    font-weight: 700;
    cursor: url(/media/cursor/melody.webp), progress;
}

.dropdown:hover .dropdown-content {
    display: flex;
    flex-direction: column;
}

.dropdown.sticky .dropdown-content {
    display: flex;
    flex-direction: column;
}

/* -----------------------------------------------------------
   SECTION LOGIC
----------------------------------------------------------- */

#page:has(.section:target) .default-content {
  display: none;
}

#page:has(.section:target) .default-content {
  opacity: 0;
  pointer-events: none;
}

#page:not(:has(.section:target)) .content-box,
#page:has(#code:target) .content-box {
  max-width: 750px;
}

.section {
  display: none;
}

.section h2 {
  font-size: 20px;
  color: #616161;
  margin-bottom: 12px;
}

.section h2, 
.default-text h2 {
  margin-top: 0; 
  margin-bottom: 12px; 
}

.section:target {
  display: block;
}

.section.main-section:has(~ .sub-section:target[data-parent]),
#page:has(.sub-section[data-parent="anime"]:target) #anime,
#page:has(.sub-section[data-parent="manga"]:target) #manga,
#page:has(.sub-section[data-parent="novel"]:target) #novel,
#page:has(.sub-section[data-parent="books"]:target) #books,
#page:has(.sub-section[data-parent="favorites"]:target) #favorites,
#page:has(.sub-section[data-parent="stats"]:target) #stats {
  display: none;
}

.sub-section {
  display: none;
}

/* -----------------------------------------------------------
   SUB-SECTION MENUS & SMOOTH TRANSITION
----------------------------------------------------------- */

.anime-menu,
.section-menu {
  background: var(--content-background);
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
  border: 1px solid var(--borders);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  left: 0;
  width: 180px;
  padding: 14px;
  font-size: 12px;
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}

.anime-menu a,
.section-menu a {
  font-size: 13px;
  font-weight: 700;
  color: #7a7a7a;
  padding: 6px 10px;
  border-radius: 10px;
  line-height: 1.2;
  text-decoration: none;
}

.anime-menu a:hover,
.section-menu a:hover {
  background: #feeef6;
  font-style: italic;
}

#page:has(.section:target) {
  gap: 24px;
}

#page:has(.section:target) .content-box {
  max-width: 660px;
}

#page:has(#anime:target) .anime-menu,
#page:has(.sub-section[data-parent="anime"]:target) .anime-menu,
#page:has(#manga:target) .section-menu[data-section="manga"],
#page:has(.sub-section[data-parent="manga"]:target) .section-menu[data-section="manga"],
#page:has(#novel:target) .section-menu[data-section="novel"],
#page:has(.sub-section[data-parent="novel"]:target) .section-menu[data-section="novel"],
#page:has(#books:target) .section-menu[data-section="books"],
#page:has(.sub-section[data-parent="books"]:target) .section-menu[data-section="books"],
#page:has(#favorites:target) .section-menu[data-section="favorites"],
#page:has(.sub-section[data-parent="favorites"]:target) .section-menu[data-section="favorites"],
#page:has(#stats:target) .section-menu[data-section="stats"],
#page:has(.sub-section[data-parent="stats"]:target) .section-menu[data-section="stats"] {
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* -----------------------------------------------------------
   EFFECTS
----------------------------------------------------------- */

.zoom {
  transition: transform .2s;
}

.zoom:hover {
  -ms-transform: scale(1.05);
  -webkit-transform: scale(1.05);
  transform: scale(1.05);
}

/* -----------------------------------------------------------
   GRAPHICS
----------------------------------------------------------- */


.favorites-chart {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 30px 20px;
  border-radius: 18px;
}

.fav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  gap: 10px;
}

.fav-value {
  font-size: 14px;
  font-weight: 800;
  color: #616161;
}

.bar-column {
  height: 160px;
  display: flex;
  align-items: flex-end;
}

.bar-rect {
  width: 42px;
  height: 0; 
  background: #ffbcd9;
  border-radius: 10px 10px 0 0;
  transition: height 1s ease;
}

.fav-label {
  font-size: 13px;
  font-weight: 700;
  color: #949494;
  text-align: center;
}

.fav-label::before {
  content: "♡";
  display: block;
  font-size: 18px;
  opacity: 0.6;
}

.cover-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
}

.cover-card {
  justify-content: center;
  align-items: center;    
  width: 120px;          
  height: 170px;          
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  position: relative;
  display: inline-block;
  filter: saturate(80%);
  transition: 0.5s ease;
}

#grid-fav-animes, 
#grid-fav-mangas, 
#grid-fav-novels, 
#grid-fav-books, 
#grid-fav-characters {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 20px !important;
    row-gap: 30px !important;
    padding: 20px 0;
    width: 100%;
}

.fav-heart-img {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  left: auto !important;  
  bottom: auto !important;
  width: 22px !important;  
  height: 22px !important;
  z-index: 100;            
  pointer-events: none;
  transform: none !important; 
}

.disliked-icon {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  left: auto !important;  
  bottom: auto !important;
  width: 22px !important;  
  height: 22px !important;
  z-index: 100;            
  pointer-events: none;
  transform: none !important; 
}

.low-rating-img {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  left: auto !important;  
  bottom: auto !important;
  width: 22px !important;  
  height: 22px !important;
  z-index: 100;            
  pointer-events: none;
  transform: none !important; 
}

.cover-card:hover {
filter: saturate(100%);
}

.cover-card img {
  width: 120px;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cover-info {
  position: absolute;
  bottom: 0;
  left: 0;
  box-sizing: border-box; 
  width: 100%;
  padding: 10px;
  background-color: rgba(255, 216, 233, 0.8);
  color: #3e3e3e;
  font-size: 12px;
  border-radius: 0 0 12px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  opacity: 0;                 
  visibility: hidden;       
  transition: opacity 0.3s ease, visibility 0.3s; 
}

.cover-card:hover .cover-info {
  opacity: 1;
  visibility: visible;
}

.cover-info strong {
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
}

#image-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-container {
    background: white;
    padding: 15px;
    border-radius: 5px;
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-container img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 3px;
}

.modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: white;
    color: #333;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    text-align: center;
    line-height: 25px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.modal-caption {
    margin-top: 15px;
    font-size: 13px;
    color: #555;
    text-align: center;
    text-transform: lowercase;
}

.gallery-img {
    filter: blur(4px);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.gallery-img:hover {
    filter: blur(0);
    transform: scale(1.02);
}

#modal-img {
    filter: none !important;
}

/* -----------------------------------------------------------
   SMOOTH SECTION TRANSITIONS
----------------------------------------------------------- */

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px); 
  }
  to {
    opacity: 1;
    transform: translateY(0); 
  }
}

.section:target {
  display: block;
  animation: sectionFadeIn 0.4s ease-out forwards;
}

.default-content {
  animation: sectionFadeIn 0.4s ease-out forwards;
}

.anime-menu,
.section-menu {
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-wrapper {
  width: 100%;
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px dotted var(--borders);
}

.back-to-top {
  font-size: 12px;
  color: #b0b0b0;
  text-transform: lowercase;
  transition: all 0.3s ease;
}

.back-to-top:hover {
  color: #ff94bf;
  font-style: italic;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px;
  color: #ffb7c5;
  font-size: 14px;
  text-transform: lowercase;
}

.heart-pulse {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.1); }
  100% { transform: scale(0.95); }
}