/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background-color: #121212;
  color: #f0f0f0;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

#container {
  display: flex;
  width: 100%;
}

/* Left Control Panel */
#control-panel {
  width: 360px;
  background-color: #1e1e1e;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid #333;
  overflow-y: auto;
}

#control-panel h1 {
  font-size: 24px;
  margin-bottom: 16px;
  color: #ffffff;
  text-align: center;
}

#control-panel label {
  font-size: 14px;
  margin-bottom: 4px;
  color: #cccccc;
}

#control-panel textarea,
#control-panel input[type="number"],
#control-panel input[type="file"],
#control-panel select {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  background-color: #2a2a2a;
  color: #ffffff;
  border: 1px solid #444;
  outline: none;
}

#control-panel input[type="color"] {
  width: 100%;
  height: 40px;
  padding: 4px;
  border-radius: 8px;
  background-color: #2a2a2a;
  border: 1px solid #444;
  outline: none;
  cursor: pointer;
}

#control-panel textarea {
  min-height: 60px;
  resize: vertical;
}

#control-panel button {
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #4e8cff;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

#control-panel button:hover {
  background: #3b73db;
}

/* Right Preview Panel */
#preview-panel {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #181818;
  position: relative;
}

#qr-canvas {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  background-color: white;
}

#qr-canvas-container.blur {
  filter: blur(8px);
  opacity: 0.3;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

#qr-canvas-container {
  transition: filter 0.4s ease, opacity 0.4s ease;
}

#qr-canvas-container canvas {
  padding: 5px;
  background-color: transparent;
}

#content-fields input,
#content-fields textarea {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  margin-bottom: 16px;
  border-radius: 8px;
  background-color: #2a2a2a;
  color: #ffffff;
  border: 1px solid #444;
  outline: none;
  resize: vertical;
}

#content-fields label {
  font-size: 14px;
  color: #cccccc;
  display: block;
  margin-bottom: 4px;
}

#content-fields input:focus,
#content-fields textarea:focus {
  border-color: #4e8cff;
  box-shadow: 0 0 0 2px rgba(78, 140, 255, 0.2);
}

#content-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#qr-canvas-container svg {
  width: 100% !important;
  height: auto !important;
}

#qr-canvas-container {
  filter: blur(8px);
  opacity: 0.3;
  transition: filter 0.6s ease, opacity 0.6s ease;
}

#qr-canvas-container:not(.blur) {
  filter: blur(0px);
  opacity: 1;
}

#qr-progress-bar-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  z-index: 2;
}

#qr-progress-bar {
  height: 100%;
  width: 0%;
  background: #4e8cff;
  transition: width 0s;
}
