:root {
  --gradient-colors: #222, #333;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(-45deg, var(--gradient-colors));
  background-size: 10px 10px;
  animation: gradient 90s ease infinite;
  overflow-x: hidden;
  height: 100vh;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

#index header {
  background: linear-gradient(-45deg, var(--gradient-colors));
  animation: gradient 25s ease infinite;
  background-size: 400% 400%;
  color: #fff;
  padding: 90px; 
  text-align: center;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.header {
  margin: 0;
  font-size: 2em; 
  font-style: oblique ;
  color: #fff;
  text-align: center;
  position: relative;
  margin-top: 45px;
}

#page1 .header {
  margin: 0;
  font-size: 2em; 
  font-style: oblique ;
  color: #fff;
  text-align: center;
  position: relative;
  margin-top: 45px;
}

#page2 .header {
  margin: 0;
  font-size: 2em; 
  font-style: oblique ;
  color: #fff;
  text-align: center;
  position: relative;
  margin-top: 45px;
}

#page3 .header {
  margin: 0;
  font-size: 2em; 
  font-style: oblique ;
  color: #fff;
  text-align: center;
  position: relative;
  margin-top: 45px;
}

#page4 .header {
  margin: 0;
  font-size: 2em; 
  font-style: oblique ;
  color: #fff;
  text-align: center;
  position: relative;
  margin-top: 45px;
}

#page5 .header {
  margin: 0;
  font-size: 2em; 
  font-style: oblique ;
  color: #fff;
  text-align: center;
  position: relative;
  margin-top: 45px;
}

#close .header {
  margin: 0;
  font-size: 2em; 
  font-style: oblique ;
  color: #fff;
  text-align: center;
  position: relative;
  margin-top: 45px;
}

.header-p {
  margin: 10px 0 0;
  font-style: oblique;
  color: #ffffff;
  font-family: cursive;
  font-size: 0.88em;
}
.nav-button {
  position: fixed;
  top: 50%;
  font-size: 20px;
  padding: 15px;
  left: calc(96% - -30px);
  right: calc(96% - -30px);
  border: 2px solid #008080;
  background: #333;
  cursor: pointer;
  opacity: 0.35;
  transition: transform 0.35s ease, opacity 0.35s ease;
  color: #ffffff;
  border-radius: 9px;
  white-space: nowrap;
}

.nav-button:hover {
  opacity: 1;
  transform: translateX(-55px);
}

#prev-button {
  left: -2000px;
  padding-left: 1000px;
}

#prev-button:hover {
  left: -2000px;
  opacity: 1;
  transform: translateX(55px);
}

#next-button {
  right: 20px;
  padding-right: 1000px;
}

#index #prev-button {
  display: none;
}

#close #next-button {
  display: none;
}

section.intro {
  text-align: center;
  padding: 50px 20px;
  background: #fff;
  margin: 20px;
  border-radius: 8px;
  outline: 3px solid #008080;
  overflow-x: hidden;
}

section.intro h2 {
  font-size: 1.3em;
  text-align: left;
  margin-left: calc(26.3% - 20px); 
  white-space: nowrap;
  color: #000;
  opacity: 0.9;  
  color: #006666;
}

section.intro h5 {
  font-size: 1em;
  text-align: left;
  margin-left: calc(26.3% - 20px); 
  white-space: nowrap;
  opacity: 0.6;
  color: #000000;
}

section.intro p {
  color: #333;
  font-size: 1.11em;
  line-height: 1.8;
  text-align: justify;
  width: 50%;
  margin: 0 auto;
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif ;
  padding: 20px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  text-justify: auto;
}

button#ChapterNext {
  background-color: transparent;
  border: 2px solid #008080;
  color: #008080;
  padding: 0px 0px;
  font-size: 1em;
  cursor: pointer;
  border-radius: 5px;
  font-family: cursive;
  transition: background-color 0.3s, color 0.3s, transform 0.3s;
  visibility: hidden;
}

button#ChapterNext:hover {
  background-color: #008080;
  color: #ffffff;
  transition: 0.3s ease all;
  transform: translateY(-3px);
}

button#ChapterPrev {
  background-color: transparent;
  border: 2px solid #008080;
  color: #008080;
  padding: 0px 0px;
  font-size: 1em;
  cursor: pointer;
  border-radius: 5px;
  font-family: cursive;
  transition: background-color 0.3s, color 0.3s, transform 0.3s;
  visibility: hidden;
}

