/* ===== 全局样式 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 头部样式 ===== */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
  font-size: 28px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.location-debug-btn {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-debug-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

/* ===== 搜索区域 ===== */
.search-section {
  background: white;
  padding: 40px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-box {
  max-width: 700px;
  margin: 0 auto;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 15px 45px 15px 20px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.clear-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
}

.clear-btn:hover {
  color: #333;
}

/* ===== Autocomplete 下拉列表 ===== */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 5px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}

.autocomplete-item {
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s ease;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: #f8f9ff;
}

.autocomplete-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.autocomplete-name {
  font-weight: 500;
  color: #333;
}

.autocomplete-type {
  font-size: 13px;
  color: #666;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 4px;
}

.autocomplete-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #999;
}

.autocomplete-rating,
.autocomplete-distance {
  display: flex;
  align-items: center;
  gap: 4px;
}

.autocomplete-price {
  font-size: 13px;
  color: #f5576c;
  font-weight: 500;
  background: #fff0f3;
  padding: 2px 8px;
  border-radius: 4px;
}

/* AI搜索建议样式 */
.autocomplete-ai {
  background: linear-gradient(135deg, #f093fb20 0%, #f5576c20 100%);
  border-left: 3px solid #f5576c;
}

.autocomplete-ai:hover {
  background: linear-gradient(135deg, #f093fb30 0%, #f5576c30 100%);
}

.autocomplete-badge {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* Query建议样式 (AI推荐) */
.autocomplete-suggestion {
  background: #f8f5ff;
  border-left: 3px solid #9b59b6;
}

.autocomplete-suggestion:hover {
  background: #f0e6ff;
}

.autocomplete-suggestion .suggestion-icon {
  font-size: 16px;
  margin-right: 8px;
  color: #9b59b6;
}

.autocomplete-suggestion .autocomplete-name {
  color: #555;
}

/* Keyword Search样式 */
.autocomplete-keyword {
  background: #f8f8f8;
  border-top: 1px solid #e0e0e0;
  margin-top: 4px;
}

.autocomplete-keyword:hover {
  background: #eeeeee;
}

.autocomplete-keyword .suggestion-icon {
  font-size: 16px;
  margin-right: 8px;
  color: #999;
}

/* POI Card样式 */
.autocomplete-poi .suggestion-icon {
  font-size: 16px;
  margin-right: 8px;
  color: #666;
}

.autocomplete-poi .autocomplete-main {
  display: flex;
  align-items: center;
}

.autocomplete-poi .autocomplete-name {
  flex: 1;
}

.suggestion-icon {
  display: inline-block;
  width: 20px;
  text-align: center;
}

/* ===== 搜索按钮 ===== */
.search-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn {
  padding: 12px 30px;
  font-size: 16px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-ai {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.btn-ai:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

/* ===== 追问输入框 ===== */
.follow-up-input-wrapper {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px dashed #e0e0e0;
  animation: fadeIn 0.5s ease;
}

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

.follow-up-divider {
  text-align: center;
  margin-bottom: 20px;
}

.divider-text {
  background: white;
  padding: 0 15px;
  color: #999;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  top: -15px;
}

.follow-up-input {
  border-color: #f5576c;
}

.follow-up-input:focus {
  border-color: #f5576c;
  box-shadow: 0 0 0 3px rgba(245, 87, 108, 0.1);
}

/* ===== 结果区域 ===== */
.results-section {
  padding: 40px 0;
  min-height: 500px;
}

.search-summary {
  background: #f8f9ff;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  border-left: 4px solid #667eea;
}

.search-summary p {
  color: #555;
  font-size: 15px;
  line-height: 1.8;
}

.query-rewrite-hint {
  background: #e8f4ff;
  border-left: 4px solid #4a90e2;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.query-rewrite-hint .hint-icon {
  font-size: 18px;
}

.query-rewrite-hint .hint-text {
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

/* ===== Query Understanding 展示样式 ===== */
.query-understanding-section {
  background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
  border: 2px solid #667eea;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.understanding-title {
  font-size: 16px;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.understanding-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.understanding-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: white;
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
}

.understanding-item:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.understanding-item.objective {
  border-left-color: #4a90e2;
  background: #f0f7ff;
}

.understanding-item.subjective {
  border-left-color: #9b59b6;
  background: #f8f5ff;
}

.understanding-item.implicit {
  border-left-color: #f39c12;
  background: #fff8e7;
}

.understanding-item.context {
  border-left-color: #27ae60;
  background: #f0fdf4;
}

.understanding-item .item-label {
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 14px;
}

.understanding-item .item-value {
  color: #555;
  line-height: 1.6;
  font-size: 14px;
}

.rewritten-query-hint {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed #ddd;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rewritten-query-hint .hint-icon {
  font-size: 16px;
  color: #667eea;
}

.rewritten-query-hint .hint-text {
  color: #666;
  font-size: 13px;
  font-style: italic;
}

/* ===== AI Summary 格式化样式 ===== */
.summary-intro {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 20px;
  font-weight: 500;
}

.summary-restaurants {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-restaurant-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #667eea;
  transition: all 0.2s ease;
}

.summary-restaurant-item:hover {
  background: #e9ecef;
  transform: translateX(2px);
}

.restaurant-number {
  font-weight: 600;
  color: #667eea;
  min-width: 24px;
  flex-shrink: 0;
}

.restaurant-name {
  font-weight: 600;
  color: #2c3e50;
  white-space: nowrap;
  flex-shrink: 0;
}

.restaurant-desc {
  color: #555;
  line-height: 1.5;
  flex: 1;
}

/* ===== Loading 样式 ===== */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===== POI 列表 ===== */
.poi-list {
  display: grid;
  grid-template-columns: 1fr; /* Changed from repeat(auto-fill, minmax(300px, 1fr)) to single column for demo visibility */
  gap: 25px;
  margin-bottom: 30px;
}

/* ===== POI 卡片 ===== */
.poi-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.poi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.poi-card-image {
  position: relative;
  width: 100%;
  height: auto; /* Changed from 200px to auto for original aspect ratio */
  min-height: 200px;
  overflow: hidden;
  background: #f0f0f0; /* Background color for letterboxing */
}

.poi-card-image img {
  width: 100%;
  height: auto; /* Changed from 100% to auto */
  object-fit: contain; /* Changed from cover to contain to show full image */
  transition: transform 0.3s ease;
}

.poi-card:hover .poi-card-image img {
  transform: scale(1.05);
}

.poi-distance {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
}

.poi-card-content {
  padding: 20px;
}

.poi-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poi-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #666;
}

.poi-type {
  background: #f0f0f0;
  padding: 4px 10px;
  border-radius: 5px;
}

.poi-price {
  color: #f5576c;
  font-weight: 500;
}

.poi-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.rating-stars {
  color: #ffa500;
  font-weight: 500;
}

.review-count {
  color: #999;
}

.similarity-score {
  color: #667eea;
  font-weight: 500;
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.poi-description {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  /* Removed truncation to show full reason text */
}

/* ===== 加载更多 ===== */
#loadMoreContainer {
  text-align: center;
  margin: 30px 0;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #999;
}

.empty-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.empty-state p {
  font-size: 18px;
  margin-bottom: 10px;
}

.empty-hint {
  font-size: 14px;
  color: #bbb;
}

/* 会话重置提示（空结果时显示） */
.session-reset-hint {
  margin-top: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #fff8e7 0%, #fff 100%);
  border: 2px solid #f39c12;
  border-radius: 12px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.session-reset-hint .hint-text {
  font-size: 15px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
}

.session-reset-hint .hint-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.session-reset-hint .hint-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.session-reset-hint .hint-btn:active {
  transform: translateY(0);
}

/* ===== 页脚 ===== */
.footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 30px 0;
  margin-top: 60px;
}

.footer p {
  font-size: 14px;
  opacity: 0.8;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .poi-list {
    grid-template-columns: 1fr;
  }

  .search-buttons {
    flex-direction: column;
  }

  .logo {
    font-size: 24px;
  }

  .search-section {
    padding: 30px 0;
  }
}

/* ===== POI 详情页样式 ===== */
.detail-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* ===== Tab导航样式 ===== */
.detail-tabs {
  margin-top: 20px;
}

.tab-nav {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: #667eea;
  background: #f8f9ff;
}

.tab-btn.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: #f8f9ff;
}

.tab-content {
  min-height: 400px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.detail-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.detail-header {
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
  overflow: hidden;
}

.detail-cover-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.detail-title {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  margin: 20px 30px 15px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 15px;
  color: #666;
  margin: 0 30px;
  padding-bottom: 20px;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-body {
  padding: 30px;
}

.detail-section {
  margin-bottom: 30px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.detail-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

.error-message {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.error-message p {
  font-size: 18px;
  margin-bottom: 20px;
}

/* ===== 详情页增强样式 ===== */
.detail-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.detail-address {
  line-height: 1.8;
  color: #555;
}

.detail-contact p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.detail-contact a {
  color: #667eea;
  text-decoration: none;
}

.detail-contact a:hover {
  text-decoration: underline;
}

.working-hours {
  display: grid;
  gap: 8px;
}

.hour-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8f9ff;
  border-radius: 6px;
}

.day-name {
  font-weight: 500;
  color: #333;
}

.hour-value {
  color: #666;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border: 2px solid #e8eaff;
  border-radius: 24px;
  font-size: 14px;
  color: #667eea;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.06);
}

.tag:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* ===== 推荐菜品样式 ===== */
.dish-recommendations {
  display: grid;
  gap: 16px;
}

.dish-item {
  padding: 16px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: 12px;
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, #667eea 0%, #764ba2 100%) 1;
  line-height: 1.6;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.06);
  position: relative;
  overflow: hidden;
}

.dish-item::before {
  content: '🍽️';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  opacity: 0.1;
  transition: all 0.3s ease;
}

.dish-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.12);
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.dish-item:hover::before {
  opacity: 0.2;
  transform: translateY(-50%) scale(1.1);
}

.dish-item strong {
  color: #667eea;
  font-weight: 600;
  font-size: 15px;
}

/* ===== 菜单亮点样式 ===== */
.menu-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.menu-highlight-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
}

.menu-highlight-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.menu-highlight-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

.menu-highlight-item:hover::before {
  opacity: 1;
}

.menu-highlight-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.menu-highlight-item:hover img {
  transform: scale(1.05);
}

.menu-highlight-info {
  padding: 16px;
  background: white;
}

.menu-highlight-title {
  font-weight: 600;
  font-size: 16px;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.4;
}

.menu-highlight-tag {
  font-size: 12px;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* ===== 图片画廊样式 ===== */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ===== 瀑布流画廊样式 ===== */
.masonry-gallery {
  column-count: 4;
  column-gap: 15px;
}

@media (max-width: 1200px) {
  .masonry-gallery {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .masonry-gallery {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  .masonry-gallery {
    column-count: 1;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 15px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.masonry-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.masonry-item img,
.masonry-item video {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.masonry-item video {
  background: #000;
}

/* 媒体来源标签 */
.media-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(4px);
  z-index: 1;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 热门评论样式 ===== */
.trending-reviews {
  display: grid;
  gap: 20px;
}

.review-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  transition: box-shadow 0.2s ease;
}

.review-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.review-author-info {
  flex: 1;
}

.review-author {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.review-rating {
  font-size: 14px;
  color: #ffa500;
}

.review-text {
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
}

.review-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 12px;
}

.review-video {
  width: 100%;
  max-height: 400px;
  border-radius: 8px;
  margin-top: 12px;
}

/* ===== 位置调试面板样式 ===== */
.debug-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.debug-panel-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

.debug-panel-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 32px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: #333;
}

.debug-panel-body {
  padding: 20px;
}

.debug-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.debug-btn-add {
  background: #FFC107;
  color: #333;
  margin-bottom: 20px;
}

.debug-btn-add:hover {
  background: #FFB300;
}

.debug-btn-primary {
  background: #FFC107;
  color: #333;
}

.debug-btn-primary:hover {
  background: #FFB300;
}

.debug-btn-secondary {
  background: white;
  color: #333;
  border: 1px solid #e0e0e0;
}

.debug-btn-secondary:hover {
  background: #f5f5f5;
}

.debug-section {
  margin-top: 10px;
}

.debug-section h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #666;
}

.debug-subsection {
  margin-bottom: 24px;
}

.debug-subsection > label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: #333;
}

.quick-locations {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.location-btn {
  padding: 12px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.location-btn:hover {
  background: #f8f9ff;
  border-color: #667eea;
  transform: translateY(-2px);
}

.location-btn:active {
  transform: translateY(0);
}

/* Geolocation Button */
.use-geolocation-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.use-geolocation-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.use-geolocation-btn:active:not(:disabled) {
  transform: translateY(0);
}

.use-geolocation-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.coordinate-inputs {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.input-group {
  flex: 1;
}

.input-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.input-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-group input:focus {
  border-color: #667eea;
}

.debug-actions {
  display: flex;
  gap: 12px;
}

.debug-actions button {
  flex: 1;
}

.current-location {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #f8f9ff;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.location-icon {
  font-size: 18px;
}

/* Header 容器需要 relative positioning */
.header .container {
  position: relative;
}

/* ===== 图片分页样式 ===== */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  padding: 20px;
}

.pagination-btn {
  padding: 10px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pagination-btn:disabled {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
  transform: none;
}

.pagination-info {
  font-size: 15px;
  color: #666;
  font-weight: 500;
}

.pagination-info #currentPageNum {
  color: #667eea;
  font-weight: 600;
}

/* ===== Toast 提示样式 ===== */
.debug-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100000;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.debug-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 评论翻译按钮样式 */
.translate-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-left: auto;
}

.translate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.translate-btn:active:not(:disabled) {
  transform: translateY(0);
}

.translate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.translate-btn.translated {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 评论卡片header布局调整（容纳翻译按钮） */
.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.review-author-info {
  flex: 1;
}

/* ===== AI Thinking 过程展示样式 ===== */
.thinking-container {
  background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
  border: 2px solid #667eea;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
  animation: fadeIn 0.3s ease;
}

.thinking-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e8eaff;
}

.thinking-icon {
  font-size: 36px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.thinking-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #667eea;
  margin: 0;
}

.thinking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

/* 自定义滚动条 */
.thinking-list::-webkit-scrollbar {
  width: 6px;
}

.thinking-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.thinking-list::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.thinking-list::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}

.thinking-item {
  padding: 12px 16px;
  background: white;
  border-radius: 10px;
  border-left: 4px solid transparent;
  animation: slideInLeft 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.thinking-item:hover {
  transform: translateX(4px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.thinking-item.agent-status {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
  border-left-color: #4a90e2;
  font-weight: 500;
  color: #4a90e2;
}

.thinking-item.objective {
  border-left-color: #4a90e2;
  background: #f0f7ff;
}

.thinking-item.subjective {
  border-left-color: #9b59b6;
  background: #f8f5ff;
}

.thinking-item.implicit {
  border-left-color: #f39c12;
  background: #fff8e7;
}

.thinking-item.context {
  border-left-color: #27ae60;
  background: #f0fdf4;
}

.thinking-item strong {
  color: #333;
  margin-right: 8px;
}

.thinking-item .value {
  color: #555;
}

/* 进度条 */
.thinking-progress {
  margin-top: 20px;
  height: 4px;
  background: #e8eaff;
  border-radius: 2px;
  overflow: hidden;
}

.thinking-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  width: 0%;
  transition: width 0.3s ease;
  animation: progressBar 3s ease-in-out;
}

@keyframes progressBar {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* ===== Streaming Thinking Chain Styles ===== */
.thinking-step {
  padding: 12px 16px;
  background: white;
  border-radius: 10px;
  border-left: 4px solid #667eea;
  margin-bottom: 10px;
  animation: slideInLeft 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  line-height: 1.6;
  color: #333;
}

/* Streaming state - shows progressive text being generated */
.thinking-step.streaming {
  border-left-color: #4a90e2;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
  position: relative;
}

/* Add blinking cursor animation for streaming */
.thinking-step.streaming::after {
  content: '▋';
  display: inline-block;
  color: #4a90e2;
  animation: blink 1s step-start infinite;
  margin-left: 2px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Complete state - thinking finished */
.thinking-step.complete {
  border-left-color: #27ae60;
  background: #f0fdf4;
}

/* Completion icon */
.thinking-complete-icon {
  color: #27ae60;
  font-weight: bold;
  margin-left: 6px;
  display: inline-block;
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Discrete message types (for backward compatibility with old thinking/intent/result events) */
.thinking-step.thinking {
  border-left-color: #667eea;
}

.thinking-step.intent {
  border-left-color: #9b59b6;
  background: #f8f5ff;
}

.thinking-step.result {
  border-left-color: #27ae60;
  background: #f0fdf4;
}

/* Agent状态样式 */
.agent-badge {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
}

/* ===== 对话历史样式 (多轮对话) ===== */
.conversation-history {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

.conversation-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.clear-conversation-btn {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.clear-conversation-btn:hover {
  background: #fee;
  border-color: #fcc;
  color: #c33;
}

.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.conversation-item {
  padding: 16px;
  background: #fafafa;
  border-radius: 10px;
  border-left: 4px solid #667eea;
  transition: all 0.2s ease;
}

.conversation-item:hover {
  background: #f5f5f5;
  transform: translateX(4px);
}

.conversation-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conversation-item-query {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.conversation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #667eea;
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
}

.conversation-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #999;
}

.result-count {
  font-size: 12px;
  color: #666;
  background: white;
  padding: 4px 10px;
  border-radius: 12px;
}

.conversation-item-time {
  font-size: 12px;
  color: #999;
}

.conversation-item-understanding {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-top: 8px;
  padding: 10px;
  background: white;
  border-radius: 6px;
}

.conversation-item-understanding .understanding-category {
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 4px;
}

.conversation-item-understanding .understanding-label {
  font-weight: 600;
  margin-right: 4px;
}

.conversation-item-understanding .understanding-value {
  color: #667eea;
  font-weight: 500;
}

/* ============================================
   Header Actions (Clear Session Button)
   ============================================ */
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.clear-session-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.clear-session-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.clear-session-btn:active {
  transform: translateY(0);
}

/* ============================================
   Related Questions (Follow-up Suggestions)
   ============================================ */
.related-questions-container {
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.related-questions-header {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-questions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.related-question-btn {
  padding: 12px 16px;
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.related-question-btn:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.related-question-btn:active {
  transform: translateY(0);
}

/* 追问输入框样式 - 简洁设计 */
.follow-up-container {
  /* 无额外样式，复用search-input-wrapper的样式 */
}

/* ===== Debug Info Panel ===== */
.debug-info-panel {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: 20px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  overflow: hidden;
}

.debug-info-header {
  padding: 10px 15px;
  background: #e9ecef;
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.debug-info-header:hover {
  background: #dee2e6;
}

.debug-info-content {
  padding: 15px;
  display: none;
}

.debug-info-content.show {
  display: block;
}

.debug-info-row {
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.debug-info-row:last-child {
  border-bottom: none;
}

.debug-info-label {
  font-weight: bold;
  color: #495057;
  min-width: 150px;
  flex-shrink: 0;
}

.debug-info-value {
  color: #212529;
  flex: 1;
  text-align: right;
  word-break: break-word;
}

.debug-info-value.highlight {
  color: #28a745;
  font-weight: bold;
}

.debug-info-value.warning {
  color: #ffc107;
  font-weight: bold;
}

.debug-info-value.error {
  color: #dc3545;
  font-weight: bold;
}

/* ==================== ES Match Status Warning ==================== */
.match-status-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #856404;
}

.match-status-warning .warning-icon {
  font-size: 18px;
}

/* ==================== Summary Sections ==================== */
.summary-container {
  margin: 20px 0;
}

.summary-intro {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
  color: #333;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.poi-highlights {
  margin-top: 16px;
}

.poi-highlight {
  background: #ffffff;
  border-left: 3px solid #007bff;
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 4px;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s;
}

.poi-highlight:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.poi-highlight strong {
  color: #007bff;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

/* ==================== Query History (对话历史) ==================== */
.query-history {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.query-history-item {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: not-allowed;
  opacity: 0.8;
}

.query-history-item .query-icon {
  font-size: 20px;
}

.query-history-item .query-text {
  flex: 1;
  font-size: 15px;
  color: #495057;
}

.query-history-item .query-time {
  font-size: 12px;
  color: #6c757d;
}

.current-query-wrapper {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.current-query-wrapper input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #007bff;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.current-query-wrapper input:focus {
  border-color: #0056b3;
}

.current-query-wrapper button {
  padding: 12px 24px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.current-query-wrapper button:hover {
  background: #0056b3;
}

.current-query-wrapper button:active {
  background: #004085;
}

/* ===== Thinking Process Container ===== */
.thinking-container {
  display: none;
  max-width: 800px;
  margin: 30px auto;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.thinking-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: white;
}

.thinking-icon {
  font-size: 28px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.thinking-title {
  font-size: 18px;
  font-weight: 600;
}

.thinking-messages {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thinking-messages::-webkit-scrollbar {
  width: 6px;
}

.thinking-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.thinking-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.thinking-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.thinking-message {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  animation: fadeIn 0.3s ease-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.thinking-message.thinking {
  color: #555;
  border-left: 4px solid #667eea;
}

.thinking-message.intent {
  color: #2d7a2d;
  border-left: 4px solid #4caf50;
  font-weight: 500;
}

.thinking-message.result {
  color: #0066cc;
  border-left: 4px solid #2196f3;
  font-weight: 500;
}

/* ==================== Conversation History (会话历史展示) ==================== */
.history-title {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e7ff;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.history-item:hover {
  background: #e9ecef;
  transform: translateX(2px);
}

.history-number {
  font-size: 12px;
  font-weight: 600;
  color: #667eea;
  min-width: 20px;
}

.history-query {
  flex: 1;
  font-size: 14px;
  color: #495057;
}

.history-results {
  font-size: 12px;
  color: #6c757d;
  white-space: nowrap;
}

/* ==================== Chat-Style Layout (ChatGPT-like) ==================== */

/* Main chat section */
.chat-main-section {
  min-height: calc(100vh - 220px);
  padding: 20px 0 100px 0;
  background: #f5f5f5;
}

/* Conversation container */
.conversation-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Welcome message (initial state) */
.welcome-message {
  text-align: center;
  padding: 60px 40px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.5s ease;
}

.welcome-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

.welcome-message h2 {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

.welcome-message p {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 8px;
}

.welcome-hint {
  font-size: 14px;
  color: #999;
  font-style: italic;
}

/* Message bubbles */
.message-bubble {
  max-width: 75%;
  padding: 16px 20px;
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  animation: slideIn 0.3s ease;
}

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

/* User message (right-aligned) */
.user-message {
  align-self: flex-end;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

.user-message-text {
  font-size: 15px;
  line-height: 1.6;
  word-wrap: break-word;
}

/* AI message (left-aligned) */
.ai-message {
  align-self: flex-start;
  background: white;
  color: #333;
  border-bottom-left-radius: 4px;
}

/* AI message header (avatar + name) */
.ai-message-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.ai-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ai-name {
  font-weight: 600;
  font-size: 14px;
  color: #667eea;
}

/* Thinking indicator with animated dots */
.ai-thinking {
  font-size: 14px;
  color: #999;
  font-style: italic;
  padding: 12px 0;
}

.ai-thinking::after {
  content: '...';
  display: inline-block;
  animation: thinkingDots 1.5s steps(4, end) infinite;
}

@keyframes thinkingDots {
  0%, 25% {
    content: '.';
  }
  26%, 50% {
    content: '..';
  }
  51%, 75% {
    content: '...';
  }
  76%, 100% {
    content: '';
  }
}

/* Streaming thinking text */
.thinking-text {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
  padding: 12px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.thinking-text.streaming::after {
  content: '▋';
  display: inline-block;
  color: #667eea;
  animation: blink 1s step-start infinite;
  margin-left: 2px;
}

.thinking-text.complete {
  color: #333;
}

.thinking-complete-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: #27ae60;
  font-weight: 500;
}

/* Loading indicator (shown after thinking text completes, before results) */
.thinking-loading-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: #667eea;
  font-weight: 500;
  animation: fadeIn 0.3s ease-in;
}

.thinking-loading-indicator .loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #e3e8ff;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progress steps (shown after typewriter completes) */
.progress-steps-container {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 12px;
  border-left: 4px solid #667eea;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  transition: all 0.4s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.progress-step .progress-icon {
  font-size: 18px;
  display: inline-block;
  min-width: 24px;
  text-align: center;
}

.progress-step.active {
  color: #667eea;
  font-weight: 500;
  animation: fadeInStep 0.4s ease-in, pulseActive 2s ease-in-out infinite;
  border-left: 3px solid #667eea;
}

.progress-step.active.waiting .progress-icon.spinning {
  animation: spin 1.5s linear infinite;
}

.progress-step.completed {
  color: #27ae60;
  font-weight: 400;
  border-left: 3px solid #27ae60;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulseActive {
  0%, 100% {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }
  50% {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Summary text */
.ai-summary {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 12px;
}

/* POI cards in AI message */
.ai-poi-list {
  margin-top: 16px;
  display: grid;
  gap: 16px;
}

/* Debug panel (collapsible) */
.debug-panel-chat {
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.debug-panel-header-chat {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 13px;
  color: #666;
  padding: 6px 0;
}

.debug-panel-toggle {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.debug-panel-toggle.expanded {
  transform: rotate(180deg);
}

.debug-panel-content-chat {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.debug-panel-content-chat.expanded {
  max-height: none;  /* 移除高度限制 */
  padding-top: 12px;
  overflow-y: visible;  /* SQL可以完整显示 */
}

.debug-section {
  margin-bottom: 16px;
  padding: 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.debug-section-title {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* SQL复制按钮 */
.copy-sql-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.copy-sql-btn:hover {
  background: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.copy-sql-btn:active {
  transform: translateY(0);
}

.debug-timing-bar {
  display: flex;
  width: 100%;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timing-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #3498db;
  color: white;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 60px;
}

.timing-item:hover {
  filter: brightness(1.1);
  transform: scale(1.05);
  z-index: 10;
}

.timing-item span:first-child {
  font-weight: 600;
}

.timing-item span:last-child {
  font-size: 10px;
  opacity: 0.9;
}

.debug-row {
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.debug-row:last-child {
  border-bottom: none;
}

.debug-label {
  font-weight: 600;
  color: #667eea;
  margin-bottom: 4px;
}

.debug-value {
  color: #495057;
  white-space: pre-wrap;
  word-break: break-word;
}

.debug-value pre {
  max-height: none;  /* 移除高度限制，显示完整SQL */
  overflow-y: visible;
  overflow-x: auto;
  white-space: pre;
  word-wrap: normal;
  background: #fff;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  font-size: 12px;
  line-height: 1.5;
}

.debug-value pre::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.debug-value pre::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.debug-value pre::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

.debug-value pre::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}

.debug-json {
  background: #fff;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
  max-height: 200px;
  overflow-y: auto;
}

/* Fixed bottom input area */
.chat-input-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e0e0e0;
  padding: 20px 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.chat-input-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-input {
  flex: 1;
  padding: 14px 50px 14px 20px;
  font-size: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  outline: none;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.chat-input:focus {
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.clear-input-btn {
  position: absolute;
  right: 100px;
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 5px 10px;
  line-height: 1;
  transition: color 0.2s ease;
}

.clear-input-btn:hover {
  color: #333;
}

.send-btn {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.send-btn:active {
  transform: scale(0.95);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.send-icon {
  font-size: 20px;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .conversation-container {
    padding: 0 12px;
  }

  .message-bubble {
    max-width: 85%;
  }

  .welcome-message {
    padding: 40px 20px;
  }

  .chat-input-wrapper {
    padding: 0 12px;
  }

  .chat-input {
    padding: 12px 40px 12px 16px;
    font-size: 14px;
  }

  .send-btn {
    width: 44px;
    height: 44px;
  }
}

/* ==================== Save for Later Panel & Button ==================== */

/* Save for Later Button - Fixed at Bottom Right */
.cart-toggle-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  z-index: 9999;
  animation: cartBtnFadeIn 0.5s ease-out;
}

@keyframes cartBtnFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.cart-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.6);
}

.cart-toggle-btn:active {
  transform: scale(0.95);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #f5576c;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(245, 87, 108, 0.4);
}

/* Save for Later Button on POI Card */
.add-to-cart-btn {
  margin-top: 12px;
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

.cart-icon {
  font-size: 16px;
}

/* Save for Later Panel (Right-side floating) */
.cart-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.cart-panel.open {
  right: 0;
}

.cart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #f0f0f0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.cart-panel-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.cart-close-btn {
  background: none;
  border: none;
  font-size: 32px;
  color: white;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.cart-close-btn:hover {
  transform: scale(1.1);
}

.cart-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.empty-cart-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
}

.empty-cart-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-cart-state p {
  font-size: 16px;
  margin-bottom: 8px;
}

.empty-cart-hint {
  font-size: 14px;
  color: #ccc;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 12px;
  transition: all 0.2s ease;
  position: relative;
}

.cart-item:hover {
  background: #e9ecef;
  transform: translateX(-4px);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: color 0.2s ease;
}

.cart-item-name:hover {
  color: #667eea;
}

.cart-item-meta {
  display: flex;
  gap: 10px;
  font-size: 13px;
}

.cart-item-rating {
  color: #ffa500;
}

.cart-item-price {
  color: #f5576c;
  font-weight: 500;
}

.cart-item-type {
  font-size: 12px;
  color: #999;
}

.cart-item-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(245, 87, 108, 0.1);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 20px;
  color: #f5576c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.cart-item-remove:hover {
  background: #f5576c;
  color: white;
  transform: scale(1.1);
}

.cart-panel-footer {
  padding: 20px;
  border-top: 2px solid #f0f0f0;
}

.cart-clear-btn {
  width: 100%;
  padding: 12px;
  background: #f5576c;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cart-clear-btn:hover {
  background: #e04658;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* Save for Later Notification Toast */
.cart-notification {
  position: fixed;
  top: 80px;
  right: -300px;
  background: white;
  color: #333;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 10001;
  font-size: 14px;
  font-weight: 500;
  transition: right 0.3s ease;
  min-width: 250px;
}

.cart-notification.show {
  right: 20px;
}

.cart-notification-success {
  border-left: 4px solid #27ae60;
}

.cart-notification-warning {
  border-left: 4px solid #f39c12;
}

.cart-notification-info {
  border-left: 4px solid #667eea;
}

/* Responsive */
@media (max-width: 768px) {
  .cart-toggle-btn {
    width: 56px;
    height: 56px;
    bottom: 20px;
    right: 20px;
  }

  .cart-panel {
    width: 100%;
    right: -100%;
  }

  .cart-panel.open {
    right: 0;
  }
}

/* ===== 统一设置面板样式 ===== */

/* 设置按钮 (替换原location-debug-btn) */
.settings-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.settings-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 设置面板遮罩 */
.settings-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

/* 设置面板内容容器 */
.settings-panel-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

/* 设置面板头部 */
.settings-panel-header {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px 16px 0 0;
  z-index: 1;
}

.settings-panel-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

/* Tab导航 */
.settings-tabs {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 60px;
  z-index: 1;
}

.settings-tab {
  flex: 1;
  padding: 15px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.settings-tab:hover {
  background: #e9ecef;
}

.settings-tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: white;
}

/* Tab内容区 */
.settings-tab-content {
  padding: 20px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* 设置区块 */
.settings-section {
  margin-bottom: 25px;
}

.settings-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 当前值显示 */
.current-value {
  background: #f8f9fa;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: #495057;
  border-left: 4px solid #667eea;
  font-family: 'Monaco', 'Menlo', monospace;
}

/* 位置按钮 (grid布局) */
.quick-locations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.location-btn {
  padding: 10px 14px;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.location-btn:hover {
  border-color: #667eea;
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.location-hint {
  font-size: 12px;
  color: #6c757d;
  margin-top: 12px;
  padding: 8px 12px;
  background: #fff3cd;
  border-radius: 6px;
  border-left: 3px solid #ffc107;
}

/* 语言选项按钮 */
.language-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.language-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.language-btn:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.language-btn.active {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

.lang-flag {
  font-size: 24px;
}

.lang-name {
  font-size: 14px;
  font-weight: 500;
}

.language-hint {
  font-size: 12px;
  color: #6c757d;
  margin-top: 12px;
  padding: 8px 12px;
  background: #fff3cd;
  border-radius: 6px;
  border-left: 3px solid #ffc107;
}

/* 🆕 Pro Mode 切换开关样式 */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* Pro Mode 模式对比样式 */
.mode-comparison {
  display: flex;
  gap: 15px;
  margin-top: 12px;
}

.mode-info {
  flex: 1;
  padding: 12px;
  background-color: #f5f5f5;
  border-radius: 6px;
  font-size: 13px;
}

.mode-info.pro-mode-info {
  background-color: #fff3e0;
  border-left: 3px solid #ff9800;
}

.mode-info strong {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}

.mode-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mode-info ul li {
  padding: 4px 0;
  color: #666;
  line-height: 1.5;
}

/* 版本信息样式 */
.version-info {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.version-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.version-item:last-child {
  border-bottom: none;
}

.version-label {
  font-size: 13px;
  color: #6c757d;
  font-weight: 500;
}

.version-value {
  font-size: 13px;
  color: #212529;
  font-family: 'Monaco', 'Menlo', monospace;
  text-align: right;
}

/* 更新日志 */
.version-changelog {
  max-height: 400px;
  overflow-y: auto;
}

.changelog-item {
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.changelog-version {
  font-size: 15px;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 10px;
}

.changelog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.changelog-list li {
  font-size: 13px;
  color: #495057;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.changelog-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #667eea;
  font-weight: bold;
}

/* 功能边界信息 */
.capability-info {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.capability-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.capability-item:last-child {
  border-bottom: none;
}

.capability-label {
  font-size: 13px;
  font-weight: 600;
  min-width: 60px;
}

.capability-value {
  font-size: 13px;
  color: #495057;
  line-height: 1.5;
}

.capability-link {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
}

.capability-link a {
  color: #667eea;
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.capability-link a:hover {
  text-decoration: underline;
}

/* 移动端响应式 */
@media (max-width: 768px) {
  .settings-panel-content {
    width: 95%;
    max-height: 90vh;
  }

  .settings-tabs {
    top: 55px;
  }

  .settings-tab {
    font-size: 12px;
    padding: 12px 8px;
  }

  .quick-locations {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }

  .location-btn {
    font-size: 12px;
    padding: 8px 10px;
  }

  .version-value {
    font-size: 11px;
  }

  .changelog-item {
    padding: 12px;
  }

  .changelog-list li {
    font-size: 12px;
  }
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* ===== Media Modal (Image/Video Enlarge) ===== */
.media-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20000;
  justify-content: center;
  align-items: center;
}

.media-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(5px);
}

.media-modal-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  z-index: 20001;
}

.media-modal-body {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.media-modal-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.media-modal-video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.media-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 36px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  line-height: 1;
}

.media-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.media-modal-prev,
.media-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 48px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.media-modal-prev {
  left: -80px;
}

.media-modal-next {
  right: -80px;
}

.media-modal-prev:hover,
.media-modal-next:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.media-modal-prev:disabled,
.media-modal-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.media-modal-prev:disabled:hover,
.media-modal-next:disabled:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%);
}

.media-modal-counter {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .media-modal-prev {
    left: 10px;
    width: 44px;
    height: 44px;
    font-size: 32px;
  }

  .media-modal-next {
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 32px;
  }

  .media-modal-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .media-modal-counter {
    bottom: 20px;
    font-size: 12px;
    padding: 6px 16px;
  }
}

/* Click cursor for images/videos */
.menu-highlight-item img,
.gallery-item img,
.masonry-item img,
.masonry-item video,
.review-image,
.review-video {
  cursor: pointer;
}
