/*
* Shared CSS - Extracted from various files
*/

/* Body & Scrollbar */
body {
  font-family:
    "Open Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen-Sans,
    Ubuntu,
    Cantarell,
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  margin: 0;
  padding: 0;
  background: #ef986e; /* fallback for old browsers */
  background: -webkit-linear-gradient(
    to right,
    #ef986e,
    #f3966b
  ); /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(
    to left,
    #ef986e,
    #f3966b
  ); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  padding-bottom: 150px; /* Space for fixed footer + ads */
}

body::-webkit-scrollbar {
  width: 15px;
}

body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.65);
}

body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.75);
  border-radius: 5px;
  transition: 0.5s;
}

body::-webkit-scrollbar-thumb:hover {
  transition: 0.5s;
  background: #000000;
}

/* Menu Overlay */
#menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #21212199;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

#menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

#menu {
  z-index: 2000; /* High z-index to overlay everything */
}

/* Header */
header {
  position: relative;
  padding: 10px;
  z-index: 1000; /* Ensure header content is above page content */
}

header .logo-container {
  position: relative;
  columns: 2;
  column-gap: 0;
  display: inline-block;
  left: 45px;
}

header .logo-container h1 {
  position: relative;
  top: 10px;
  font-family: "lora", "Courier New", Courier, monospace;
  color: #000000;
  display: inline-block;
  padding-top: 5px;
  margin: 0;
  margin-left: 5px;
}

header .logo-container img {
  margin: 0;
  padding: 0;
  max-width: 70px;
  max-height: 70px;
}

header nav {
  position: absolute;
  top: 15px;
  right: 12px;
}

header nav ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

header nav ul li {
  display: inline-block;
  margin: 0 10px;
}

.nav-link {
  display: inline-block;
  text-decoration: none;
  color: #333;
}

.nav-link:hover .nav-text {
  transition: 0.25s ease-in-out;
  text-decoration: none;
  color: #005a9c;
}

.nav-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 5px;
}

.icon-more {
  width: 35px;
  height: 35px;
  margin: 0 10px;
}

.nav-text {
  transition: 0.25s ease-in-out;
  vertical-align: middle;
}

/* Hamburger Menu */
#menuToggle input {
  display: block;
  width: 40px;
  height: 32px;
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
  opacity: 0;
  z-index: 2;
  -webkit-touch-callout: none;
}

@media screen and (max-width: 1115px) {
  header .logo-container {
    position: relative;
    columns: 2;
    column-gap: 0;
    display: inline-block;
    left: 25px;
  }

  #menuToggle {
    display: block;
    position: relative;
    top: 25px;
    left: -25px;
    z-index: 1;
    user-select: none;
  }

  #menuToggle .hamburgers {
    display: block;
    width: 33px;
    height: 4px;
    margin-bottom: 5px;
    position: relative;
    background: #000000;
    border-radius: 3px;
    z-index: 1;
    transform-origin: 4px 0px;
    transition:
      background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1),
      opacity 0.55s ease,
      transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
  }

  #menuToggle .hamburgers:first-child {
    transform-origin: 0% 0%;
  }

  #menuToggle .hamburgers:nth-last-child(2) {
    transform-origin: 0% 100%;
  }

  #menuToggle input:checked ~ .hamburgers {
    opacity: 1;
    transform: rotate(45deg) translate(-2px, -1px);
    background: #232323;
  }

  #menuToggle input:checked ~ .hamburgers:nth-last-child(3) {
    opacity: 0;
    transform: rotate(0deg) scale(0.2, 0.2);
  }

  #menuToggle input:checked ~ .hamburgers:nth-last-child(2) {
    transform: rotate(-45deg) translate(0, -1px);
  }

  #menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    width: 250px;
    max-width: 300px;
    top: 25px;
    right: 0;
    height: auto;
    margin: 0;
    padding: 10px;
    padding-top: 45px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    background: #f4a67d;
    list-style-type: none;
    -webkit-font-smoothing: antialiased;
    transform-origin: top right;
    transform: translate(100%, 0); /* Slide from right */
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 2000;
  }

  #menu li {
    display: inline-block;
    padding: 10px 0;
    font-size: 22px;
    white-space: nowrap;
    margin-right: 20px;
  }

  .nav-link {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
  }

  .nav-icon {
    width: 24px;
    margin-right: 8px;
  }

  .nav-text {
    font-size: 16px;
  }

  .nav-link:hover {
    color: #666;
  }

  .nav-link.active {
    font-weight: bold;
  }

  #menuToggle input:checked ~ ul {
    transform-origin: top right;
    transform: none;
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
  }

  #menu li:nth-last-child(1),
  #menu li:nth-last-child(2) {
    margin: 0 auto;
  }

  .icon-more {
    width: 35px;
    height: 35px;
    margin: 0 25px;
  }
}

