body {
  font-family: 'Comic Sans MS', sans-serif; 
  background-color: #f0f0ff;
  color: #333;
  padding: 20px;
  background-image: url('../images/background.png'); 
  background-size: cover; 
  background-position: center; 
  background-attachment: fixed; 
}

.story-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #ffe9b2; 
  border-radius: 15px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); 
}

h1 {
  color: #ff1e56; 
  text-align: center;
  font-size: 2em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

h2, h3 {
  color: #ff7d00; 
  text-align: center;
  margin: 20px 0;
}

p {
  line-height: 1.8; 
  margin-bottom: 15px;
  font-size: 1.3em;
  color: #2c2c54; 
}

.quote {
  font-style: italic;
  color: #00a8ff; 
  font-size: 1.4em;
  margin-left: 30px;
}

strong {
  color: #ff1e56; 
}

em {
  color: #0a891f; 
}

.footer {
  color: #000000;
  padding: 10px;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  font-size: small;
}

.social-media {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-icon {
  color: #fbc531;
  font-size: 20px;
  margin: 0 10px;
  transition: transform 0.3s, color 0.3s;
  text-decoration: none;
}

.social-icon:hover {
  transform: scale(1.3);
  color: #e84118; 
}

.story-image {
  display: block;
  max-width: 100%; 
  height: auto;
  margin: 20px auto;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); 
  border: 3px solid #fbc531; 
}

#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #fbc531;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
  color: #2c2c54;
  font-family: 'Orbitron', 'Segoe UI', sans-serif;
  box-shadow:
    0 0 10px rgba(251, 197, 49, 0.6),
    0 0 18px rgba(251, 197, 49, 0.4);
}

#backToTop.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#backToTop:hover {
  background: #e84118;
  box-shadow:
    0 0 12px rgba(232, 65, 24, 0.7),
    0 0 22px rgba(251, 197, 49, 0.6);
  transform: scale(1.08);
}

#backToTop:active {
  background: #a32b11;
  transform: scale(0.92);
}

#backToTop i {
  font-size: 28px;
  transition: transform 0.3s ease;
  text-shadow: 0 0 6px rgba(44, 44, 84, 0.7);
}

#backToTop.reverse {
  background: #ff7d00;
  animation: softPulse 2s ease-in-out infinite;
  color: #2c2c54;
}

@keyframes softPulse {
  0%, 100% {
    box-shadow:
      0 0 10px rgba(255, 125, 0, 0.4),
      0 0 20px rgba(251, 197, 49, 0.3);
  }
  50% {
    box-shadow:
      0 0 16px rgba(251, 197, 49, 0.6),
      0 0 28px rgba(255, 125, 0, 0.5);
  }
}

@media (hover: none) and (pointer: coarse) {
  #backToTop {
    width: 68px;
    height: 68px;
    bottom: 25px;
    right: 25px;
  }

  #backToTop i {
    font-size: 32px;
  }
}