@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&display=swap');

* {
  font-family: "Fredoka";
}

/* Base styles */
body {
  margin: 0;
  padding: 0;
  background-color: #f9f9fb;
  color: #333;
}

/* Top bar */
.top-bar {
  background: linear-gradient(90deg, #B37EFF, #dbc2ff);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  color: black;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  position: relative;
  z-index: 2;
}

.top-bar button {
  padding: 8px 14px;
  border: none;
  background: white;
  color: #7a42f4;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.top-bar button:hover {
  background: #f0e9ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Game container */
.game-container {
  width: 100%;
  height: calc(100vh - 50px); /* leave space for bar in normal mode */
  position: relative;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Loading screen */
.loading-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f9f9fb;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: 500;
  color: #555;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.6s ease;
}
.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}
.spinner {
  border: 5px solid #ddd;
  border-top: 5px solid #7a42f4;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-right: 12px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---------- FULLSCREEN MODE ---------- */

/* Game fills entire screen */
.fullscreen .game-container {
  height: 100vh;
}

/* Remove purple bar background and shadow */
.fullscreen .top-bar {
  background: none;
  box-shadow: none;
  position: absolute;   /* float on top of game */
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  pointer-events: none; /* let clicks pass through except buttons */
}

/* Keep buttons clickable */
.fullscreen .top-bar button {
  pointer-events: auto;
}

/* Hide the game title in fullscreen */
.fullscreen #game-title {
  display: none;
}
