body {
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px;
  background: #f4f4f4;
}

#app {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

canvas {
  border: 1px solid #000;
  background: #fff;
}

#controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: 20px;
}

#codeInput {
  width: 400px;
  height: 600px;
  font-family: monospace;
  padding: 10px;
}

button {
  padding: 10px;
  font-size: 16px;
  cursor: pointer;
}

#docs {
  margin-top: 20px;
  padding: 22px 18px 18px 18px;
  background: #f9fbff;
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(0, 116, 217, 0.08);
  max-width: 950px;
  font-family: inherit;
  white-space: normal;
}

#docs table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

#docs th,
#docs td {
  border: 1px solid #c7e3f9;
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 1em;
}

#docs th {
  background: #eaf4ff;
  font-weight: bold;
  color: #0074d9;
}

#docs td b {
  font-family: monospace;
  color: #0074d9;
}

#xLabels {
  margin-top: 2px;
  color: #333;
}

#yLabels {
  margin-right: 2px;
  color: #333;
  text-align: right;
}

#main-menu {
  display: flex;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin-bottom: 36px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  padding: 12px 32px;
  align-items: center;
}

#main-menu li a {
  text-decoration: none;
  color: #0074d9;
  font-weight: bold;
  font-size: 19px;
  padding: 8px 18px;
  border-radius: 6px;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  letter-spacing: 0.5px;
  display: inline-block;
}

#main-menu li a:hover,
#main-menu li a:focus {
  background: #0074d9;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 116, 217, 0.10);
  text-decoration: none;
  outline: none;
}

.about-app-box {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.18em;
  background: #f9fbff;
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(0, 116, 217, 0.08);
  padding: 32px 28px 28px 28px;
  margin-top: 24px;
  color: #234;
  line-height: 1.7;
}

.about-app-box p {
  margin-bottom: 1.2em;
}

.about-app-box strong {
  color: #0074d9;
}

.about-app-box .emoji {
  font-size: 1.3em;
  vertical-align: middle;
  margin-right: 6px;
}

.about-app-box ul {
  margin: 1.2em 0 0 1.2em;
  padding: 0;
  list-style: "✨ ";
}

.about-app-box ul li {
  margin-bottom: 0.5em;
}

.how-it-works-box {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.13em;
  background: #f9fbff;
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(0, 116, 217, 0.08);
  padding: 32px 28px 28px 28px;
  margin-top: 24px;
  color: #234;
  line-height: 1.7;
}

.how-it-works-box p {
  margin-bottom: 1.2em;
}

.how-it-works-box strong {
  color: #0074d9;
}

.how-it-works-box .emoji {
  font-size: 1.2em;
  vertical-align: middle;
  margin-right: 6px;
}

.how-it-works-box ul {
  margin: 1.2em 0 0 1.2em;
  padding: 0;
  list-style: "👉 ";
}

.how-it-works-box ul li {
  margin-bottom: 0.5em;
}

.how-it-works-box code {
  background: #eaf4ff;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 1em;
  color: #0074d9;
}

.submenu {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 24px 0 32px 0;
  justify-content: center;
}

.submenu li a {
  text-decoration: none;
  color: #0074d9;
  font-weight: bold;
  font-size: 17px;
  padding: 6px 16px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.submenu li a:hover,
.submenu li a:focus {
  background: #0074d9;
  color: #fff;
}

.lesson-box {
  max-width: 700px;
  margin: 0 auto 40px auto;
  background: #f9fbff;
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(0, 116, 217, 0.08);
  padding: 32px 28px 28px 28px;
  color: #234;
  line-height: 1.7;
  font-size: 1.13em;
}

.lesson-box h2 {
  color: #0074d9;
  margin-top: 0;
  margin-bottom: 0.7em;
  letter-spacing: 0.5px;
}

.lesson-box img {
  display: block;
  margin: 18px auto 18px auto;
  max-width: 350px;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 116, 217, 0.10);
}

