html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  position: relative;
  overflow-x: hidden;
  color: rgb(37, 37, 37);
}

body::before,
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-size: calc(100% - 30px) auto; /* 15px padding each side */
  background-position: top center;
  background-repeat: no-repeat;
  background-image: linear-gradient(to right, rgba(0,0,0,0.8), rgba(0,0,0,0)), url('background.jpg');
  transition: opacity 2s ease-in-out;
  background-color: rgba(8, 8, 8,1);
}

/* Separate images */
body::before {
  background-image: 
    linear-gradient(to right, rgba(0,0,0,0.8), rgba(0,0,0,0.1), rgba(0,0,0,0.8)),
    url('background.jpg');
  opacity: 1;
  background-color: rgba(8, 8, 8, 1);

}

body::after {
  background-image: 
    linear-gradient(to right, rgba(0,0,0,0.8), rgba(0,0,0,0.1), rgba(0,0,0,0.8)),
    url('background 2.jpg'); /* remove the backslash */
  opacity: 0;
  background-color: rgba(8, 8, 8, 1);

}


@keyframes fadeBefore {
  0%    { opacity: 1; }
  47.5% { opacity: 1; }   /* hold longer */
  52.5% { opacity: 0; }   /* fade over wider range */
  97.5% { opacity: 0; }   /* hold off longer */
  100%  { opacity: 1; }
}

@keyframes fadeAfter {
  0%    { opacity: 0; }
  47.5% { opacity: 0; }
  52.5% { opacity: 1; }
  97.5% { opacity: 1; }
  100%  { opacity: 0; }
}


body::before {
  animation: fadeBefore 40s infinite;
}

body::after {
  animation: fadeAfter 40s infinite;
}






.topbar {
  display: flex;
  align-items: center;
  background-color: rgba(34, 34, 34, 0.9);
  color: white;
  padding: 10px 20px;
  gap: 15px;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
}

.topbar button,
.topbar a {
  background: transparent;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.topbar button:hover,
.topbar a:hover {
  background-color: #444;
}

.topbar .spacer {
  flex-grow: 1;
}

/* Prevent content from hiding under fixed topbar */
body > *:not(.topbar) {
  padding-top: 50px; /* match nav height */
}

#stats {
  margin-top: 10px;
  font-family: Arial, sans-serif;
}

.best-time {
  color: green;
  font-weight: bold;
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: flex; /* corrected 'first baseline' */
  height: calc(auto); /* adjust for topbar height */
  padding-left: 10px;
  padding-right: 10px;
  color: rgb(104, 104, 104);
}

