/* ===== 全局：粉色恋爱风，手机优先 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
  color: #4a2c35;
  min-height: 100vh;
  font-size: 15px;
}

/* ===== 顶部 ===== */
header {
  background: linear-gradient(90deg, #ff6b9d, #ff8fab);
  color: #fff;
  padding: 18px 16px;
  text-align: center;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 4px 12px rgba(255,107,157,.3);
}
header h1 { font-size: 22px; }
.subtitle { font-size: 13px; opacity: .9; margin-top: 4px; }
.logout {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 12px;
  opacity: .85;
  cursor: pointer;
  padding: 6px 10px;
}
.logout:hover { opacity: 1; text-decoration: underline; }
header { position: relative; }

/* ===== 登录/注册卡片 ===== */
#authView {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff0f5 0%, #ffe4ec 100%);
  padding: 20px;
}
.auth-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px 24px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 8px 30px rgba(255,107,157,.25);
  text-align: center;
}
.auth-card h1 { font-size: 24px; color: #ff6b9d; }
.auth-sub { font-size: 13px; color: #b48a97; margin: 8px 0 20px; }
.auth-card input {
  width: 100%;
  padding: 13px 16px;
  margin-bottom: 12px;
  border: 1px solid #ffd6e0;
  border-radius: 14px;
  font-size: 15px;
}
.auth-card input:focus { outline: 2px solid #ff8fab; }
#authBtn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(90deg, #ff6b9d, #ff8fab);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255,107,157,.4);
  margin-top: 4px;
}
#authBtn:active { transform: scale(.98); }
.auth-toggle {
  margin-top: 16px;
  font-size: 13px;
  color: #ff6b9d;
  cursor: pointer;
}
.auth-toggle:hover { text-decoration: underline; }

/* ===== 订单状态卡片 ===== */
.my-order {
  max-width: 640px;
  margin: 14px auto 0;
  padding: 0 12px;
}
.my-order .card {
  background: #fff;
  border-radius: 20px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(255,107,157,.18);
  border-top: 4px solid #ff8fab;
}
.card-top {
  font-size: 14px;
  font-weight: bold;
  color: #8a4b5e;
}
.dismiss {
  float: right;
  font-size: 12px;
  font-weight: normal;
  color: #c98a9b;
  cursor: pointer;
  padding: 4px 8px; /* 加大点按区域，手机上好按 */
}
.dismiss:hover { color: #ff6b9d; }

/* 三步进度条 */
.steps {
  display: flex;
  gap: 6px;
  margin: 12px 0 10px;
}
.step {
  flex: 1;
  padding: 7px 0;
  border-radius: 20px;
  background: #f6e6ec;
  font-size: 12px;
  color: #b48a97;
  text-align: center;
}
.step.on {
  background: linear-gradient(90deg, #ff6b9d, #ff8fab);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(255,107,157,.4);
}
.step.pass { background: #ffd6e0; color: #d6336c; }

.my-order .status-big { font-size: 17px; font-weight: bold; text-align: center; }
.st-pending { color: #f59f00; }
.st-cooking { color: #1c7ed6; }
.st-done    { color: #2f9e44; }

.my-order .items-line {
  font-size: 13px;
  color: #a06b7a;
  text-align: center;
  margin-top: 8px;
}
.refresh-btn {
  display: block;
  margin: 10px auto 0;
  padding: 9px 28px;
  border: 1px solid #ffb3c6;
  background: #fff;
  color: #ff6b9d;
  border-radius: 22px;
  font-size: 14px;
  cursor: pointer;
  min-height: 40px; /* 手机上手指好按 */
}
.refresh-btn:hover { background: #ffe4ec; }

/* ===== 主区域 ===== */
main {
  display: flex;
  flex-direction: column; /* 手机：菜单在上，购物车在下 */
  gap: 14px;
  padding: 14px 12px;
  max-width: 1000px;
  margin: 0 auto;
}

#menu h2 { font-size: 16px; margin-bottom: 10px; }

/* ===== 菜品卡片：手机一排两个 ===== */
.dish-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dish-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(255,107,157,.12);
  cursor: pointer;
  border: 2px solid transparent;
  /* 手机上点下去的反馈 */
  transition: transform .1s;
}
.dish-card:active {
  transform: scale(.96);
  border-color: #ff8fab;
}

.dish-card .emoji { font-size: 40px; }
.dish-card .name { margin: 6px 0 2px; font-weight: bold; font-size: 14px; }
.dish-card .price { color: #ff6b9d; font-weight: bold; font-size: 14px; }

/* ===== 购物车 ===== */
#cart {
  background: #fff;
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(255,107,157,.15);
}
#cart h2 { font-size: 16px; margin-bottom: 8px; }

#cartList { list-style: none; margin-bottom: 10px; }

#cartList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #ffd6e0;
  font-size: 14px;
}

.qty-btn {
  border: 1px solid #ffb3c6;
  background: #fff;
  color: #ff6b9d;
  border-radius: 50%;
  width: 30px;   /* 加大，手机上好按 */
  height: 30px;
  cursor: pointer;
  margin: 0 6px;
  font-size: 16px;
}
.qty-btn:active { background: #ffe4ec; }

#note {
  width: 100%;
  border: 1px solid #ffd6e0;
  border-radius: 12px;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  margin-bottom: 10px;
}
#note:focus { outline: 2px solid #ff8fab; }

.cart-footer { text-align: center; }
.total { font-size: 17px; font-weight: bold; color: #ff6b9d; margin-bottom: 8px; }

#submitBtn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 25px;
  background: linear-gradient(90deg, #ff6b9d, #ff8fab);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255,107,157,.4);
}
#submitBtn:active { transform: scale(.98); }

/* ===== 大一点的屏幕（平板/电脑）：菜单和购物车并排 ===== */
@media (min-width: 700px) {
  main { flex-direction: row; }
  #menu { flex: 1; }
  #cart { width: 300px; position: sticky; top: 20px; height: fit-content; }
  .dish-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .dish-card:hover {
    transform: translateY(-4px);
    border-color: #ff8fab;
    box-shadow: 0 8px 20px rgba(255,107,157,.25);
  }
}
