/* =========================================================
   GLOBAL STYLES (Shared across all pages)
   ========================================================= */
* {
  box-sizing: border-box;
}

body {
  background-color: #0a0a0a;
  font-family: 'Georgia', serif;
  margin: 0;
  padding: 0;
  color: #e0d8c3;
  opacity: 0;
}

.all-other-pages {
  transition: opacity 0.3s ease;
}

.title-page-only {
  opacity: 0;
  transition: opacity 1.5s ease;
}

body.loaded {
  opacity: 1;
}

main {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

a {
  text-decoration: none;
}

.mainSelect {
  max-width: 1500px;
  width: 100%;
  background-color: #1b1b1b;
  padding: 20px;
  border: 2px solid #555;
  border-radius: 8px;
  box-shadow: 0 0 12px #000;
}

.headerBox {
  text-align: center;
  margin-bottom: 20px;
}

.headerBox2 {
  margin-top: -70px;
}

.pageTitle {
  line-height: 1.5;
  color: #e0d8c3;
  font-size: 2.5rem;
  font-family: "Russo One", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.pageTitle span {
  color: #f0d87a;
}

.gameText {
  background-color: #121212;
  margin-top: 30px;
  padding: 15px;
  border-left: 4px solid #f0d87a;
  border-right: 4px solid #f0d87a;
  line-height: 1.5;
  color: #e0d8c3;
  font-size: 1rem;
  text-align: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

.centerText {
  text-align: center;
}

/* Hidden elements */
.hidden {
  display: none;
}

.yellow {
  color: #f0d87a;
}

.cool-blue {
  color: #7A92F0;
}

.bigger {
  font-size: 1.3em;
}


/* =========================================================
   START SCREEN (myfrpg-start.html)
   ========================================================= */
#landingPage {
  max-width: 1200px;
  width: 100%;
  background-color: #1b1b1b;
  padding: 20px;
  border: 2px solid #555;
  border-radius: 8px;
  box-shadow: 0 0 12px #000;
}

/* Stats (hidden on intro) */
#stats {
  background-color: #222;
  border: 1px solid #555;
  padding: 10px;
  margin-bottom: 10px;
  display: none;
  /* set display to flex to display stats box */
  justify-content: space-around;
  font-weight: bold;
}

.stat {
  color: #f0d87a;
}

/* Intro Button */
#standardBtnContainer {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

#standardBtnContainer button,
#mobileModal button {
  background: linear-gradient(to bottom, #8e7032, #6e5723);
  border: 2px solid #d3b95c;
  color: #f5f3e7;
  padding: 15px 15px;
  margin-top: 30px;
  margin-left: 30px;
  margin-right: 30px;
  font-size: 1.1em;
  cursor: pointer;
  font-family: 'Georgia', serif;
  border-radius: 5px;
  text-decoration: none;
  transition: transform 0.3s ease-in-out;
}

#standardBtnContainer button a {
  padding: 12px 30px;
}

#standardBtnContainer button:hover,
#mobileModal button:hover {
  background: linear-gradient(to bottom, #a07d3a, #7e652b);
  transform: scale(1.05);
}

#createCharacterBtn a,
#confirmBtn a {
  color: #f5f3e7;
}

/* Controls (hidden initially) */
#controls {
  display: none;
  /* set display to flex to display buttons */
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

/* Monster Stats */
#monsterStats {
  background-color: #3b0d0d;
  border: 1px solid #c40b0b;
  padding: 10px;
  margin-bottom: 15px;
  color: #f5c6c6;
}

/* Image Placeholder */
#imageContainer img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}


/* =========================================================
   RACE SELECT SCREEN (myfrpg-race-select.html)
   ========================================================= */

/* Slideshow container */
.slideshow-container {
  max-height: 80%;
  max-width: 85%;
  position: relative;
  margin: auto;
  overflow: hidden;
}

.slide-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 550px;
  margin: 0 auto;
}

/* Hide the images by default */
.mySlides {
  display: none;
  width: 100%;
  text-align: center;
}