@media screen and (min-width: 1116px) {
  #close_icon,
  nav .history {
    display: none;
  }
}

.nav-text.active {
  font-weight: 700;
  color: #005a9c;
}

/* Global Main Styles */
main h1,
main h2,
main h3,
main h4,
main h5,
main h6,
main p,
footer {
  font-family:
    "DM Sans",
    "Open Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen-Sans,
    Ubuntu,
    Cantarell,
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* Buttons */
button {
  background-color: #005a9c;
  border: none;
  padding: 10px 20px;
  text-align: center;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 10px;
  cursor: pointer;
  white-space: nowrap;
}

main a button {
  color: white;
}

main a button:hover {
  color: white;
  text-decoration: none;
}
.relaxed-confirm-button {
  margin-right: 30px;
}
.custom-cancel-button {
  margin-left: 30px;
}

/* Loading Bar & Animations */
#loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: #ef986e;
}

.progress {
  background-color: black;
  height: 100%;
  transition: width 0.5s ease-in-out;
}

.progress.filling {
  animation: fill-progress 1s ease-in-out forwards;
}

@keyframes fill-progress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.progress.filling.completed {
  animation: hide-progress 0.5s ease-in-out forwards;
}

@keyframes hide-progress {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Components */
.icon-card-alert {
  background-color: rgba(0, 0, 0, 0.355);
  padding: 20px;
  margin: 10px auto;
  border-radius: 5px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
}

.icon-card-alert .icon {
  margin: 5px;
}

#install_app {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  animation: slide-in 0.5s ease-in-out forwards;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

/* Footer */
footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: #333;
  color: white;
  text-align: center;
  padding: 10px 0;
  z-index: 1000;
}

/* Banner Ads Placeholder - Global Footer */
.banner-ads-container {
  width: 100%;
  max-width: 728px;
  height: 90px; /* Standard Leaderboard Height */
  background-color: rgba(255, 255, 255, 0.4); /* Translucent white */
  backdrop-filter: blur(5px); /* Glassy effect */
  border: 1px dashed rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto; /* Center horizontally */
  border-radius: 8px 8px 0 0; /* Rounded top only */
  color: #eee;
  font-size: 0.9rem;

  /* Stacking logic */
  position: absolute;
  bottom: 100%; /* Positions it exactly on top of the footer */
  left: 50%;
  transform: translateX(-50%);
}

footer p {
  margin: 0;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

footer .footer-left,
footer .footer-right,
footer .footer-separator {
  display: inline;
}

footer a {
  color: #60b8f7;
  text-decoration: none;
  font-weight: bold;
  margin: 0 5px;
  transition: ease 0.3s;
}

footer a:hover {
  color: #0a63ac;
}

.designer-link {
  color: #60b8f7;
  text-decoration: underline;
}

/* Footer Responsiveness */
@media screen and (max-width: 600px) {
  footer p {
    flex-direction: column;
  }
  footer .footer-separator {
    display: none;
  }
}

/* Back to Top Button */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 120px; /* Position it above the ads banner */
  right: 20px;
  padding: 8px 12px;
  background-color: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(5px);
  color: #fff;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 2500;
  cursor: pointer;
}

#back-to-top:hover {
  background-color: #fd864a;
  border: 1px solid rgb(0, 0, 0);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(239, 152, 110, 0.3);
}
