* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  position: relative;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 25px;
  width: 100%;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

header p{
  opacity: 0.9;
  font-size: 1.1rem;
}

/* 上传区域 */
.upload-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  margin-bottom: 25px;
  text-align: center;
}

.upload-container {
  border: 2px dashed #3498db;
  border-radius: 8px;
  background: #f8f9fa;
  padding: 20px 10px;
  position: relative;
  transition: all 0.3s;
  margin-bottom: 20px;
}

.upload-container:hover {
  background: #edf7ff;
  border-color: #2980b9;
}

.upload-icon {
  font-size: 4rem;
  margin-bottom: 10px;
  color: #3498db;
}

.upload-text {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #2c3e50;
}

.upload-btn {
  display: inline-block;
  background: #3498db;
  color: white;
  padding: 12px 60px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.upload-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.upload-instructions {
  background: #e8f4fc;
  padding: 15px;
  border-radius: 8px;
  margin-top: 25px;
  font-size: 0.95rem;
  margin: 20px auto 0;
}

/* 图片区域 */
.image-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.image-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1;
}

.image-size-warning {
  background: #fdecea;
  color: #e74c3c;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.9rem;
  display: none;
}

.image-container {
  min-height: 250px;
  border: 1px solid #e0e0e0;
  background: #f8f9fa;
  position: relative;
  overflow: auto;
  cursor: crosshair;
}

#targetImage {
  display: none;
  margin: 1px;
}

.coordinate-display {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-family: monospace;
  z-index: 10;
}

/* 参考线 */
.ref-line {
  position: absolute;
  background: rgba(52, 152, 219, 0.5);
  z-index: 5;
  pointer-events: none;
}

.ref-line.horizontal {
  width: 100%;
  height: 1px;
  top: -1px;
  left: 0;
}

.ref-line.vertical {
  width: 1px;
  height: 100%;
  top: 0;
  left: -1px;
}

/* 操作按钮区域 */
.action-section {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.action-btn {
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  border: none;
  font-size: 1rem;
}

.btn-reupload {
  background: #f8f9fa;
  color: #3498db;
  border: 1px solid #e0e0e0;
}

.btn-reupload:hover {
  background: #e8f4fc;
}

.btn-copy-all {
  background: #2ecc71;
  color: white;
}

.btn-copy-all:hover {
  background: #27ae60;
}

.btn-clear {
  background: #e74c3c;
  color: white;
}

.btn-clear:hover {
  background: #c0392b;
}

/* 坐标记录区域 */
.records-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 20px;
  margin-bottom: 25px;
}

.records-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.records-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2c3e50;
}

.count-badge {
  background: #3498db;
  color: white;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 1rem;
  margin-left: 10px;
}

.records-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.record-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  border: 1px solid #eee;
}

.record-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-color: #3498db;
}

.record-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
}

.record-index {
  font-weight: 600;
  color: #2c3e50;
}

.record-time {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.record-coord {
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  color: #3498db;
  margin: 10px 0;
}

.record-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.record-btn {
  flex: 1;
  padding: 8px 0;
  border-radius: 5px;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-delete {
  background: #fdecea;
  color: #e74c3c;
}

.btn-delete:hover {
  background: #fadbd8;
}

.btn-copy {
  background: #e8f4fc;
  color: #3498db;
}

.btn-copy:hover {
  background: #d6eaf8;
}

.no-records {
  text-align: center;
  padding: 50px;
  color: #bdc3c7;
  grid-column: span 3;
  font-size: 1.1rem;
}

/* 底部区域 */
footer {
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  padding: 20px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s;
  border: 1px solid #eee;
}

.feature-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #3498db;
}

.feature-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #2c3e50;
}

.feature-desc {
  color: #7f8c8d;
  line-height: 1.7;
}

.tool-description {
  margin-top: 25px;
}

.tool-description h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #2c3e50;
}

.tool-description p {
  color: #555;
  line-height: 1.5;
  margin-top: 10px;
}

.highlight {
  color: #e74c3c;
  font-weight: 500;
}
