#eatwhat-page, #window-detail-page, #eatwhat-random-page {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* 顶部标题栏 */
#eatwhat-page .sub-page-back,
#window-detail-page .sub-page-back,
#eatwhat-random-page .sub-page-back {
  border-color: #ff9800;
  color: #ff9800;
}

#eatwhat-page .sub-page-back:hover,
#window-detail-page .sub-page-back:hover,
#eatwhat-random-page .sub-page-back:hover {
  background: rgba(255, 152, 0, 0.1);
}

#eatwhat-page .sub-page-title,
#window-detail-page .sub-page-title,
#eatwhat-random-page .sub-page-title {
  color: #ff9800;
}

/* 喝什么主题 - 随机推荐页标题和返回按钮蓝色 */
#eatwhat-random-page.theme-drink .sub-page-back {
  border-color: #4facfe;
  color: #4facfe;
}

#eatwhat-random-page.theme-drink .sub-page-back:hover {
  background: rgba(79, 172, 254, 0.1);
}

#eatwhat-random-page.theme-drink .sub-page-title {
  color: #4facfe;
}

/* 内容区 */
.eatwhat-content {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 搜索栏 - 橙色边框 */
.eatwhat-search-bar {
  position: relative;
  width: 100%;
  margin-bottom: 4px;
  border: 1.5px solid #ff9800;
  border-radius: 24px;
  background: var(--glass);
  display: flex;
  align-items: center;
  padding: 2px 4px;
}

.eatwhat-search-bar i.fa-magnifying-glass {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--subtext);
  font-size: 16px;
}

.eatwhat-search-bar input {
  width: 100%;
  padding: 10px 40px 10px 42px;
  border: none;
  background: transparent;
  font-size: 15px;
  outline: none;
  color: var(--text);
}

.eatwhat-search-bar input::placeholder {
  color: var(--subtext);
  opacity: 0.6;
}

.eatwhat-search-bar .clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--subtext);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0 4px;
}

.eatwhat-search-bar .clear-btn:hover {
  opacity: 1;
  color: #ff9800;
}

/* 食堂切换按钮 */
.eatwhat-canteen-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 4px;
  padding-bottom: 4px;
}

.eatwhat-canteen-tabs::-webkit-scrollbar {
  display: none;
}

.canteen-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border: 1.5px solid #ff9800;
  background: var(--glass);
  border-radius: 14px;
  font-size: 14px;
  color: var(--subtext);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
  backdrop-filter: blur(5px);
}

.canteen-tab.active {
  background: #ff9800;
  color: #fff;
  border-color: #ff9800;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.25);
}

.canteen-tab:active {
  transform: scale(0.95);
}

/* 随机推荐/AI推荐按钮 - 透明背景+边框样式 */
.eatwhat-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}

.eatwhat-action-btn {
  padding: 14px;
  border: 1.5px solid;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  background: var(--glass);
  backdrop-filter: blur(5px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: inherit;
}

.eatwhat-action-btn:active {
  transform: scale(0.95);
  background: rgba(128, 128, 128, 0.1);
}

/* 随机推荐按钮 - 橙色边框 */
.eatwhat-action-btn.random-btn {
  background: transparent;
  border-color: #ff9800;
  color: #ff9800;
}

/* AI推荐按钮 - 彩虹渐变边框 */
.eatwhat-action-btn.ai-btn {
  background: transparent;
  border: 1.5px solid #c084fc;
  color: #c084fc;
}

.eatwhat-action-btn.ai-btn:active {
  background: rgba(192, 132, 252, 0.08);
}

.ai-btn-icon {
  width: 25px;
  height: 25px;
  object-fit: contain;
  vertical-align: middle;
}

/* 暗色模式下AI推荐按钮文字颜色 */
@media (prefers-color-scheme: dark) {
  .eatwhat-action-btn.ai-btn {
    border-color: #d8b4fe;
    color: #d8b4fe;
  }

  .eatwhat-action-btn.ai-btn:active {
    background: rgba(216, 180, 254, 0.1);
  }
}

/* 楼层分组卡片 */
.eatwhat-windows-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 40px;
}

.floor-group-card {
  border: 1.5px solid #ff9800;
  border-radius: 16px;
  padding: 14px;
  background: var(--glass);
  box-shadow: var(--shadow);
}

.floor-group-title {
  font-size: 16px;
  font-weight: 700;
  color: #ff9800;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 152, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 6px;
}

.floor-group-title i {
  font-size: 14px;
}

.floor-group-content {
  display: flex;
  flex-direction: column;
}

