/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body styles */
body {
  font-family: 'Courier New', sans-serif;
  background: #1f1b1b; 
  color: #e7dede; 
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 1.5s ease forwards;
  position: relative; /* needed for positioning pseudo-elements */
}

/* Dot pattern overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#000 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.1;
  z-index: 9999;
}

/* Main container */
.container {
  display: flex;
  height: 90vh;
  width: 90vw;
}

/* Fade-in animation keyframes */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
/* Title text */
.title {
  font-size: 20px;
  font-weight: bold;
  color: #f5eaea;
  font-family: 'Bodoni Moda', serif;
  text-align: center;
  margin-bottom: 1px;
  letter-spacing: 16px;
  width: 100%;
  position: relative;
  z-index: 2; /* On top of everything else */
  text-shadow:
    0 0 4px rgba(255, 220, 220, 0.3),
    0 0 10px rgba(255, 220, 220, 0.2);
}


/* The floating image behind the title */
.title-bg-img {
  position: absolute;
  top: -55px;     /* Adjust Y-position */
  left: -30px;    /* Adjust X-position */
  width: 400px;   /* Resize image easily */
  height: 600px;
  background-image: url('https://64.media.tumblr.com/3238ce1d9555588eefcd08c5b5fd8c52/4d00ac6b33cec795-e1/s1280x1920/396e991f2ac67e8b502168ffc0e4b92b5d983899.pnj');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.6;
  z-index: 1; /* Behind title */
  pointer-events: none;
}



/* Sidebar styles */
.sidebar {
  width: 300px;
  background-color: #2a2323;
  padding: 20px 10px;
  margin-right: 30px;
  overflow-y: auto;
  border: none;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #f2e4e4;
}

/* Main content area styles */
.content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  height: 100%;
  background-color: #2e2525;
  border-radius: 8px;
  color: #f4eaea;
}

/* Navigation tree styles */
.tree,
.tree ul {
  list-style: none;
  padding-left: 20px;
  position: relative;
}

/* Each list item with relative positioning and padding for the lines */
.tree li {
  position: relative;
  padding-left: 20px;
}

/* Vertical line on the left of each list item */
.tree li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  border-left: 2px solid #e38b8b;
  height: 100%;
}

/* Horizontal connector line on each list item */
.tree li::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 0;
  width: 20px;
  border-top: 2px solid #e38b8b;
}

/* Shorter vertical line for last child */
.tree li:last-child::before {
  height: 12px;
}

/* Links style */
.tree a {
  color: #e38b8b;
  text-decoration: none;
  padding: 2px 0;
  display: inline-block;
  transition: color 0.2s;
}

/* Hover effect on links */
.tree a:hover {
  color: #f4cccc;
  background: #443636;
}

/* Strikethrough links style for disabled items */
.tree a.strikethrough {
  text-decoration: line-through;
  color: #996666;
  pointer-events: none;
}

/* Highlight */
.highlight {
  background: #f9e6e6;
  color: #111;
}

/* Text selection styling */
::selection {
  color: #2a2323;
  background: #f7cfcf;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 2px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #e38b8b;
  border-radius: 10px;
}

/* Calendar container styling */
.calendar-container {
  width: 200px;
  background: #1f1b1b;
  color: #e38b8b;
  font-family: 'Verdana', sans-serif;
  font-size: 11px;
  padding: 8px;
  margin: 20px auto;
  border: 1px solid #e38b8b;
  box-sizing: border-box;
}

/* Calendar header */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-weight: bold;
  color: #FF99FF;
  font-size: 12px;
}

/* Calendar grid */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  text-align: center;
}

/* Days and dates boxes */
.calendar-day,
.calendar-date {
  width: 22px;
  height: 22px;
  line-height: 24px;
  box-sizing: border-box;
  display: inline-block;
  font-size: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}

/* Date boxes */
.calendar-date {
  border-radius: 2px;
  transition: background-color 0.2s;
  border: 1px dotted #e38b8b;
  margin: 1px;
}

/* Hover effect on date boxes */
.calendar-date:hover {
  background-color: #ffb6c1;
  color: white;
  font-weight: bold;
  border-radius: 4px;
  box-shadow: 0 0 3px #ffb6c1;
}

/* Today’s date styling */
.calendar-date.today {
  background-color: #ff99cc;
  color: white;
  position: relative;
  font-weight: bold;
  border-radius: 4px;
  box-shadow: 0 0 5px #ff99cc;
  animation: sparkle 1.2s infinite alternate;
}

/* Sparkle animation for today's date */
@keyframes sparkle {
  0% { transform: scale(1); }
  100% { transform: scale(1) rotate(5deg); }
}

/* Calendar header buttons styling */
.calendar-header button {
  background-color: #5a414a; 
  border: 1px solid #4a3740;
  color: #d8a9b8;
  font-weight: bold;
  font-family: 'Verdana', sans-serif;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 0 4px #4a3740;
}

