@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

:root {
  --pink-50: #fdf2f8;
  --pink-100: #fce7f3;
  --pink-200: #fbcfe8;
  --pink-500: #ec4899;
  --pink-600: #db2777;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--gray-50);
  height: 100vh;
  color: var(--gray-800);
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* 头部区域 */
.header {
  background-color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border-radius: 0.75rem;
  margin: 1rem;
  transition: all 0.2s;
}

.header:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-title {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-input {
  font-size: 1.25rem;
  font-weight: 500;
  width: 24rem;
  border: none;
  outline: none;
  transition: all 0.2s;
}

.title-input:focus {
  border-bottom: 2px solid var(--pink-500);
}

.header-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.btn-secondary {
  color: var(--gray-600);
}

.btn-secondary:hover {
  color: var(--gray-800);
}

.btn-primary {
  background-color: var(--pink-500);
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background-color: var(--pink-600);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-config {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.note-input {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  outline: none;
  transition: all 0.2s;
}

.note-input:focus {
  border-color: var(--pink-500);
  box-shadow: 0 0 0 2px var(--pink-100);
}

.config-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}

.config-item:hover {
  background-color: var(--gray-50);
}

.config-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  width: 6rem;
  display: flex;
  align-items: center;
}

.required {
  color: #ef4444;
  margin-right: 0.5rem;
}

.radio-group {
  display: flex;
  gap: 2rem;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.radio-input {
  accent-color: var(--pink-500);
}

.radio-text {
  margin-left: 0.5rem;
  font-size: 0.875rem;
}

/* 主要内容区域 */
.main-content {
  display: flex;
  flex: 1;
  gap: 1rem;
  margin: 0 1rem 1rem 1rem;
  overflow: hidden;
}

/* 左侧区域 */
.sidebar {
  width: 18rem;
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
}

.tab-buttons {
  width: 6rem;
  border-right: 1px solid var(--gray-100);
}

.tab-button {
  width: 100%;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-button.active {
  background-color: var(--pink-50);
  color: var(--pink-500);
  border-left: 2px solid var(--pink-500);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tab-button:not(.active):hover {
  background-color: var(--gray-50);
}

.tab-icon {
  font-size: 1.125rem;
  transition: transform 0.2s;
}

.tab-button:hover .tab-icon {
  transform: scale(1.1);
}

.tab-label {
  font-size: 0.75rem;
  font-weight: 500;
}

.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.outline-item {
  padding: 0.5rem;
  display: flex;
  align-items: center;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.outline-item:hover {
  background-color: var(--gray-50);
}

.drag-handle {
  color: var(--gray-400);
  margin-right: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.outline-item:hover .drag-handle {
  opacity: 1;
}

.type-button {
  width: 100%;
  text-align: left;
  padding: 0.5rem;
  border: none;
  background: none;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.type-button:hover {
  background-color: var(--gray-50);
}

.type-icon {
  color: var(--gray-400);
  width: 1.25rem;
  transition: transform 0.2s;
}

.type-button:hover .type-icon {
  transform: scale(1.1);
}

.logic-content {
  padding: 0.75rem;
}

.add-logic-btn {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background-color: var(--pink-500);
  color: white;
  border: none;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.add-logic-btn:hover {
  background-color: var(--pink-600);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logic-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.logic-item {
  padding: 0.625rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.logic-item:hover {
  background-color: var(--gray-50);
  border-color: var(--pink-200);
}

/* 右侧问题列表 */
.question-list {
  flex: 1;
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  overflow-y: auto;
}

.questions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.question-card {
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  transition: all 0.2s;
}

.question-card:hover {
  border-color: var(--pink-200);
}

.question-header {
  display: flex;
  align-items: flex-start;
}

.required-badge {
  color: var(--pink-500);
  background-color: var(--pink-50);
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.question-content {
  margin-left: 1rem;
  flex: 1;
}

.question-title {
  font-weight: 500;
  transition: color 0.2s;
}

.question-card:hover .question-title {
  color: var(--pink-600);
}

.question-options {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.option-input {
  accent-color: var(--pink-500);
}

.option-text {
  margin-left: 0.5rem;
  font-size: 0.875rem;
}

.number-input {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  outline: none;
  transition: all 0.2s;
}

.number-input:focus {
  border-color: var(--pink-500);
  box-shadow: 0 0 0 2px var(--pink-100);
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.2s;
}

.modal-overlay.show {
  opacity: 1;
}

.modal-content {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 42rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1rem;
} 