/* -----------------------------------------------------------
    VARIABLES & IMPORTS
----------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Alata&family=DotGothic16&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: 95px; 
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

mark {
  background-color: #feeef6;
  color: #6d6d6d;
  font-weight: bold;
}

*,
body,
html {
  cursor: url('/media/cursor/melody.webp'), auto !important;
}

a,
a *,
button,
button *,
img,
input[type="submit"],
input[type="button"],
.topnav a,
.close-journal {
  cursor: url('/media/cursor/melody.webp'), pointer !important;
}

.text {
  color: #616161;
  font-size: 18px;
  font-weight: 900;
}

.mobile-only {
  display: none;
}

#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;
}

/* -----------------------------------------------------------
    TOP NAVIGATION
----------------------------------------------------------- */

header {
    position: fixed;
    background-color: #fff;
    width: 100%;
    left: 0;
    right: 0;
    top: 0;
    z-index: 99999999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-bottom: 35px solid;
    border-image: url('/media/borders/renda-bg.png') 19 repeat;
    border-image-outset: 5px;
    border-top: 0px;
    border-left: 0px;
    border-right: 0px;
}

.topnav {
    max-width: 900px;
    margin: 0 auto;
    padding: 6px 20px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 25px; 
    flex: 1;
    margin-top: 8px; 
}

.nav-group.left {
    justify-content: flex-end;
    margin-right: 60px; 
}

.nav-group.right {
    justify-content: flex-start;
    margin-left: 60px;
}

.topnav a {
    padding: 4px 3px; 
    font-weight: 700;
    color: #616161;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    position: relative; 
}

.topnav a:hover {
    font-style: italic;
    text-decoration: none;
}

.topnav a::after {
    content: '';
    position: absolute;
    bottom: -4px; 
    left: 0;
    width: 0;
    height: 4px;
    background-color: var(--fave-colour-two); 
    transition: width 0.2s ease; 
}

.topnav a:hover::after {
    width: 100%;
}

.topnav .icon-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon {
    border-radius: 50%;
    background-color: #fff; 
    padding: 4px;
    border: 1px solid #dcdcdc;
    width: 65px;
    height: 65px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 85px; 
}

.icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* -----------------------------------------------------------
    SLIDING JOURNAL / BOOK VIEWPORTS
----------------------------------------------------------- */

html:has(.out-journal:target) {
  overflow: hidden;
}

