/* 基础样式 */
:root {
  --primary-color: #FF9E80; /* 温暖的珊瑚粉 */
  --secondary-color: #FFD180; /* 柔和的淡黄色 */
  --accent-color: #FF7043; /* 强调色 - 深一点的橙色 */
  --background-color: #FFF3E0; /* 非常淡的米黄色背景 */
  --text-color: #5D4037; /* 深棕色文字，提高可读性 */
  --light-text: #8D6E63; /* 浅一点的文字色 */
  --shadow-color: rgba(255, 152, 0, 0.2); /* 柔和的阴影 */
}

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 警告消息 */
.alert {
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 2px 4px var(--shadow-color);
}

.alert-success {
  background-color: #C8E6C9;
  color: #2E7D32;
  border-left: 4px solid #81C784;
}

.alert-danger {
  background-color: #FFCDD2;
  color: #C62828;
  border-left: 4px solid #E57373;
}

/* 认证表单 */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  padding: 20px;
}

.auth-form {
  width: 100%;
  max-width: 420px;
  padding: 40px 30px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: all 0.3s ease;
}

.auth-form:hover {
  box-shadow: 0 15px 35px rgba(255, 152, 0, 0.25);
}

.auth-form h2 {
  margin: 0 0 25px;
  text-align: center;
  color: var(--accent-color);
  font-size: 28px;
  font-weight: 600;
  position: relative;
}

.auth-form h2:after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--secondary-color);
  margin: 15px auto;
  border-radius: 2px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--light-text);
  font-size: 14px;
}

.form-group input {
  width: 90%;
  padding: 12px 15px;
  border: 2px solid #FFCCBC;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s;
  background-color: #FFF8F5;
}

.form-group input:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.2);
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: var(--light-text);
  font-size: 12px;
}

.form-group.remember {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.form-group.remember input {
  width: auto;
  margin-right: 10px;
  accent-color: var(--accent-color);
}

.form-group.remember label {
  margin: 0;
  color: var(--text-color);
}

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  background-color: #F4511E;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-color);
}

.btn:active {
  transform: translateY(0);
}

.auth-links {
  margin-top: 25px;
  text-align: center;
  font-size: 14px;
}

.auth-links a {
  color: var(--accent-color);
  text-decoration: none;
  margin: 0 10px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-block;
}

.auth-links a:hover {
  color: #E64A19;
  transform: translateY(-1px);
}

.auth-links a:after {
  content: "·";
  margin-left: 12px;
  color: #FFCCBC;
}

.auth-links a:last-child:after {
  display: none;
}

/* 访客限制样式 */
.guest-disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: none;
}

.guest-disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* 仪表盘 */
.dashboard {
  max-width: 800px;
  margin: 50px auto;
  padding: 40px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px var(--shadow-color);
  text-align: center;
}

.dashboard h2 {
  color: var(--accent-color);
  margin-bottom: 20px;
}

.dashboard p {
  color: var(--light-text);
  margin-bottom: 30px;
}

.logout-btn {
  max-width: 200px;
  margin: 20px auto 0;
  background-color: #EF9A9A;
}

.logout-btn:hover {
  background-color: #E57373;
}

/* 添加一些可爱的装饰元素 */
.canteen-icon {
  text-align: center;
  margin-bottom: 20px;
}

.canteen-icon svg {
  width: 60px;
  height: 60px;
  fill: var(--accent-color);
}

.welcome-message {
  font-size: 18px;
  color: var(--light-text);
  text-align: center;
  margin-bottom: 30px;
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 骨架屏样式 */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  width: 100%;
}

.skeleton-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.1);
  width: 100%;
  max-width: 280px;
}