.eatwhat-window-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 10px;
}

.eatwhat-window-item:active {
  transform: scale(0.98);
  background: rgba(255, 152, 0, 0.06);
}

.eatwhat-window-preview {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid rgba(255, 152, 0, 0.15);
}

.eatwhat-window-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eatwhat-window-info {
  flex: 1;
  min-width: 0;
}

.eatwhat-window-name {
  font-size: 15px;
  font-weight: 600;
  color: #ff9800;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eatwhat-window-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ew-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  background: rgba(100, 100, 100, 0.08);
  color: var(--subtext);
}

.ew-tag i {
  font-size: 11px;
}

.ew-tag-hours.rest {
  background: rgba(158, 158, 158, 0.12);
  color: #9e9e9e;
}

.ew-tag-hours.unknown {
  background: rgba(255, 152, 0, 0.1);
  color: #ff9800;
}

.window-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
  opacity: 0.6;
}

/* 休息状态 */

/* 五一假期提醒框 */
.eatwhat-holiday-notice {
  background: rgba(255, 152, 0, 0.08);
  border: 1px solid rgba(255, 152, 0, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #ff9800;
  margin-bottom: 12px;
  line-height: 1.5;
}
.eatwhat-holiday-notice i {
  font-size: 18px;
  flex-shrink: 0;
}

/* 假期日期选择器 */
.holiday-date-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0 4px;
}
.holiday-date-selector .date-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--subtext);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.holiday-date-selector .date-btn.active {
  background: #ff9800;
  color: #fff;
  border-color: #ff9800;
  font-weight: 600;
}
.holiday-date-selector .date-btn:active {
  transform: scale(0.95);
}
.eatwhat-window-item.holiday-rest {
  opacity: 0.6;
}

.eatwhat-window-name.holiday-rest {
  color: #9e9e9e !important;
}

/* 窗口详情页 */
.window-detail-content {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 4px;
}

.window-info-card {
  background: var(--glass);
  border: 1.5px solid rgba(255, 152, 0, 0.3);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.window-cover {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 152, 0, 0.15);
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.window-cover:active {
  transform: scale(0.98);
}

.window-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.window-header-info {
  padding: 14px;
}

.window-header-info h2 {
  font-size: 18px;
  font-weight: 700;
  color: #ff9800;
  margin-bottom: 8px;
}

.window-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* 菜品列表 */
.dish-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 40px;
}

.dish-category-section {
  margin-bottom: 4px;
}

.dish-category-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid;
}

.dish-category-title.dish { color: #ff6b35; border-color: rgba(255, 107, 53, 0.3); }
.dish-category-title.drink { color: #4facfe; border-color: rgba(79, 172, 254, 0.3); }
.dish-category-title.condiment { color: #9c27b0; border-color: rgba(156, 39, 176, 0.3); }

.dish-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.dish-item:active {
  transform: scale(0.98);
}

.dish-image {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid rgba(255, 152, 0, 0.15);
}

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

.dish-info {
  flex: 1;
  min-width: 0;
}

.dish-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dish-price {
  font-size: 13px;
  color: var(--subtext);
  font-weight: 600;
}

.dish-item.ew-dish { border-color: rgba(255, 107, 53, 0.25); }
.dish-item.ew-drink { border-color: rgba(79, 172, 254, 0.25); }
.dish-item.ew-condiment { border-color: rgba(156, 39, 176, 0.25); }

.dish-name.ew-name-dish { color: #ff6b35; }
.dish-name.ew-name-drink { color: #4facfe; }
.dish-name.ew-name-condiment { color: #9c27b0; }

/* 随机推荐页 */

.random-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  animation: fadeInUp 0.3s ease;
}

.random-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--glass);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.random-item:active {
  transform: scale(0.98);
}

.random-item.dish {
  border: 1.5px solid rgba(255, 152, 0, 0.35);
}

.random-item.drink {
  border: 1.5px solid rgba(79, 172, 254, 0.35);
}

.random-item-img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  box-shadow: var(--shadow);
}

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

.random-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.random-item-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.random-item.dish .random-item-name {
  color: #ff9800;
}

.random-item.drink .random-item-name {
  color: #4facfe;
}

.random-item-location {
  font-size: 13px;
  color: var(--subtext);
  display: flex;
  align-items: center;
  gap: 4px;
}

.random-item-price {
  font-size: 15px;
  font-weight: 700;
}

.random-item.dish .random-item-price {
  color: #ff9800;
}

.random-item.drink .random-item-price {
  color: #4facfe;
}

.random-item-goto {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1.5px solid;
  background: transparent;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}

.random-item.dish .random-item-goto {
  border-color: #ff9800;
  color: #ff9800;
}

.random-item.dish .random-item-goto:hover {
  background: #ff9800;
  color: #fff;
}

.random-item.drink .random-item-goto {
  border-color: #4facfe;
  color: #4facfe;
}

.random-item.drink .random-item-goto:hover {
  background: #4facfe;
  color: #fff;
}

.random-refresh-btn {
  width: 100%;
  padding: 14px;
  border: 1.5px solid;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  background: var(--glass);
  backdrop-filter: blur(5px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: inherit;
}

.random-refresh-btn:active {
  transform: scale(0.95);
  background: rgba(128, 128, 128, 0.1);
}

#eatwhat-random-page.theme-dish .random-refresh-btn {
  border-color: #ff9800;
  color: #ff9800;
}

#eatwhat-random-page.theme-drink .random-refresh-btn {
  border-color: #4facfe;
  color: #4facfe;
}

/* 搜索结果 */
.eatwhat-search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeInUp 0.3s ease;
}

.ew-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--glass);
  border: 1px solid rgba(255, 152, 0, 0.2);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.ew-search-item:active {
  transform: scale(0.98);
  background: rgba(255, 152, 0, 0.08);
}