button#ChapterPrev:hover {
  background-color: #008080;
  color: #ffffff;
  transition: 0.3s ease all;
  transform: translateY(-3px);
}

::selection {
  background: #00000000;
  color: #008080;
}

.droplet {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: growAndFade 0.5s ease-out forwards;
}

@keyframes growAndFade {
  0% {
      width: 20px;
      height: 20px;
      opacity: 1;
  }
  100% {
      width: 100px;
      height: 100px;
      opacity: 0;
  }
}

#toggle-table {
color: #008080; 
font-style: italic;
width: 170px;
}

#expandable-table {
border-collapse: collapse;
margin: 0 auto;
background-color: #fcfcfc;
text-align: left;
animation-duration: 0.3s;
animation-fill-mode: forwards;
}

#expandable-table:not(.open) {
display: none;
animation-name: close-table;
}

#expandable-table.open {
animation-name: open-table;
}

#expandable-table.closing {
animation-name: close-table;
animation-duration: 0.3s;
animation-fill-mode: forwards;
}

@keyframes open-table {
0% {
  opacity: 0;
  transform: scaleY(0);
}
100% {
  opacity: 1;
  transform: scaleY(1);
}
}

@keyframes close-table {
0% {
  opacity: 1;
  transform: scaleY(1);
}
100% {
  opacity: 0;
  transform: scaleY(0);
}
}

.code-block {
background-color: #fff4e6; 
padding: 20px;
border: 1px solid #868e96; 
border-radius: 5px;
margin: 20px auto;
overflow: auto; 
max-width: 45%; 
text-align: left;
white-space: pre; 
min-width: 300px; 
}

.code-block {
background-color: #fff4e6; 
padding: 20px;
border: 1px solid #868e96; 
border-radius: 5px;
margin: 20px auto;
overflow: auto; 
max-width: 45%; 
text-align: left;
white-space: pre; 
min-width: 300px; 
max-height: 200px; 
}

@media only screen and (max-width: 720px) {
.code-block {
  font-size: 0.8em; 
  padding: 10px;
}
}

.code-block code {
font-family: var(--font-mono);
font-size: 0.85em;
color: #373737; 
padding: 1px 2px;
border-radius: 2px;
text-align: center; 
}

.img-HC {
  transition: transform 0.3s ease-in-out;
  margin-left: -25px;
  margin-bottom: -25px;
}

.img-HC:hover {
  animation: wave 4s infinite;
  transform-origin: left bottom;
  animation-fill-mode: forwards;
}

@keyframes wave {
  0% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(-10deg);
  }
  20% {
    transform: rotate(10deg);
  }
  30% {
    transform: rotate(-10deg);
  }
  40% {
    transform: rotate(10deg);
  }
  50% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.img {
display: block;
margin-left: auto;
margin-right: auto;
width: 100%;
height: auto;
transform: scale(1.5);
}

.img-small {
display: block;
margin-left: auto;
margin-right: auto;
width: 80%;
height: auto;
transform: scale(1.3);
}

#toggle-table {
cursor: pointer; 
}

#expandable-table th, #expandable-table td {
border: 2px solid #008080;
padding: 15px;
}

#expandable-table tbody tr {
cursor: pointer;
}

#expandable-table tbody tr td {
transition: padding 0.2s ease-in-out;
}

#expandable-table tbody tr.expanded {
background-color: #f0f0f0;
}

#expandable-table tbody tr.expanded td {
padding: 20px;
}

#expandable-table td:first-child {
font-weight: bold;
}

#expandable-table td ul {
list-style: none;
padding: 0;
margin: 0;
}

#expandable-table td ul li {
padding-left: 20px;
}

#expandable-table td ul li:before {
content: "•";
padding-right: 5px;
}

footer {
  animation: gradient 90s ease infinite;
  background: linear-gradient(-45deg, var(--gradient-colors));
  background-size: 10px 10px;
  color: #fff;
  text-align: center;
  font-size: 1em;
  position: absolute;
  bottom: 100;
  left: 0;
  width: 100%;
  margin-top: auto;
  padding-top: 10px;
  padding-bottom: 10px;
  border-top: 2.1px solid #008080;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.custom-link:link {
  color: #008080;
  background-color: transparent;
  text-decoration: none;
}

.custom-link:visited {
  color: #008080;
  background-color: transparent;
  text-decoration: none;
}