.skeleton-image {
  height: 160px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-content {
  padding: 15px;
}

.skeleton-line {
  height: 16px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.medium {
  width: 80%;
}

/* 详情页骨架屏 */
.detail-skeleton {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
}

.detail-skeleton-header {
  height: 200px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.detail-skeleton-body {
  padding: 20px;
}

.detail-skeleton-title {
  height: 28px;
  width: 60%;
  margin-bottom: 15px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

.detail-skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

.detail-skeleton-text.short {
  width: 40%;
}

.detail-skeleton-text.medium {
  width: 70%;
}

/* 加载占位符居中 */
.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--light-text);
  font-size: 16px;
}

.loading-placeholder.small {
  min-height: 100px;
}

.loading-placeholder.inline {
  display: inline-flex;
  min-height: 50px;
}

/* 访客登录引导 */
.guest-restriction {
  transition: all 0.3s ease;
}

.guest-restriction:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 仪表盘 */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 搜索栏样式 */
.search-bar {
  display: flex;
  align-items: center;
  max-width: 600px;
  margin: 0 auto 30px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.canteen-icon svg {
  width: 40px;
  height: 40px;
  fill: var(--accent-color);
  margin-right: 20px;
}

.search-form {
  flex: 1;
  display: flex;
}

#search-input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid #FFCCBC;
  border-radius: 25px 0 0 25px;
  font-size: 16px;
  outline: none;
  transition: all 0.3s;
  background: white;
}

#search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

.search-btn {
  padding: 0 25px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 0 25px 25px 0;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
  height: 50px;
}

.search-btn:hover {
  background-color: #F4511E;
  transform: translateY(-1px);
}

.search-btn svg {
  vertical-align: middle;
}

/* 独立搜索栏样式 */
.standalone-search {
  max-width: 600px;
  margin: 30px auto;
  padding: 0 15px;
}

.standalone-search .search-form {
  display: flex;
  width: 100%;
}

.standalone-search #search-input {
  flex: 1;
  padding: 16px 24px;
  border: 2px solid #FFCCBC;
  border-right: none;
  border-radius: 50px 0 0 50px;
  font-size: 16px;
  outline: none;
  transition: all 0.3s;
  background: white;
}

.standalone-search #search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

.standalone-search .search-btn {
  padding: 0 30px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 0 50px 50px 0;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
  font-weight: 500;
}

.standalone-search .search-btn:hover {
  background-color: #F4511E;
  transform: translateY(-1px);
}

/* 欢迎区域 */
.welcome-section {
  text-align: center;
  margin-bottom: 40px;
}

.welcome-section h2 {
  color: var(--accent-color);
  margin-bottom: 10px;
}

.welcome-section p {
  color: var(--light-text);
  font-size: 16px;
}

/* 推荐区域 */
.recommendation-section {
  margin-bottom: 40px;
}

.section-title {
  display: flex;
  align-items: center;
  color: var(--accent-color);
  font-size: 22px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #FFE0B2;
}

.title-icon {
  margin-right: 10px;
}

.refresh-btn {
  margin-left: auto;
  font-size: 14px;
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s;
}

.refresh-btn:hover {
  color: var(--accent-color);
}

.recommendation-scroll {
  display: flex;
  overflow-x: auto;
  padding: 10px 0;
  gap: 20px;
  scrollbar-width: thin;
}

.recommendation-scroll::-webkit-scrollbar {
  height: 6px;
}

.recommendation-scroll::-webkit-scrollbar-thumb {
  background: #FFCC80;
  border-radius: 3px;
}

/* 推荐类型选择标签 */
.recommendation-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #FFE0B2;
  gap: 10px;
}

.rec-tab-btn {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 4px 4px 0 0;
}

.rec-tab-btn:hover {
  color: var(--accent-color);
  background-color: rgba(255, 112, 67, 0.05);
}

.rec-tab-btn.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  font-weight: 500;
}

.recommendation-card {
  min-width: 280px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.1);
  transition: all 0.3s;
  cursor: pointer;
}

.recommendation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 152, 0, 0.15);
}

.recommendation-image {
  height: 160px;
  background-color: #FFF3E0;
  background-size: cover;
  background-position: center;
}

.recommendation-info {
  padding: 15px;
}

.recommendation-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

.recommendation-desc {
  font-size: 14px;
  color: var(--light-text);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommendation-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--light-text);
}

.recommendation-rating {
  color: #FFA000;
  font-weight: 500;
}

/* 榜单区域 */
.ranking-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #FFE0B2;
}

.tab-btn {
  padding: 8px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 16px;
  color: var(--light-text);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  font-weight: 500;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.ranking-item {
  background: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.1);
  transition: all 0.2s;
  cursor: pointer;
}

.ranking-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.15);
}

.ranking-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.ranking-rank {
  width: 30px;
  height: 30px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 15px;
}

.ranking-name {
  font-weight: 600;
  flex: 1;
}

.ranking-rating {
  color: #FFA000;
  font-weight: 500;
}

.ranking-details {
  font-size: 14px;
  color: var(--light-text);
  margin-top: 8px;
}

