body {
  background-color: rgb(0, 139, 139);
}

header {
  padding-top: 20px;
  position: relative;
}

.back-button {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.9);
  color: rgb(0, 139, 139);
  text-decoration: none;
  border-radius: 25px;
  font-family: 'Lato', sans-serif;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.back-button:hover {
  background: white;
  transform: translateX(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-button i {
  font-size: 14px;
}

main {
  padding-bottom: 50px;
}

h1 {
  font-family: 'Fredericka the Great', sans-serif;
  text-transform: capitalize;
  font-size: 70px;
  margin-top: 0;
  margin-bottom: 30px;
  font-weight: normal;
  color: rgb(0, 0, 0);
}

.hello {
  display: inline-block;
}

.ship {
  width: 200px;
}

.chardinjs-tooltiptext {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
}

p .whats-this {
  width: 200px;
  margin: 0 auto;
}

.game-mode-selection,
.difficulty-selection {
  margin: 20px 0;
}

.mode-label,
.difficulty-label {
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: rgb(0, 0, 0);
}

.mode-buttons,
.difficulty-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mode-button,
.difficulty-button {
  min-width: 120px;
  padding: 12px 20px;
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mode-button.active,
.difficulty-button.active {
  background-color: rgb(248, 96, 41);
  border-color: rgb(248, 96, 41);
  color: rgb(0, 0, 0);
  transform: scale(1.05);
}

.mode-button i,
.new-battle i {
  margin-right: 5px;
}

.difficulty-hint {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: rgb(248, 96, 41);
  background-color: rgba(248, 96, 41, 0.1);
  border-left: 3px solid rgb(248, 96, 41);
  padding: 10px 15px;
  margin-top: 15px;
  border-radius: 4px;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.difficulty-hint i {
  margin-right: 8px;
}


@media only screen and (max-width: 640px) {
  h1 {
    font-size: 50px;
    margin-bottom: 20px;
  }

  .ship {
    width: 150px;
  }

  header {
    padding-top: 0;
  }

  .back-button {
    position: static;
    margin: 10px auto 20px;
    display: inline-flex;
  }

  .intro {
    display: inline;
  }
  
  .mode-buttons,
  .difficulty-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .mode-button,
  .difficulty-button {
    width: 200px;
  }
  
  .new-battle {
    width: 90%;
    max-width: 300px;
  }
}

@media only screen and (max-width: 400px) {
  h1 {
    font-size: 40px;
  }
  
  .row p {
    font-size: 16px;
  }
  
  .mode-label,
  .difficulty-label {
    font-size: 16px;
  }
  
  .mode-button,
  .difficulty-button {
    width: 180px;
    font-size: 14px;
    padding: 10px 16px;
  }
  
  .new-battle {
    font-size: 16px;
    padding: 14px;
  }
}

/* PWA Install Banner */
.pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgb(248, 96, 41), rgb(255, 127, 80));
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.pwa-banner-content > i {
  font-size: 32px;
  color: white;
}

.pwa-banner-text {
  flex: 1;
  color: white;
}

.pwa-banner-text strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.pwa-banner-text p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

.pwa-install-button {
  background: white;
  color: rgb(248, 96, 41);
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s;
  white-space: nowrap;
}

.pwa-install-button:hover {
  transform: scale(1.05);
}

.pwa-close-button {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 10px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.pwa-close-button:hover {
  opacity: 1;
}

.pwa-footer {
  text-align: center;
  padding: 20px;
  margin-top: 30px;
}

.pwa-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgb(1, 111, 111);
  text-decoration: none;
  font-size: 16px;
  padding: 10px 20px;
  border: 2px solid rgb(1, 111, 111);
  border-radius: 25px;
  transition: all 0.3s;
}

.pwa-footer-link:hover {
  background: rgb(1, 111, 111);
  color: white;
  transform: translateY(-2px);
}

@media only screen and (max-width: 640px) {
  .pwa-banner-content {
    padding: 12px 15px;
    gap: 10px;
  }
  
  .pwa-banner-content > i {
    font-size: 24px;
  }
  
  .pwa-banner-text strong {
    font-size: 16px;
  }
  
  .pwa-banner-text p {
    font-size: 12px;
  }
  
  .pwa-install-button {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .pwa-footer-link {
    font-size: 14px;
    padding: 8px 16px;
  }
}

@media only screen and (max-width: 400px) {
  .pwa-banner-content {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .pwa-banner-text {
    flex-basis: 100%;
    text-align: center;
  }
  
  .pwa-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
  }
}
