body {
  background: linear-gradient(to right, #e0eafc, #cfdef3);
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  background: linear-gradient(to right, #0f0f0f, #1a1a1a);
  text-align: center;
  padding: 0.6rem 1rem; /* thinner padding */
  font-family: 'Orbitron', sans-serif;
  font-size: 1.8rem; /* slightly smaller */
  font-weight: bold;
  letter-spacing: 2px;
  color: #00f0ff;
  text-shadow: 0 0 6px #00f0ff, 0 0 12px #00c3ff;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid rgba(0,240,255,0.3); /* thin glow border at bottom */
  backdrop-filter: blur(8px); /* slight blur for background stripe */
}

.nexus-title {
  background: linear-gradient(90deg, #00f0ff, #00bfff, #00f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s infinite linear;
}

@keyframes shimmer {
  0% { background-position: -500px; }
  100% { background-position: 500px; }
}

.version {
  font-size: 1rem;
  font-weight: normal;
  vertical-align: middle;
  margin-left: 8px;
  color: #00f0ff; /* SOLID visible Nexus blue */
  text-shadow: 0 0 5px #00f0ff, 0 0 8px #00c3ff; /* neon glow */
  -webkit-text-fill-color: initial; /* Reset weird inherited transparent text */
  background: none; /* Remove any shimmer gradient for version */
}

#editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 1rem;
  box-sizing: border-box;
  border-radius: 20px;
}



#code-editors {
  display: flex;
  flex: 1;
  gap: 1rem;
}

textarea {
  flex: 1;
  padding: 1rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid #00bfff;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  color: #003366;
  font-weight: 500;
  resize: vertical; /* Allow only vertical resizing */
  min-height: 200px; /* Minimum height for mobile usability */
  box-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
  transition: all 0.3s;
}

textarea:focus {
  outline: none;
  border-color: #1e90ff;
  box-shadow: 0 0 15px #1e90ff;
}

iframe {
  flex: 1;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid #00bfff;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 191, 255, 0.3);
  resize: vertical; /* Allow vertical resizing */
  min-height: 300px; /* Minimum height for better usability */
}

/* Mobile Specific Improvements */
@media (max-width: 768px) {
  iframe {
    min-height: 350px; /* Make output bigger on mobile */
  }
}

#controls {
  padding: 1rem;
  text-align: center;
  background: white;
  border-top: 1px solid #ccc;
  border-radius: 20px;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(145deg, #0f0f0f, #1a1a1a); /* dark futuristic gradient */
  color: #00f0ff; /* cool light blue text */
  padding: 0.8rem 2rem;
  border: 1px solid #00f0ff;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0 0.5rem;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
  max-width: 250px;
  min-width: 150px;
}

button:hover {
  background: linear-gradient(145deg, #00f0ff, #00bfff); /* neon glow on hover */
  color: #0f0f0f; /* invert text color on hover */
  border: 1px solid #00f0ff;
  box-shadow: 0 0 10px #00f0ff, 0 0 30px #00bfff; /* strong neon double glow */
}

.label {
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.editor-section {
  display: flex;
  flex-direction: column;
  flex: 1;
}

#nexusBackground {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: linear-gradient(to right, #e0eafc, #cfdef3);
}

header, #editor, #controls {
  position: relative;
  z-index: 1;
}

/* Live Mode Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin-right: 10px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px; width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(135deg, #00bfff, #1e90ff);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.live-label {
  vertical-align: middle;
  font-weight: 500;
  font-size: 1.1rem;
}

/* Default (Desktop/Large Screen) */
#code-editors {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.editor-section, iframe {
  flex: 1;
}

/* Mobile/Small Screen */
@media (max-width: 768px) {
  #code-editors {
    flex-direction: column;
  }

  .editor-section, iframe {
    width: 100%;
  }

  #controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  button {
    width: 90%;
  }
}

@media (max-width: 768px) {
  textarea {
    min-height: 250px;
  }
}

.release-link {
  font-size: 0.2rem !important;
  margin-left: 15px;
  padding: 4px 10px;
  border: 1px solid #00f0ff;
  border-radius: 12px;
  text-decoration: none;
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.1);
  backdrop-filter: blur(6px);
  transition: all 0.3s ease-in-out;
  font-family: 'Poppins', sans-serif;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
  vertical-align: middle;
}

.release-link:hover {
  background: linear-gradient(135deg, #00f0ff, #1e90ff);
  color: #0f0f0f;
  box-shadow: 0 0 8px #00f0ff, 0 0 16px #1e90ff;
  text-shadow: none;
}