/* 模态框样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: var(--light-text);
  transition: all 0.2s;
}

.close-modal:hover {
  color: var(--accent-color);
}

/* 详情页样式 */
.detail-header {
  display: flex;
  margin-bottom: 20px;
}

.detail-image {
  width: 120px;
  height: 120px;
  background-color: #FFF3E0;
  border-radius: 8px;
  margin-right: 20px;
  background-size: cover;
  background-position: center;
}

.detail-title {
  font-size: 24px;
  color: var(--accent-color);
  margin-bottom: 5px;
}

.detail-subtitle {
  font-size: 16px;
  color: var(--light-text);
  margin-bottom: 10px;
}

.detail-rating {
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.detail-stars {
  color: #FFA000;
  margin-right: 10px;
}

.detail-review-count {
  color: var(--light-text);
  font-size: 14px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-meta-item {
  padding: 5px 10px;
  background-color: #FFF3E0;
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-color);
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section-title {
  font-size: 18px;
  color: var(--accent-color);
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #FFE0B2;
}

/* 添加遮罩层样式 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999; /* 低于搜索结果但高于其他内容 */
  display: none;
}

.overlay.show {
  display: block;
}

/* 确保hidden类有效 */
.hidden {
  display: none !important;
}

/* 更新搜索结果样式 */
.search-results {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  background: white;
  z-index: 1000;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  display: none;
}

.search-results.show {
  display: block;
}

.close-results {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  color: var(--accent-color);
  z-index: 1001;
  background: none;
  border: none;
  padding: 5px;
}

.result-item {
  padding: 12px;
  border-bottom: 1px solid #FFE0B2;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-item:hover {
  background-color: #FFF3E0;
}

.result-type {
  display: inline-block;
  padding: 3px 8px;
  background-color: #FFE0B2;
  color: #E65100;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 10px;
}

.result-details {
  font-size: 14px;
  color: var(--light-text);
  margin-top: 5px;
}

.result-rating {
  color: #FFA000;
  font-weight: 500;
  font-size: 16px;
}

/* 导航栏样式 */
.navbar {
    background-color: var(--accent-color);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.user-menu {
    position: relative;
    color: white;
    cursor: pointer;
}

.dropdown {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
}

.dropdown a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown a:hover {
    background-color: #f1f1f1;
}

.user-menu:hover .dropdown {
    display: block;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-login, .btn-register {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid white;
}

.btn-login {
    background-color: transparent;
    color: white;
}

.btn-login:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-register {
    background-color: white;
    color: var(--accent-color);
}

.btn-register:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

/* 个人中心页面样式 */
.profile-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.profile-title {
    color: var(--accent-color);
    margin-bottom: 30px;
    text-align: center;
}

.profile-form .form-group {
    margin-bottom: 20px;
}

.profile-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--light-text);
}

.profile-form input {
    width: 90%;
    padding: 12px 15px;
    border: 2px solid #FFCCBC;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #FFF8F5;
}

.profile-form input:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.2);
}

.profile-actions {
    display: flex;
    justify-content: space-between;
    gap: 20px;  
    margin-top: 30px;
    text-align: center;
    text-decoration: none;
}

/* 新增评分和拥挤度反馈样式 */
#rating-modal, #crowd-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  padding: 30px;
  position: relative;
}

.star-rating {
  margin: 20px 0;
  text-align: center;
}

.star-rating span {
  font-size: 30px;
  margin: 0 5px;
  cursor: pointer;
  color: #FFD700;
}

.crowd-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

.crowd-option {
  padding: 12px;
  border: 2px solid #FFE0B2;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
}

.crowd-option:hover {
  background: #FFF3E0;
  border-color: #FFCC80;
}

.feedback-btn {
  margin-top: 15px;
  padding: 8px 15px;
  background: var(--secondary-color);
}

