/* 전체 컨테이너 */
.qr-generator-wrapper {
  width: 100% !important;
  box-sizing: border-box !important;
  background: #f0f4f8 !important;
  padding: 24px !important;
  border-radius: 8px !important;
  font-family: 'Segoe UI', 'Roboto', sans-serif !important;
  margin-bottom: 30px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

/* 헤더 */
.gen-header {
  text-align: center !important;
  margin-bottom: 25px !important;
}
.gen-main-title {
  margin: 0 0 12px !important;
  font-size: 2em !important;
  color: #1a3c5e !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}
.gen-subtext {
  color: #4a5568 !important;
  font-size: 1em !important;
  line-height: 1.5 !important;
  max-width: 700px !important;
  margin: 0 auto !important;
}

/* 본문 레이아웃 */
.gen-body {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 24px !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}
.gen-input-area,
.gen-result-area {
  flex: 1 1 340px !important;
  min-width: 300px !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  transition: box-shadow 0.3s ease !important;
}
.gen-input-area:hover,
.gen-result-area:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}
.section-title {
  margin: 0 0 16px !important;
  font-weight: 600 !important;
  color: #2d3748 !important;
  font-size: 1.25em !important;
  border-bottom: 2px solid #edf2f7 !important;
  padding-bottom: 10px !important;
}

/* 폼 그룹 */
.form-group {
  margin-bottom: 20px !important;
  padding: 15px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
}
.form-group:hover {
  border-color: #cbd5e0 !important;
}
.group-label {
  display: block !important;
  font-weight: 600 !important;
  color: #2d3748 !important;
  margin-bottom: 8px !important;
  font-size: 1em !important;
}

/* 서브그룹 */
.subgroup {
  margin-top: 15px !important;
  padding-top: 12px !important;
  border-top: 1px dashed #e2e8f0 !important;
}
.subgroup-label {
  display: block !important;
  color: #4a5568 !important;
  margin-bottom: 8px !important;
  font-size: 0.95em !important;
  font-weight: 500 !important;
}
.help-text {
  margin-top: 5px !important;
  font-size: 0.8em !important;
  color: #718096 !important;
  line-height: 1.4 !important;
}

/* 버튼형 라디오 */
.btn-group-row {
  display: flex !important;
  width: 100% !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}
.btn-radio {
  position: relative !important;
  flex: 1 1 80px !important;
  min-width: 80px !important;
  text-align: center !important;
  background: #edf2f7 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: 1px solid #e2e8f0 !important;
  overflow: hidden !important;
}
.btn-radio input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.btn-radio span {
  display: block !important;
  padding: 10px 0 !important;
  font-weight: 500 !important;
  color: #4a5568 !important;
  transition: all 0.2s ease !important;
}
.btn-radio:hover {
  background: #e2e8f0 !important;
  transform: translateY(-1px) !important;
}
.btn-radio:active {
  transform: translateY(1px) !important;
}
.btn-radio input[type="radio"]:checked + span {
  background: #3182ce !important;
  color: #ffffff !important;
}

/* 텍스트 입력 */
.input-wrap {
  position: relative !important;
  margin-top: 6px !important;
  margin-bottom: 12px !important;
}
.text-input {
  width: 100% !important;
  padding: 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  font-size: 1em !important;
  color: #2d3748 !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  transition: all 0.2s ease !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}
.text-input:focus {
  border-color: #3182ce !important;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15) !important;
  outline: none !important;
}
.text-input::placeholder {
  color: #a0aec0 !important;
}
.textarea {
  min-height: 100px !important;
  resize: vertical !important;
  line-height: 1.5 !important;
}
.counter-text {
  text-align: right !important;
  font-size: 0.8em !important;
  color: #718096 !important;
  margin-top: 4px !important;
}

/* 비밀번호 토글 */
.password-wrap {
  position: relative !important;
}
.toggle-password {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 1.1em !important;
  color: #718096 !important;
  padding: 4px !important;
  line-height: 1 !important;
}
.toggle-password:hover {
  color: #4a5568 !important;
}
.eye-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* 체크박스 */
.checkbox-wrap {
  display: flex !important;
  align-items: center !important;
  margin-top: 10px !important;
}
.checkbox-input {
  margin-right: 8px !important;
  width: 18px !important;
  height: 18px !important;
}
.checkbox-label {
  font-size: 0.95em !important;
  color: #4a5568 !important;
}

/* 도우미 버튼 (https://, www., .com) */
.help-button-row {
  display: flex !important;
  width: 100% !important;
  gap: 8px !important;
  margin-bottom: 5px !important;
  flex-wrap: wrap !important;
}
.btn-helper {
  flex: 1 1 60px !important;
  min-width: 60px !important;
  padding: 8px 5px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 4px !important;
  background: #f7fafc !important;
  cursor: pointer !important;
  font-size: 0.85em !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
  color: #4a5568 !important;
}
.btn-helper:hover {
  background: #edf2f7 !important;
  border-color: #cbd5e0 !important;
  color: #2d3748 !important;
}
.btn-helper:active {
  transform: scale(0.98) !important;
}

/* 범위 슬라이더 */
.range-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
}
.range-input {
  flex: 1 !important;
  height: 6px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background: #e2e8f0 !important;
  outline: none !important;
  border-radius: 3px !important;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: #3182ce !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
  transition: background 0.2s ease !important;
}
.range-input::-webkit-slider-thumb:hover {
  background: #2c5282 !important;
}
.range-input::-moz-range-thumb {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: #3182ce !important;
  cursor: pointer !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
  transition: background 0.2s ease !important;
}
.range-input::-moz-range-thumb:hover {
  background: #2c5282 !important;
}
.range-value {
  min-width: 80px !important;
  text-align: right !important;
  font-size: 0.9em !important;
  color: #4a5568 !important;
  font-weight: 500 !important;
}

/* 셀렉트 박스 */
.select-input {
  width: 100% !important;
  padding: 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  font-size: 0.95em !important;
  color: #2d3748 !important;
  cursor: pointer !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s ease !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
  padding-right: 35px !important;
}
.select-input:focus {
  border-color: #3182ce !important;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15) !important;
  outline: none !important;
}

/* 색상 테마 */
.color-theme-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}
.color-theme-btn {
  padding: 8px 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 4px !important;
  background: #f7fafc !important;
  cursor: pointer !important;
  font-size: 0.85em !important;
  color: #4a5568 !important;
  transition: all 0.2s ease !important;
}
.color-theme-btn:hover {
  background: #edf2f7 !important;
  border-color: #cbd5e0 !important;
}
.color-theme-btn:active {
  transform: scale(0.97) !important;
}

