/* Box Shadow 생성기 전용 스타일 */

nav { max-width: 800px; }
main { max-width: 800px; }

.preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 1rem;
  transition: background 0.2s;
}

.preview-box {
  width: 180px;
  height: 110px;
  background: #ffffff;
  border-radius: 14px;
  transition: box-shadow 0.15s, background 0.15s, border-radius 0.15s;
}

.box-options {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.opt-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 0;
}

.opt-row label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-sub);
  white-space: nowrap;
}

.opt-row input[type="color"] {
  width: 36px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.opt-row input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
  min-width: 0;
}

.num-display {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  min-width: 44px;
  text-align: right;
}

/* 레이어 섹션 */
.layers-section {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.layers-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
}

.layers-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.btn-add {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-add:hover {
  background: var(--primary-hover);
}

.layers-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.layer-card {
  padding: 0.75rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.layer-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.layer-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.inset-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  margin-left: 0.4rem;
}
.inset-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
  cursor: pointer;
}

.layer-remove {
  margin-left: auto;
  width: 26px;
  height: 26px;
  font-size: 1rem;
  line-height: 1;
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.layer-remove:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error);
  color: var(--error);
}
.layer-remove:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.layer-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.slider-row,
.color-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.slider-label {
  font-size: 0.78rem;
  color: var(--text-sub);
  font-weight: 500;
}

.slider {
  accent-color: var(--primary);
  min-width: 0;
}

.slider-num {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  min-width: 50px;
  text-align: right;
}

.color-row {
  grid-template-columns: 90px 36px 1fr;
}

.color-swatch {
  width: 36px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.color-text {
  padding: 0.4rem 0.55rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  min-width: 0;
  width: 100%;
}
.color-text:focus {
  border-color: var(--primary);
}

/* 출력 */
.output {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.output-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.9rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.output-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.btn-copy {
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  background: var(--surface);
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-copy:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.output-code {
  padding: 0.85rem 0.95rem;
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .preview-stage { height: 200px; }
  .preview-box { width: 140px; height: 90px; }
  .box-options { grid-template-columns: 1fr 1fr; }
  .box-options .opt-row:nth-child(2) { grid-column: 1 / -1; }
  .slider-row, .color-row { grid-template-columns: 70px 1fr auto; }
  .color-row { grid-template-columns: 70px 32px 1fr; }
}

@media (max-width: 480px) {
  .preview-stage { height: 170px; }
  .output-code { font-size: 0.78rem; }
}