/* 详情页中的评分显示 */
.detail-rating {
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.detail-stars {
  color: #FFA000;
  font-size: 18px;
  margin-right: 10px;
}

.detail-review-count {
  color: var(--light-text);
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .ranking-list {
    grid-template-columns: 1fr;
  }
  
  .search-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .canteen-icon {
    margin-bottom: 15px;
  }
  
  .search-form {
    width: 100%;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-form {
  animation: fadeIn 0.5s ease-out;
}

#search-results.show {
  display: block !important;
}

#search-results {
  overflow-y: auto;          /* 允许垂直滚动 */
  max-height: 80vh;         /* 最大高度为视口 80% */
  pointer-events: auto;     /* 确保能接收滚轮事件 */
}

/* 新增/修改的CSS */
.title-with-icon {
  display: flex;
  align-items: center;
  gap: 15px; /* 标题和图标之间的间距 */
  margin-bottom: 8px;
}

.recommendation-title, .detail-title {
  flex: 1; /* 让标题占据剩余空间 */
  margin: 0; /* 移除默认边距 */
  font-weight: 600;
}

.recommendation-title {
  font-size: 18px;
}

.detail-title {
  font-size: 24px;
}

.favorite-icon {
  font-size: 28px; /* 推荐卡片大小 */
  color: #aaa;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0; /* 防止图标被压缩 */
}

.favorite-icon:hover {
  transform: scale(1.2);
  color: #ff4757;
}

.favorite-icon.active {
  color: #ff4757;
  animation: pulse 0.5s;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* 详情页面爱心更大 */
.detail-header .favorite-icon {
  font-size: 32px; /* 详情页更大 */
}

/* 让搜索框更大气 */
.search-bar {
  padding: 20px 30px;          /* 整体更高 */
}
#search-input {
  font-size: 18px;             /* 字更大 */
  padding: 15px 20px;          /* 输入区域更肥 */
  min-width: 70%;              /* 宽度占 70% 屏幕（移动端自适应） */
}
.search-btn {
  font-size: 20px;             /* 放大镜按钮跟着大 */
  padding: 0 25px;
}

.filter-bar {
  display: flex;
  gap: 20px;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 30px;
}
.filter-bar select {
  padding: 10px 20px;
  font-size: 18px;
  border-radius: 8px;
  border: 2px solid var(--accent-color);
}

/* ===== 详情页评论区整容 ===== */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.review-user {
    font-weight: 600;
    color: var(--primary-color);
}

.review-date {
    margin-left: 12px;
    color: #666;
    font-size: 13px;
}

.review-user {
    font-weight: 600;
    color: var(--accent-color);
}

.review-rating {
    color: #FFA000;
}

.review-date {
    color: var(--light-text);
}

.review-content {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  word-wrap: break-word;
}

.review-content-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 8px;
    gap: 15px;
}

.review-content-row .review-content {
    margin-top: 0;
    flex: 1;
}

.review-rating-inline {
    color: #ff9800;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    margin-left: 10px;
}

.review-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.like-btn, .delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  outline: none;
}

.like-btn {
  color: #64748b;
  background: transparent;
}

.like-btn:hover {
  background: #f1f5f9;
  color: #475569;
}

.like-btn.liked {
  color: #ef4444;
  background: #fef2f2;
}

.like-btn.liked:hover {
  background: #fee2e2;
}

.delete-btn {
  color: #64748b;
  background: transparent;
}

.delete-btn:hover {
  color: #ef4444;
  background: #fef2f2;
}

.like-icon, .delete-icon {
  display: block;
  flex-shrink: 0;
}

.like-count {
  font-weight: 600;
  min-width: 12px;
  text-align: center;
  font-size: 11px;
  line-height: 1;
}

/* ===== 评分/反馈弹窗整容 ===== */
.modal-content {
    border-radius: 16px;
    padding: 30px 35px;
    max-width: 500px;
}

.star-rating span {
    font-size: 36px;
    margin: 0 8px;
    transition: transform .2s;
}

.star-rating span:hover {
    transform: scale(1.2);
}

.crowd-options {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 15px;
}

.crowd-option {
    font-size: 16px;
    padding: 14px;
    border-radius: 10px;
    border: 2px solid var(--accent-color);
}

.crowd-option:hover {
    background: var(--secondary-color);
}

.feedback-btn {
    margin-top: 25px;
    padding: 14px 0;
    font-size: 17px;
    border-radius: 10px;
}

/* 排队时间评价大卡片 */
.queue-feedback-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 4px 12px var(--shadow-color);
    font-size: 17px;
}

.queue-feedback-card label {
    font-weight: 600;
    color: var(--accent-color);
    display: block;
    margin-bottom: 12px;
}

.queue-feedback-card select {
    width: 100%;
    padding: 12px 16px;
    font-size: 17px;
    border-radius: 8px;
    border: 2px solid var(--accent-color);
    background: #fff8f5;
}

