/* Background triangles */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  background: #1e1b33;
  pointer-events: none;
}

.bg-layer span {
  position: absolute;
  display: block;
  width: 0;
  height: 0;
  border-left: 40px solid transparent;
  border-right: 40px solid transparent;
  border-bottom: 70px solid #ffe26f;
  opacity: 0.1;
  animation: floatTri 20s ease-in-out infinite;
  filter: drop-shadow(0 0 10px #ffe26f);
  pointer-events: none;
}

.bg-layer span:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.bg-layer span:nth-child(2) { top: 50%; left: 80%; animation-delay: 8s; }
.bg-layer span:nth-child(3) { top: 30%; left: 40%; animation-delay: 4s; }
.bg-layer span:nth-child(4) { top: 75%; left: 10%; animation-delay: 12s; }
.bg-layer span:nth-child(5) { top: 85%; left: 60%; animation-delay: 16s; }
.bg-layer span:nth-child(6) { top: 5%; left: 90%; animation-delay: 20s; }

@keyframes floatTri {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(180deg); }
}

/* App layout */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1e1b33;
  color: #ffe4f4;
  display: flex;
  justify-content: center;
  align-items: start;
  min-height: 100vh;
  padding: 2rem;
  box-sizing: border-box;
}

.app {
  max-width: 800px;
  width: 100%;
  z-index: 1;
  position: relative;
  text-align: center;
}

.logo {
  width: 100px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px #ff90e8);
}

h1 {
  font-size: 2.5rem;
  color: #ff90e8;
  margin-bottom: 0.2rem;
  text-shadow: 0 0 5px #ff90e8;
}

.subtitle {
  font-size: 1rem;
  color: #90faff;
  margin-top: 0;
  text-shadow: 0 0 3px #90faff;
}

/* Form area */
main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

textarea#codeInput {
  width: 100%;
  height: 200px;
  background-color: #2a2644;
  color: #fffdd0;
  border: 2px solid #ff90e8;
  border-radius: 10px;
  padding: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  resize: vertical;
  box-shadow: 0 0 10px #ff90e880;
}

button#runBtn {
  background: linear-gradient(90deg, #ff90e8, #90faff, #ffe26f);
  color: #1e1b33;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 12px #ffe26f;
  transition: transform 0.1s ease-in-out;
  align-self: center;
}

button#runBtn:hover {
  transform: scale(1.05);
}

.output {
  background-color: #2a2644;
  color: #d6ffe4;
  border: 2px solid #90faff;
  padding: 1rem;
  border-radius: 10px;
  min-height: 120px;
  white-space: pre-wrap;
  font-family: 'Courier New', monospace;
  box-shadow: 0 0 10px #90faff80;
}

.output-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.output-box {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  background-color: #2a2644;
  border-radius: 10px;
  border: 2px solid #444;
  padding: 1rem;
  box-shadow: 0 0 12px #1e1b33;
  min-width: 300px;
  max-width: 100%;
}

.output-box h3 {
  margin-top: 0;
  color: #ffe26f;
  text-shadow: 0 0 4px #ffe26f;
  font-weight: normal;
  font-size: 1rem;
  text-align: left;
}

.output-box .output {
  background-color: transparent;
  border: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  white-space: pre-wrap;
  color: #d6ffe4;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}


/* Footer */
footer {
  margin-top: 3rem;
  font-size: 1.2rem;  
  color: #ffe26f;
  text-shadow: 0 0 3px #ffe26f;
}
