/* Project Page CSS */

* { cursor: none !important; }
    
body {
    background-image: url('/Images/background.jpg');
    overflow-x: hidden;
}

.project-page-container {
  max-width: 1200px;
  margin: auto;
  padding: 20px; /* Increased padding for the entire container */
}

.top-button-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

a.artstation-button, a.home-button {
  font-weight: bold;
  text-decoration: none !important;
  border-radius: 10px;
  padding: 10px 20px;
  display: inline-block;
  transition: background-color 0.3s ease;
}

a.artstation-button {
  font-size: 1.3em;
  padding: 15px 25px;
  background-color: #ff8ee0;
  color: #1a1a2e !important;
}
a.artstation-button:hover {
  background-color: #ffd6ff;
  transform: scale(1.05);
}

a.home-button {
  background-color: #fcb1ff;
  color: #1a1a2e !important;
}
a.home-button:hover {
  background-color: #ffd6ff;
}

a.download-button {
  font-size: 1.3em;
  padding: 15px 25px;
  background-color: #8ee0ff;
  color: #1a1a2e !important;
  font-weight: bold;
  text-decoration: none !important;
  border-radius: 10px;
  display: inline-block;
}
a.download-button:hover {
  background-color: #d6f7ff;
  transform: scale(1.05);
}

a.youtube-button {
  font-size: 1.3em;
  padding: 15px 25px;
  background-color: #f74518;
  color: #1a1a2e !important;
  font-weight: bold;
  text-decoration: none !important;
  border-radius: 10px;
  display: inline-block;
}
a.youtube-button:hover {
  background-color: #ee1e1e;
  transform: scale(1.05);
}

.carousel-container {
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-container img,
.carousel-container video,
.carousel-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.carousel-container img.active,
.carousel-container video.active,
.carousel-container iframe.active {
  display: block;
}

.arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 90px;
  height: 90px;
  background-color: transparent;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 100;
  color: white;
  font-size: 1.5em;
  user-select: none;
}

.arrow-btn.left { left: 10px; }
.arrow-btn.right { right: 10px; }

.description-box {
  background-color: rgba(26,26,46,0.8);
  color: #fceaff;
  padding: 30px; /* Increased padding */
  border-radius: 15px;
  margin: 40px auto; /* Added margin for spacing */
  line-height: 1.8; /* Increased line height */
  font-size: 1.1em; /* Slightly larger font size */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.description-box h1 {
  text-align: center; /* Center-align the title */
  font-size: 2em; /* Larger font size for the title */
  margin-bottom: 20px; /* Add spacing below the title */
}

.description-box p {
  margin-bottom: 20px; /* Add spacing between paragraphs */
}

.inline-image {
  margin: 30px 0;
  text-align: center;
}

.inline-image img,
.inline-image video {
  max-width: 100%;
  max-height: 500px;
  height: auto;
  width: auto;
  margin: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(255, 176, 255, 0.3);
  object-fit: contain;
  cursor: zoom-in;
}

.inline-image .caption {
  font-size: 0.9em;
  color: #c9aaff;
  margin-top: 8px;
  font-style: italic;
}

#custom-cursor {
  position: fixed;
  left: -100px;
  top: -100px;
  width: 70px;
  height: 70px;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
  opacity: 0;
}

.zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 10, 20, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.sub-projects {
    margin: 35px 0 45px;
}

.sub-projects h2 {
    text-align: center;
    margin-bottom: 25px;
}


/* Card grid */

.sub-project-grid {
    display: grid;

    /* Maximum of 3 cards per row */
    grid-template-columns: repeat(4, 250px);

    gap: 25px;

    /* Centre the entire group */
    justify-content: center;

    width: 100%;
}


/* Individual card */

