body {
  margin: 0;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f0f0f0;
  color: #222;
}

header {
  background: #e0e0e0;
  color: #222;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
  margin: 0;
  font-size: 22px;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#workspace {
  flex: 1;
  display: flex;
  min-height: 70vh;
}

#controls {
  width: 260px;
  padding: 15px;
  background: #f0f0f0;
  color: #222;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#controls h2 {
  margin: 0 0 10px 0;
  font-size: 18px;
  text-align: center;
}

#controls label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

#controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  border: none;
  box-shadow: none;
  outline: none;
  margin: 0;
  padding: 0;
}


#controls span {
  font-size: 12px;
  color: #555;
}

#controls button {
  padding: 8px;
  background: #ddd;
  border: none;
  border-radius: 5px;
  color: #222;
  cursor: pointer;
  transition: background 0.2s ease;
}

#controls button:hover {
  background: #ccc;
}

#canvas-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fafafa;
  overflow: hidden;
}

#instructions {
  max-width:800px;
  margin: 0 auto;
  padding: 20px;
  background: #f4f4f4;
  color: #222;
}

#instructions h3 {
  margin-top: 0;
}

#controls input[type="file"] {
  display: none;
}

.file-label {
  padding: 8px;
  background: #1E90FF;
  border: none;
  border-radius: 5px;
  color: #fff;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  font-size: 14px;
  display: inline-block;
}

.file-label:hover {
  background: #339CFF;
  transform: scale(1.05);
}
/* Wrapper around the link, matches instructions width */
.a-wrapper {
  box-sizing: border-box;
  font-size: 200%;
  max-width: 800px;       /* same as #instructions max-width */
  margin: 1rem auto;       /* center horizontally with spacing */
  font-family: sans-serif;
  padding: 0;              /* remove extra padding here */
  text-align: center;      /* center the link */
}

/* The link itself */
.a-wrapper a {
  display: inline-block;   /* shrink to content width */
  background-color: #0077cc;
  color: white;
  padding: 0.6em 1.2em;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.a-wrapper a:hover {
  background-color: #005fa3;
  transform: translateY(-1px);
}