.mc-server-page {
  color: white;
  padding: 2rem 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.server-hero {
  text-align: center;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.server-hero h1 {
  font-size: 2.5rem;
  color: #66ffcc;
}

.server-hero p {
  font-size: 1.2rem;
  color: #ccc;
}

.server-ip {
  margin-top: 1rem;
  font-size: 1rem;
}

.server-ip button {
  margin-left: 10px;
  background-color: #444;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.server-ip button:hover {
  background-color: #666;
}

.server-details {
  margin-bottom: 2rem;
}

.server-details h2 {
  color: #00bfff;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.server-details ul {
  list-style-type: none;
  padding: 0;
}

.server-details li {
  margin-bottom: 10px;
  font-size: 1rem;
  padding-left: 1rem;
  position: relative;
}

.server-details li::before {
  content: "🎮";
  position: absolute;
  left: 0;
}

.server-gallery {
  margin-bottom: 2rem;
}

.server-gallery h2 {
  font-size: 1.8rem;
  color: #ffcc00;
  margin-bottom: 1rem;
}

.gallery-images {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.gallery-images img {
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
  box-shadow: 0 0 10px #000;
}

.join-now {
  text-align: center;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.join-now h2 {
  color: #ff66cc;
  font-size: 2rem;
}

.join-now p {
  color: #ddd;
  margin: 1rem 0;
}

.join-btn {
  background: linear-gradient(to right, #00ffcc, #00bfff);
  color: black;
  font-weight: bold;
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.join-btn:hover {
  transform: scale(1.05);
}


/* Login page styling */
.login-container {
  max-width: 400px;
  margin: 100px auto;
  background-color: rgba(34, 34, 34, 0.9);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
  text-align: center;
}

.login-container h2 {
  color: #66ffcc;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.login-container input {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  color: #ddd;
  font-size: 1rem;
}

.login-container input::placeholder {
  color: #666;
}

.login-container button {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#login-btn {
  background: linear-gradient(to right, #00ffcc, #00bfff);
  color: #000;
}

#login-btn:hover {
  background: linear-gradient(to right, #00bfff, #00ffcc);
}

#register-btn {
  background-color: #444;
  color: #fff;
}

#register-btn:hover {
  background-color: #666;
}

#message {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #ff6666; 
  border: none;
  color: #00bfff;
  font-size: 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.back-btn:hover {
  color: #66ffcc;
  text-decoration: underline;
}

.remember-me {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #ccc;
}

.remember-me input[type="checkbox"] {
  margin-right: 8px;
  accent-color: #00ffcc;
}
.terms-container {
  max-width: 800px;
  margin: 6rem auto;
  background-color: rgba(34, 34, 34, 0.9);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
  color: #ccc;
}

.terms-container h1 {
  color: #66ffcc;
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.terms-container h2 {
  color: #00bfff;
  margin-top: 1.5rem;
  font-size: 1.3rem;
}

.terms-container p {
  margin: 0.8rem 0;
  line-height: 1.6;
}

#back-btn {
  display: inline-block;
  margin-top: 2rem;
  background: linear-gradient(to right, #00ffcc, #00bfff);
  color: #000;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#back-btn:hover {
  background: linear-gradient(to right, #00bfff, #00ffcc);
  transform: scale(1.05);
}
.game-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem;
  justify-content: center;
  color: black;
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
  box-sizing: border-box; /* Ensure padding doesn't affect width */
  background: rgba(20, 20, 20, 0.8); /* dark translucent background */
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 98%; /* limit width for better readability */
  width: 100%; /* full width within max-width */
  padding: 1.5rem;

}
.game-card {
  background: rgba(20, 20, 20, 0.8); /* a bit darker, almost black translucent */
  color: #ccc; /* lighter text for readability */
  padding: 1rem;
  border-radius: 12px;
  width: 220px;
  text-align: center;
  box-shadow: 0 0 12px rgba(0, 255, 204, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.game-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #00ffcc;
}

.game-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  object-fit: cover;
  height: 140px;
  background-color: #111; /* fallback bg for missing images */
}

/* Title */
.game-card h2 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.2rem;
  color: #66ffcc;
}

/* Description */
.game-card p {
  font-size: 0.95rem;
  color: #aaa;
  margin: 0;
}
#message {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.2rem;
  color: #ccc;
}
a {
  color: #00bfff;
}
#game-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 2rem;
}
main.content {
  max-width: 800px;
  margin: 80px auto 40px; /* margin top for fixed navbar */
  background: rgba(20, 20, 20, 0.8);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
  color: #ccc;
}

.game-cover {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
  background-color: #111;
  box-shadow: 0 0 8px #00ffccaa;
}

main.content h1 {
  color: #66ffcc;
  margin-bottom: 0.5rem;
}

main.content p.description {
  font-size: 1.1rem;
  color: #aaa;
  margin-bottom: 2rem;
}

.buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.buttons button {
  flex: 1 1 150px;
  padding: 12px 20px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  color: black;
  user-select: none;
}

.buttons button.buy {
  background: linear-gradient(to right, #00ffcc, #00bfff);
}

.buttons button.buy:hover {
  background: linear-gradient(to right, #00bfff, #00ffcc);
}

.buttons button.demo {
  background: linear-gradient(to right, #ff66cc, #ff3399);
}

.buttons button.demo:hover {
  background: linear-gradient(to right, #ff3399, #ff66cc);
}
#actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 1rem 0;
  flex-wrap: wrap;
}

#actions button {
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 10px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  color: black;
  background: linear-gradient(to right, #00ffcc, #00bfff);
  transition: background 0.3s ease, transform 0.2s ease;
}

#actions button:hover {
  background: linear-gradient(to right, #00bfff, #00ffcc);
  transform: scale(1.05);
}

/* Search bar */
#search {
  text-align: center;
  margin-bottom: 2rem;
}

#search input {
  padding: 10px;
  width: 220px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #1e1e1e;
  color: #ccc;
}

#search button {
  padding: 10px 15px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: black;
  background: linear-gradient(to right, #00ffcc, #00bfff);
  transition: background 0.3s ease, transform 0.2s ease;
}

#search button:hover {
  background: linear-gradient(to right, #00bfff, #00ffcc);
  transform: scale(1.05);
}

/* Recipe list */
#recipe-list {
  max-width: 800px;
  margin: 0 auto 3rem;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#recipe-list li {
  background: rgba(20, 20, 20, 0.8);
  color: #66ffcc;
  padding: 15px 20px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 255, 204, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#recipe-list li:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px #00ffcc;
}

/* Modal */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: rgba(20, 20, 20, 0.95);
  color: #66ffcc;
  padding: 25px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
}

#modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #00bfff;
  font-weight: bold;
}

#modal-close:hover {
  color: #66ffcc;
}

/* Modal text styling */
#modal-title {
  margin-bottom: 1rem;
}

#modal-ingredients, #modal-steps {
  display: block;
  margin-bottom: 1rem;
  color: #ccc;
}