.sub-project-button {
    display: flex;
    flex-direction: column;

    width: 250px;

    text-decoration: none;
    text-align: center;

    background-color: rgba(26, 26, 46, 0.8);

    border-radius: 12px;

    overflow: hidden;

    color: #fceaff;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}


/* Card image */

.sub-project-button img {
    width: 100%;
    aspect-ratio: 1 / 1;

    object-fit: cover;

    display: block;
}


/* Card title */

.sub-project-button span {
    padding: 12px 10px;

    font-weight: bold;
    font-size: 1em;
}


/* Hover */

.sub-project-button:hover {
    transform: translateY(-5px);

    background-color: rgba(50, 50, 75, 0.95);
}


/* Mobile */

@media (max-width: 850px) {

    .sub-project-grid {
        grid-template-columns: repeat(2, 250px);
    }

}


@media (max-width: 580px) {

    .sub-project-grid {
        grid-template-columns: minmax(0, 1fr);
        padding: 0 20px;
    }

    .sub-project-button {
        width: 100%;
        max-width: 300px;
        margin: auto;
    }

}

/* Adjust styles for mobile devices */
@media (max-width: 768px) {
  /* Ensure the body doesn't overflow horizontally */
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
  }

  /* Hide the custom cursor on mobile */
  #custom-cursor {
    display: none;
  }

  /* Make the slideshow buttons smaller */
  .arrow-btn {
    width: 50px;
    height: 50px;
    font-size: 1em;
  }

  /* Ensure the carousel fits within the screen */
  .carousel-container {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
  }

  /* Adjust padding and margins for better spacing */
  .description-box {
    padding: 20px;
    margin: 20px auto;
    font-size: 1em;
  }

  .inline-image {
    margin: 20px 0;
  }

  .inline-image img,
  .inline-image video {
    max-height: 300px; /* Reduce max height for smaller screens */
  }

  /* Ensure the project page container fits within the screen */
  .project-page-container {
    padding: 10px;
    box-sizing: border-box;
  }

  /* Adjust grid layout for mobile */
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    padding: 10px;
    overflow-x: hidden; /* Prevent horizontal scrolling in the grid */
  }

  /* Hide desktop-specific elements */
  .flame-overlay,
  .cursor-container,
  .corner-icons {
    display: none !important;
  }

  /* Footer adjustments */
  .footer {
    position: relative;
    width: 100%;
    margin-top: auto;
    padding-bottom: 10px;
  }
}

/* ---------- Two-column rows (built by layoutDescription in projectScript.js) ---------- */

.split-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  margin-bottom: 20px;
}

/* Odd rows: media on the left, text on the right */
.split-row.reverse .split-text  { grid-column: 2; grid-row: 1; }
.split-row.reverse .split-media { grid-column: 1; grid-row: 1; }

.split-text > :last-child { margin-bottom: 0; }

.split-media .inline-image { margin: 0 0 20px; }
.split-media .inline-image:last-child { margin-bottom: 0; }

/* Let media fill the column rather than the 500px cap used in full-width mode */
.split-media .inline-image img,
.split-media .inline-image video {
  max-height: none !important;
}

/* Image with no paragraph before it: centre it full width */
.split-row.media-only { grid-template-columns: minmax(0, 1fr); }
.split-row.media-only .split-media { max-width: 700px; margin: 0 auto; }

@media (max-width: 768px) {
  .split-row { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .split-row.reverse .split-text,
  .split-row.reverse .split-media { grid-column: auto; grid-row: auto; }
}

/* ---------- Multiple media in a row: centred strip, all items the same height ---------- */

.media-strip {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin: 10px auto 30px;
}

/* --basis (width that gives the target height) is set by equaliseStrip() in projectScript.js */
.media-strip .inline-image {
  flex: 0 1 var(--basis, 300px);
  margin: 0;
  min-width: 0;
}

.media-strip .inline-image img,
.media-strip .inline-image video {
  width: 100%;
  height: auto;
  max-height: none !important;
}

@media (max-width: 768px) {
  .media-strip { flex-direction: column; gap: 15px; }
  .media-strip .inline-image { flex: none; width: 100%; }
}


/* ---------- Music player (!audio[...] in project.md, see audioPlayer.js) ---------- */
.audio-player {
  width: 100%;
  border-radius: 12px;
  background: #1e1e2e;
  padding: 15px;
  box-shadow: 0 0 25px rgba(255, 176, 255, 0.3);
  margin-bottom: 10px;
  position: relative;
  display: flex;
}

.player-main {
  flex-grow: 1;
  margin-right: 20px;
}

.player-info {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.song-title {
  color: white;
  font-weight: bold;
  margin-bottom: 5px;
}

#player-status {
  color: #aaa;
  font-size: 12px;
}

.player-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.control-btn {
  padding: 8px 15px;
  background: #f05454;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: opacity 0.2s;
}

.control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pause-btn {
  background: #f5a742;
}

.stop-btn {
  background: #555;
}

.control-btn:not(:disabled):hover {
  opacity: 0.9;
}

.youtube-btn {
  background: #1e90ff;
}

.time-display {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  color: #aaa;
  font-size: 12px;
  margin-bottom: 5px;
}

.progress-container {
  position: relative;
  height: 15px;
  margin-bottom: 10px;
}

.progress-bg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  height: 5px;
  background: #555;
  border-radius: 3px;
  z-index: 1;
}