/* Resize and align images properly */
.characterImage {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Limit champion image size on stats page */
#statsPage .characterImage {
  max-width: 300px;
  /* or whatever size looks good */
  height: auto;
  margin: 0 auto;
  /* center the image */
  display: block;
}

/* Arrow styling */
.prev,
.next {
  position: relative;
  /* relative to the wrapper */
  top: 0;
  transform: none;
  font-size: 2rem;
  background-color: transparent;
  color: white;
  padding: 10px;
  cursor: pointer;
  user-select: none;
  z-index: 1;
}

.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
}

/* The dots/bullets/indicators */
.slider-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px auto 20px auto;
  width: 85%;
}

.slider-dots {
  display: flex;
  gap: 8px;
}

.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active,
.dot:hover {
  background-color: #d3b95c;
}

.class-name {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: "Russo One", sans-serif;
  color: #d3b95c;
  letter-spacing: 2px;
}

/* Fading animation */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {
    opacity: .4;
  }

  to {
    opacity: 1;
  }
}

/* Gender and Race selection */
.character-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
}

.genderSelect {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.genderSelect label {
  font-size: 1.6rem;
  cursor: pointer;
  font-family: "Russo One", sans-serif;
  color: #f0d87a;
}


/* Class description highlight */
.class-describe {
  font-size: 1.1rem;
  font-family: "Russo One", sans-serif;
  color: #d3b95c;
}

/* =========================================================
   CLASS SELECT SCREEN (myfrpg-class-select.html)
   ========================================================= */
#characterStats {
  max-width: 1200px;
  width: 100%;
  background-color: #1b1b1b;
  padding: 20px;
  border: 2px solid #555;
  border-radius: 8px;
  box-shadow: 0 0 12px #000;
}

/* Make stats section a flex container */
.imageTextContainer {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  /* align items at the top */
  gap: 20px;
  /* space between image and text */
}

.raceDescribeSection {
  display: flex;
  align-items: flex-start;
  /* align items at the top */
  gap: 20px;
  /* space between image and text */
  margin: 10px;
}

.imageTextContainer .raceDescribeSection img {
  max-width: 300px;
  max-height: 300px;
  /* adjust as needed */
  height: 280px;
  width: auto;
  display: block;
  object-fit: cover;
}

.raceDescribeText {
  flex: 1;
  /* expands to fill space */
  text-align: left;
  /* ensure text aligns left */
  font-size: 1.05rem;
  margin-top: -10px;
}

.imageTextContainer div:nth-child(5) {
  margin-bottom: 100px;
}

/* Limit champion image size */
#statsPage .characterImage {
  max-width: 250px;
  /* adjust as needed */
  height: auto;
  display: block;
}

/* Make description take remaining space */
#classDescribe {
  flex: 1;
  /* expands to fill space */
  text-align: left;
  /* ensure text aligns left */
}

/* =========================================================
   GALLERY STYLE (myfrpg-race-select.html)
   ========================================================= */
.gallery-container {
  width: 100%;
  max-width: 1500px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.gallery-item {
  width: 100%;
  height: 400px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform .3s ease;
}

.imageTextContainer .raceDescribeSection .img900 {
  display: none;
}


/* ======================== RESPONSIVE GALLERY GRID FIX (5-COLUMN VERSION) ======================== */
/* Keeps five images per row on large screens, scaling smoothly down to two and one on smaller screens. 
   Each image fully fills its .gallery-item container and keeps your hover/fade effects intact. */

.gallery-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  /* 5 per row on large screens */
  gap: 15px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 1600px;
  /* Optional: keeps it centered on ultra-wide monitors */
  margin: 0 auto;
}

/* Gallery container for starting zones */
.gallery-container-startingzones {
  display: grid;
  /* 3 per row on large screens */
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 1600px;
  /* Optional: keeps it centered on ultra-wide monitors */
  margin: 0 auto;
}

