* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  width: 100%;
}

body {
  font-family: system-ui, sans-serif;
  background: #111;
  color: #eee;
}

/* Toolbar */
header {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
}

header h1 {
  display: flex;
  align-items: center;
  justify-content: baseline;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.9);
}

header h6 {
  /* font-size: 14px; */
  margin-top: 7px;
  margin-left: 6px;
  color: #bbbbbb82;
}

header h6 a {
  text-decoration: none;
  color: #bbbbbb82;
}

header h6 a:hover {
  text-decoration: underline;
  color: #bbbbbb;
}

/* Layout */
.editor {
  height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: 200px 1fr 240px;
}

/* Panels */
.panel {
  background: linear-gradient(180deg, #181818, #141414);
  border-right: 1px solid #2a2a2a;
  padding: 14px;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.panel h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #bdbdbd;
  margin-bottom: 12px;
}

.panel label {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 10px;
}

.panel input {
  background: #1f1f1f;
  border: 1px solid #2f2f2f;
  border-radius: 6px;
  padding: 6px 8px;
  color: #eee;
  transition:
    border 0.15s ease,
    box-shadow 0.15s ease;
}

.panel input:focus {
  outline: none;
  border-color: #4da3ff;
  box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.2);
}

.panel input[type="color"] {
  padding: 2px;          /* keep it compact */
  height: 32px;          /* similar to other inputs */
  background: #1f1f1f;   /* same bg as others */
}


/* Layers */
.layers ul {
  list-style: none;
}

.layers li {
  padding: 6px;
  cursor: pointer;
  background: #222;
  margin-bottom: 4px;
}

.layers li.active {
  background: #333;
}

/* Canvas */
.canvas-wrapper {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  background: #292828;
}

#canvas {
  position: relative;
  width: 56rem; /* 900 ÷ 16 */
  height: 37rem; /* 600 ÷ 16 */
  background: #fff;
  overflow: hidden;
  box-shadow:
    0 0 0 1px #ddd,
    0 12px 30px rgba(0, 0, 0, 0.35);
}

/* Dock container */
.dock-wrap {
  position: absolute;
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dock {
  position: relative;
}
.dock {
  position: absolute;
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  padding: 6px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  backdrop-filter: blur(6px);
}

/* Dock buttons */
.dock button {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  background: #1f1f1f;
  color: #ddd;
  border: 1px solid #2f2f2f;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.dock button:hover {
  background: #262626;
  border-color: #3a3a3a;
}

.dock button:active {
  background: #1a1a1a;
}

.dock #delete:hover {
  background-color: rgba(245, 86, 86, 0.632);
}

.dock button.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.export {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 0.6rem;
  padding: 6px;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  backdrop-filter: blur(6px);
}

.export button {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
  background: #1f1f1f;
  color: #ddd;
  border: 1px solid #2f2f2f;
  cursor: pointer;
  font-weight: 500;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.export button:hover {
  background: #262626;
  border-color: #3a3a3a;
}

.export button:active {
  background: #1a1a1a;
}

/* Info button */
.info-btn {
  position: absolute;
  bottom: 2%;
  left: calc(50% + 260px); /* offset from dock */
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid #2a2a2a;
  color: #ddd;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.info-btn:hover {
  background: #262626;
}

/* Shortcuts popup */
.shortcuts {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: #ddd;
  backdrop-filter: blur(6px);
  min-width: 220px;
  z-index: 6;
  min-width: 280px;
  padding: 16px 18px;
  font-size: 13px;
}

.shortcuts h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: #aaa;
}

.shortcuts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shortcuts li {
  margin-bottom: 6px;
}

.hidden {
  display: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  z-index: 5;
}

.info-btn {
  animation: pulse 2.2s ease-in-out infinite;
}
.info-btn.pulse {
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(77, 163, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(77, 163, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(77, 163, 255, 0);
  }
}





/* Elements */
.element {
  position: absolute;
  user-select: none;
  transform-origin: center;
  box-sizing: border-box;
}

/* Selection */
.element.selected {
  outline: 2.5px solid #4da3ff;
}

/* Resize handles */
.handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #4da3ff;
}

.handle.tl {
  top: -4px;
  left: -4px;
  cursor: nwse-resize;
}
.handle.tr {
  top: -4px;
  right: -4px;
  cursor: nesw-resize;
}
.handle.bl {
  bottom: -4px;
  left: -4px;
  cursor: nesw-resize;
}
.handle.br {
  bottom: -4px;
  right: -4px;
  cursor: nwse-resize;
}

/* Properties */
.properties label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  margin-bottom: 8px;
}

.properties input {
  padding: 4px;
  margin-top: 4px;
}

.layer-item {
  font-size: 13px;
  color: #ddd;
  padding: 8px;
  border-radius: 4px;
}
