:root {
  --primary-color: linear-gradient(to right, #6500cb, #5200a3);
  --secondary-color: #ffd700;
  --card-header: linear-gradient(to right, #ffd700, rgb(255, 165, 0));
  --card-bg: #201e1e;

  --text-color: #f0f0f0;
  --meggaphone: #e8910a;

  --main-size: 100%;

  --prov-hover: rgba(0, 0, 0, 0.2);
  --prov-bg: hsla(0, 43%, 35%, 1);
  --prov-color: #fff;

  --cta-top-bg: rgba(189, 184, 184, 0.7);
  --cta-top-bg-hover: rgba(255, 255, 255, 0.7);

  --card-container: rgba(75, 74, 74, 0.7);

  background-color: rgb(44, 44, 44);
  font-family: "Courier Prime", monospace;
  font-weight: 400;
}

/* Loading screen styles */
.loading-screen {
  position: relative;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #3498db;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#backToTopBtn {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: #555;
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  font-size: 18px;
  width: 50px;
  height: 50px;
  transition: all 0.3s ease;
}

#backToTopBtn:hover {
  background-color: #333;
}

#backToTopBtn svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.cta-top a:hover {
  background: var(--cta-top-bg-hover);
}

.error {
  color: #d9534f;
  padding: 20px;
  text-align: center;
}

html,
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  color: #d6d6d6;
}

body::-webkit-scrollbar {
  display: none;
}

.container {
  font-family: "Courier Prime", monospace;
  font-weight: 400;
  padding: 0 10%;
  position: relative;
}

.tomorrow-regular {
  font-family: "Tomorrow", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.tomorrow-semibold {
  font-family: "Tomorrow", sans-serif;
  font-weight: 600;
  font-style: normal;
}

.tomorrow-thin-italic {
  font-family: "Tomorrow", sans-serif;
  font-weight: 100;
  font-style: italic;
}

.tomorrow-regular-italic {
  font-family: "Tomorrow", sans-serif;
  font-weight: 400;
  font-style: italic;
}

.tomorrow-semibold-italic {
  font-family: "Tomorrow", sans-serif;
  font-weight: 600;
  font-style: italic;
}

/* Navbar  */
.navbar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 999;
  background: var(--primary-color);
}

.navbar-wrapper {
  display: grid;
  grid-template-columns: 1fr 60px;
  place-items: center;
  height: 100%;
  padding: 0.5rem 0;
}

.logo-container img {
  max-width: 150px;
}

.cta-container {
  display: flex;
  gap: 0.6rem;
}

.cta-btn {
  box-shadow: 0px 0px 0px 2px #9fb4f2;
  background: linear-gradient(to bottom, #8cb2f2 5%, #476e9e 100%);
  background-color: #8cb2f2;
  border-radius: 10px;
  display: inline-block;
  cursor: pointer;
  color: #ffffff;
  text-align: center;

  padding: 0.5rem 1rem;
  text-decoration: none;
  text-shadow: 0px 1px 0px #283966;
}
.cta-btn:hover {
  background: linear-gradient(to bottom, #476e9e 5%, #8cb2f2 100%);
  background-color: #476e9e;
}
.cta-btn:active {
  position: relative;
  top: 1px;
}

.runingtext {
  width: 100%;
  background: var(--meggaphone);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  color: #000;
}

.runingtext marquee {
  width: 80%;
}

/* Carousel  */
.carousel {
  position: relative;
  max-width: 900px;
  margin: auto;
  overflow: hidden;
  margin-top: 70px;
}

.slides {
  display: flex;
  transition: transform 0.5s ease;
}

.slide {
  min-width: 100%;
  display: none;
}

.slide img {
  width: 700px;
  max-height: 600px;
}

.slide.active {
  display: block;
}

.slide img {
  width: 100%;
  height: auto;
}

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  border: none;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.next {
  right: 0;
}

/* Provider  */
.provider {
  display: flex;
  justify-content: center;
}

.provider ul {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  list-style-type: none;
  align-items: center;
}

.provider .prov-btn {
  list-style-type: none;
  background: var(--prov-bg);
  color: var(--prov-color);
  width: 100px;
}

.provider li {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.provider img {
  max-width: 100px;
  width: 100%;
}

.provider li:hover {
  background: var(--prov-hover);
}

/* Main  */
.main {
  margin: 0.2rem;
}

.main-header {
  background: #cf8f05;
  padding: 1rem 2rem;
  border-radius: 3rem 3rem 0 0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.card-container {
  display: flex;
  gap: 0.4rem;
  width: 100%;
  padding: 0.2rem;
  background: var(--card-container);
  flex-wrap: wrap;
  justify-content: center;
  box-shadow: 0px 0px 2px 0px rgba(255, 165, 0, 0.52);
  -webkit-box-shadow: 0px 0px 2px 0px rgba(255, 165, 0, 0.52);
  -moz-box-shadow: 0px 0px 2px 0px rgba(255, 165, 0, 0.52);
}
.card-container .card {
  max-width: 33%;
  min-width: 200px;
}

/* Footer  */
.simple-footer {
  background: var(--primary-color);
  color: #bebebe;
  padding: 20px 0;
  font-size: 14px;
  border-top: 1px solid rgba(233, 236, 239, 0.6);
  margin-top: 40px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* GameCanvas  */
#gameCanvas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.game-card {
  border: 1px solid #000;
  max-width: 250px;
  position: relative;
}

.game-image {
  opacity: 1;
  transition: opacity 0.3s ease;
  background: #f5f5f5;
  width: 100%;
  height: auto;
  max-width: 170px;
}

.game-image.loaded {
  opacity: 1;
}

/* Fallback for browsers without JS */
.no-js .game-image {
  opacity: 1;
}
.no-js .game-image:not([src]) {
  background-image: none;
}

/* Progress Bar  */
.progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  background: white;
  z-index: 99;
}

.progress-bar {
  height: 100%;
  transition: width 0.5s ease-in-out;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  font-size: 16px;
  font-family: Arial, sans-serif;
  color: #000;
}

/* Color classes */
.progress-high {
  background-color: #4caf50 !important;
}

.progress-medium {
  background-color: #ffc107 !important;
}

.progress-low {
  background-color: #f44336 !important;
}