/* Gallery item for starting zones */
.gallery-item-startingzones {
  position: relative;
  overflow: hidden;
  /* Adjust height as needed */
  height: 500px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  height: 350px;
  /* Adjust height as needed */
  transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Make sure images fully fill their containers */
.image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to top, rgba(142, 112, 50, 0), rgba(110, 87, 35, 1));
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Prevents squishing */
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.image-wrapper2 {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to top, rgba(142, 112, 50, 0), rgba(110, 87, 35, 1));
}

.image-wrapper2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Prevents squishing */
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item-startingzones:hover .image-wrapper2 img {
  transform: scale(.95);
  border-radius: 3%;
}

.gallery-item-startingzones.locked .image-wrapper2 img {
  transform: scale(.97);
  border-radius: 3%;
}

.gallery-item:hover .image-wrapper img:nth-child(2) {
  opacity: 1;
  transform: scale(.9);
  border-radius: 3%;
}

.gallery-item:hover .image-wrapper img:nth-child(1) {
  opacity: 0;
  transform: scale(1.35);
}

/* 3 per row on medium screens */
@media (max-width: 1200px) and (min-width: 900px) {
  .gallery-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 2 per row on tablets */
@media (max-width: 899px) and (min-width: 600px) {
  .gallery-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1 per row on mobile */
@media (max-width: 599px) {
  .gallery-container {
    grid-template-columns: 1fr;
  }
}

.image-wrapper {
  width: 100%;
  height: 85%;
  position: relative;
  overflow: hidden;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity .7s ease, transform .7s ease;
}


.image-wrapper img:nth-child(2) {
  opacity: 0;
  transform: scale(1.1);
}

.gallery-item:hover .image-wrapper img:nth-child(2) {
  opacity: 1;
  transform: scale(.9);
  border-radius: 3%;
}


.gallery-item:hover .image-wrapper img:nth-child(1) {
  opacity: 0;
  transform: scale(1.35);
}

.gallery-item.locked .image-wrapper img:nth-child(2) {
  opacity: 1;
  transform: scale(.95);
  border-radius: 3%;
}

.gallery-item.locked .image-wrapper img:nth-child(1) {
  opacity: 0;
  transform: scale(1.05);
}

.image-name {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: 'Russo One', sans-serif;
  color: #f5f3e7;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.3s ease;
  z-index: 2;
}

.gallery-item:hover .image-name {
  background: linear-gradient(to bottom, rgba(142, 112, 50, 0), rgba(110, 87, 35, 1));
}

.gallery-item.locked .image-name {
  background: linear-gradient(to bottom, rgba(142, 112, 50, 0), rgba(110, 87, 35, 1));
}

.image-wrapper img:nth-child(3) {
  opacity: 0;
}

.centerText {
  text-align: center;
}

.textInfo {
  font-size: 1.1rem;
}

/* ======================== Extra Info Display ======================== */

.extraInfo {
  margin-top: 20px;
  padding: 15px;
  background: rgba(240, 216, 122, 0.08);
  border: 2px solid #f0d87a;
  border-radius: 8px;
  color: #f0d87a;
  font-family: "Cinzel", serif;
  font-size: 1rem;
  text-align: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

.gameText.fade-out {
  opacity: 0;
  transform: translateY(5px);
}

.gameText.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.extraInfo.fade-out {
  opacity: 0;
  transform: translateY(5px);
}

.extraInfo.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.racials {
  color: white;
  font-size: 1.2rem;
}


/* ======================== MODAL (Small Screen Version of gameText) ======================== */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  padding-top: 25%;
  padding-left: 10%;
  overflow: auto;
  background-color: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #121212;
  border: 3px solid #f0d87a;
  color: #e0d8c3;
  padding: 25px;
  width: 90%;
  max-width: 550px;
  font-size: 1rem;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(240, 216, 122, 0.2);
  animation: fadeIn 0.4s ease;
}

#modalExtraInfo {
  margin-top: 1rem;
  /* creates a nice gap */
}

.close-btn {
  color: #f0d87a;
  float: right;
  margin-top: -20px;
  margin-right: -10px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.close-btn:hover {
  color: #fff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* ======================== MEDIA QUERIES ======================== */

/* 1200px and below (large screens shifting to medium) */
@media (max-width: 1200px) {

  /* Example: adjust modal size */
  .modal-content {
    max-width: 1000px;
    font-size: 0.95rem;
  }

  .image-wrapper:hover img:nth-child(1) {
    transform: scale(1.03);
  }
}

/* 1060px breakpoint */
@media (max-width: 1060px) {

  .imageTextContainer .raceDescribeSection img {
    margin-top: 30px;
  }
}


/* 900px and below (tablets and small laptops) */
@media (max-width: 900px) {

  /* Example: center modal more tightly */
  .modal {
    padding-top: 20%;
    padding-left: 10%;
  }

  .modal-content {
    max-width: 1000px;
    font-size: 0.9rem;
    padding: 20px;
  }

  .image-wrapper img:nth-child(3) {
    opacity: 0;
  }

  .raceDescribeSection {
    display: block;
  }

  .imageTextContainer .raceDescribeSection .raceDescribeText h2 {
    margin-top: 35px;
  }

  .imageTextContainer .raceDescribeSection img {
    float: left;
    margin-right: 17px;
    margin-bottom: 8px;
    clip-path: margin-box;
  }

  .imageTextContainer .raceDescribeSection .img900 {
    display: block;
  }

  .imageTextContainer .raceDescribeSection .imgReg {
    display: none;
  }
}


/* 600px and below (phones) */
@media (max-width: 600px) {

  /* Tighten modal and reduce padding */
  .modal {
    padding-top: 15%;
    padding-left: 8%;
  }

  .modal-content {
    width: 92%;
    max-width: 1000px;
    padding: 18px;
    font-size: 0.85rem;
  }

  .close-btn {
    font-size: 1.3rem;
    margin-top: -15px;
    margin-right: -5px;
  }

  .image-wrapper img:nth-child(2) {
    opacity: 0;
    transform: scale(1);
    object-fit: scale-down;
    z-index: 2;
  }

  .image-wrapper img:nth-child(3) {
    opacity: .15;
    transform: scale(1);
    object-fit: cover;
    z-index: -1;
  }

  .gallery-item:hover .image-wrapper img:nth-child(2) {
    opacity: 1;
    transform: scale(1);
    transform-origin: center;
    object-fit: scale-down;
  }

  .gallery-item:hover .image-wrapper img:nth-child(3) {
    z-index: 1;
  }


  .gallery-item:hover .image-wrapper img:nth-child(1) {
    opacity: 0;
    transform: scale(1.1);
  }

  .gallery-item.locked .image-wrapper img:nth-child(2) {
    opacity: 1;
    transform: scale(1);
  }

  .gallery-item.locked .image-wrapper img:nth-child(1) {
    opacity: 0;
    transform: scale(1.05);
  }

  .raceDescribeSection {
    display: flex;
    flex-direction: column;
  }

  .raceDescribeSection:nth-child(2),
  .raceDescribeSection:nth-child(4) {
    flex-direction: column-reverse;
  }

  .imageTextContainer .raceDescribeSection .img900 {
    display: none;
  }

  .imageTextContainer .raceDescribeSection .imgReg {
    display: block;
  }

  .raceDescribeText h2,
  .raceDescribeText p {
    text-align: center;
  }

  .imageTextContainer .raceDescribeSection img {
    width: 100%;
    max-width: 100%;
    object-fit: cover;
  }

  .pageTitle {
    font-size: 2.1rem;
    line-height: 1;
  }

  .imageTextContainer .raceDescribeSection .raceDescribeText h2 {
    margin-top: 0px;
  }

  .imageTextContainer .raceDescribeSection img {
    margin-top: 0px;
  }

}




/* =========================================================
   CODE DUMPS / UNUSED / ALTERNATIVE
   ========================================================= */
/* Alt Image Style
#imageContainer {
  margin-top: 20px;
  height: 150px;
  background-color: #181818;
  border: 1px dashed #555;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-style: italic;
  font-size: 0.9em;
}

.raceSelect {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 550px;
}

.raceSelect label {
  font-family: "Russo One", sans-serif;
  cursor: pointer;
  font-size: 1rem;
  color: #e0d8c3;
}

*/