/* Beety - Flappy Bird style game */

.beety-body {
  background: #000;
  font-family: sans-serif;
}

.beety-page {
  min-height: 100vh;
  width: 100%;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  transition: filter 1s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Level filters */
.beety-page.level-10 { filter: hue-rotate(20deg); }
.beety-page.level-20 { filter: hue-rotate(30deg); }
.beety-page.level-30 { filter: hue-rotate(47deg); }
.beety-page.level-40 { filter: hue-rotate(120deg); }
.beety-page.level-50 { filter: grayscale(1); }
.beety-page.level-60 { filter: sepia(1); }
.beety-page.level-70 {
  filter: brightness(.8) contrast(1.2) grayscale(1);
}
.beety-page.level-70 .shadow-edges {
  background: linear-gradient(to right, #000, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, .5) 70%, #000000c0);
}
.beety-page.level-80 { filter: hue-rotate(20deg) saturate(2) brightness(1.5); }
.beety-page.level-90 .game-content { filter: invert(1); }
.beety-page.level-100 .game-content { transform: rotateX(180deg); }

.game-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
  width: 100%;
}

.game-container {
  width: 100%;
  height: 400px;
  background: linear-gradient(to bottom, #01055c, #000000, #01055c 97%, #46107d, rgb(83, 11, 62) 99%, rgb(255, 27, 130) 99%);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  border-radius: 4px;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

.game-container.is-playing .floor {
  animation: moveFloor 1s linear infinite;
}

.floor {
  background: url('/beety/floor.png') repeat-x;
  background-size: 150px;
  height: 100px;
  width: 100%;
  position: absolute;
  bottom: 2px;
  left: 0;
}

.shadow-edges {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #000, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0) 80%, #000);
  pointer-events: none;
  z-index: 1;
}

@keyframes moveFloor {
  0% { background-position: 0; }
  100% { background-position: -150px; }
}

.beety {
  position: absolute;
  left: 100px;
  width: 60px;
  height: 60px;
  will-change: transform;
  z-index: 2;
  transform: translateZ(0);
}

.beety img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}

.beety.jumping .beety img {
  transform: scale(1.1);
}

.obstacle {
  position: absolute;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid;
  border-radius: 0;
  z-index: 1;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  transform: translateZ(0);
  will-change: transform;
}

.obstacle-top {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  border-top: none;
}

.obstacle-bottom {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  border-bottom: none;
}

.obstacle::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1),
    rgba(0, 0, 0, 0.1)
  );
  pointer-events: none;
}

.score-container {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 24px;
  font-weight: bold;
  text-align: right;
  z-index: 3;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.current-score {
  color: #fff;
  margin-bottom: 5px;
}

.score-container .high-score {
  color: #BD9FFF;
  font-size: 18px;
}

.game-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 1rem;
  border-radius: 8px;
  color: #fff;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.125);
  min-width: 300px;
  z-index: 10;
}

.game-logo {
  width: 150px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}

.scores {
  margin: 1rem 0;
}

.final-score {
  font-size: 24px;
  color: var(--color-primary, #0000FF);
  margin-bottom: 0.5rem;
}

.game-screen .high-score {
  font-size: 18px;
  color: var(--color-secondary, #FFB700);
  opacity: 0.9;
}

.new-high-score {
  color: var(--color-secondary, #FFB700);
  margin-top: 0.5rem;
  font-size: 18px;
  animation: beety-pulse 1s infinite;
}

.start-text {
  display: inline-block;
  margin-top: 2rem;
  font-size: 18px;
  opacity: 0.8;
  animation: beety-pulse 1.5s infinite;
}

@keyframes beety-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