.lesson-box .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf4ff;
  color: #0074d9;
  border: 2px dashed #b3d8f6;
  border-radius: 10px;
  height: 180px;
  margin: 18px 0;
  font-size: 1.1em;
  font-style: italic;
  padding: 24px;
}

.lesson-img {  
  height: 100%;
  width: auto;
}

#canvas-info {
  margin-top: 18px;
  font-size: 1.08em;
  color: #234;
  background: #f9fbff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 116, 217, 0.08);
  padding: 12px 12px 12px 12px;
  max-width: 700px;
  min-width: 340px;
}

#info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px;
  font-size: 1em;
  margin-bottom: 10px;
}

.info-holder {
  margin-right: 8px;
  background: #fff;
  border-radius: 8px;
  border: 1.5px solid #0074d9;
  padding: 4px 8px;
  font-size: 1em;
  color: #0074d9;
  font-weight: bold;
  box-shadow: 0 1px 6px rgba(0, 116, 217, 0.07);
  transition: border 0.2s, box-shadow 0.2s;
}

.info-holder b {
  color: #234;
  font-weight: bold;
}

#canvas-info button {
  padding: 10px 22px;
  font-size: 1.08em;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  background-color: #0074d9;
  color: #fff;
  margin-right: 12px;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(0, 116, 217, 0.10);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

#canvas-info button:hover {
  background-color: #005fa3;
  box-shadow: 0 4px 16px rgba(0, 116, 217, 0.18);
  transform: translateY(-2px) scale(1.03);
  outline: none;
}

#runButton.run-btn {
  background: linear-gradient(90deg, #1ec96b 60%, #00b84d 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.15em;
  border: none;
  border-radius: 8px;
  padding: 14px 32px;
  margin-top: 10px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(30, 201, 107, 0.10);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  letter-spacing: 0.5px;
}

#runButton.run-btn:hover {
  background: linear-gradient(90deg, #17a858 60%, #009c3a 100%);
  box-shadow: 0 4px 16px rgba(30, 201, 107, 0.18);
  transform: translateY(-2px) scale(1.03);
  outline: none;
}

#resetButtons {
  display: flex;
  gap: 12px;
  width: 100%;
}

#resetButtons button {
  padding: 10px 22px;
  font-size: 1.08em;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  background-color: #eb4301;
  color: #fff;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(0, 116, 217, 0.10);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

#resetButtons button:hover {
  background-color: #b43402;
  box-shadow: 0 4px 16px rgba(0, 116, 217, 0.18);
  transform: translateY(-2px) scale(1.03);
  outline: none;
}

.reset-btn {
  flex-grow: 1;
  margin: 0;
}

#dialog {
  position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.25); display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.dialog-box {
  display: flex; flex-direction: column;
  background: #fff; border-radius: 12px; padding: 28px 36px; box-shadow: 0 4px 24px #0074d955;
  font-size: 1.15em; color: #234; text-align: center;
  min-width: 240px;
}
.dialog-box button {
  margin-top: 18px; padding: 8px 22px; border-radius: 8px; border: none; background: #0074d9; color: #fff; font-weight: bold;
  cursor: pointer; font-size: 1em;
}

.howit-link {
  /* color: #0074d9; */
  text-decoration: underline dotted;
  font-weight: bold;
  transition: color 0.2s;
}
.howit-link:hover,
.howit-link:focus {
  color: #005fa3;
  background: #eaf4ff;
  border-radius: 5px;
  text-decoration: none;
  outline: none;
}

/* Primeri crteza dialog */
#examplesDialog {
  position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.25); display: flex; align-items: center; justify-content: center; z-index: 1100;
}
#examplesDialog .dialog-box {
  background: #fff; border-radius: 12px; padding: 28px 36px; box-shadow: 0 4px 24px #0074d955;
  font-size: 1.08em; color: #234; text-align: center; min-width: 260px;
}
#examplesList .example-item:hover {
  background: #eaf4ff;
  color: #0074d9;
  border-radius: 6px;
}