/* Hover effect for calendar header buttons */
.calendar-header button:hover {
  background-color: #6f4a56; 
  color: #e6c2ce; 
  transform: scale(1.05) rotate(-2deg);
  box-shadow: 0 0 6px #6f4a56;
}

/* Responsive layout for small screens */
@media (max-width: 700px) {
  .container {
    flex-direction: column;  /* stack vertically */
    width: 95vw;             /* narrower container on small screens */
    height: auto;            /* let height expand */
  }

  .sidebar {
    width: 100%;             /* full width sidebar */
    margin-right: 0;         /* no side margin */
    padding: 15px 10px;      /* adjust padding */
    max-height: 200px;       /* limit height for sidebar */
    overflow-y: auto;        /* scroll if needed */
  }

  .content {
    width: 100%;             /* full width content */
    height: auto;            /* auto height */
    padding: 20px;           /* slightly less padding */
    margin-top: 10px;        /* space between sidebar and content */
  }
}

.corner-overlay {
  position: fixed;
  bottom: 10px;   /* Distance from bottom */
  right: -188px;    /* Distance from right */
  width: 500px;    /* Resize easily */
  height: 630px;
  background-image: url('https://64.media.tumblr.com/3d309116828c47e775fea2d9ef0879e4/d8ed749a448ab7a0-ea/s640x960/26335ea9215bc6faadd3ead81caea6662a024dca.pnj'); /* example image */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 9999; /* On top of everything */
  pointer-events: none; /* So it doesn't block clicks */
  opacity: 1;
}

.phone-img {
  position: fixed;
  bottom: -40px;   /* Distance from bottom */
  right: -5px;    /* Distance from right */
  width: 180px;    /* Resize easily */
  height: 200px;
  background-image: url('https://64.media.tumblr.com/926e042b2ff64dc9ed8ef1b172ee5c39/fe9c77b37072f962-db/s2048x3072/2493c7cd35013082263dfbeba3c0bfaaf202b63b.pnj');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 9999;       /* On top of everything */
  pointer-events: none; /* So it doesn't block clicks */
  opacity: 1;
  /* Added to allow hover effect despite pointer-events: none */
  pointer-events: auto;
  cursor: pointer;
}

/* Hover shake */
.phone-img:hover {
  animation: chaotic-shake 0.2s infinite;
}

/* Chaotic shake effect */
@keyframes chaotic-shake {
  0%   { transform: translate(0, 0); }
  15%  { transform: translate(-2px, 2px); }
  30%  { transform: translate(3px, -2px); }
  45%  { transform: translate(-2px, -3px); }
  60%  { transform: translate(2px, 3px); }
  75%  { transform: translate(-3px, 1px); }
  100% { transform: translate(0, 0); }
}

.updates-box::-webkit-scrollbar {
  width: 2px;                   /* Slightly wider scrollbar */
}

.updates-box::-webkit-scrollbar-track {
  background: transparent;
}

.updates-box::-webkit-scrollbar-thumb {
  background: #e38b8b;
  border-radius: 10px;
}

/* === Updates Container === */
.updates-container {
  position: relative;
  width: 200px;
  margin: 20px auto 0 auto;
  flex-shrink: 0;
}

/* Label above box */
.updates-label {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 10px;
  font-size: 17px;
  font-weight: 900;
  color: #e38b8b;
  -webkit-text-stroke: 1px #f5eaea; /* Clean thick border */
  letter-spacing: 1px;
  white-space: nowrap; /* Force single line */
  z-index: 1;
  text-shadow: none; /* Remove glow */
font-family: Impact, Charcoal, sans-serif;
}


/* === Updates Box === */
.updates-box {
  height: 120px;
  overflow-y: auto;
  padding: 12px;
  background-color: #2a2323;
  border: 1px solid #e38b8b;
  border-radius: 8px;
  font-size: 11px;
  color: #e38b8b;
}

/* Custom scrollbar */
.updates-box::-webkit-scrollbar {
  width: 2px;
}

.updates-box::-webkit-scrollbar-track {
  background: transparent;
}

.updates-box::-webkit-scrollbar-thumb {
  background: #e38b8b;
  border-radius: 10px;
}

/* === Updates Content === */
.updates-box h3 {
  margin-bottom: 6px;
  font-weight: bold;
  color: #ff99cc;
  text-align: center;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-shadow: 0 0 5px #ff99cc;
}

.updates-box ul {
  list-style-type: disc;
  padding-left: 16px;
  margin: 0;
}

.updates-box li {
  margin-bottom: 4px;
  line-height: 1.3;
}

.clock {
  position: fixed;
  top: -5px;
  right: 20px;
  color: #e38b8b;
  font-family: 'Bodoni Moda', serif;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 9999;
  letter-spacing: 1px;
  text-shadow: 0 0 2px #ff99cc;
   -webkit-text-stroke: 1px #f5eaea; /* Clean thick border */
  letter-spacing: 0.5px;
  white-space: nowrap; /* Force single line */
  z-index: 1;
  text-shadow: none; /* Remove glow */
}

