* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #f3f5f8;
  color: #20242a;
  font-family:
    Pretendard,
    "Noto Sans KR",
    "Malgun Gothic",
    Arial,
    sans-serif;
}

button,
select,
input {
  font: inherit;
}

.top-header {
  padding: 24px 30px;
  background: #ffffff;
  border-bottom: 1px solid #dfe3e8;
}

.top-header h1 {
  margin: 6px 0 8px;
  font-size: 30px;
  line-height: 1.3;
}

.test-badge {
  display: inline-block;
  margin: 0;
  padding: 5px 10px;
  background: #fff0d8;
  color: #9a5500;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.header-description {
  margin: 0;
  color: #616974;
  font-size: 17px;
}

.editor-layout {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 22px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px;
}

.control-panel,
.workspace-panel {
  background: #ffffff;
  border: 1px solid #dfe3e8;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(25, 35, 50, 0.06);
}

.control-panel {
  overflow: hidden;
}

.panel-section {
  padding: 22px;
  border-bottom: 1px solid #e6e9ed;
}

.panel-section:last-child {
  border-bottom: 0;
}

.panel-section h2,
.workspace-header h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.upload-button {
  display: block;
  width: 100%;
  padding: 16px;
  background: #1769aa;
  color: #ffffff;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.upload-button:hover {
  background: #11598f;
}

.help-text {
  margin: 12px 0 0;
  color: #69727e;
  font-size: 14px;
  line-height: 1.6;
}

.effect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.effect-button {
  min-height: 100px;
  padding: 12px 8px;
  background: #ffffff;
  border: 2px solid #dce2e8;
  border-radius: 13px;
  color: #2a3038;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.effect-button span {
  display: block;
  margin-bottom: 7px;
  font-size: 28px;
}

.effect-button:hover {
  border-color: #1769aa;
  background: #f2f8fd;
}

.setting-label {
  display: block;
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 700;
}

.setting-label select {
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid #ccd3da;
  border-radius: 10px;
  background: #f6f7f9;
}

.make-button {
  width: 100%;
  margin-top: 6px;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: #bec5cc;
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
}

.workspace-panel {
  display: flex;
  min-width: 0;
  min-height: 720px;
  flex-direction: column;
  padding: 20px;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
}

.workspace-header h2 {
  margin: 0;
}

#statusText {
  color: #69727e;
  font-size: 15px;
}

.canvas-area {
  position: relative;
  display: flex;
  overflow: hidden;
  flex: 1;
  min-height: 580px;
  align-items: center;
  justify-content: center;
  background-color: #edf0f3;
  background-image:
    linear-gradient(45deg, #dfe4e8 25%, transparent 25%),
    linear-gradient(-45deg, #dfe4e8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfe4e8 75%),
    linear-gradient(-45deg, transparent 75%, #dfe4e8 75%);
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
  border: 2px dashed #bdc5cd;
  border-radius: 14px;
}

.empty-guide {
  padding: 35px;
  color: #606a75;
  text-align: center;
}

.empty-guide strong {
  display: block;
  font-size: 21px;
}

.empty-guide p {
  margin: 8px 0 0;
  font-size: 16px;
}

.empty-icon {
  margin-bottom: 14px;
  font-size: 58px;
}

#previewImage {
  display: block;
  max-width: 100%;
  max-height: 670px;
  object-fit: contain;
  user-select: none;
}

.workspace-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
}

.secondary-button {
  padding: 12px 18px;
  background: #ffffff;
  color: #3a424c;
  border: 1px solid #cbd2d9;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-button:hover {
  background: #f3f5f7;
}

@media (max-width: 900px) {
  .editor-layout {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .workspace-panel {
    min-height: 600px;
  }

  .canvas-area {
    min-height: 460px;
  }
}

@media (max-width: 520px) {
  .top-header {
    padding: 20px 16px;
  }

  .top-header h1 {
    font-size: 24px;
  }

  .effect-grid {
    grid-template-columns: 1fr 1fr;
  }

  .workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