.ew-search-main {
  flex: 1;
  min-width: 0;
}

.ew-search-name {
  font-size: 15px;
  font-weight: 600;
  color: #ff9800;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ew-search-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.ew-search-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(255, 152, 0, 0.12);
  color: var(--subtext);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
}

.ew-search-price {
  font-size: 14px;
  font-weight: 700;
  color: #ff9800;
}

.ew-search-goto {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px solid #ff9800;
  background: transparent;
  color: #ff9800;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}

.ew-search-goto:hover {
  background: #ff9800;
  color: #fff;
}

/* 假期日期选择器 */
.holiday-date-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0 4px;
}

.holiday-date-selector .date-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--subtext);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.holiday-date-selector .date-btn.active {
  background: #ff9800;
  color: #fff;
  border-color: #ff9800;
  font-weight: 600;
}

.holiday-date-selector .date-btn:active {
  transform: scale(0.95);
}

/* 五一假期提醒框 */
.eatwhat-holiday-notice {
  background: rgba(255, 152, 0, 0.08);
  border: 1px solid rgba(255, 152, 0, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #ff9800;
  margin-bottom: 12px;
  line-height: 1.5;
}

.eatwhat-holiday-notice i {
  font-size: 18px;
  flex-shrink: 0;
}

/* 通用动画 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 加载与空状态 */
.search-loading {
  text-align: center;
  font-size: 13px;
  color: var(--subtext);
  padding: 20px 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--subtext);
  opacity: 0.7;
}

