* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #000;
  overflow-y: auto;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('assets/storm-bg.jpg') no-repeat center/cover;
  z-index: 1;
  opacity: 0.7;
}

.lightning {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('assets/lightning.png') no-repeat center;
  animation: flash 3s infinite;
  opacity: 0;
}

.rune {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: url('assets/rune.png') no-repeat center;
  opacity: 0.3;
  animation: spin 20s linear infinite;
}

@keyframes flash {
  0%, 90% { opacity: 0; }
  95% { opacity: 0.7; }
  100% { opacity: 0; }
}

@keyframes spin {
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.mute-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 0.5rem;
  background: #ff00ff;
  border: none;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
  z-index: 1000;
  animation: glow 1.5s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px #ff00ff; }
  50% { box-shadow: 0 0 20px #00f7ff; }
}

.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 100;
}

.loader img {
  width: 100px;
}

.loader.active {
  display: block; /* Explicit show */
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
}

.modal-content {
  background: rgba(0, 0, 0, 0.85);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  border: 2px solid #00f7ff;
}

.character {
  width: 150px;
  margin-bottom: 1rem;
}

.slide h2 {
  color: #00f7ff;
  margin-bottom: 1rem;
}

.slide p {
  color: #ccc;
  margin-bottom: 1rem;
}

.slide button {
  padding: 0.5rem 1rem;
  background: #ff00ff;
  border: none;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
  margin: 0.5rem;
}

#main-content {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
  box-sizing: border-box;
  overflow-y: auto;
}

.container {
  text-align: center;
  background: rgba(0, 0, 0, 0.85);
  padding: 1.5rem;
  border-radius: 15px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 0 30px rgba(0, 247, 255, 0.5);
  z-index: 10;
  overflow: visible;
  min-height: fit-content;
}

h1 {
  color: #00f7ff;
  text-shadow: 0 0 10px #ff00ff;
  margin-bottom: 1rem;
}

p {
  color: #ccc;
  margin-bottom: 1rem;
}

.cauldron-img {
  width: 200px;
  margin: 1rem auto;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form label {
  color: #00f7ff;
  font-size: 1.1rem;
}

form input, form select {
  padding: 0.5rem;
  border: 2px solid #ff00ff;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
}

form button {
  padding: 0.5rem;
  background: #ff00ff;
  border: none;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s;
}

form button:hover {
  transform: scale(1.1);
}

.output {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
}

.output img {
  max-width: 100%;
  width: 150px;
  border: 2px solid #00f7ff;
  border-radius: 10px;
  filter: drop-shadow(0 0 10px #ff00ff);
}

.output p {
  margin: 0;
  color: #ccc;
  font-size: 0.9rem;
  text-align: center;
}

.download-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(45deg, #ff00ff, #00f7ff);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1rem;
  z-index: 50;
}

.download-btn:hover {
  transform: scale(1.1);
}

.tweet-btn {
  display: block;
  margin: 1rem auto;
  padding: 0.5rem 1rem;
  background: #1da1f2;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
}

footer {
  margin-top: 1rem;
  font-size: 0.9rem;
  z-index: 5;
}

@media (max-width: 600px) {
  .container {
    padding: 1rem;
    max-width: 95%;
  }
  .cauldron-img {
    width: 150px;
  }
  .output {
    gap: 0.2rem;
  }
  .output img {
    width: 120px;
  }
  .download-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}