/* General Styles */
* {
    font-family: 'Monster Font';
}

body {
    text-align: center;
    position: relative;
    background-color: #E9E2D3;
    color: rgb(33, 35, 146);
    background-repeat: no-repeat;  /* Prevent background repeat */
    background-size: cover;  /* Ensure the background covers the entire screen */
    background-attachment: fixed; /* Make background fixed when scrolling */
    overflow-x: hidden;
}


/* Font Face */
@font-face {
    font-family: 'Monster Font';
    src: url('OpenDyslexic-Bold.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Title Styles */
#title {
    text-align: center;
    background: linear-gradient(to bottom, lightgreen, rgb(245, 189, 84));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px black;
}

/* Input Styles */
#First_Monster, #Second_Monster, #Search_Monster {
    width: 200px;
    padding: 10px 15px; /* Adjust padding for better spacing */
    margin-bottom: 15px; /* Increased margin for better spacing between elements */
    background: rgb(255, 109, 109); /* Keep the original background color */
    border: 2px solid #f7b7b7; /* Add a soft border for definition */
    border-radius: 8px; /* Rounded corners for a more modern look */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
    font-size: 14px; /* Adjust font size for better readability */
    color: #333; /* Dark text color for better contrast */
    transition: all 0.3s ease; /* Smooth transition for interactive effects */
    text-align: center;
}

#First_Monster:focus, #Second_Monster:focus, #Search_Monster:focus {
    border-color: rgb(255, 109, 109); /* Change border color on focus */
    box-shadow: 0 0 10px rgba(255, 109, 109, 0.5); /* Highlight input box on focus */
    outline: none; /* Remove the default outline on focus */
}


#Search_Monster:disabled,
input:disabled {
    background-color: #d3d3d3;
    color: #a0a0a0;
    cursor: not-allowed;
}

/* Suggestion Box */
.suggestions {
    border: 1px solid #ccc;
    display: none;
    position: absolute;
    background: white;
    max-height: 150px;
    overflow-y: auto;
    z-index: 99;
    width: 200px;
    border-radius: 10%;
    opacity: 0.8;
}

/* Result Container */
#resultContainer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    position: absolute;
    top: 50px;
    width: 100%;
}

/* Image and Stats Containers */
#imageContainer, #statsContainer, .suggestions {
    flex: 1;
    text-align: center;
}

.monster-image {
    width: 300px;
    height: auto;
    margin-right: 10px;
    position: left;
    opacity: 0;
    transform: translateY(100px);
    animation: slide-up 0.5s forwards;
}

/* Result Text Styles */
.result-container {
    position: relative;
    margin-bottom: 0;
    margin-left: 200px;
    display: flex;
    flex-direction: column;
    width: 300px;
}

.result-text {
    position: relative;
    z-index: 1;
    padding: 1px;
    text-align: center;
}

.black-box {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, lightgreen, rgb(245, 189, 84));
    z-index: 0;
    border-radius: 7px;
    opacity: 0.7;
}

/* Tab Styles */
.tabs-container {
    display: flex;
    margin-bottom: 10px;
    position: relative; /* Allows for controlled placement */
    z-index: 10; /* Ensure it stays on top */
}

.tab-button {
    margin-right: 5px;
    padding: 8px 5px; /* Slightly adjusted padding for better fit */
    cursor: pointer;
    border-radius: 5px;
    min-width: 100px; /* Minimum width to keep buttons consistent */
    max-width: 80px; /* Maximum width to prevent excessive growth */
    width: 100%; /* Allow width to adjust to available space within container */
    box-sizing: border-box; /* Prevent padding from affecting width */
}

.tab-button:hover {
    background-color: darkblue;
    color: white; /* Ensure text color changes on hover for visibility */
}

/* Content Area */
.content-area {
    margin-top: 10px;
}

