/* Base styles and global layout - FlipQuiz */

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  min-height: 100vh;
  max-width: 100vw;
  font-family: Arial, sans-serif;
  background: linear-gradient(
    135deg,
    #667eea 0%,
    #764ba2 25%,
    #f093fb 50%,
    #f5576c 75%,
    #4facfe 100%
  );
  background-size: 400% 400%;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  position: relative;
  will-change: background-position;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      3px 3px at 20px 30px,
      rgba(255, 255, 255, 0.6),
      transparent
    ),
    radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(
      2px 2px at 130px 80px,
      rgba(255, 255, 255, 0.4),
      transparent
    ),
    radial-gradient(
      3px 3px at 160px 30px,
      rgba(255, 255, 255, 0.5),
      transparent
    ),
    radial-gradient(
      1px 1px at 200px 100px,
      rgba(255, 255, 255, 0.6),
      transparent
    );
  background-repeat: repeat;
  background-size: 250px 120px;
  animation: sparkleFloating 12s linear;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
}

/* Fixed Home Button */
.home-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.home-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.home-btn .material-icons {
  font-size: 2em;
  color: #fff;
  transition: all 0.2s ease;
}

.home-btn:hover .material-icons {
  color: #f093fb;
  text-shadow: 0 0 10px rgba(240, 147, 251, 0.5);
}
/* Position Game Modes button below Home button */
.gamemode-btn {
  position: fixed;
  top: 100px; /* Position below the home button with proper spacing */
  right: 20px; /* Adjust as needed */
  z-index: 1000;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.gamemode-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.gamemode-btn .material-icons {
  font-size: 2em;
  color: #fff;
  transition: all 0.2s ease;
}

.gamemode-btn:hover .material-icons {
  color: #f093fb;
  text-shadow: 0 0 10px rgba(240, 147, 251, 0.5);
}

.qr-toggle-fab {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 12000;
  width: 56px;
  height: 56px;
  border-radius: 5px;
  background: #fff;
  color: #199e6a;
  border: 2.5px solid #199e6a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1em;
  box-shadow: 0 4px 16px rgba(25, 158, 106, 0.13);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.qr-toggle-fab:hover,
.qr-toggle-fab.active {
  background: #199e6a;
  color: #fff;
  border-color: #199e6a;
  box-shadow: 0 8px 24px rgba(25, 158, 106, 0.18);
}
.qr-toggle-fab .material-icons {
  font-size: 1.4em;
}
