@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #f5f5f5;
  font-family: 'Roboto', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 1rem;
}

/* Header / menu */

header{
  margin-bottom: 1.5rem;
}
nav {
    margin-top: 20px;
    width: 100%;
    max-width: 800px;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
}

nav ul li {
    margin: 0 10px;
}

nav ul li a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
    padding: 10px 15px;
    background-color: #fff;
    border-radius: 5px;
    transition: background 0.2s;
}

nav ul li a:hover {
    background-color: #ccc;
}

.main-menu {
  font-size: 1.2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.main-menu a {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #000;
  border-radius: 4px;
}

.main-menu a:hover,
.main-menu a.current {
  background: steelblue;
  color: #fff;
}

/* Canvas */
canvas {
  border: 2px solid steelblue;
  width: 100%;
  max-width: 800px;
  height: auto; /* mantiene proporzioni */
  display: block;
  margin-bottom: 1rem;
}

/* Toolbox */
.toolbox {
  background-color: steelblue;
  border: 1px solid slateblue;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
  max-width: 800px;
  padding: 1rem;
  gap: 0.5rem;
}

.toolbox > * {
  background-color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  height: 50px;
  width: 50px;
  cursor: pointer;
}

/* Ultimo bottone a fine riga */
.toolbox > *:last-child {
  margin-left: auto;
}

/* Media queries */
@media screen and (min-width: 600px) {
  .container {
    flex-wrap: nowrap;
  }

  .main-menu {
    gap: 2rem;
  }

  .toolbox {
    justify-content: flex-start;
  }
}
