* { box-sizing:border-box; margin:0; padding:0; }

html { height:100%; width:100%; }


:root {
  --background-rgb: rgb(29 30 34);
  
  --blue-rgb: 33 150 243;
  --primary-rgb: var(--blue-rgb);

  --g1: rgb(12, 57, 91);
  --g2: rgb(12, 15, 46);

  --ice-background: rgba(140, 200, 255, 255);
}


body {
  animation: background-pan 10s linear infinite;
  background: linear-gradient(
    to right,
    var(--g1),
    var(--g2),
    var(--g1)
  );
  background-size: 200%;
  height: 100vh;
  overflow: hidden;
  margin: 0px;

  align-content:center;
  align-items:space-around;
  /* background-color:var(--ice-background); */
  display:grid;
  /* justify-items:center; */
  /* height:100%; */
  /* width:100%; */
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* body {
  height: 100vh;
  display: grid;
  place-items: center;
  background-color: rgb(var(--background-rgb));
  margin: 0rem;
  overflow: hidden;
} */

#intro {
  position: relative; /* Make it a positioning parent */
}

.sub_div {
  position: absolute;
  bottom: -15px;
}

.sub_div2 {
  position: absolute;
  right: 0;
  bottom: -15px;
}

.shadow {
  box-shadow: 10px 10px 5px grey;
}

.displayed {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

canvas { image-rendering: pixelated;}

.rounded {
    border-radius: 10px;
}

hr{
    border: 0;
    height: 1px;
    background-color: var(--stuff-color-root);
}

/* AI Page CSS */

#body-ai-page {
  align-content:unset;
  align-items:unset;
  background-color: #002233;
  display:unset;
  height:100%;
  width:100%;
  font-family: 'Montserrat', sans-serif;
}

#chat-window {
  width: 400px;
  height: 500px;
  margin: 0 auto;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

#chat-header {
  background-color: #f5f5f5;
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #ddd;
  font-size: 18px;
  font-weight: bold;
}

#chat-history {
  height: 400;
  overflow-y: scroll;
  padding: 10px;
}

#chat-input {
  background-color: #f5f5f5;
  padding: 10px;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: center;
}

#chat-message-input {
  width: 70%;
  height: 35px;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

#chat-message-submit {
  width: 20%;
  height: 46px;
  background-color: #4caf50;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  margin-left: 10px
}

/* effects */


#main-card {
  position: absolute; /* Make it absolute so you can move it around freely */
  z-index: 2; /* Lower z-index means it will be behind tiles */
  top: 52%; /* Center it vertically */
  left: 42%; /* Center it horizontally */
  transform: translate(-50%, -50%); /* Perfect centering */
  display: none;
}

* {
  box-sizing: border-box;
}



