/* Background trang dùng gradient sáng dịu */
body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

.container {
  background: linear-gradient(135deg, #d2b2e8 0%, #b882cf 100%);
  margin: 30px;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.15);
  max-width: 700px;
  width: 100%;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 25px;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

textarea, input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #ccc;
  border-radius: 10px;
  font-size: 16px;
  resize: vertical;
  box-sizing: border-box;
}

label {
  font-weight: bold;
  color: #333;
  display: block;
}

select, input[type="color"] {
  padding: 8px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

button {
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #388e3c;
}

canvas {
  display: block;
  margin: 25px auto 0;
  border: 2px solid #ccc;
  border-radius: 15px;
  background: white;
}
/* Icon home quay về trang chủ */
.home-link {
  position: fixed; /* Đứng yên khi scroll */
  top: 15px;
  left: 15px;
  font-size: 28px;
  background-color: rgba(255 255 255 / 0.8);
  padding: 8px 12px;
  border-radius: 10px;
  color: #333;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background-color 0.3s, color 0.3s;
  user-select: none;
  z-index: 1000;
}

.home-link:hover {
  background-color: #4caf50;
  color: white;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.8);
  cursor: pointer;
}


@media only screen and (max-width: 600px) {
  body {
    align-items: center;
    padding: 10px 5px;
  }

  .container {
    margin: 10px;
    padding: 20px;
    max-width: 100%;
    width: 100%;
    border-radius: 15px;
  }

  h1 {
    font-size: 1.6em;
    margin-bottom: 20px;
  }

  .controls {
    gap: 10px;
  }

  textarea, input[type="text"], select, input[type="color"] {
    font-size: 14px;
    padding: 10px;
  }

  button {
    font-size: 14px;
    padding: 10px;
  }

  canvas {
    width: 100% !important;
    height: auto !important;
    margin-top: 20px;
    border-radius: 10px;
  }

  .home-link {
    font-size: 22px;
    padding: 6px 10px;
    top: 10px;
    left: 10px;
  }
}