/* No Monster Styles */
#noMonster {
    display: flex;
    flex-direction: column; /* Aligns children vertically */
    align-items: center; /* Centers horizontally */
    justify-content: center; /* Centers vertically */
    position: absolute; /* Allows for centering in relation to the screen */
    top: 50%; /* Positions from the top */
    left: 30%; /* Positions from the left */
    transform: translate(-50%, -50%); /* Centers the element */
    text-align: center; /* Centers text inside */
    max-width: 550px;
    transform: translateY(100px);
    animation: slide-up 0.5s forwards;
}

#noMonsternoslide {
    max-width: 350px;
    width: 350px;
}

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

/* Keyframes */
@keyframes slide-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



#inputContainer {
    position: relative; /* Allows for controlled placement */
    z-index: 10; /* Ensure it stays on top */
}

#resultContainer {
    margin-top: 20px; /* Space between input and results */
}
#breedButton, #resetButton {
    color:black; 
}
#breedButton:hover, #resetButton:hover {
    background-color: darkblue;
    color: white;

}

#iconContainer {
    position: absolute;
    top: 10px; /* Adjust as necessary */
    left: 10px; /* Adjust as necessary */
    display: flex;
    align-items: center;
}

#icon {
    width: 50px; /* Adjust the icon size as needed */
    height: 50px;
    cursor: pointer; /* Change cursor to pointer on hover */

}

#textContainer {
    color: black;
    display: none; /* Initially hide the text container */
    margin-left: 10px; /* Space between icon and text */
    padding: 5px;
    background: rgb(255, 109, 109);
    border: 2px solid #ccc; /* Optional border */
    border-radius: 5px; /* Rounded corners */
    position: relative; /* Position relative for sliding */
    animation: slideIn 0.5s forwards; /* Animation for sliding in */
    z-index: 10; /* Ensure the icon and text are above the background */
    max-width: 300px;

}

@keyframes slideIn {
    from {
        transform: translateX(-100%); /* Start from the left */
        opacity: 0; /* Start as invisible */
    }
    to {
        transform: translateX(0); /* End at its original position */
        opacity: 1; /* Fade in */
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0); /* Start from its original position */
        opacity: 1; /* Start visible */
    }
    to {
        transform: translateX(-100%); /* Slide out to the left */
        opacity: 0; /* Fade out */
    }
}

#iconContainer:hover #textContainer {
    display: block; /* Show the text container when hovering over the icon */
    animation: slideIn 0.5s forwards; /* Start sliding in animation */
}

/* Hide the text container when not hovering */
#iconContainer:not(:hover) #textContainer {
    display: none; /* Ensure it is hidden when not hovering */
}

/* Ensure the container slides out smoothly */
#iconContainer:not(:hover) #textContainer {
    animation: slideOut 0.5s forwards; /* Slide out animation */
    display: block; /* Keep it visible during animation */
}



/* Fog overlay styles */
#blurOverlay {
    position: fixed; /* Fixed positioning to cover the entire viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0); /* Transparent background */
    backdrop-filter: blur(10px); /* Apply a blur effect */
    display: none; /* Initially hidden */
    z-index: 100; /* Below the input elements */
}

/* Fog message styles */
#blurMessage {
    position: fixed; /* Fixed positioning */
    top: 20px; /* Position from the top */
    left: 20px; /* Position from the left */
    color: white; /* Text color */
    background-color: rgba(80, 80, 80, 0.301); /* Semi-transparent background */
    padding: 10px; /* Padding for some spacing */
    border-radius: 5px; /* Rounded corners */
    display: none; /* Initially hidden */
    z-index: 122; /* Above other elements */
    animation: slideIn 0.5s forwards; /* Animation for sliding in */

}

/* Ensure inputContainer, inputs, and buttons are positioned normally */
#inputContainer,
input,
button {
    position: relative; /* Relative positioning */
    z-index: 98; /* Higher z-index for input and button */
}

/* Hide inputs and buttons when fog is active */
#inputContainer.hidden,
input.hidden,
button.hidden {
    z-index: 120; /* Set to 0 initially */
    display: none; /* Hide the elements */
}

/* Ensure the resultContainer and imageContainer are above the fog */
#resultContainer,
#imageContainer,
#statsContainer {
    z-index: 120; /* Set to 0 initially */
}