.top-left-img {
  position: fixed;
  top: -15px;
  left: 17px;
  width: 120px;
  height: 120px;
  background-image: url('https://64.media.tumblr.com/096fde4d1b499f4cb348dfe90934241f/4d00ac6b33cec795-b7/s1280x1920/c8348eb19ea4c2ddccd9802376353c44008b3b8e.pnj');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: rotate(-25deg); /* 👈 Tilt the image counterclockwise */
  z-index: 9999;
  pointer-events: none;
  opacity: 0.9;
}

/* === COPY AND PASTE CODES CSS === */
.codes-container {
  padding: 20px;
  color: #e8dede;
  font-family: monospace;
}

.codes-header {
  text-align: left;
  margin-bottom: 20px;
}

.codes-header h2 {
  font-size: 18px;
  margin: 0;
  color: #e7dede;
  letter-spacing: 1.5px;
}

.codes-header p {
  font-size: 12px;
  color: #f2e4e4;
  margin-top: 4px;
}

.code-block {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.code-box {
  width: 200px;           /* Fixed width */
  max-width: 200px;
  max-height: 180px;      /* Limit height to 180px */
  background-color: #1f1b1b;
  border: 1px solid #ff99cc;
  border-radius: 6px;
  padding: 10px;
  position: relative;
  box-shadow: 0 0 6px rgba(255, 153, 204, 0.3);
  display: flex;
  flex-direction: column;
  overflow-y: auto;       /* Enable vertical scroll */
}

.code-title {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 12px;
  color: #ff99cc;
  text-shadow: 0 0 3px #ff99cc;
  flex-shrink: 0;
}

pre {
  margin: 0;
  font-size: 11px;
  color: #f8e1e1;
  white-space: pre-wrap;   /* Wrap lines inside */
  word-wrap: break-word;
  flex-grow: 1;
}

/* Copy button styling */
.copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  background-color: #2c1a1a;
  color: #ff99cc;
  border: 1px solid #ff99cc;
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
}

.copy-btn:hover {
  background-color: #ff99cc;
  color: #2c1a1a;
}

/* Divider between code sections */
.code-divider {
  margin: 24px 0;
  border: none;
  border-top: 1px dashed #ff99cc;
  opacity: 0.4;
}

function copyCode(button) {
  // Get the <code> element inside the same .code-box
  const code = button.closest('.code-box').querySelector('code');
  if (!code) return;

  // Copy the **textContent** to get the decoded code snippet (e.g., <div> instead of &lt;div&gt;)
  const textToCopy = code.textContent;

  // Create a temporary textarea to copy the text
  const textarea = document.createElement('textarea');
  textarea.value = textToCopy;
  document.body.appendChild(textarea);
  textarea.select();

  try {
    const successful = document.execCommand('copy');
    if (successful) {
      alert('Code copied to clipboard!');
    } else {
      alert('Failed to copy code.');
    }
  } catch (err) {
    alert('Error copying code.');
  }

  document.body.removeChild(textarea);
}

.highlight {
  color: pink; /* pink text by default */
  text-decoration: none;
}

.highlight:hover {
  color: #f4cccc;       /* hover color */
  background: #443636;  /* hover background */
}

.artist-page {
  padding: 20px;
  font-family: 'Courier New', monospace;
  color: #e8dede;
  max-width: 900px;
  margin: 0 auto;
}

.artist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background-color: #1a1414;
}

.artist-table thead tr {
  background-color: #1a1414;
  border-bottom: 1px solid #ff99cc;
}

.artist-table thead th {
  padding: 8px 12px;
  text-align: left;
  color: #ff99cc;
  letter-spacing: 1.5px;
  font-weight: bold;
}

.artist-table thead th:last-child {
  border-right: none;
}

.artist-table tbody tr {
  border-bottom: 1px solid #443636;
    transition: background-color 0.3s ease;

}

.artist-table tbody tr:hover {
  background-color: #3e2a2a;
}

.artist-table tbody td {
  padding: 6px 12px;
  color: #e7dede;
  vertical-align: middle;
  border-right: 1px solid #443636;
}

.artist-table tbody td:last-child {
  border-right: none;
}

.category-row td {
  background-color: #4b2a4b;
  color: #ff99cc;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  letter-spacing: 2px;
  padding: 10px 0;
}

/* Responsive: stack cells on smaller screens */
@media (max-width: 600px) {
  .artist-table, .artist-table thead, .artist-table tbody, .artist-table th, .artist-table td, .artist-table tr {
    display: block;
  }
  .artist-table thead tr {
    display: none;
  }
  .artist-table tbody tr {
    margin-bottom: 15px;
    border-bottom: 2px solid #ff99cc;
  }
  .artist-table tbody td {
    border: none;
    position: relative;
    padding-left: 50%;
    text-align: left;
    white-space: normal;
  }
  .artist-table tbody td::before {
    position: absolute;
    top: 6px;
    left: 12px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
    color: #ff99cc;
    text-shadow: 0 0 5px #ff99cc;
    content: attr(data-label);
  }
}
