/* Base Styling */
body {
  background-color: #050505;
  color: #eee;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Courier New', Courier, monospace;
  padding: 20px;
  box-sizing: border-box;
}

code {
  padding: .2em .5ch;
  background: #212121;
}

a {
  color: #10a0a0;
  text-decoration: none;
}

a:hover {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: auto;
}

/* ASCII Output Container */
#canvas {
  white-space: pre;
  font-size: 11px;
  line-height: 9px;
  letter-spacing: 1px;
  background: #000;
  padding: 20px;
  border: 1px solid #333;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  max-width: 100%;
  max-height: 70vh;
  overflow: auto;
  margin-bottom: 25px;
  box-sizing: border-box;
}

/* Layout Groups */
.intro {
  width: 100%;
  max-width: 900px;
  margin-bottom: 20px;
}

#newring {
  margin-top: 20px;
}

.controls {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: #111;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 2px;
}

.controls-top-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 15px;
  margin-bottom: 20px;
}

.controls-presets {
  margin-bottom: 20px;
}

.group { 
  display: flex; 
  flex-direction: column; 
  gap: 8px;
  flex: 1 1 auto;
  min-width: 120px;
}

.buttons-group {
  display: flex; 
  gap: 5px;
}

/* Typography & Form Elements */
label { 
  font-size: 10px; 
  text-transform: uppercase; 
  letter-spacing: 1px; 
  color: #888;
}

textarea {
  width: 100%;
  height: 250px;
  background: #000;
  color: #eee;
  border: 1px solid #444;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  padding: 10px;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 10px;
}

input[type="text"], input[type="number"] {
  background: #000;
  border: 1px solid #444;
  color: #eee;
  padding: 8px;
  outline: none;
}

input[type="range"] { 
  cursor: pointer; 
  height: 31px;
}

button {
  background: #222;
  color: #eee;
  border: 1px solid #444;
  padding: 8px 15px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s;
  height: 35px;
  text-transform: uppercase;
}

button:hover { 
  background: #333; 
  border-color: #666; 
}

button:active { 
  background: #444; 
}

.error-log { 
  color: #ff5555; 
  font-size: 11px; 
  margin-top: 10px;
  min-height: 14px; 
}

/* Responsive adjustments */
@media (max-width: 600px) {
  #canvas { font-size: 8px; line-height: 7px; }
  .group { min-width: 100%; }
}

/* Fullscreen */
#canvas:fullscreen {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
