@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

html, body {
  margin: 0;
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  background-color: #0c0c0c;

  background-image: url('images/my-background-16.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
}
h1 {
  margin: 20px 0;
  color: #fff;
  text-shadow: 0 0 8px #00fff2, 0 0 16px #00fff2;
  font-weight: 700;
  font-size: 2.5rem;
}

#pet-screen {
  position: relative;
  width: min(600px, 92vw);
  height: 400px;
  margin: 20px auto;
  box-shadow: 0 4px 15px rgba(0, 255, 242, 0.4);
  overflow: hidden;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
}

#pet-screen::before {
  content: "";
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  z-index: 0;
  background: url('images/my-background-18.jpg') center center / cover no-repeat;
  opacity: 0.8;
}

#pet-container {
  position: absolute;
  bottom: 1rem;
  left: 0;
  width: 140px;
  height: 140px;
  animation: moveLeftRightImmediateFlip 9s infinite linear;
  animation-fill-mode: forwards;
}

@keyframes moveLeftRightImmediateFlip {
  0% {
    left: 0;
    transform: scaleX(-1);
  }
  49.999% {
    left: calc(100% - 150px);
    transform: scaleX(-1);
  }
  50% {
    left: calc(100% - 150px);
    transform: scaleX(1);
  }
  99.999% {
    left: 0;
    transform: scaleX(1);
  }
  100% {
    left: 0;
    transform: scaleX(-1);
  }
}

#pet-inner.jump {
  animation: jump 0.6s ease-out;
}
@keyframes jump {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-50px); }
  70%  { transform: translateY(-50px); }
  100% { transform: translateY(0); }
}

#pet-image {
  max-width: 100%;
  max-height: 100%;
}

#rename-section {
  margin: 20px 0;
}

#rename-section input[type="text"] {
  font-family: 'JetBrains Mono', monospace;
  padding: 0.5rem 1rem;
  border: 2px solid #016397;
  border-radius: 4px;
  background: #080808;
  color: #fff;
  outline: none;
  font-size: 1rem;
}
#rename-section input[type="text"]::placeholder {
  color: #555;
}
#rename-section button {
  margin-left: 10px;
  padding: 0.6rem 1.2rem;
  border: 2px solid #016397;
  background: #080808;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}
#rename-section button:hover {
  background: #016397;
  color: #fff;
}

#pet-status {
  margin: 20px auto;
  width: min(500px, 92vw);
  text-align: left;
  color: #fff;
  background: rgba(1, 99, 151, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 8px;
  border-radius: 4px;
  font-size: 1.1rem;
}
#pet-status p {
  margin: 0 0 10px 0;
}

#status-message {
  margin: 0 0 10px 0;
  color: #fff;
  font-style: italic;
  text-align: left;
}

#pet-actions button {
  margin: 5px;
  padding: 10px 20px;
  border: 2px solid #016397;
  background: #080808;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}
#pet-actions button:hover {
  background: #016397;
  color: #fff;
}

#messages {
  margin: 20px auto;
  width: min(500px, 92vw);
  text-align: left;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px;
  border-radius: 4px;
  color: #ffffff;
  font-weight: bold;
  font-size: 1.1rem;
  text-shadow: 0 0 6px #016397;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#feed-menu {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #080808; 
  padding: 20px;
  border-radius: 8px;
  z-index: 999;
  width: 300px;
  text-align: center;
  color: #fff;
  box-shadow: 0 0 10px #00fff2;
}

.fish-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 10px;
  cursor: pointer;
  gap: 5px;
}
.fish-option img {
  max-width: 50px;
  transition: transform 0.2s;
}
.fish-option img:hover {
  transform: scale(1.1);
}
.custom-tooltip {
  display: none;
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 5px 8px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.85rem;
}
.fish-option:hover .custom-tooltip {
  display: block;
}
.fish-count {
  font-size: 1.1rem;
  color: #fff;
}

#game-menu {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #080808;
  padding: 20px;
  border-radius: 8px;
  z-index: 999;
  width: 300px;
  text-align: center;
  color: #fff;
  box-shadow: 0 0 10px #00fff2;
}
#game-menu h3 {
  margin: 10px 0;
}

#rps-choices, 
#guess-choices {
  display: none; 
  margin: 15px 0;
}
#rps-choices button,
#guess-choices button {
  margin: 5px;
  padding: 8px 15px;
  border: 2px solid #016397;
  background: #111;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}
#rps-choices button:hover,
#guess-choices button:hover {
  background: #016397;
  color: #fff;
}
#close-game-menu {
  margin-top: 10px;
  padding: 0.6rem 1.2rem;
  border: 2px solid #016397;
  background: #080808;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}
#close-game-menu:hover {
  background: #016397;
  color: #fff;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
    margin: 16px 0;
  }

  #pet-screen {
    height: 60vw;
    max-height: 360px;
    min-height: 230px;
  }

  #rename-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0 12px;
  }

  #rename-section input[type="text"] {
    width: min(360px, 90vw);
    box-sizing: border-box;
  }

  #rename-section button {
    margin-left: 0;
  }

  #pet-status,
  #messages {
    box-sizing: border-box;
    font-size: 1rem;
  }

  #feed-menu,
  #game-menu {
    width: min(300px, 90vw);
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  html,
  body {
    background-attachment: scroll;
  }

  h1 {
    font-size: 1.6rem;
    padding: 0 10px;
  }

  #pet-screen {
    width: 94vw;
    height: 62vw;
    min-height: 210px;
  }

  #pet-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px;
  }

  #pet-actions button {
    margin: 0;
    min-width: 110px;
  }

  #rps-choices button,
  #guess-choices button,
  #close-game-menu {
    font-size: 0.85rem;
    padding: 8px 10px;
  }

  .fish-option {
    margin: 8px 6px;
  }

  .custom-tooltip {
    white-space: normal;
    width: 160px;
  }
}