/* Hide resultContainer when fog is active */
#resultContainer.hidden {
    display: none; /* Hide the result container */
}

/* Hide blur when fog is not active */
#blurOverlay.hidden {
    display: none; /* Hide the blur overlay */
}

/* Hide blur message when fog is not active */
#blurMessage.hidden {
    display: none; /* Hide the blur message */
}




.breed-image {
    display: flex;
    flex-direction: column; /* Aligns children vertically */
    align-items: center; /* Centers horizontally */
    justify-content: center; /* Centers vertically */
    position: absolute; /* Allows for centering in relation to the screen */
    top: 50%; /* Positions from the top */
    left: 50%; /* Positions from the left */
    transform: translate(-50%, -50%); /* Centers the element */
    text-align: center; /* Centers text inside */
    max-width: 300px;
  }
  
 

  button {
    width: 10%; /* Slightly smaller button width */
    padding: 8px;
    margin: 5px 2%;
    font-size: 12px; /* Smaller font size for buttons */
    font-weight: bold;
    color: white;
    background: rgb(255, 109, 109);
    border: 2px solid #f7b7b7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: rgb(255, 79, 79); /* Darker hover background */
    box-shadow: 0 0 8px rgba(255, 79, 79, 0.3);
}

button:active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Subtle shadow on click */
}

button:focus {
    outline: none;
}


input::placeholder {
    text-align: center;
    color: rgba(0, 0, 0, 0.5); /* Set text color with transparency (50% opacity) */
    font-size: 14px; /* Adjust the font size */
    font-style: italic; /* Italicize the placeholder text */
    font-weight: 300; /* Lighter font weight for a soft look */
    letter-spacing: 1px; /* Add slight space between characters */
    opacity: 1; /* Ensure placeholder text is fully visible */
}

input:focus::placeholder {
    color: #ff6d6d; /* Change the placeholder color on focus */
    font-style: normal; /* Remove italic style when focused */
}


/* Slide Button */
#slideButton {
    position: fixed;
    top: 20%;
    right: 0;
    transform: translateY(-50%);
    background-color: rgb(255, 109, 109, 0.7);
    color: white;
    padding: 15px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    cursor: pointer;
    z-index: 1000;
    transition: right 0.3s ease, transform 0.3s ease;
}

#slideButton:hover {
    right: 10px;
    transform: translateY(-50%) scale(1.05);
}

/* Slide Panel */
#slidePanel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background-image: url(images/backgrounds/Celestials_DesktopWallpaper.jpg);
    background-size: cover;
    box-shadow: -3px 0 10px rgb(255, 109, 109);
    transition: right 0.5s ease;
    z-index: 999;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
     overflow: hidden;

}

/* Panel Content */
#panelContent {
    color: rgb(255, 109, 109);
}

#slidePanel.open {
    right: 0;
}


@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

#islandImg {
    position: absolute;
    right: 75%;
    bottom: 30%;
    animation: float 3s ease-in-out infinite;
}

#islandName {
    position: absolute;
    color: mediumpurple;
    text-decoration: underline;
    text-shadow: -1px -1px 0 #8C00E3,
1px -1px 0 #8C00E3,
-1px 1px 0 #8C00E3,
1px 1px 0 #8C00E3;;
    right: 77%;
}

#islandDropdown {
    width: 20%;
    margin-top: 10px;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 5px;
        text-shadow: -1px -1px 0 #8C00E3,
    1px -1px 0 #8C00E3,
    -1px 1px 0 #8C00E3,
    1px 1px 0 #8C00E3;
    background-color: mediumpurple;
    position: absolute;
    z-index: 1;
    top: 70%;
    left: 5%;
    text-align: center;
}

#checklist {
    position: relative;
    left: 70%;
    width: 300px;
    height: 445px;
    border: 2px solid mediumpurple;
    background-color: rgb(72, 3, 148,0.7);
    z-index: 1;
    border-radius: 5px;
}

#monsterNameList {
    text-align: center;
    color: mediumpurple;
    text-shadow: -1px -1px 0 #8C00E3,
    1px -1px 0 #8C00E3,
    -1px 1px 0 #8C00E3,
    1px 1px 0 #8C00E3;
}

