:root {
  --material-color: #ffeae3; /* Peachy white */
  --material-metalness: 0.1;
  --material-roughness: 0.5;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  overflow: hidden;
  background: #1a1a1a;
  color: #e0e0e0;
}

.container {
  display: flex;
  height: 100%;
  width: 100%;
}

.left-panel {
  width: 30%;
  min-width: 300px;
  background: #2d2d2d;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.right-panel {
  flex: 1;
  height: 100%;
  background: #1a1a1a;
}

#code-input {
  width: 100%;
  flex: 1;
  margin: 20px 0;
  resize: none;
  min-height: 200px;
  box-sizing: border-box;
  background: #363636;
  color: #e0e0e0;
  border: 1px solid #404040;
  border-radius: 4px;
  padding: 10px;
}

h1 {
  margin: 0;
  font-size: 1.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

h1 {
  text-align: center;
}

h1 a {
  color: #ffffff;
  text-decoration: none;
}

h1 a:hover {
  color: var(--material-color);
  text-decoration: underline;
}

.buttons-container {
  margin-bottom: 10px;
  width: 100%;
}

.render-btn {
  padding: 10px;
  width: 100%;
  margin-bottom: 10px;
  box-sizing: border-box;
  background: #4a4a4a;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.render-btn:hover {
  background: #5a5a5a;
}

.output-container {
  display: none;
  max-height: 20%;
  background: #363636;
  border: 1px solid #404040;
  border-radius: 4px;
  padding: 10px;
  overflow-y: auto;
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
  color: #e0e0e0;
}

.output-container.warning {
  background-color: rgba(228, 161, 27, 0.5);
}

.output-container.success {
  background-color: rgba(20, 164, 77, 0.5);
}

.output-title {
  font-weight: bold;
  margin-bottom: 5px;
  color: #ffffff;
}

#output-message {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-width: 100%;
}

canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.button-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Mobile Responsive Design */
@media screen and (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  
  .left-panel {
    width: 100%;
    min-width: unset;
    height: 50%;
    min-height: 300px;
    padding: 10px;
  }
  
  canvas {
    aspect-ratio: 1;
  }

  .right-panel {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  h1 {
    font-size: 1.2rem;
    white-space: normal;
    padding: 5px 0;
    overflow: visible;
  }
  
  h1 a {
    word-break: break-word;
    display: inline-block;
  }
  
  #code-input {
    min-height: 150px;
    margin: 10px 0;
  }

  .buttons-container {
    margin-bottom: 0px;
  }

  .output-container {
    max-height: none;
    flex-shrink: 0;
    margin-bottom: 0px;
  }
}