/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  -webkit-tap-highlight-color: transparent;
}

/* Game layout — button is fixed to upper third of viewport; trophies are fixed to bottom */
#game {
  height: 100%;
}

/* Button — fixed to upper third of viewport so it never moves when trophies appear */
#red-button-container {
  position: fixed;
  top: 33%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vmin;
  height: 60vmin;
  max-width: 300px;
  max-height: 300px;
}

#red-button {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 35% 35%, #ff6b6b, #ff2929 50%, #cc0000);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  box-shadow:
    0 8px 0 #aa0000,
    0 10px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(0);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

#red-button:focus {
  outline: 0;
}

#red-button:active {
  transform: translateY(6px);
  box-shadow:
    0 2px 0 #aa0000,
    0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Trophies — fixed to bottom so they never displace the button */
#trophy-container {
  position: fixed;
  bottom: 72px;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
}

.trophy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 20px;
  color: #b8860b;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  user-select: none;
  animation: trophy-pop 0.4s ease-out;
}

.trophy-icon {
  font-size: 16px;
}

@keyframes trophy-pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Share button — fixed to bottom-center, hidden until first trophy earned */
#share-button {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  transition: color 0.2s, border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

#share-button:hover {
  color: #333;
  border-color: #999;
}

#share-button:focus {
  outline: 0;
}

#share-button.hide {
  display: none !important;
}

/* Copyright — nearly unreadable, for the curious */
#copyright {
  position: fixed;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 8px;
  color: #e0e0e0;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* Toast notification for clipboard fallback */
#share-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

#share-toast.show {
  opacity: 1;
}