.progress-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  width: 0%;
  height: 5px;
  background: #f05454;
  border-radius: 3px;
  z-index: 2;
  transition: width 0.1s;
}

#progressBar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 15px;
  margin: 0;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 3;
}

#progressBar:disabled {
  cursor: not-allowed;
}

#progressBar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  background: #f05454;
  border-radius: 50%;
  cursor: pointer;
}

#progressBar:disabled::-webkit-slider-thumb {
  background: #999;
}

.volume-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 10px;
  border-left: 1px solid #444;
  width: 40px;
}

.volume-slider-container {
  height: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#volumeSlider {
  width: 120px;
  height: 5px;
  -webkit-appearance: none;
  background: #555;
  border-radius: 5px;
  outline: none;
  transform: rotate(-90deg);
  transform-origin: center;
}

#volumeSlider:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#volumeSlider:not(:disabled) {
  cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  background: #f05454;
  border-radius: 50%;
}

#volumeValue {
  color: #aaa;
  font-size: 12px;
  margin-top: 10px;
  text-align: center;
}

#player-container {
  height: 0;
  width: 0;
  position: absolute;
  overflow: hidden;
  opacity: 0;
}

/* Firefox specific styles for vertical slider */
@supports (-moz-appearance:none) {
  #volumeSlider {
    height: 120px;
    width: 5px;
    transform: none;
  }
}

/* Responsive styles for mobile devices only */
@media (max-width: 640px) {
  .audio-player {
    max-width: 95%;
    padding: 12px;
    flex-direction: column;
  }

  .player-main {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .volume-container {
    flex-direction: row;
    width: 100%;
    padding: 10px 0 0 0;
    border-left: none;
    border-top: 1px solid #444;
  }

  .volume-slider-container {
    height: auto;
    width: 100%;
    margin-right: 10px;
  }

  #volumeSlider {
    width: 100%;
    transform: none;
  }

  #volumeValue {
    margin-top: 0;
    margin-left: 10px;
    min-width: 40px;
  }

  /* Firefox specific styles for mobile */
  @supports (-moz-appearance:none) {
    #volumeSlider {
      height: 5px;
      width: 100%;
    }
  }

  /* Smaller control buttons on mobile */
  .control-btn {
    padding: 6px 12px;
    font-size: 14px;
  }

  /* Adjust the player-controls spacing on mobile */
  .player-controls {
    justify-content: space-between;
  }
}

/* ---------- "Coming soon" box (templates/coming-soon.html) ---------- */
.coming-soon {
  display: flex;
  align-items: center;
  gap: 25px;
  max-width: 700px;
  margin: 10px auto;
  padding: 20px 25px;
  border: 2px dashed rgba(255, 176, 255, 0.45);
  border-radius: 12px;
  background-color: rgba(255, 176, 255, 0.05);
}

.coming-soon img {
  height: 110px;
  max-width: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

.description-box .coming-soon h2 {
  margin: 0 0 6px;
  color: #c9aaff;
}

.description-box .coming-soon p {
  margin: 0;
}

@media (max-width: 600px) {
  .coming-soon {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  .coming-soon img {
    height: auto;
  }
}