@keyframes journalSlideUp {
  from {
    transform: translate(-50%, 35vh) rotate(0deg) scale(1);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes bookTableGlide {
  0% {
    transform: translate(140vw, -50%) rotate(11deg) scale(1);
    opacity: 0;
  }
  70% {
    transform: translate(-53%, -50%) rotate(-2deg) scale(1); 
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes bookTableGlideReturn {
  0% {
    transform: translate(-140vw, -50%) rotate(-11deg) scale(1);
    opacity: 0;
  }
  70% {
    transform: translate(-47%, -50%) rotate(2deg) scale(1); 
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    opacity: 1;
  }
}

.out-journal {
  width: 800px;
  position: fixed;
  left: 50%;
  top: 56%;
  z-index: 99999;
  box-sizing: border-box;
  transform-origin: 50% 50%; 
}

#default-journal {
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
  pointer-events: auto;
  animation: journalSlideUp 0.9s cubic-bezier(0.25, 1, 0.3, 1) forwards;
}

html:not(:has(.out-journal:not(#default-journal):target)) #default-journal {
  animation: bookTableGlideReturn 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.out-journal:not(#default-journal):not(:target) {
  opacity: 0;
  pointer-events: none;
  transform: translate(140vw, -50%) rotate(11deg) scale(1); 
  transition: opacity 0.4s ease-in, transform 0.6s cubic-bezier(0.25, 1, 0.3, 1);
}

.out-journal:not(#default-journal):target {
  pointer-events: auto;
  animation: bookTableGlide 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

html:has(.out-journal:not(#default-journal):target) #default-journal {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-140vw, -50%) rotate(-8deg) scale(1) !important;
  transition: opacity 0.6s ease-out, transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.journal {
  width: 800px;
  max-height: 90vh; 
  margin: 0 auto;
  background: #fff url('/media/backgrounds/patterned.png');
  border-radius: 10px;
  padding: 22px 22px; 
  box-shadow: 
    -5px -5px 4px inset rgba(0,0,0,0.2), 
    3px 3px 3px inset rgba(255,255,255,0.33),
    0 12px 35px rgba(0, 0, 0, 0.15);
  position: relative;
  border: 1px solid var(--borders);
  box-sizing: border-box;
  overflow: hidden; 
}

.journal::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 24px;
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(to right,
      rgba(0,0,0,0.06) 0%,
      rgba(0,0,0,0.02) 25%,
      rgba(255,255,255,0.2) 50%,
      rgba(0,0,0,0.02) 75%,
      rgba(0,0,0,0.08) 100%);
  z-index: 2;
}

.pattern {
  background: url('/media/graphics/hearts.png') 0px 0px / 20px;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0px;
  left: 0px;
  mix-blend-mode: soft-light;
  pointer-events: none;
  border-radius: 10px;
  z-index: 2;
}

.journal-pages {
  display: flex;
  margin: 0 auto;
  justify-content: space-between;
  position: relative;
  z-index: 3; 
  box-sizing: border-box;
  width: 100%;
}

.journal-page {
  width: 49.8%; 
  background: url('/media/backgrounds/paperplain.png');
  height: 580px;
  overflow-y: auto;
  scrollbar-width: none; 
  -ms-overflow-style: none;
  color: var(--text);
  line-height: 1.6;
  position: relative;
  border: 3px solid white;
  box-shadow: 0px 0px 4px inset #00000055, 0px 0px 2px #00000022;
  border-image-source: url('/media/borders/babado.png');
  border-image-outset: 5px;
  border-image-slice: 20;
  border-image-width: 6px;
  border-image-repeat: round;
  box-sizing: border-box;
  padding: 12px 24px 28px 28px; 
  font-size: 13px;
  font-family: 'nunito';
}

.journal-page::-webkit-scrollbar {
  display: none;
}

.journal-page[style*="margin-right"] {
  margin-right: 0px !important;
}

.journal-page[style*="margin-left"] {
  margin-left: 0px !important;
}

.journal-page h2 {
  font-size: 18px;
  color: #616161;
  padding-bottom: 6px;
  margin-bottom: 12px;
  padding-left: 2px;
  text-transform: lowercase;
}

.spirals {
  height: 560px;
  width: 24px;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  image-rendering: pixelated;
  z-index: 1000;
  pointer-events: none;
  background: url('/media/graphics/spirals.png') 0px 0px / cover;
}

.spirals-bg {
  height: 560px;
  width: 5px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  background: url('/media/backgrounds/paperplain.png') 0px 0px / cover;
}

/* -----------------------------------------------------------
   GRAPHIC OVERLAY
----------------------------------------------------------- */

.global-melo-anchor {
  width: 800px;
  position: fixed;
  left: 52%;
  bottom: 7%;
  transform: translate(-50%, -50%);
  pointer-events: none; 
  z-index: 1000000; 
  box-sizing: border-box;
}

.melo-wrap {
  position: absolute;
  bottom: -45px; 
  right: -55px; 
  width: 170px;
  height: auto;
  pointer-events: auto; 
}

.melo-wrap::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 20px;
  background: radial-gradient(ellipse,
      rgba(0, 0, 0, 0.25) 0%,
      rgba(0, 0, 0, 0.18) 40%,
      rgba(0, 0, 0, 0) 80%);
  filter: blur(6px);
  z-index: -1;
  pointer-events: none;
}

.png {
  width: 170px;
  display: block;
  transition: .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.png:hover {
  transform: rotate(8deg);
}

.fave-underline {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-style: italic; 
}

.fave-underline::after {
  content: '';
  position: absolute;
  bottom: -1px; 
  left: 0;
  width: 100%; 
  height: 3.5px;
  background-color: var(--fave-colour-two); 
}

/* -----------------------------------------------------------
   GENRE ARCHIVE & JOURNAL MEDIA GRID LAYOUT
----------------------------------------------------------- */

#star {
  font-size: 18px;
  font-family: puf;
  margin-bottom: 15px;
  letter-spacing: 0.1em;
}

.genre-section {
  display: none;
  flex-direction: column;
  width: 100%;
}

.genre-section.active {
  display: flex;
}

.movie-genre-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 15px;
  width: 100%;
  box-sizing: border-box;
  position: static !important;  
  opacity: 1 !important;        
  pointer-events: auto !important; 
  transform: none !important;   
}

.movie-genre-menu .genre-btn {
  background: transparent;
  border: none;
  outline: none;
  text-align: left;
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: 'nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #7a7a7a;
  padding: 6px 10px;
  border-radius: 10px;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.movie-genre-menu .genre-btn:hover {
  background: #feeef6;
  font-style: italic;
  color: #7a7a7a;
}

.movie-genre-menu .genre-btn.active {
  background: #feeef6;
  font-style: italic;
  color: var(--text);
}

.media-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  row-gap: 16px !important;
  padding: 10px 2px 140px 2px !important; 
  width: 100%;
  box-sizing: border-box;
}

.cover-card {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 2 / 3 !important;
  height: auto !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1) !important;
  margin: 0 !important;
}

.cover-card .img-container {
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  position: relative !important;
}

.cover-card img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  transform: none !important;
}

.cover-card .fav-heart-img,
.cover-card .disliked-icon {
  position: absolute !important;
  top: 5px !important;
  right: 5px !important;
  left: auto !important;
  bottom: auto !important;
  width: 15px !important;
  height: 15px !important;
  z-index: 60 !important;
  transform: none !important;
  display: block !important;
}

.cover-card:hover .cover-info {
  opacity: 1 !important;
  visibility: visible !important;
}

.cover-info {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  padding: 6px 4px !important; 
  background-color: rgba(255, 216, 233, 0.95) !important;
  color: #3e3e3e !important;
  border-radius: 0 0 8px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  text-align: left !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s !important;
  z-index: 50 !important;
  min-height: 42px !important;
}

.cover-info strong {
  font-weight: 700 !important;
  font-size: 10px !important;      
  line-height: 1.2 !important;
  white-space: normal !important;
  word-break: break-word !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important; 
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.cover-info span {
  font-size: 9px !important;      
  margin-top: 2px !important;      
  color: #555 !important;           
}

.movie-inline-review {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-transform: lowercase;
  font-family: 'nunito', sans-serif;
  animation: fadeInLeaf 0.25s ease;
}

@keyframes fadeInLeaf {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.cover-card:hover .hide-on-card-hover {
  display: none !important;
}