#monsterTypeDropdown {
   width: 100%;
   text-align: center;
   font-size: 20px;
   background-color: mediumpurple;
   text-shadow: -1px -1px 0 #8C00E3,
   1px -1px 0 #8C00E3,
   -1px 1px 0 #8C00E3,
   1px 1px 0 #8C00E3;
}

.sliding-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    background-color: mediumpurple;
    padding: 0 10px;
    margin-top: 5px;
    border-radius: 5px;
    color: black;
}

/* Active state to expand the panel */
.sliding-panel.active {
    max-height: 100%; /* Adjust as needed */
    padding: 10px;
}

#monsterSelection {
    width: 100%;
    background-color: mediumpurple;
    text-align: center;
    font-size: 15px;
}

.monster-details-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    background-color: #f2f2f2;
    padding: 0 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.monster-details-panel.show {
    max-height: 700px; /* or large enough for content */
    padding: 10px;
}

.monster-details-panel img {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
}

#monsterListButton,#openChecklistButton{
    width: 100%;
    background-color: mediumpurple;
    color: black;
    border: black 2px solid;
}

#prevPage {
    position: absolute;
    top: 77%;
    right: 85%;
    background-color: mediumpurple;
    text-shadow: -1px -1px 0 #8C00E3,
    1px -1px 0 #8C00E3,
    -1px 1px 0 #8C00E3,
    1px 1px 0 #8C00E3;
    border: #391759 1px solid;
    color: black;
}

#nextPage {
    position: absolute;
    top: 77%;
    right: 70%;
    background-color: mediumpurple;
    text-shadow: -1px -1px 0 #8C00E3,
    1px -1px 0 #8C00E3,
    -1px 1px 0 #8C00E3,
    1px 1px 0 #8C00E3;
    border: #391759 1px solid;
    color: black;
}

#slideButtonForChecklist {
    position: absolute;
    bottom: 40%;
    right: 100%; /* Initially, the button is off-screen */
    transform: translateY(-50%);
    color: white;
    padding: 15px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    cursor: pointer;
    z-index: 1000;  /* Ensure it's on top of the checklist menu */
    transition: right 0.3s ease, transform 0.3s ease;
    background-color: rgba(147, 112, 219, 0.7);  /* Use rgba for better transparency */
    width: 25px;
}

#checklistMenu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(72, 3, 148, 0.6);
    backdrop-filter: blur(12px);
    box-shadow: 0 0 20px rgba(92, 9, 112, 0.6);
    z-index: 999;
    padding: 40px;
    box-sizing: border-box;
    color: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.5s ease;
    transform: translateX(100%); /* hidden by default */
}

#checklistMenu.open {
    transform: translateX(0); /* slide in when open */
}

#checklistMenu h2 {
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
    color: #e0d6ff;
    text-shadow: 1px 1px 4px #000;
}

#monsterChecklist {
    flex-grow: 1;
    width: 100%;
    max-width: 800px;
    overflow-y: auto;
    padding-right: 12px;
    border-radius: 10px;
}

#monsterChecklist li {
    margin-bottom: 15px;
    list-style: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    transition: background 0.3s;
}

#monsterChecklist li:hover {
    background: rgba(255, 255, 255, 0.2);
}

#monsterChecklist img {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 5px;
    object-fit: cover;
}

label {
    display: flex;
    align-items: center;
    font-size: 1.1em;
}

/* Scrollbar styles */
#monsterChecklist::-webkit-scrollbar {
    width: 10px;
}
#monsterChecklist::-webkit-scrollbar-thumb {
    background-color: #800080;
    border-radius: 10px;
    border: 2px solid #4b0082;
}
#monsterChecklist::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
#monsterChecklist {
    scrollbar-width: thin;
    scrollbar-color: #800080 #4b0082;
}

