body {
  zoom: 1;
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: row;
}

:root {
  --faceSize: 120px;
  --cubeSize: 120px;
  --tableHeight: calc(var(--faceSize) * 3);
  --tableWidth: calc(var(--faceSize) * 4);
}

table {
  border-collapse: collapse;
  margin: 20px auto;
  width: var(--tableWidth);
  height: var(--tableHeight);
}

textarea {
  display: block;
  margin-bottom: 10px;
}

td {
    width: var(--faceSize);
    height: var(--faceSize);
    border: none;
    padding: 2px;
}

svg {
    display: block;
    width: 100%;
    height: 100%;
}

.square, .triangle, .ellipse {
    stroke: black;
    stroke-width: 1;
}

/* Cores padrão */
.square-0, .square-1, .square-2, .square-3, .triangle-0, .triangle-1, .triangle-2, .triangle-3, .ellipse-0, .ellipse-1, .ellipse-2, .ellipse-3 { fill: grey; }

/********************************************/

.face-3d {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: visible;
    border: 1px solid black;
}
.is-3d #cubo-3d {
   /* Ajuste a posição das faces */

  #face-0 { transform: rotateX(90deg) translateZ(calc(var(--cube-size) / 2)) rotateZ(90deg); }
  #face-1 { transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 2)); }
  #face-2 { transform: rotateY(-90deg) translateZ(calc(var(--cube-size) / 2)); }
  #face-3 { transform: translateZ(calc(var(--cube-size) / 2)); }
  #face-4 { transform: rotateY(90deg) translateZ(calc(var(--cube-size) / 2)); }
  #face-5 { transform: rotateX(-90deg) translateZ(calc(var(--cube-size) / 2)) rotateZ(-90deg);}

}

/*********************************************/

body > div:nth-child(1) {
  overflow-y: auto;
}

body > div:nth-child(2) {
  flex: 1;
  background: rgb(81, 105, 99);
}

#cubo-3d {
  position: relative;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
  transition: transform 0.1s;
  cursor: move;
}

#cubo-3d-wrapper {
  perspective: 1000px;
  height: 100%;
  overflow: hidden;
}

#cubo-3d-wrapper.orthographic {
  perspective: none;
}

#cubo {
  zoom: 2.2!important;
}


/* Modern styling for container and controls */
#container {
  zoom: 1.4;
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
  color: #333;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#alg-controlers-container, #controlers-container {
  margin-bottom: 20px;
}

textarea, select {
  font-family: 'Roboto Mono', monospace;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  background-color: #fff;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus, select:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

#stateOutput {
  background-color: #f1f3f4;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Roboto Mono', monospace;
  resize: vertical;
}

button {
  background-color: #4285f4;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #3367d6;
}

button:active {
  background-color: #2a56c6;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 32px;
}

/* Simple feedback link styling */
.feedback-link {
  display: inline-block;
  margin-top: 10px;
  color: #4285f4;
  text-decoration: none;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  transition: color 0.2s;
}

.feedback-link:hover {
  color: #3367d6;
  text-decoration: underline;
}

.feedback-link:visited {
  color: #4285f4;
}