body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; }

/* 앱 전체 배경 - 은은한 그라데이션 (기존 순백색 대신) */
.app-bg {
  background: linear-gradient(160deg, #eef1fb 0%, #e7ecfb 28%, #eef4f6 62%, #f3f0fa 100%);
  min-height: 100vh;
}

/* 좌측 다크 사이드바 */
.app-sidebar {
  background: linear-gradient(195deg, #171a2b 0%, #1d2140 55%, #232a52 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.app-sidebar .nav-item {
  color: #a6acc9;
}
.app-sidebar .nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.app-sidebar .nav-item-active {
  background: linear-gradient(135deg, #3a63f5, #5b3df5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(58, 99, 245, 0.35);
}
.app-sidebar .sidebar-divider { border-color: rgba(255, 255, 255, 0.08); }
.app-sidebar .sidebar-label { color: #6d74a0; }
.app-sidebar .sidebar-name { color: #f1f2fb; }
.app-sidebar .sidebar-email { color: #7d84ac; }
.app-sidebar .sidebar-logo-badge {
  background: linear-gradient(135deg, #3a63f5, #5b3df5);
  box-shadow: 0 4px 12px rgba(58, 99, 245, 0.4);
}
.app-sidebar .user-box { background: rgba(255, 255, 255, 0.04); }

/* 에디터 캔버스 작업영역 - 도트 그리드 + 그라데이션 (심심한 회색 대신) */
.canvas-workspace {
  background-color: #eef1fa;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(58, 99, 245, 0.14) 1px, transparent 0);
  background-size: 18px 18px;
}

/* 섹션 리스트 아이템 */
.section-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: default;
  background: #fff;
}
.section-item:hover { background: #f9fafb; }
.section-item-active {
  border-color: #3a63f5;
  background: #f0f5ff;
}
.drag-handle { cursor: grab; }

/* 캔버스 섹션 하이라이트 */
.canvas-section {
  position: relative;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: -2px;
  transition: outline-color 0.15s;
}
.canvas-section:hover { outline-color: #b8ceff; }
.canvas-section-active { outline-color: #3a63f5; }

/* 섹션 내 placeholder */
.sec-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #bbb;
  font-size: 12px;
  padding: 40px;
}
.sec-placeholder i { font-size: 24px; }

.sec-img-half {
  flex: 1;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  background-color: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sec-img-top {
  width: 100%;
  height: 280px;
  background-size: cover;
  background-position: center;
  background-color: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 캔버스 편집중 라벨 */
.canvas-section-label {
  position: absolute;
  top: -11px;
  left: 12px;
  z-index: 5;
  background: #3a63f5;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(58, 99, 245, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

/* 이미지 라이브러리 풀 썸네일 */
.pool-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: grab;
  border: 1px solid #eee;
  background: #f5f5f5;
  transition: transform 0.1s, box-shadow 0.15s;
}
.pool-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.pool-thumb:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  border-color: #b8ceff;
}
.pool-thumb:active { cursor: grabbing; }
.pool-thumb .pool-thumb-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.15s;
  cursor: pointer;
}
.pool-thumb:hover .pool-thumb-del { opacity: 1; }

/* 드롭존 드래그오버 강조 (Tailwind 클래스 토글 보조) */
#pool-dropzone.pool-dropzone-over {
  border-color: #3a63f5 !important;
  background-color: #eef2ff !important;
}
