/* 高铁风景拍摄助手 - 样式表 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 10px;
  padding-bottom: 80px;
}

/* 顶部状态栏 */
.header {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 15px 20px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.header h1 {
  font-size: 20px;
  color: #333;
  margin-bottom: 10px;
}

.gps-status {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #666;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  margin-right: 8px;
  animation: pulse 2s infinite;
}

.status-dot.active {
  background: #00c853;
}

.status-dot.error {
  background: #ff1744;
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 卡片样式 */
.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.card-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
}

/* 位置卡片 */
.location-info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 15px;
  font-size: 14px;
}

.info-row .label {
  color: #666;
  font-weight: 500;
}

/* 对话区域 */
.chat-messages {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.message {
  margin-bottom: 12px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  text-align: right;
}

.message.system {
  text-align: left;
}

.message-content {
  display: inline-block;
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.5;
}

.message.user .message-content {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-bottom-right-radius: 5px;
}

.message.system .message-content {
  background: #f0f0f0;
  color: #333;
  border-bottom-left-radius: 5px;
}

.chat-input-area {
  display: flex;
  gap: 10px;
}

#userInput {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
}

#userInput:focus {
  border-color: #667eea;
}

#sendBtn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s;
}

#sendBtn:active {
  transform: scale(0.95);
}

/* 风景点卡片 */
.scenic-spot {
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  animation: slideIn 0.3s ease;
}

.spot-name {
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.spot-info {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.spot-alert {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  animation: pulse 1s infinite;
}

.spot-alert-title {
  font-weight: bold;
  color: #856404;
  margin-bottom: 10px;
  font-size: 16px;
}

/* 相机卡片 */
#cameraPreview {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
}

.capture-btn {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

#photoCount {
  text-align: center;
  font-size: 14px;
  color: #666;
}

/* 底部按钮 */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px;
  display: flex;
  gap: 10px;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
}

.btn-primary, .btn-secondary {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, #f6d365, #fda085);
  color: white;
}

.btn-secondary {
  background: linear-gradient(135deg, #11998e, #38ef7d);
  color: white;
}

.btn-primary:active, .btn-secondary:active {
  transform: scale(0.95);
}

/* 占位符 */
.placeholder {
  color: #999;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* 响应式 */
@media (max-width: 480px) {
  .header h1 {
    font-size: 18px;
  }

  .card {
    padding: 12px;
  }

  .location-info {
    font-size: 13px;
  }
}