.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  #eatwhat-page .sub-page-back,
  #window-detail-page .sub-page-back,
  #eatwhat-random-page .sub-page-back {
    border-color: #ffb74d;
    color: #ffb74d;
  }

  #eatwhat-page .sub-page-back:hover,
  #window-detail-page .sub-page-back:hover {
    background: rgba(255, 183, 77, 0.15);
  }

  #eatwhat-page .sub-page-title,
  #window-detail-page .sub-page-title,
  #eatwhat-random-page .sub-page-title {
    color: #ffb74d;
  }

  /* 喝什么暗色 - 蓝色系 */
  #eatwhat-random-page.theme-drink .sub-page-back {
    border-color: #66b3ff;
    color: #66b3ff;
  }

  #eatwhat-random-page.theme-drink .sub-page-back:hover {
    background: rgba(102, 179, 255, 0.15);
  }

  #eatwhat-random-page.theme-drink .sub-page-title {
    color: #66b3ff;
  }

  .eatwhat-search-bar {
    border-color: #ffb74d;
  }

  .eatwhat-search-bar .clear-btn:hover {
    color: #ffb74d;
  }

  .canteen-tab.active {
    background: #ffb74d;
    border-color: #ffb74d;
    box-shadow: 0 2px 8px rgba(255, 183, 77, 0.25);
  }

  .eatwhat-action-btn.dish-btn {
    border-color: #ffb74d;
    color: #ffb74d;
  }

  .eatwhat-action-btn.drink-btn {
    border-color: #66b3ff;
    color: #66b3ff;
  }

  .floor-group-card {
    border-color: #ffb74d;
  }

  .floor-group-title {
    color: #ffb74d;
    border-color: rgba(255, 183, 77, 0.25);
  }

  .eatwhat-window-name {
    color: #ffb74d;
  }

  .eatwhat-window-preview,
  .window-cover,
  .dish-image {
    border-color: rgba(255, 183, 77, 0.15);
  }

  .window-info-card {
    border-color: rgba(255, 183, 77, 0.3);
  }

  .window-header-info h2 {
    color: #ffb74d;
  }

  .dish-category-title.dish { color: #ff8a65; border-color: rgba(255, 138, 101, 0.3); }
  .dish-category-title.drink { color: #66b3ff; border-color: rgba(102, 179, 255, 0.3); }
  .dish-category-title.condiment { color: #ce93d8; border-color: rgba(206, 147, 216, 0.3); }

  .dish-name.ew-name-dish { color: #ff8a65; }
  .dish-name.ew-name-drink { color: #66b3ff; }
  .dish-name.ew-name-condiment { color: #ce93d8; }

  .dish-price {
    color: var(--subtext);
  }

  .ew-tag-hours.unknown {
    background: rgba(255, 183, 77, 0.15);
    color: #ffb74d;
  }

  .ew-search-name,
  .ew-search-price {
    color: #ffb74d;
  }

  .ew-search-tag {
    background: rgba(255, 183, 77, 0.15);
    color: #aaa;
  }

  .ew-search-goto {
    border-color: #ffb74d;
    color: #ffb74d;
  }

  .ew-search-goto:hover {
    background: #ffb74d;
    color: #1e1e1e;
  }

  .random-item.dish {
    border-color: rgba(255, 183, 77, 0.35);
  }

  .random-item.drink {
    border-color: rgba(102, 179, 255, 0.35);
  }

  .random-item.dish .random-item-name,
  .random-item.dish .random-item-price {
    color: #ffb74d;
  }

  .random-item.drink .random-item-name,
  .random-item.drink .random-item-price {
    color: #66b3ff;
  }

  .random-item.dish .random-item-goto {
    border-color: #ffb74d;
    color: #ffb74d;
  }

  .random-item.dish .random-item-goto:hover {
    background: #ffb74d;
    color: #1e1e1e;
  }

  .random-item.drink .random-item-goto {
    border-color: #66b3ff;
    color: #66b3ff;
  }

  .random-item.drink .random-item-goto:hover {
    background: #66b3ff;
    color: #1e1e1e;
  }

  #eatwhat-random-page.theme-dish .random-refresh-btn {
    border-color: #ffb74d;
    color: #ffb74d;
  }

  #eatwhat-random-page.theme-drink .random-refresh-btn {
    border-color: #66b3ff;
    color: #66b3ff;
  }

  .eatwhat-holiday-notice {
    background: rgba(255, 152, 0, 0.12);
    border-color: rgba(255, 152, 0, 0.35);
    color: #ffb74d;
  }

  .holiday-date-selector .date-btn.active {
    background: #ffb74d;
    border-color: #ffb74d;
  }

  .eatwhat-window-item.holiday-rest {
    opacity: 0.55;
  }

  .eatwhat-window-name.holiday-rest {
    color: #9e9e9e !important;
  }
  .eatwhat-holiday-notice {
    background: rgba(255, 152, 0, 0.12);
    border-color: rgba(255, 152, 0, 0.35);
    color: #ffb74d;
  }
  .holiday-date-selector .date-btn.active {
    background: #ffb74d;
    border-color: #ffb74d;
  }

  .ew-tag-hours.rest {
    background: rgba(158, 158, 158, 0.15);
    color: #9e9e9e;
  }
}

/* ==================== 随机推荐页面样式 ==================== */
/* 推荐类型切换按钮 */
.random-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.random-type-btn {
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  background: var(--glass);
  backdrop-filter: blur(5px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: inherit;
  color: var(--subtext);
}

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

/* 菜品按钮 - 橙色主题 */
.random-type-btn[data-type="dish"] {
  border-color: #ff9800;
  color: #ff9800;
}

/* 饮品按钮 - 蓝色主题 */
.random-type-btn[data-type="drink"] {
  border-color: #4facfe;
  color: #4facfe;
}

/* ==================== AI推荐页面样式 ==================== */
#eatwhat-ai-page {
  overflow: hidden;
  padding: 0 0 1px 0;
}

#eatwhat-ai-page .sub-page-back {
  border-color: #9c27b0;
  color: #9c27b0;
}

#eatwhat-ai-page .sub-page-back:hover {
  background: rgba(156, 39, 176, 0.1);
}

#eatwhat-ai-page .sub-page-title {
  color: #9c27b0;
}

