/* --- General & Index Page Styles --- */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* Default Green Background (for index.html) */
  background: linear-gradient(135deg, #0a2e0a, #1a5d1a, #0a2e0a, #1a5d1a);
  background-size: 400% 400%;
  animation: gradientBG 20s ease infinite;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: white;
  text-align: center;
  padding: 20px;
  position: relative; /* Add this for proper positioning */
}

/* Gallery page styling - */
.gallery-body {
    min-height: auto;
    justify-content: flex-start;
    padding-top: 50px;
    /* Overrides the body background for the gallery page only */
    background: linear-gradient(135deg, #001f3f, #003366, #001f3f, #003366); 
    background-size: 400% 400%;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.title {
  color: #90E4C1;
  text-shadow: 0 0 15px rgba(0, 255, 157, 0.8),
              0 0 30px rgba(0, 255, 157, 0.6),
              0 0 45px rgba(0, 255, 157, 0.4);
  font-size: 2.5rem;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.content {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  line-height: 1.6;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  max-width: 600px;
  margin-bottom: 20px;
}

.button-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.top-button-container {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.open-page-btn {
  margin-top: 30px;
  padding: 15px 30px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  color: white;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.open-page-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.back-btn {
    margin-bottom: 40px;
}

/* --- Search Bar Styles --- */
.search-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 25px;
}

.search-bar {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    box-sizing: border-box; /* Ensures padding doesn't increase width */
    backdrop-filter: blur(5px);
}

.search-bar::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-bar:focus {
    outline: none;
    border-color: #90E4C1;
    background: rgba(255, 255, 255, 0.15);
}


/* --- Gallery Specific Styles --- */
.gallery-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1000px;
  width: 100%;
  margin-top: 20px;
}

.game-card {
  flex-basis: 220px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  border-radius: 10px;
  padding: 15px;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background 0.3s ease;
  text-align: left;
}

.game-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
}

.game-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    display: block;
}

.game-card h3 {
    margin-top: 0;
    margin-bottom: 5px;
    color: #90E4C1;
    text-shadow: 0 0 5px rgba(0, 255, 157, 0.5);
}

.game-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: none;
    padding: 0;
    margin: 0;
}

.game-card.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.game-card.disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
}
