/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-image: url('marvel-bg.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
  position: relative;
  min-height: 100vh;
}

/* Background Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: -1;
}

/* Header */
header {
  background-color: rgba(0, 0, 0, 0.8);
  padding: 20px 10px;
  text-align: center;
}
header h1 {
  font-size: 2.5rem;
}

/* Heroes */
main {
  padding: 20px;
}
.heroes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.hero-card {
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  padding: 15px;
  width: 200px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.hero-card:hover {
  transform: scale(1.05);
}
.hero-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
}
.hero-card h2 {
  font-size: 1.2rem;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background-color: #111;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}
#close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* Footer */
footer {
  background-color: rgba(0, 0, 0, 0.8);
  padding: 10px;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 40px;
}
