/* Reset some default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ensure HTML & body fill the window height */
html, body {
  height: 100%;
}

/* Basic styling */
body {
  line-height: 1.6;
  /* Background image fixes */
  background-repeat: no-repeat;       /* Do not tile the image */
  background-position: center bottom; /* Position image at the bottom center */
  background-size: cover;            /* Scale the image to cover the entire screen */
  background-attachment: fixed;       /* Keeps the image fixed during scroll (optional) */

  color: #333;
  font-family: 'Montserrat', sans-serif; /* Modern sans-serif font */
  font-size: 16px;
}

.container {
  width: 90%;
  margin: 0 auto;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header styling */
header {
  background-color: #2ecc71; /* Vibrant green header */
  color: #fff; /* White text */
  padding: 20px 0;
  text-align: center; /* Centered header content */
  width: 100%;
}

h1 {
  font-size: 3em; /* Larger header font size */
  margin-bottom: 20px;
  font-family: 'Pacifico', cursive; /* Playful script font */
}

/* Welcome text styling */
.welcome-text {
  margin-left: 10px;
  margin-top: 20px;
  font-size: 28px; /* Larger font size */
  font-weight: bold;
  text-align: center;
}

/* Search bar styling */
.search-bar {
  padding: 10px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.search-bar input {
  padding: 10px;
  border: 2px solid #3f51b5; /* Indigo */
  border-right: none;
  border-radius: 20px 0 0 20px;
  font-size: 14px;
  width: 40%;
  max-width: 400px;
  outline: none;
  background: #fff;
  color: #333;
  transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.search-bar input::placeholder {
  color: #aaa;
}

.search-bar input:focus {
  border-color: #303f9f; /* Darker Indigo */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}



.search-bar button:hover {
  background-color: #303f9f; /* Darker Indigo on Hover */
}

.search-bar button:active {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-bar button i {
  font-size: 16px; /* Adjusted the size of the icon */
}

/* Flex container styling */
.flex-container {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}


body {
  font-size: 16px;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f3f3f3;
}
.welcome-text {
  margin-top: 1px;
  font-size: 44px;
  font-weight: bold;
  color: #333;
  font-family: 'Bungee Shade', sans-serif;
  text-align: center;
}

.search-bar button {
  padding: 8px 16px;
  font-size: 18px;
  border: 2px solid #bbb;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: #a777e3;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.search-bar button:hover {
  background: #6e8efb;
}
.content {
  margin: 32px 0 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#gameFrame {
  width: 100%;
  max-width: 900px;
  min-height: 510px;
  border: 2px solid #444;
  border-radius: 16px;
  box-shadow: 0 4px 16px #0002;
  background: #fff;
  margin-bottom: 10px;
}
.fullscreen-button {
  padding: 8px 20px;
  border-radius: 8px;
  background: #6e8efb;
  color: #fff;
  border: none;
  font-size: 16px;
  font-family: 'Roboto', Arial, sans-serif;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  margin-bottom: 8px;
  transition: background 0.2s;
}
.fullscreen-button:hover {
  background: #a777e3;
}
.flex-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 24px auto 48px auto;
  max-width: 1240px;
}
.flex-item {
  margin: 8px;
  padding: 12px;
  background-color: #fff;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 8px;
  background-size: cover !important;
  background-position: center !important;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.flex-item:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 12px rgba(0,0,0,0.2);
  border-radius: 8px;
}
.flex-item::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  border-radius: 8px;
}
.flex-item:hover::after {
  opacity: 1;
}
.flex-item span {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  padding: 10px 15px;
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}
.flex-item:hover span {
  visibility: visible;
  opacity: 1;
}
/* Student Tip & Footer Styles */
.container {
  max-width: 500px;
  margin: 30px auto 10px auto;
  padding: 10px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.tip {
  text-align: center;
  margin-bottom: 10px;
}
.tip-text {
  font-size: 14px;
  color: #333;
  line-height: 1.4;
}
.tip-img {
  width: 30px;
  height: 30px;
  vertical-align: middle;
}
footer {
  background-color: #2c3e50;
  color: #fff;
  text-align: center;
  padding: 10px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  margin-top: 24px;
}
.footer-links {
  margin-top: 5px;
}
.footer-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 5px;
  transition: color 0.3s;
}
.footer-links a:hover {
  color: #3498db;
}
.hit-counter {
  margin-top: 10px;
}
.hit-counter img {
  width: 80px;
  height: auto;
}
/* Random Game button */
.random-game {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  color: #fff;
  text-transform: uppercase;
  font-weight: bold;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  border: none;
  border-radius: 25px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: background 0.3s, transform 0.2s;
  z-index: 999;
}
.random-game:hover {
  background: linear-gradient(135deg, #a777e3, #6e8efb);
  transform: translateY(-2px);
}


