/* GLOBAL */
.window {
  border: 2px solid white;
}

* {
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  padding: 0;
  line-height: 0;   /* ← removes the invisible text line */
}

body {
  margin: 0;
	padding: 0;
  min-height: 100vh;
  display: flex;          /* Activates Flexbox layout */
  flex-direction: column; /* Stacks header, main, and footer vertically */

  background-image: url("background-image.png");
  background-repeat: repeat;
  background-size: auto;
  background-position: top left;
	background-size: 50%;
  font-family: 'Inter', sans-serif;
}

/* Header */
header {
  background: transparent;
  color: white;
  padding: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 240px; /* ← Shifts out from behind sidebar */
  z-index: 1;
  position: relative;
}

.welcome-title {
  width: 400px;
  height: auto;
  vertical-align: middle;
  margin: 0;
  padding: 0;
  margin-right: 0px;
  display: block;
  margin-bottom: 0px;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.dr-title {
  width: 400px;
  height: auto;
  vertical-align: middle;
  margin: 0;
  padding: 0;
  margin-right: 0px;
  display: block;
  margin-bottom: 0px;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.title-row {
  width: 100%;
  background: transparent;
  padding: 30px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  line-height: 0;
}

.title-row a {
  text-decoration: none;
}

.title {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.logo {
  position: absolute;
  top: 5px;
  right: -125px;
  width: 75px;
  height: auto;
}

/* ===========================
   SIDEBAR MENU (NEW SYSTEM)
   =========================== */

.side-menu {
  position: fixed;
  top: 0;        /* Forces it to touch the absolute top edge */
  left: 0;       /* Forces it to touch the absolute left edge */
  width: 240px;
  height: 100vh; /* Keeps it full screen height */
  background: #111;
  color: #ddd;
  padding: 5px 0;
  border-right: 2px solid #333;
  overflow-y: auto;
  font-family: Inter, sans-serif;
  z-index: 5000; /* Ensures it stays on top of everything else */
}

.side-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ROW: link + arrow */
.menu-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  cursor: pointer;
}

.menu-row a {
  color: #ccc;
  text-decoration: none;
  font-size: 15px;
  flex-grow: 1;
  padding: 10px 30px;
  display: block;
}

.menu-row:hover {
  background: #222;
}

/* ==========================================
   🎯 ABSOLUTE TOP ROOT LINK
   ========================================== */
/* Force the absolute first link in the entire sidebar to hug the left edge */
.side-menu > .menu-section > .menu-row a {
  padding-left: 15px !important; /* Pulls text safely to the left */
}

/* Level 1 (Autobiography, DragonRealms, Cats) */
.side-menu > .menu-section > .submenu > li > .menu-row a {
  padding-left: 30px; 
}

/* Level 2 (Profiles, Lich, Entertainment) */
.side-menu > .menu-section > .submenu > li > .submenu > li > .menu-row a,
.side-menu > .menu-section > .submenu > li > .submenu > li > a {
  padding-left: 45px; 
}

/* Level 3 Deep Links (Desiphon profile, Praxiuz profile) */
.side-menu .submenu .submenu .submenu a {
  padding-left: 60px; 
}

/* ARROW */
.arrow-icon {
  color: #ccc;
  transition: transform 0.25s ease;
  margin-right: 15px; /* Keeps the arrow tucked neatly on the right */
}

.menu-section.open > .menu-row .arrow-icon {
  transform: rotate(90deg);
}

/* SUBMENU (collapsed by default) */
.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

/* SUBMENU OPEN */
.menu-section.open > .submenu {
  max-height: 1000px;
}

/* SUBMENU LINKS */
.submenu a {
  display: block;
  color: #aaa;
  text-decoration: none;
  font-size: 14px;
}

.submenu a:hover {
  background: #333;
  color: #fff;
}

/* ACTIVE PAGE HIGHLIGHT */
.active-link {
  background: #444;
  color: #fff !important;
  font-weight: bold;
}
/* HOME CONTENT */
main {
  margin-left: 236px; /* Aligns nicely with your menu width */
  padding: 20px;
  position: relative;
  z-index: 1;
  flex: 1;            /* Grows to push the footer to the bottom */
}

.character-name {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto 40px auto; /* 20px top gap, 40px bottom gap */
  width: 100%;
}

.character-title-img {
  max-width: 500px; /* Adjust this width based on how big your image file actually is */
  height: auto;
  display: block;
}  

.profile-pictures {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
}

.image-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
  flex-wrap: wrap; /* Allows them to drop down cleanly if the screen gets too small */
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.link-image {
  display: block;
  width: 450px;           /* Sets a clean, readable width for each card */
  aspect-ratio: 16 / 10;  /* ← Changes the box to a sleek landscape ratio matching your artwork */
  overflow: hidden;

  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(255, 210, 127, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* ← Sits perfectly snug now without cutting off anything important */
  display: block;
}

.link-image:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 210, 127, 0.9);
}

.video-tile {
  grid-column: span 2;
  height: 800px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid white;
}

.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================
   ⚔️ DESIPHON PROFILE GALLERY ONLY
   ========================================== */

/* 1. The Grid Container */
.profile-gallery-layout .image-grid {
  display: flex;         
  flex-wrap: wrap;       
  gap: 5x;
  padding: 5px;
  justify-content: flex-start;
}

/* 2. Smaller, Locked-In-Place Card Dimensions (~200px Wide) */
.profile-gallery-layout .link-image {
  display: block;
  width: 200px;          /* ← Dropped down to your preferred compact size */
  height: 300px;         /* ← Proportional tall aspect ratio for 200px width */
  flex-shrink: 0;        
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(255, 210, 127, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 3. Image presentation within the locked frame */
.profile-gallery-layout .link-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;     
  display: block;
}

/* 4. ⭐ VIDEO TILE: Locked to span exactly 2 card spots + the gap column ⭐ */
.profile-gallery-layout .video-tile {
  display: block;
  width: 425px;          /* ← Exact math: (200px * 2) + 25px gap */
  height: 300px;         /* ← Matches the uniform row height perfectly */
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid white;
}

.profile-gallery-layout .video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 10000;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

/* Base image/video layer */
#lightbox-img,
#lightbox-video {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(255,255,255,0.2);
}

.lightbox:not(.active) .hit-left,
.lightbox:not(.active) .hit-right,
.lightbox:not(.active) .arrow,
.lightbox:not(.active) .close {
  pointer-events: none !important;
}

/* Fade + Zoom animation */
.lightbox.active img {
  animation: fadeZoom 0.25s ease;
}

/* Hit zones */
.hit-left,
.hit-right {
  position: absolute;
  top: 0;
  width: 20%;
  height: 100%;
  pointer-events: auto;
	background: none;
  transition: background 0.35s ease; /* ← belongs here */
  z-index: 2;
}

.hit-left { left: 0; }
.hit-right { right: 0; }

/* Hovering the left zone highlights the prev arrow */
.hit-left:hover ~ .prev {
  color: #ffd27f;
  transform: translateY(-50%) scale(1.2);
}

/* Hovering the right zone highlights the next arrow */
.hit-right:hover ~ .next {
  color: #ffd27f;
  transform: translateY(-50%) scale(1.2);
}
/* Arrows */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 10px;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.2s ease;
  z-index: 3;
}

.arrow {
  opacity: 1;
  pointer-events: auto;
}

.arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

.arrow span {
  pointer-events: auto; /* arrow icon still clickable */
}

.arrow:hover {
  color: #ffd27f;
  transform: translateY(-50%) scale(1.2);
  text-shadow: 0 0 12px rgba(255, 210, 127, 0.6);
}

.prev { left: 30px; }
.next { right: 30px; }

/* Close button */
.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 48px;
  cursor: pointer;
  user-select: none;
  z-index: 3;
}


@keyframes fadeZoom {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* Day/Night Button */
.dark {
  filter: invert(1) hue-rotate(180deg);
}

footer {
  text-align: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  margin-left: 240px; /* Tribunes alignment out past sidebar */
}