* {
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
  font-weight: bold;
}
body {
  margin: 0;
  background: linear-gradient(to bottom right, #ffd6f6, #e0fffc);
  display: flex;
  flex-direction: column;
  align-items: center;
}
header {
  width: 100%;
  padding: 2vh;
  background: linear-gradient(to right, #ff99cc, #66ccff);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 5px solid #fff;
}
h1 {
  font-size: 3.5vw;
  text-align: center;
  margin: 0 0 1vh;
  color: #fff;
  text-shadow: 2px 2px #333;
}
.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2vw;
  margin-bottom: 2vh;
}
input[type="file"], input[type="text"] {
  padding: 1.2vh;
  border-radius: 16px;
  border: 2px solid #fff;
  font-size: 1.2rem;
  width: 60vw;
  max-width: 260px;
  background: #fff;
  color: #444;
}
.btn {
  background: linear-gradient(145deg, #ffecb3, #ffb6c1);
  color: #333;
  border: none;
  border-radius: 30px;
  padding: 1.5vh 2vw;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 3px 3px 6px rgba(0,0,0,0.2);
  transition: 0.2s;
}
.btn:hover {
  transform: scale(1.05);
  background: linear-gradient(145deg, #ffd3a5, #ffb7c5);
}
#previewArea {
  width: 95%;
  max-width: 900px;
  margin: 2vh auto;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
#thumbPanel {
  display: flex;
  background: #ffeeee;
  border-bottom: 3px dashed #ff80ab;
  overflow-x: auto;
}
#thumbs {
  display: flex;
  gap: 10px;
  padding: 12px;
  flex-grow: 1;
}
.thumb {
  border: 3px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  max-height: 120px;
  transition: 0.3s;
}
.thumb.active {
  border-color: #ff4081;
  box-shadow: 0 0 10px #ff80ab;
}
#mainView {
  display: flex;
  justify-content: center;
  padding: 20px;
}
canvas {
  border: 4px dotted #ff80ab;
  background: #fff;
  max-width: 100%;
  border-radius: 16px;
}
#status {
  font-size: 1.3rem;
  color: #444;
  text-align: center;
  margin: 20px;
}
footer {
  background: #f8f8f8;
  padding: 20px;
  text-align: center;
  font-size: 1rem;
  width: 100%;
  margin-top: auto;
}
#helpModal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}
#helpContent {
  background: white;
  padding: 2rem;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 10px;
}
#helpContent ul {
  padding-left: 1rem;
}
#helpContent button {
  margin-top: 1rem;
  background: #f44336;
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
}
