html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  font-family: sans-serif;
}

.controls {
  position: absolute;
  z-index: 999;
  top: 10px;
  left: 10px;
  background: white;
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.controls button {
  padding: 5px 10px;
  cursor: pointer;
}

#image-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#image-wrapper {
  position: relative;
  display: inline-block;
}

#uploaded-image {
  display: block;
  max-width: 100%;
  max-height: 100vh;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.zone {
  position: absolute;
  border: 2px dashed red;
  background-color: rgba(255, 0, 0, 0.1);
  cursor: pointer;
}

.tooltip {
  position: fixed;
  background: #fff;
  border: 1px solid #333;
  padding: 8px 12px;
  z-index: 1000;
  white-space: pre-wrap;
  pointer-events: none;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  max-width: 300px;
  word-wrap: break-word;
  line-height: 1.4;
}

.zone-list-section {
  margin-top: 15px;
  border-top: 1px solid #ccc;
  padding-top: 10px;
}

.zone-list-section h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: bold;
}

#zone-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.zone-item {
  padding: 8px;
  margin: 2px 0;
  background: #f5f5f5;
  border-radius: 3px;
  font-size: 12px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zone-text {
  flex-grow: 1;
  cursor: pointer;
}

.zone-item:hover {
  background: #e0e0e0;
  border-color: #ccc;
}

.zone-item.highlighted {
  background: #ffeb3b;
  border-color: #fbc02d;
}

.zone.highlight {
  border-color: #ffeb3b !important;
  border-width: 3px !important;
  background-color: rgba(255, 235, 59, 0.3) !important;
  box-shadow: 0 0 10px rgba(255, 235, 59, 0.6);
}

.delete-button {
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.delete-button:hover {
  background: #cc0000;
}

.delete-button:active {
  background: #990000;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-width: 400px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background: #e0e0e0;
  color: #333;
}

.modal-body {
  padding: 20px;
}

.modal-body label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

.modal-body textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 120px;
  box-sizing: border-box;
}

.modal-body textarea:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.button-primary {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.button-primary:hover {
  background: #45a049;
}

.button-secondary {
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ccc;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

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