@font-face {
  font-family: "Pavanam";
  src: url("fonts/Pavanam-Regular.eot");
  src: url("fonts/Pavanam-Regular.eot?#iefix") format("embedded-opentype"),
    url("fonts/Pavanam-Regular.woff2") format("woff2"),
    url("fonts/Pavanam-Regular.woff") format("woff"),
    url("fonts/Pavanam-Regular.ttf") format("truetype"),
    url("fonts/Pavanam-Regular.svg#Pavanam-Regular") format("svg");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "TSCuSaiIndira";
  src: url("TSCuSaiIndira.eot?#iefix") format("embedded-opentype"),
    url("TSCuSaiIndira.woff") format("woff"),
    url("TSCuSaiIndira.ttf") format("truetype"),
    url("TSCuSaiIndira.svg#TSCuSaiIndira") format("svg");
  font-weight: normal;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f5f5;
}
.video-container {
  position: relative;
  max-width: 80%;
  width: 100%;
  height: auto;
  aspect-ratio: 22 / 9.5;
  overflow: hidden;
}

.background-frame {
  position: fixed;
  top: 0;
  left: 10%;
  width: 80%;
  height: 90%;
  object-fit: fill;
  z-index: 1;
  pointer-events: none;
}

.video-element {
  position: absolute;
  top: 0%;
  left: 0%;
  width: 100%;
  height: 74%;
  object-fit: contain;
  z-index: 2;
  border-radius: 2%;
}

.game-1container img {
  position: static;
  top: 20px;
  left: 0px;
  width: 60vw;
  height: 95vh;
  background-size: cover;
}
.game-1 {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  height: 100vh;
}

#left,
#right {
  width: 50%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 10px;
  margin-right: 10px;
}

.images img {
  width: 200px;
  height: 200px;
  cursor: pointer;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.images img:hover {
  transform: scale(1.1);
  opacity: 0.8;
  animation: slide-in 0.5s ease-in-out forwards;
}

.sequence-boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 20px;
}

.sequence-box {
  width: 200px;
  height: 200px;
  border: 2px solid #696464;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 50px;
  font-weight: bold;
  background: linear-gradient(135deg, #dbdada, #d8d3d3);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.sequence-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.sequence-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  z-index: -1;
  opacity: 0.8;
}
.draggable {
  cursor: move;
  z-index: 2;
}

.correct {
  border-color: green;
}

.wrong {
  border-color: red;
}

.next-button {
  position: absolute;
  top: 80%;
  left: 55%;
  transform: translate(-50%, -50px);
}

.next-button img {
  width: 300px;
  height: auto;
  cursor: pointer;
}
.next-button:active img {
  transform: scale(0.9);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}
.reset-button {
  position: absolute;
  top: 80%;
  left: 45%;
  transform: translate(-50%, -50px);
}

.reset-button img {
  width: 100px;
  height: auto;
  cursor: pointer;
}

.reset-button:active img {
  transform: scale(0.9);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-2container {
  position: relative;
  max-width: 80%;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9.5;
  overflow: hidden;
}

.game-2container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}
.next-button1 {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.next-button1 img {
  width: 200px;
  height: auto;
  cursor: pointer;
}

.next-button1:active img {
  transform: scale(0.9);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-2-table {
  width: 70%;
  border-collapse: collapse;
  margin-top: 2%;
  margin-left: auto;
  margin-right: auto;
  z-index: 2;
  position: relative;
  background-color: #346b8b;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  font-family: "Pavanam", sans-serif;
  color: #ffffff;
}

.game-2-table td {
  width: 100px;
  height: 50px;
  border: 1px solid #70bde9;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  font-size: 18px;
  color: #333;
  border-radius: 20px;
  border-style: none;
  border-style: dashed;
  border: groove;
  transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.game-2-table td:hover {
  transform: scale(1.05);
}

.tamil-font {
  font-family: "Pavanam", sans-serif;
  text-align: left;
  margin-top: 13px;
  color: #f8f3f3;
  margin-left: 17%;
  font-size: 22px;
  position: relative;
  z-index: 2;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
.meaning {
  font-family: "Pavanam", sans-serif;
  position: fixed;
  font-size: 22px;
  color: #75920d;
  text-align: left;
  top: 27%;
  left: 38%;
  font-weight: bold;
}

h3.header {
  font-family: "TSCuSaiIndira", sans-serif;
  text-align: center;
  margin-top: 13%;
  color: #ededf0;
  font-size: 20px;
  position: relative;
  z-index: 2;
}

.highlight {
  background-color: green;
}

.game-end img {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  height: auto;
  background-size: contain;
}
.controls {
  position: absolute;
  bottom: 9%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10%;
  justify-content: center;
  align-items: center;
  z-index: 3;
}
.controls button {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.controls button img {
  width: 80px;
  height: auto;
}

.controls button:active {
  transform: scale(0.9);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.controls button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

#popup {
  display: none;
  position: fixed;
  z-index: 2;
}

#popup button {
  display: block;
  margin: 0 auto;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
}
#popup-image {
  position: fixed;
    width: 24%;
    top: 19%;
    right: 38.70%;
}
#close-button {
  position: fixed;
  width: 2.5%;
  top: 21%;
  right: 40%;
  cursor: pointer;
}

#blinkingbox {
  display: none;
  position: fixed;
  top: 56.5%;
  left: 33%;
  width: 5%;
  height: 4%;
  border: 8px solid red;
  animation: blink 3s infinite;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 2;
}

@keyframes blink {
  0%,
  50%,
  100% {
    opacity: 1;
  }
  25%,
  75% {
    opacity: 0;
  }
}