.screen {
  width: 500px;
  display: flex;
  border: 3px solid rgb(var(--primary-rgb) / 80%);
  aspect-ratio: 12 / 16;
  border-radius: 1rem;
  background-color: rgb(var(--primary-rgb) / 15%);
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.screen:after,
.screen:before {
  content: "";
  height: 5px;
  position: absolute;
  z-index: 4;
  left: 50%;
  translate: -50% 0%;
  background-color: white;
}

.screen:before {
  width: 15%;
  top: 0rem;
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
}

.screen:after {
  width: 25%;
  bottom: 0rem;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

@keyframes pan-overlay {
  from {
    background-position: 0% 0%;
  }
  
  to {
    background-position: 0% -100%;
  }
}

.screen-overlay {    
  background: linear-gradient(
    rgb(var(--primary-rgb) / 0.15),
    rgb(var(--primary-rgb) / 0.15) 3px,
    transparent 3px,
    transparent 9px
  );
  background-size: 100% 9px;
  height: 100%;
  width: 100%;
  animation: pan-overlay 22s infinite linear;
  position: absolute;
  z-index: 2;
  left: 0px;
  top: 0px;
}

@keyframes pan-image {  
  0% {
    background-position: 36% 42%;
    background-size: 150%;
  }
  
  20% {
    background-position: 30% 35%;
    background-size: 180%;
  }
  
  20.0001% { /* -- View 2 -- */
    background-position: 60% 85%;
    background-size: 300%;
  }
  
  40% {
    background-position: 49% 81%;
    background-size: 250%;
  }
  
  40.0001% { /* -- View 3 -- */
    background-position: 80% 42%;
    background-size: 200%;
  }
  
  60% {
    background-position: 84% 33%;
    background-size: 180%;
  }
  
  60.0001% { /* -- View 4 -- */
    background-position: 0% 0%;
    background-size: 200%;
  }
  
  80% {
    background-position: 15% 4%;
    background-size: 180%;
  }
  
  80.0001% { /* -- View 5 -- */
    background-position: 80% 10%;
    background-size: 200%;
  }
  
  100% {
    background-position: 72% 14%;
    background-size: 200%;
  }
}

.screen > .screen-image-new {
  background-image: url("../old_assets/images/newgame.png");
  height: 100%;
  width: 100%;
  position: absolute;
  z-index: 1;
  left: 0px;
  top: 0px;
  background-size: 300%;
  background-position: 0% 0%;
  filter: sepia(100%) hue-rotate(160deg);
  opacity: 0.6;
  animation: pan-image 15s linear infinite;
}

.screen > .screen-image-old {
  background-image: url("../old_assets/images/oldgame.png");
  height: 100%;
  width: 100%;
  position: absolute;
  z-index: 1;
  left: 0px;
  top: 0px;
  background-size: 300%;
  background-position: 0% 0%;
  filter: sepia(100%) hue-rotate(160deg);
  opacity: 0.6;
  animation: pan-image 15s linear infinite;
}

.screen > .screen-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex-grow: 1;
  gap: 4rem;
  position: relative;
  z-index: 3;
  margin: 1rem;
  padding-bottom: 6rem;
  border: 1px solid rgb(var(--primary-rgb) / 50%);
  border-radius: 0.6rem;
}

.screen > .screen-content > .screen-icon {
  color: white;
  font-size: 4rem;
  text-shadow: 0px 0px 0.5rem white;
}

.screen > .screen-content > .screen-user{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.screen > .screen-content > .screen-user:before,
.screen > .screen-content > .screen-user:after {
  content: "";
  position: absolute;
  top: 0px;
  background-color: rgb(var(--primary-rgb));
  border-radius: 1rem;
  box-shadow: 0px 0px 8px 3px rgb(var(--primary-rgb) / 60%);
}

.screen > .screen-content > .screen-user:before {
  height: 2px;
  width: 50px;
  translate: -20px -1rem;
  opacity: 0.75;
}

.screen > .screen-content > .screen-user:after {
  height: 3px;
  width: 30px;
  translate: 26px calc(-1rem - 0.5px);
}

.screen > .screen-content > .screen-user > :is(.name, .link) {
  font-family: "Source Code Pro", monospace;
  color: white; 
  text-align: center;
  text-transform: uppercase; 
}

.screen > .screen-content > .screen-user > .name {
  position: relative;
  font-size: 4.25rem;
  font-weight: 400;
}

.screen > .screen-content > .screen-user > .name:before,
.screen > .screen-content > .screen-user > .name:after {
  content: "";
  height: 4px;
  width: 4px;
  position: absolute;
  border: 2px solid white;
  border-radius: 2px;
}

.screen > .screen-content > .screen-user > .name:before {
  top: 55%;
  right: -1.5rem;
}

.screen > .screen-content > .screen-user > .name:after {
  top: 45%;
  left: -1.5rem;  
}

.screen > .screen-content > .screen-user > .link {  
  opacity: 0.8;
  font-size: 1.5rem;
  text-shadow: 0px 0px 0.5rem white;
  font-weight: 400;
  letter-spacing: 0.3rem;
  text-decoration: none;
}

.screen > .screen-content > .screen-user > .link:is(:hover, :focus) {  
  text-decoration: underline; 
}

@media(max-width: 700px) {
  .screen {
    scale: 0.6;
    margin-bottom: 0rem;
  }
}

/* tiles */


@keyframes background-pan {
  from {
    background-position: 0% center;
  }
  
  to {
    background-position: -200% center;
  }
}



body.toggled {
  animation: none;
}

body.toggled > #main-title {
  opacity: 0;
}

body.toggled > #icon {
  /* opacity: 1; */
  display: block;
}

body.toggled > #tiles > .tile:hover {
  opacity: 0.1 !important;
}

.centered {
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.lefted {
  left: 20%;
  position: absolute;
  top: 50%;
  transform: translate(-20%, -50%);
}

.righted {
  left: 80%;
  position: absolute;
  top: 50%;
  transform: translate(-80%, -50%);
}

.centered-bottom {
  left: 42%;
  position: absolute;
  top: 95%;
  transform: translate(-50%, -50%);
  text-align: center;
}

#tiles {
  height: calc(120vh - 1px);
  width: calc(120vw - 1px);
  position: relative;
  z-index: 2;
  
  display: grid;
  grid-template-columns: repeat(var(--columns), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
}

.tile {
  cursor: pointer;
  position: relative;
}

.tile:hover:before {
  background-color: rgb(30, 30, 30);
}

.tile:before {
  background-color: rgb(0, 0, 0);
  content: "";
  inset: 0.5px;
  position: absolute;
}

#main-title {
  color: white;
  font-family: "Source Code Pro", monospace;
  font-size: 16px;
  margin: 0px;
  pointer-events: none;
  transition: opacity 1200ms ease;
  width: 50vw;
  z-index: 3;
}

#main-title > .fancy {
  color: var(--g2);
  font-family: 'Dancing Script', cursive;
  font-size: 1.5em;
  line-height: 0.9em;
}

#icon {
  color: rgba(255, 255, 255, 0.15);
  font-size: 80vmin;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1200ms ease;
  z-index: 1;
}

.ratings {
  clear: both; /* Clear floats */
  padding-top: 10px; /* Add space above the ratings */
  font-family: "Source Code Pro", monospace;
  color: white;
}
.rating {
  margin-bottom: 5px;
}

.rating-label {
  display: inline-block;
  width: 100px; /* Adjust as needed */
}

.rating-bar {
  display: inline-block;
  height: 10px; /* Adjust height of the bar */
  background-color: blue;
  border-radius: 5px; /* Optional for rounded corners */
}