.custom-link:hover {
  color: #008080;
  background-color: #b2d8d8;
}

.custom-link:active {
  color: #b2d8d8;
  background-color: transparent;
  text-decoration: none;
}

.footer-link:link {
  color: #ffffff;
  background-color: transparent;
  text-decoration: none;
}

.footer-link:visited {
  color: #ffffff;
  background-color: transparent;
  text-decoration: none;
}

.footer-link:hover {
  color: #008080;
  background-color: #b2d8d8;
}

.footer-link:active {
  color: #b2d8d8;
  background-color: transparent;
  text-decoration: none;
}

#intro-text {
  padding-top: 10px;
  padding-bottom: -100px;
}

@media only screen and (min-width: 1200px) {
  section.intro {
      max-width: 80%;
      margin: 40px auto;
      text-justify: auto;
  }
}

@media only screen and (min-width: 768px) and (max-width: 1200px) {
  section.intro {
      max-width: 80%;
      margin: 30px auto;
  }
  section.intro p {
      width: 78%;
  }
  section.intro h2 {
      font-size: 1.5em;
      text-align: left;
      margin-left: calc(13.3% - 20px); 
      width: 50%; 
      white-space: nowrap;
  }
  section.intro h5 {
      font-size: 1em;
      text-align: left;
      margin-left: calc(13.3% - 20px); 
      white-space: nowrap;
      opacity: 0.6;
  }
  .nav-button {
      font-size: 18px;
      left: calc(95% - -10px);
      right: calc(95% - -10px);
    }
}

 @media only screen and (max-width: 900px) {

  section.intro {
      max-width: 85%;
      margin: 20px auto;
      padding: 30px;
    }
    button#Chapter1 {
      font-size: 0.9em; 
    }
    section.intro p {
      width: 95%; 
    }
    header {
      padding: 30px; 
    }
    #index header {
      padding: 30px;
    }
    section.intro h2 {
      font-size: 1.5em;
      text-align: left;
      margin-left: calc(6.6% - 20px); 
      width: 50%; 
      white-space: nowrap;
  }
  section.intro h5 {
      font-size: 1em;
      text-align: left;
      margin-left: calc(6.6% - 20px); 
      white-space: nowrap;
      opacity: 0.6;
  }
  .nav-button {
    font-size: 16px;
    left: calc(95.5% - -5px);
    right: calc(95.5% - -5px);
  }
  }

@media only screen and (max-width: 768px) {
    body{
      background-size: 5px 5px;
    }
    section.intro {
      max-width: 100%;
      margin: 0px 0px;
      margin-left: -32px;
      padding: 30px 30px;
      border-radius: 0;
      margin-top: 40px;
      font-size: 15px;
      overflow-x: hidden;
    }
    button#Chapter1 {
      font-size: 0.9em; 
    }
    section.intro p {
      width: 100%; 
      text-justify: none;
      line-height: 1.9;
      font-size: 16px;
      overflow-x: hidden;
    }
    header {
      padding: 10px; 
    }
    #index header {
      padding: 10px;
    }
    .header{
      font-size: 1.85em;
    }
    #page1 .header {
      font-size: 1.85em;
    }
    #page2 .header {
      font-size: 1.85em;
    }
    #page3 .header {
      font-size: 1.85em;
    }
    #page4 .header {
      font-size: 1.85em;
    }
    #page5 .header {
      font-size: 1.85em;
    }
    #close .header {
      font-size: 1.85em;
    }
    section.intro h2 {
      font-size: 1.4em;
      text-align: left;
      margin-left: calc(5%);
      width: 50%; 
      white-space: nowrap;
  }
    section.intro h5 {
      font-size: 0.9em;
      text-align: left;
      margin-left: calc(5%); 
      white-space: nowrap;
      opacity: 0.6;
  }

  .nav-button {
    display: none;
  }
  .emptyspace {
    display: block;
  }
    button#ChapterNext {
      font-size: 0.8em;
      border-radius: 3px; 
      padding: 10px 20px;
      margin: 20px;
      visibility: visible;
      align-items: center;
      margin-left: 32px;
    }
    button#ChapterPrev {
      font-size: 0.8em; 
      border-radius: 3px; 
      padding: 10px 20px;
      margin: 20px;
      visibility: visible;
      align-items: center;
      margin-left: 32px;
    }
    #expandable-table {
      margin-left: 32px;
    }
    footer {
      background-size: 5px 5px;
    }
}