/* 全局样式 */
:root {
  --primary-color: #2563eb;
  --secondary-color: #4b5563;
  --light-bg: #f5f7f9;
  --dark-bg: #1f2937;
  --text-color: #333;
  --light-text: #f9fafb;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 8px;
}

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

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-color);
  line-height: 1.5;
  background-color: var(--light-bg);
  overflow: hidden;
  height: 100vh;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ==================== 地图相关样式 ==================== */
#map {
  width: 100%;
  height: 100%;
  z-index: 10;
}

.map-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  background: var(--light-bg);
  text-align: center;
}

.typing-indicator {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-color);
  animation: typing 1.5s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: 0s;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.3s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes typing {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

.map-marker {
  cursor: pointer;
  transition: transform 0.2s;
}

.map-marker:hover {
  transform: scale(1.1);
}

.map-popup {
  max-width: 300px;
}

.map-popup img {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 10px;
}

/* ==================== 聊天相关样式 ==================== */
.chat-container {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 350px;
  max-height: 500px;
  background-color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
  transition: all 0.3s ease;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: var(--primary-color);
  color: white;
}

.chat-header h3 {
  font-size: 16px;
  font-weight: 500;
}

.minimize-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 350px;
}

.message {
  padding: 10px 14px;
  border-radius: var(--radius);
  max-width: 85%;
  word-break: break-word;
}

.user-message {
  align-self: flex-end;
  background-color: var(--primary-color);
  color: white;
}

.assistant-message {
  align-self: flex-start;
  background-color: var(--light-bg);
  color: var(--text-color);
}

.chat-input {
  display: flex;
  padding: 12px;
  border-top: 1px solid var(--border-color);
}

.chat-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  outline: none;
}

.chat-input input:focus {
  border-color: var(--primary-color);
}

.send-btn {
  margin-left: 8px;
  padding: 0 16px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.chat-bubble {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 100;
}

/* ==================== UI组件样式 ==================== */
.about-link {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  background-color: white;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow);
  z-index: 100;
}

.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background-color: white;
  max-width: 600px;
  width: 100%;
  border-radius: 12px;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section-title {
  font-size: 18px;
  margin-bottom: 12px;
}

.modal-text {
  line-height: 1.6;
  color: var(--secondary-color);
  margin-bottom: 12px;
}

.modal-list {
  padding-left: 20px;
  line-height: 1.6;
  color: var(--secondary-color);
}

.modal-list-item {
  margin-bottom: 8px;
}

.modal-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .chat-container {
    width: 100%;
    max-height: 50vh;
    bottom: 0;
    right: 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  
  .about-link {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }
} 