.task-form {
  padding: 1rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.close-x-button {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 1.5rem;
  color: #7f8c8d;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
  z-index: 1600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.close-x-button:hover {
  background-color: #ffffff;
  color: #2c3e50;
}

.task-form h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 1.5rem 0;
}

.task-form form {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 0.5rem;
}

.form-group label input[type="checkbox"] {
  margin-right: 0.5rem;
}

.progression-button {
  padding: 0.5rem;
  border: 2px solid #d1d5db;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  color: #6b7280;
}

.progression-button-outlined {
  background: transparent;
  color: #6b7280;
  border-color: #d1d5db;
}

.progression-button-filled {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.progression-button:hover {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #9ca3af;
}

.progression-button-filled:hover {
  background: #059669;
  border-color: #059669;
}

.progression-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.progression-button-outlined:focus {
  background: transparent !important;
  color: #6b7280 !important;
  border-color: #d1d5db !important;
}

.progression-button-filled:focus {
  background: #10b981 !important;
  color: white !important;
  border-color: #10b981 !important;
}

.progression-button-subtask.progression-button-filled {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.progression-button-subtask.progression-button-filled:hover {
  background: #059669;
  border-color: #059669;
}

.progression-button-subtask.progression-button-filled:focus {
  background: #10b981 !important;
  color: white !important;
  border-color: #10b981 !important;
}

.rewards-container {
  margin-top: 0.75rem;
}

.reward-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.reward-item:last-child {
  margin-bottom: 0;
}

.reward-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  background: #f3f4f6;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  color: #6b7280;
  flex-shrink: 0;
}

.subtask-name-input {
  margin-bottom: 0.75rem;
}

.reward-item .form-input {
  flex: 1;
}

.reward-item .reward-project-input {
  flex: 3;
}

.reward-item .reward-score-input {
  flex: 1;
}

.subtasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.subtasks-header label {
  margin: 0;
  display: flex;
  align-items: center;
  height: 2rem;
  line-height: 2rem;
}

.add-subtask-button {
  padding: 0.375rem;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 2rem;
  height: 2rem;
}

.add-subtask-button:hover {
  background: #4f46e5;
}

.subtask-form-item {
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.subtask-header-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.subtask-name-input {
  flex: 1;
  margin-bottom: 0;
}

.subtask-rewards {
  margin-top: 0.75rem;
}

.remove-subtask-button {
  padding: 0.5rem;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 2.5rem;
  height: 2.5rem;
}

.remove-subtask-button:hover {
  background: #dc2626;
}

.error-message {
  color: #ef4444;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fef2f2;
  border-radius: 0.375rem;
  border: 1px solid #fecaca;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.cancel-button,
.submit-button,
.delete-button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-button {
  background: #f3f4f6;
  color: #374151;
}

.cancel-button:hover {
  background: #e5e7eb;
}

.submit-button {
  background: linear-gradient(to right, #6366f1, #8b5cf6);
  color: white;
  flex: 1;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.submit-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.delete-button {
  background: #ef4444;
  color: white;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  width: 44px;
}

.delete-button:hover:not(:disabled) {
  background: #dc2626;
}

.delete-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.wishlist-link-info {
  padding: 0.75rem;
  background-color: #f0f9ff;
  border-radius: 6px;
  border: 1px solid #bae6fd;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wishlist-link-text {
  font-size: 0.9rem;
  color: #374151;
}

.wishlist-link-text strong {
  color: #6366f1;
  font-weight: 600;
}

.wishlist-unlink-x {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.wishlist-unlink-x:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Test configuration styles */
.test-config-section {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 0.5rem;
  padding: 1rem;
}

.test-config-section > label {
  font-size: 1rem;
  font-weight: 600;
  color: #3498db;
  margin-bottom: 1rem !important;
}

.test-config-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.test-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.test-field-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.test-dictionaries-section {
  margin-top: 1rem;
}

.test-dictionaries-section > label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
  display: block;
}

.test-dictionaries-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.5rem;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
}

.test-dictionary-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.test-dictionary-item:hover {
  background-color: #f3f4f6;
}

.test-dictionary-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #3498db;
}

.test-dictionary-name {
  flex: 1;
  font-weight: 500;
  color: #374151;
}

.test-dictionary-count {
  font-size: 0.875rem;
  color: #9ca3af;
}

.test-no-dictionaries {
  padding: 1rem;
  text-align: center;
  color: #6b7280;
  font-style: italic;
}
