:root {
  --primary-color: #ffb300;
  --primary-hover: #F57C00;
  --primary-active: #ffb300;
  --text-color: #333;
  --text-color-light: #666;
  --bg-color: #fff;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow-color: rgba(0, 132, 255, 0.2);
  --radius: 12px;
  --transition: all 0.3s ease;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  color: var(--text-color);
  background: var(--bg-color);
  transition: var(--transition);
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#map {
  flex: 1;
  width: 100%;
}

.control-panel {
  position: fixed;
  top: 75px;
  left: 10px;
  background: #f8f4e1;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 320px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  0% {
    transform: translateX(-20px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.search-box {
  display: flex;
  gap: 10px;
}

#search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  color: #333;
}

#search-input::placeholder {
  color: #999;
  transition: opacity 0.2s ease;
}

#search-input:focus {
  outline: none;
  border-color: #0084ff;
  box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.2);
  background: #f8f9fa;
}

#search-input:focus::placeholder {
  opacity: 0.5;
}

.night-mode #search-input {
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.15);
  color: #e0e0e0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.night-mode #search-input::placeholder {
  color: #666;
}

.night-mode #search-input:focus {
  background: #2d2d2d;
  border-color: #0084ff;
  box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.2);
}

.night-mode #search-input:focus::placeholder {
  opacity: 0.5;
}

.btn, #search-btn, .controls button {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-active));
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  box-shadow: 0 4px 6px var(--shadow-color);
}

#clear-btn {
  border: 2px solid #ff0000;
}

#import-btn,
#export-btn,
#night-mode-btn {
  border: 2px solid #69ff69;
}

.btn:hover, #search-btn:hover, .controls button:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-active));
  transform: translateY(-1px);
  box-shadow: 0 6px 12px var(--shadow-color);
}

.btn:active, #search-btn:active, .controls button:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px var(--shadow-color);
}

.controls button {
  flex: 1;
}

.controls button:active {
  transform: translateY(0);
  box-shadow: 0 4px 6px rgba(0, 132, 255, 0.2);
}

/* 夜间模式 */
.night-mode {
  background: #121212;
  color: #e0e0e0;
}

.night-mode .control-panel {
  background: rgba(18, 18, 18, 0.95);
  color: #e0e0e0;
  border-color: rgba(255, 255, 255, 0.1);
}

.night-mode #search-input {
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

.night-mode #search-input:focus {
  border-color: #0084ff;
  box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.2);
}

.night-mode #search-result {
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
}

.night-mode .controls button {
  background: linear-gradient(135deg, #444, #333);
}

.night-mode .controls button:hover {
  background: linear-gradient(135deg, #555, #444);
}

.night-mode .amap-marker-label {
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #666;
  padding: 2px 5px;
  border-radius: 3px;
}

.night-mode .coordinate-display {
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #666;
}

.night-mode .marker-input-popup {
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  border: 1px solid #444;
}

.night-mode .marker-input-popup input {
  background: #2d2d2d;
  border-color: #444;
  color: #fff;
}

.night-mode .marker-input-popup button {
  background: #444;
  color: #fff;
}

.night-mode .marker-input-popup button:hover {
  background: #555;
}

.night-mode .mark-position-box {
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  border: 1px solid #444;
}

.night-mode .mark-position-box input {
  background: #2d2d2d;
  border-color: #444;
  color: #fff !important;
}

/* Marker Name Input Styling */
.marker-name-input {
  width: 280px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  color: #333;
  margin-bottom: 10px;
}

.marker-confirm-btn {
  width: 100px;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-active));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  display: block;
  margin-top: 10px;
  margin-left: 0;
}

.marker-confirm-btn:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-active));
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.marker-confirm-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.night-mode .marker-confirm-btn {
  background: linear-gradient(135deg, #444, #333);
}

.night-mode .marker-confirm-btn:hover {
  background: linear-gradient(135deg, #555, #444);
}

.marker-name-input::placeholder {
  color: #999;
  transition: opacity 0.2s ease;
}

.marker-name-input:focus {
  outline: none;
  border-color: #0084ff;
  box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.2);
  background: #f8f9fa;
}

.marker-name-input:focus::placeholder {
  opacity: 0.5;
}

.night-mode .marker-name-input {
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.15);
  color: #e0e0e0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.night-mode .marker-name-input::placeholder {
  color: #666;
}

.night-mode .marker-name-input:focus {
  background: #2d2d2d;
  border-color: #0084ff;
  box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.2);
}

.night-mode .marker-name-input:focus::placeholder {
  opacity: 0.5;
}

.night-mode .mark-position-box button {
  background: #444;
  color: #fff !important;
}

.night-mode .mark-position-box button:hover {
  background: #555;
}

.night-mode .mark-position-box label {
  color: #fff !important;
}

.night-mode .mark-position-box .instructions {
  color: #ccc !important;
}

.night-mode .coordinate-display {
  color: #fff !important;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #666;
  padding: 8px;
  border-radius: 4px;
}

#search-result {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-item {
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
  border-radius: 6px;
}

.result-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.result-item:last-child {
  border-bottom: none;
}

.result-item h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.result-item p {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.4;
}

.night-mode #search-result {
  background: rgba(18, 18, 18, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

.night-mode .result-item {
  border-color: rgba(255, 255, 255, 0.1);
}

.night-mode .result-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.night-mode .result-item h4 {
  color: #e0e0e0;
}

.night-mode .result-item p {
  color: #aaa;
}
