body {
  font-family: "Roboto", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #eaeaea;
  transition: background 0.3s, color 0.3s;
}

/* DARK MODE */
body.dark-mode {
  background: #121212;
  color: #fff;
}

header {
  text-align: center;
  padding: 40px 20px;
  position: relative;
  background: #212121;
  transition: background 0.3s, color 0.3s;
  color: #ffffff;
}

body.dark-mode header {
  background: #1e1e1e;
  color: #fff;
}

h1 { font-size: 32px; margin: 0; font-weight: 700; }

#darkModeToggle {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  fill: #d1d5db;
  transition: fill 0.2s;
}
#darkModeToggle:hover { fill: #555; }
body.dark-mode #darkModeToggle { fill: #fff; }

.main-layout {
  display: flex;
  gap: 40px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 60px;
  align-items: flex-start;
}

.controls {
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.panel {
  background: #fff;
  border: 1px solid #ffffff;
  padding: 15px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.3s, border 0.3s, color 0.3s;
  font-weight: 400;
}

.dark-mode .panel {
  background: #2a2a2a;
  border: 1px solid #444;
}

.btn {
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: 0.2s ease, transform 0.1s;
  color: #fff;
}
.btn:hover { transform: translateY(-1px); opacity: 0.9; }

.gold { background: #898449; }
.coral { background: #FF6B6B; }
.sgray { background: #666666; }
.gray { background: #282828; }
.green { background: #25b564; }

.canvas-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.canvas-title {
  text-align: center;
  margin-bottom: 20px;
}

.canvas-container {
  width: 975px;
  height: 731px;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s, border 0.3s;
}

.dark-mode .canvas-container { background: #2a2a2a; border: 1px solid #444; }

canvas {
  display: block;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d1d5db;
}
.dark-mode canvas { background: #1f1f1f; border: 1px solid #555; }

.buttons-container {
  display: flex;
  margin-top: 10px;
  width: 100%;
  max-width: 975px;
  gap: 10px;
}

.buttons-container button {
  flex: 1;
}

.shadow-controls label { font-size: 14px; color: #555; }
.dark-mode .shadow-controls label { color: #ddd; }

.hidden { display: none; }

.site-footer {
  text-align: center;
  padding: 15px 0;
  background: #212121;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-top: 1px solid #D1D1D6;
  margin-top: 40px;
}

.site-logo {
  height: 100px;
  width: auto;
  margin-right: 10px;
  vertical-align: center;
}

.canvas-instructions-wrapper {
  display: flex;
  gap: 20px;
  align-items: stretch;
  flex-wrap: wrap;
}

.canvas-instructions-wrapper .how-to-use {
  flex: 1;
  max-width: 395px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  font-size: 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
}

body.dark-mode .how-to-use {
  background-color: #2a2a2a;
  border-color: #444;
  color: #ddd;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .main-layout { flex-direction: column; align-items: center; }
  .canvas-container { width: 100%; }
  canvas { width: 100%; height: auto; }
  .canvas-instructions-wrapper { flex-direction: column; }
  .canvas-instructions-wrapper .how-to-use { max-width: 100%; width: 100%; height: auto; }
  .buttons-container { flex-direction: column; max-width: 100%; }
}



/* Canvas + How-to side by side */
.canvas-instructions-wrapper {
  display: flex;
  gap: 20px;
  align-items: flex-start; /* align top edges */
}

/* Canvas wrapper holds canvas + buttons */
.canvas-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Canvas container */
.canvas-container {
  width: 975px;
  height: 731px;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s, border 0.3s;
}

/* Buttons below canvas */
.buttons-container {
  display: flex;
  margin-top: 10px;
  width: 100%;
  max-width: 975px;
  gap: 10px;
}

.buttons-container button {
  flex: 1;
}

/* How-to panel */
.how-to-use {
  flex: 1;
  max-width: 395px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
}

/* Responsive */
@media (max-width: 1200px) {
  .canvas-instructions-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .canvas-container { width: 100%; }
  canvas { width: 100%; height: auto; }
  .buttons-container { max-width: 100%; flex-direction: column; }
  .how-to-use { max-width: 100%; width: 100%; height: auto; margin-top: 20px; }
}