/* 색상 선택기 */
.color-picker-row {
  display: flex !important;
  gap: 20px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}
.color-picker-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
}
.color-input {
  width: 48px !important;
  height: 48px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  background: #fff !important;
  padding: 2px !important;
  transition: border-color 0.2s ease !important;
}
.color-input:hover, .color-input:focus {
  border-color: #3182ce !important;
}
.color-label {
  font-size: 0.85em !important;
  color: #718096 !important;
}

/* 버튼행 (재설정/생성) */
.btn-row {
  display: flex !important;
  gap: 12px !important;
  margin-top: 25px !important;
}
.btn-reset,
.btn-generate {
  flex: 1 !important;
  padding: 14px 10px !important;
  border: none !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  cursor: pointer !important;
  font-size: 1em !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}
.btn-reset {
  background: #718096 !important;
}
.btn-reset:hover {
  background: #4a5568 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}
.btn-reset:active {
  transform: translateY(1px) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}
.btn-generate {
  background: #3182ce !important;
  font-weight: 600 !important;
}
.btn-generate:hover {
  background: #2b6cb0 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}
.btn-generate:active {
  transform: translateY(1px) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* QR 코드 미리보기 영역 */
.qr-preview-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
  margin-bottom: 20px !important;
}
.qr-preview {
  width: 100% !important;
  min-height: 280px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  box-sizing: border-box !important;
  position: relative !important;
}
#qrcode {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  transition: opacity 0.3s ease !important;
}
#qrcode img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
  border-radius: 4px !important;
  transition: transform 0.3s ease !important;
}
#qrcode img:hover {
  transform: scale(1.02) !important;
}
.placeholder-text {
  text-align: center !important;
  color: #a0aec0 !important;
  padding: 30px !important;
}
.placeholder-icon {
  margin-bottom: 12px !important;
  color: #cbd5e0 !important;
}

/* 스캔 테스트 안내 */
.scan-test-note {
  background: #ebf8ff !important;
  border: 1px solid #bee3f8 !important;
  border-radius: 6px !important;
  padding: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.scan-icon {
  font-size: 1.5em !important;
}
.scan-test-note p {
  margin: 0 !important;
  font-size: 0.9em !important;
  color: #3182ce !important;
  line-height: 1.4 !important;
}

/* QR 정보 영역 */
.qr-info {
  background: #f7fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 15px !important;
  margin-bottom: 20px !important;
}
.info-item {
  display: flex !important;
  justify-content: space-between !important;
  padding: 8px 0 !important;
  border-bottom: 1px dotted #e2e8f0 !important;
}
.info-item:last-child {
  border-bottom: none !important;
}
.info-label {
  font-weight: 600 !important;
  color: #4a5568 !important;
}
.info-value {
  color: #718096 !important;
}

/* 다운로드 영역 */
.final-result-box {
  background: #f0fff4 !important;
  border: 2px solid #38a169 !important;
  border-radius: 6px !important;
  padding: 15px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 5px !important;
  margin-bottom: 15px !important;
  animation: pulse 2s infinite !important;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.4) !important;
  }
  70% {
    box-shadow: 0 0 0 10px rgba(56, 161, 105, 0) !important;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 161, 105, 0) !important;
  }
}
.final-result-label {
  color: #38a169 !important;
  font-size: 1.1em !important;
  font-weight: 600 !important;
}
.final-result-value {
  color: #2d3748 !important;
  font-size: 0.9em !important;
}