/* 7. 聊天容器：Flex纵向布局，消息区独立滚动，阻止滚动链 */
.ai-chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 16px;
  overflow: hidden;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* AI消息气泡 */
.ai-message {
  display: flex;
  max-width: 92%;
}

.ai-message.user {
  align-self: flex-end;
  justify-content: flex-end;
}

.ai-message.assistant {
  align-self: flex-start;
  justify-content: flex-start;
}

.ai-message-content {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  color: #9c27b0;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.ai-message.user .ai-message-content {
  background: var(--glass);
  border: 1px solid var(--border);
  color: #9c27b0;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* AI推荐卡片 */
.ai-recommend-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.ai-recommend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--glass);
  border: 1.5px solid rgba(156, 39, 176, 0.3);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-recommend-card:active {
  transform: scale(0.98);
}

.ai-recommend-card img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.ai-recommend-info {
  flex: 1;
  min-width: 0;
}

.ai-recommend-name {
  font-size: 15px;
  font-weight: 600;
  color: #9c27b0;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-recommend-location {
  font-size: 12px;
  color: var(--subtext);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-recommend-price {
  font-size: 14px;
  font-weight: 600;
  color: #9c27b0;
}

/* 输入区域 */
.ai-chat-input-area {
  padding: 12px 16px 100px;
  background: transparent;
  border: none;
}

.ai-quick-bubbles {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ai-bubble {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: 16px;
  font-size: 13px;
  color: var(--subtext);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.ai-bubble:hover {
  background: var(--text-light);
  color: var(--text);
}

.ai-bubble:active {
  transform: scale(0.95);
}

/* 4. 去掉输入框外圈方框 */
.ai-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  outline: none;
}

.ai-input-wrapper input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 20px;
  background: var(--glass);
  font-size: 14px;
  outline: none;
  color: #9c27b0;
  font-family: inherit;
  box-shadow: none;
}

.ai-input-wrapper input::placeholder {
  color: #9c27b0;
  opacity: 0.5;
}

/* 3. 发送按钮：带边框透明背景 */
.ai-send-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #9c27b0;
  border-radius: 50%;
  background: transparent;
  color: #9c27b0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  font-size: 16px;
}

.ai-send-btn:active {
  transform: scale(0.9);
  background: rgba(156, 39, 176, 0.12);
}

/* 6. 输入框下方灰色小字 */
.ai-input-hint {
  text-align: center;
  font-size: 11px;
  color: var(--subtext);
  opacity: 0.55;
  margin-top: 8px;
  line-height: 1.4;
  user-select: none;
  -webkit-user-select: none;
}

/* 加载动画 */
.ai-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--subtext);
  font-size: 13px;
}

.ai-loading i {
  animation: spin 1s linear infinite;
}

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

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  #eatwhat-ai-page .sub-page-back {
    border-color: #ce93d8;
    color: #ce93d8;
  }

  #eatwhat-ai-page .sub-page-back:hover {
    background: rgba(206, 147, 216, 0.15);
  }

  #eatwhat-ai-page .sub-page-title {
    color: #ce93d8;
  }

  .ai-bubble {
    border-color: rgba(206, 147, 216, 0.3);
    background: rgba(206, 147, 216, 0.1);
    color: #ce93d8;
  }

  .ai-bubble:hover {
    background: rgba(206, 147, 216, 0.2);
  }

  .ai-input-wrapper input {
    border-color: rgba(206, 147, 216, 0.3);
    color: #ce93d8;
  }

  .ai-input-wrapper input::placeholder {
    color: #ce93d8;
    opacity: 0.5;
  }

  .ai-input-wrapper input:focus {
    border-color: #ce93d8;
  }

  .ai-send-btn {
    border-color: #ce93d8;
    color: #ce93d8;
  }

  .ai-send-btn:active {
    background: rgba(206, 147, 216, 0.15);
  }

  .ai-recommend-card {
    border-color: rgba(206, 147, 216, 0.3);
  }

  .ai-recommend-name,
  .ai-recommend-price {
    color: #ce93d8;
  }

  .random-type-btn[data-type="dish"] {
    border-color: #ffb74d;
    color: #ffb74d;
  }

  .random-type-btn[data-type="drink"] {
    border-color: #66b3ff;
    color: #66b3ff;
  }

  /* AI消息框暗色统一 */
  .ai-message-content,
  .ai-message.user .ai-message-content {
    background: var(--glass);
    border: 1px solid var(--border);
    color: #ce93d8;
  }
}