.close-modal{
  position:absolute;
  top:0;
  right:0;
  z-index:10;
  width:40px;
  height:32px;
  line-height:32px;
  font-size:22px;
  color:#fff;
  background:#e15b5b;
  border:none;
  border-radius:0 0 0 16px;   /* 只在左下角圆角，像撕角 */
  cursor:pointer;
  text-align:center;
  box-shadow:-2px 2px 6px rgba(0,0,0,.2);
}

.close-modal:hover {
    background: rgba(0,0,0,0.6);
}

/* 收敛按钮：白底橘字 */
.btn-view-all {
    display: inline-block;
    padding: 4px 10px;
    font-size: 14px;
    color: var(--accent-color);
    background: #fff;
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none; /* 去掉下划线 */
}

.btn-view-all:hover {
    background: var(--accent-color);
    color: #fff;
    text-decoration: none; /* 保持无下划线 */
}

/* 修改 .modal-content 样式 */
.modal-content {
  max-height: 80vh;
  min-height: 600px;
  overflow: hidden; /* 保持隐藏溢出 */
  display: flex; /* 新增 */
  flex-direction: column; /* 新增 */
}

/* 修改详情主体容器 */
.detail-body, 
.review-body {
  height:70vh;
  overflow-y:auto;
  padding:60px 20px 100px 20px; /* 右侧padding从48px减小到20px */
  box-sizing:border-box;
}

/* 让菜品详情弹窗内的滚动条生效，不改宽高 */
.modal-content[data-dish-modal] { 
  overflow: visible; 
}

/* 防止底部评论被截断 */
.review-body { 
  padding-bottom: 40px; 
}

/* 在已有样式基础上添加 */
.review-list {
  margin-bottom: 60px; /* 增加底部空间 */
}

/* 仅替换这一处，其余完全不动 */
.detail-body {
  height: 70vh !important;
  overflow-y: auto !important;
  padding-bottom: 100px !important;
}

.review-body {
  height: 70vh !important;
  overflow-y: auto !important;
  padding-bottom: 100px !important;
}

.detail-body::after {
  content: '';
  display: block;
  height: 80px;
  pointer-events: none;
}

.review-body::after {
  content: '';
  display: block;
  height: 80px;
  pointer-events: none;
}

.review-back {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: #fff;
  z-index: 3;
  font-weight: 500;
  color: var(--accent-color);
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

/* 滑动动画保持 */
.detail-body.hide {
  transform: translateX(-100%);
}
.review-body.hide {
  transform: translateX(100%);
}

.review-back:hover {
    color: #F4511E;
}

.no-results {
    text-align: center;
    padding: 30px;
    color: var(--light-text);
}

.error {
    text-align: center;
    padding: 30px;
    color: #C62828;
}

.error button {
    margin-top: 15px;
    padding: 8px 15px;
    background: var(--secondary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* 排队时间选项样式 */
.queue-time-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.queue-option {
    padding: 12px;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    background: white;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.queue-option:hover {
    background: var(--accent-light);
}

.queue-time-label {
    font-weight: bold;
    font-size: 16px;
}

.queue-time-desc {
    font-size: 14px;
    color: #666;
}

/* 供应菜品高级卡片 */
.dish-list {
    display: grid;
    gap: 12px;
    padding: 0 10px;
}

.dish-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(255,152,0,.12);
    transition: all .2s;
}

.dish-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,152,0,.2);
}

.dish-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
}

.dish-price {
    font-size: 15px;
    color: var(--accent-color);
    font-weight: 500;
}

.dish-item > div:last-child {
    color: #ffa000;
}

/* 供应区可滚动 */
.dish-list {
    max-height: 300px;   /* 按需调整 */
    overflow-y: auto;
}

/* 修复双屏切换 */
.detail-body,
.review-body {
    height: 100%;
    overflow-y: auto;
}

/* 食堂-窗口卡片 */
.stall-list {
    display: grid;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.stall-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(255,152,0,.12);
    transition: all .2s;
}

.stall-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,152,0,.2);
}

.stall-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
}

.stall-rating {
    color: #ffa000;
}