/* 다운로드 옵션 */
.download-options {
  background: #f7fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 15px !important;
}
.download-title {
  text-align: center !important;
  font-weight: 500 !important;
  color: #4a5568 !important;
  margin-bottom: 12px !important;
  font-size: 0.9em !important;
}

/* 다운로드 버튼 */
.bottom-btn-row {
  display: flex !important;
  gap: 10px !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
}
.btn-download {
  padding: 12px 16px !important;
  background: #3182ce !important;
  border: none !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  cursor: pointer !important;
  font-size: 0.95em !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 140px !important;
  justify-content: center !important;
}
.download-icon {
  font-size: 1.2em !important;
}
.btn-download:hover {
  background: #2b6cb0 !important;
  transform: translateY(-1px) !important;
}
.btn-download:active {
  transform: translateY(1px) !important;
}

/* 반응형 (모바일) */
@media screen and (max-width: 720px) {
  .qr-generator-wrapper {
    padding: 15px !important;
  }
  .gen-body {
    flex-direction: column !important;
  }
  .help-button-row {
    flex-wrap: wrap !important;
  }
  .btn-helper {
    min-width: 60px !important;
  }
  .color-picker-row {
    justify-content: center !important;
  }
  .btn-radio {
    flex: 1 1 calc(50% - 8px) !important;
  }
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
  .qr-generator-wrapper {
    background: #1a202c !important;
    color: #e2e8f0 !important;
  }
  .gen-main-title {
    color: #63b3ed !important;
  }
  .gen-subtext {
    color: #cbd5e0 !important;
  }
  .gen-input-area, .gen-result-area {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  }
  .section-title {
    color: #e2e8f0 !important;
    border-bottom-color: #4a5568 !important;
  }
  .form-group {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
  }
  .group-label, .subgroup-label, .info-label {
    color: #e2e8f0 !important;
  }
  .help-text {
    color: #a0aec0 !important;
  }
  .text-input, .select-input, .textarea {
    background: #4a5568 !important;
    border-color: #718096 !important;
    color: #e2e8f0 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  }
  .text-input::placeholder {
    color: #a0aec0 !important;
  }
  .text-input:focus, .select-input:focus {
    border-color: #63b3ed !important;
    box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.2) !important;
  }
  .btn-radio {
    background: #4a5568 !important;
    border-color: #718096 !important;
  }
  .btn-radio span {
    color: #e2e8f0 !important;
  }
  .btn-radio input[type="radio"]:checked + span {
    background: #3182ce !important;
    color: #ffffff !important;
  }
  .btn-helper {
    background: #4a5568 !important;
    border-color: #718096 !important;
    color: #e2e8f0 !important;
  }
  .btn-helper:hover {
    background: #2d3748 !important;
  }
  .range-input {
    background: #718096 !important;
  }
  .range-input::-webkit-slider-thumb {
    background: #63b3ed !important;
  }
  .range-input::-webkit-slider-thumb:hover {
    background: #4299e1 !important;
  }
  .range-input::-moz-range-thumb {
    background: #63b3ed !important;
  }
  .range-input::-moz-range-thumb:hover {
    background: #4299e1 !important;
  }
  .range-value, .counter-text, .info-value, .color-label {
    color: #cbd5e0 !important;
  }
  .color-theme-btn {
    background: #4a5568 !important;
    border-color: #718096 !important;
    color: #e2e8f0 !important;
  }
  .color-theme-btn:hover {
    background: #2d3748 !important;
  }
  .color-input {
    border-color: #718096 !important;
  }
  .qr-preview {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
  }
  .placeholder-text, .placeholder-icon {
    color: #a0aec0 !important;
  }
  .scan-test-note {
    background: #2c3a4f !important;
    border-color: #3182ce !important;
  }
  .scan-test-note p {
    color: #63b3ed !important;
  }
  .qr-info, .download-options {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
  }
  .download-title {
    color: #cbd5e0 !important;
  }
  .final-result-box {
    background: #25472a !important;
    border-color: #48bb78 !important;
  }
  .final-result-label {
    color: #9ae6b4 !important;
  }
  .final-result-value {
    color: #e2e8f0 !important;
  }
  .checkbox-label {
    color: #cbd5e0 !important;
  }
  #qrcode img {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
  }
}