#exitChecklist {
    background-color: mediumpurple;
    color: white;
    border: 2px black solid;
}
#monsterChecklist h2 {
    width: 100%;
    font-size: 1.5em;
    border-bottom: 2px solid #e0d6ff;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.container {
  background: mediumpurple;
  border-radius: 20px;
  padding: 20px;
  max-width: 1100px;
  margin: auto;
  box-shadow: 0 0 20px #00000080;
  scale: 0.9;
}

#h1-checklist {
  text-align: center;
  color: #fff;
  text-shadow: 0 0 10px #9b59b6;
  margin-bottom: 20px;
}

.checklist {
  overflow-x: auto;
}

.row {
  display: flex;
  border-bottom: 1px solid #ccc;
  align-items: center;
}

.cell {
  padding: 10px;
  border-right: 1px solid #ccc;
  min-width: 120px;
  text-align: center;
  background: #eae0ff;
  color: #333;
}

.header .cell {
  font-weight: bold;
  background: #3d0066;
  color: white;
  border-radius: 8px 8px 0 0;
}

.cell img {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto 4px;
  border-radius: 10px;
  border: 2px solid #6e00c8;
}

.monster {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#monster-rows {
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #9e79f3 #2e004f;
}

/* For Webkit browsers like Chrome */
#monster-rows::-webkit-scrollbar {
  width: 8px;
}
#monster-rows::-webkit-scrollbar-track {
  background: #2e004f;
}
#monster-rows::-webkit-scrollbar-thumb {
  background-color: #9e79f3;
  border-radius: 8px;
}

#monster-rows {
  max-height: 400px; /* You can adjust this */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #9e79f3 #2e004f;
}

.controls {
  text-align: right;
  margin-top: 10px;
}

.controls button {
  background-color: #6e00c8;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  padding: 6px 14px;
  margin-left: 10px;
  cursor: pointer;
  box-shadow: 0 0 6px #aa66ff;
  transition: 0.2s;
}

.controls button:hover {
  background-color: #8f2fff;
  transform: scale(1.05);
}


#checklist-container {
  display: inline-block; /* shrink to fit content */
  border: 1px solid #ccc;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.grid-row {
  display: grid;
  grid-template-columns: 180px repeat(var(--visible-islands-count), 140px);
  border-bottom: 1px solid #ddd;
}

#header-row .cell {
  padding: 8px;
  text-align: center;
  font-weight: bold;
  background-color: #f0f0f0;
  border-right: 1px solid #ddd;
  display: flex;
  justify-content: center;
  align-items: center;
}

#header-row .label {
  text-align: left;
  padding-left: 12px;
  background-color: #eee;
}

.row {
  display: grid;
  grid-template-columns: 180px repeat(var(--visible-islands-count), 140px);
  border-bottom: 1px solid #eee;
  align-items: center;
}

.cell {
  border-right: 1px solid #eee;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  overflow-wrap: break-word;
}

.cell.monster {
  justify-content: flex-start;
  gap: 10px;
  background-color: rgb(72, 3, 148,0.7);
}

.cell.monster img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.cell.unavailable {
  font-size: 0.75em;
  font-style: italic;
  color: #888;
  text-align: center;
  padding: 6px 8px;
}

.progress-ring {
  width: 36px;
  height: 36px;
  display: block;
  margin: 0 auto;
}

.progress-ring__background {
  stroke: #eee;
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.35s;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.progress-ring__text {
  font-weight: bold;
  dominant-baseline: middle;
}


#escMenu {
    background-color: rgb(63, 6, 82, 0.7);
      padding: 10px; /* Padding for some spacing */
    border-radius: 5px; /* Rounded corners */
    z-index: 122; /* Above other elements */
    animation: slideIn 0.5s forwards; /* Animation for sliding in */
}

#checklist-container {
  position: relative;
}

.column-backgrounds {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: auto repeat(var(--visible-islands-count), 1fr);
  z-index: 0;
  pointer-events: none;
}

.column-backgrounds .column-bg {
  height: 100%;
}

#header-row {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #7f50cd; /* Match base purple */
}
.cell.current-island {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  font-weight: bold;
}
.monster-name-cell {
  background: linear-gradient(135deg, #6a0dad, #9c4dcc);
  border-radius: 10px;
  padding: 6px;
}

