/* Overall page styling */
body {
  font-family: Arial, sans-serif;
  background: #1e1e1e;
  color: #ccc;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Container styling */
.container {
  flex: 1;
  width: 90%;
  max-width: 800px;
  margin: 30px auto;
  background: #2e2e2e;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.8);
  border-radius: 8px;
}

/* Headings */
h1, h2 {
  text-align: center;
  color: #f5f5f5;
}

/* CodeMirror Editor */
#editor {
  height: 300px;
}

/* Output Areas */
#output, #file-output {
  border: 1px solid #444;
  margin-top: 10px;
  padding: 10px;
  background: #1e1e1e;
  color: #ccc;
  min-height: 80px;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: monospace;
  line-height: 1.4;
}

/* Custom scrollbar for output areas */
#output::-webkit-scrollbar, #file-output::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
#output::-webkit-scrollbar-track, #file-output::-webkit-scrollbar-track {
  background: #1e1e1e;
}
#output::-webkit-scrollbar-thumb, #file-output::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

/* File Output Section */
.file-section {
  margin-top: 20px;
  padding: 10px;
  background: #292929;
  border: 1px solid #444;
  border-radius: 8px;
  display: none;
}
.file-section h2 {
  text-align: center;
  margin-bottom: 10px;
  color: #f5f5f5;
}

/* Individual File Container */
.file-container {
  margin-bottom: 15px;
  padding: 10px;
  background: #333;
  border: 1px solid #555;
  border-radius: 6px;
}
.file-container h4 {
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #555;
  color: #fff;
  font-size: 1.2em;
}
.file-container pre {
  margin: 0;
  font-family: monospace;
  white-space: pre-wrap;
  color: #ccc;
}

/* Controls (buttons, select) */
.controls {
  text-align: center;
  margin-top: 10px;
}
button {
  padding: 8px 16px;
  font-size: 16px;
  cursor: pointer;
  background: #444;
  color: #ccc;
  border: none;
  border-radius: 4px;
  margin-right: 10px;
}
button:hover {
  background: #555;
}
select {
  padding: 8px 12px;
  font-size: 16px;
  background: #444;
  color: #ccc;
  border: none;
  border-radius: 4px;
}

/* Interactive Input Container */
#input-container {
  display: none;
  margin-top: 10px;
  border: 1px solid #444;
  background: #1e1e1e;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
}
#custom-input {
  padding: 8px;
  font-size: 16px;
  width: 70%;
  background: #2e2e2e;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 4px;
  margin-right: 10px;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  color: #888;
}
footer a {
  color: #888;
  text-decoration: none;
}

/* Delete File Button */
#delete-file-btn {
  padding: 8px 16px;
  font-size: 16px;
  cursor: pointer;
  background: #444;
  color: #ccc;
  border: none;
  border-radius: 4px;
  margin-right: 10px;
}
#delete-file-btn:hover {
  background: #555;
}

/* Running Button Animation */
.running {
  animation: pulse 2s infinite;
}
/* Right-side Menu */
.right-menu {
  position: absolute;
  right: 5%;
  top: 20px;
  z-index: 100;
}

.menu-btn {
  background: #444;
  color: #ccc;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 16px;
}

.menu-links {
  display: none;
  position: absolute;
  right: 0;
  background: #2e2e2e;
  min-width: 180px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  border: 1px solid #444;
}

.menu-links a {
  display: block;
  padding: 10px 15px;
  color: lightblue;
  text-decoration: none;
  border-bottom: 1px solid #444;
}

.menu-links a:hover {
  background: #444;
  color: blue;
}

.menu-links a:last-child {
  border-bottom: none;
}

.right-menu:hover .menu-links {
  display: block;
}
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}