/* 让“保存更改”和“返回”按钮文字样式完全一致，并去掉下划线 */
.profile-actions .btn,
.profile-actions a.btn {
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none; /* 去掉 <a> 的下划线 */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 收敛时也保持无下划线 */
.profile-actions .btn:hover,
.profile-actions a.btn:hover {
    text-decoration: none;
}

.detail-scroll-wrapper {
  max-height: 80vh;
  overflow-y: auto;
}

/* 右侧内缩，左侧不变 */
.detail-scroll-wrapper-right-pad {
  padding-right: 4%;   /* 仅右侧留空，从10%减小到4% */
  box-sizing: border-box;
}

/* 详情页内容区域更宽，但仍居中 */
.detail-scroll-wrapper-right-pad {
  padding-right: 4%;
  max-width: 900px; /* 比原来更宽，从720px增加到900px */
  margin: 0 auto;
}

.detail-section,
.review-list,
.review-form {
  max-width: 100%; /* 不再限制 */
}

/* 提交评价框更紧凑 */
.review-form textarea {
  font-size: 15px;
  padding: 10px 12px;
  min-height: 80px;
}
.review-form .btn {
  max-width: 180px;
  margin: 10px 0 0 0;
  font-size: 15px;
  padding: 10px 0;
}

/* 排队评分模态框样式 */
.rating-modal-content {
  max-width: 450px;
  text-align: center;
  padding: 30px;
}

.rating-modal-content h3 {
  color: var(--accent-color);
  margin-bottom: 25px;
  font-size: 1.4em;
}

.rating-modal-content .rating-text {
  margin: 20px 0;
  font-size: 1.1em;
  min-height: 25px;
}

.queue-rating-stars {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}

.queue-rating-stars .star {
  font-size: 24px;
  cursor: pointer;
  color: var(--accent-color);
  transition: color 0.2s;
}

.queue-rating-stars .star:hover,
.queue-rating-stars .star.active {
  color: var(--accent-color);
}

.queue-rating-people {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}

.queue-rating-people .person-rating {
  cursor: pointer;
  padding: 8px;
  transition: transform 0.2s;
}

.queue-rating-people .person-rating:hover {
  transform: scale(1.15);
}

.queue-rating-people .person-rating .person-icon {
  width: 28px;
  height: 28px;
  background-color: #FF8A65;
  border-radius: 50% 50% 2px 2px;
  display: inline-block;
  position: relative;
}

.queue-rating-people .person-rating .person-icon::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background-color: #FF8A65;
  border-radius: 50%;
}

.queue-rating-people .person-rating .person-icon.empty {
  background-color: #bdbdbd;
  opacity: 0.5;
}

.queue-rating-people .person-rating .person-icon.empty::before {
  background-color: #bdbdbd;
  opacity: 0.5;
}

.queue-rating-people .person-rating.active .person-icon {
  background-color: #FF8A65;
  opacity: 1;
}

.queue-rating-people .person-rating.active .person-icon::before {
  background-color: #FF8A65;
  opacity: 1;
}

.queue-rating-text {
  margin: 15px 0;
  font-size: 16px;
  color: var(--text-color);
}

#submit-queue-rating {
  margin-top: 20px;
}

.review-body {
  padding-bottom: 100px;
}

/* 小人图标样式 */
.people-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.person-icon {
  width: 9px;
  height: 16px;
  background-color: #FF8A65; /* 更浅的橙色 */
  border-radius: 50% 50% 2px 2px;
  display: inline-block;
  position: relative;
}

.person-icon::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  background-color: #FF8A65; /* 更浅的橙色 */
  border-radius: 50%;
}

.person-icon::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 3px;
  background-color: #FF8A65; /* 更浅的橙色 */
  border-radius: 1px;
}

.person-icon.empty {
  background-color: #bdbdbd; /* 稍微浅一点的灰色 */
  opacity: 0.5;
}

.person-icon.empty::before {
  background-color: #bdbdbd; /* 稍微浅一点的灰色 */
  opacity: 0.5;
}

.person-icon.empty::after {
  background-color: #bdbdbd; /* 稍微浅一点的灰色 */
  opacity: 0.5;
}

.ranking-people-icons .person-icon,
.recommendation-people-icons .person-icon {
  width: 8px;
  height: 14px;
}

.ranking-people-icons .person-icon::before,
.recommendation-people-icons .person-icon::before {
  width: 6px;
  height: 6px;
  top: -5px;
}

.ranking-people-icons .person-icon {
  font-size: 13px; /* 排行榜更小 */
  margin: 0 -1.5px;
}

.recommendation-people-icons .person-icon {
  font-size: 13px; /* 推荐卡片更小 */
  margin: 0 -1px;
}

/* 悬浮问题反馈按钮 */
.floating-feedback-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    text-decoration: none;
}

.floating-feedback-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff5252, #ff7979);
}

.floating-feedback-btn svg {
    width: 24px;
    height: 24px;
}