:root{
  /* 基础语义色 */
  --bg:#fff8ef;
  --surface:#ffffff;
  --surface-soft:#fff4e4;
  --text:#17201a;
  --muted:#69756c;
  --primary:#22c55e;
  --primary-dark:#159447;
  --accent:#ff7a3d;
  --accent-soft:#fff0e7;
  --line:rgba(23,32,26,.10);
  --shadow:0 24px 70px rgba(48,71,45,.14);
  --shadow-soft:0 14px 35px rgba(48,71,45,.10);
  --radius:28px;
  --danger:#ef4444;
  --danger-dark:#dc2626;
  --warning:#f59e0b;
  --warning-soft:#fff3cd;

  /* 页面渐变背景（首页 / 结算页 / 订单页共用同一套配方，深浅色各一份） */
  --page-gradient:
    radial-gradient(circle at 12% 8%, rgba(255,122,61,.18), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(34,197,94,.16), transparent 32%),
    linear-gradient(180deg,#fffaf3 0%,#f7fbf1 100%);
  --grid-overlay-color:rgba(23,32,26,.035);

  /* 毛玻璃卡片（导航栏、控制面板、登录卡片等大量复用） */
  --glass-bg:rgba(255,255,255,.70);
  --glass-bg-strong:rgba(255,255,255,.86);
  --glass-border:rgba(255,255,255,.78);

  /* 深色系卡片（购物车、优惠券、地址卡固定用深底，深浅模式下都存在，但配色略有差异） */
  --dark-card-bg:linear-gradient(135deg,#17201a,#2d4632);
  --dark-card-solid:rgba(23,32,26,.94);

  /* 纯白/纯浅灰这类"看起来是背景"的功能色，抽出来方便深色模式整体重定义 */
  --surface-alt:#fff;
  --surface-muted:#f5f5f4;
  --input-bg:#fff;
}

/* Dark Mode Variables：与 :root 一一对应，保证组件样式只需引用变量即可自动适配 */
html.dark-mode,
body.dark-mode{
  --bg:#12181a;
  --surface:#202b23;
  --surface-soft:#2a382e;
  --text:#eafff2;
  --muted:#a8b9ad;
  --line:rgba(255,255,255,.10);
  --accent-soft:#3a2c22;
  --shadow:0 24px 70px rgba(0,0,0,.45);
  --shadow-soft:0 14px 35px rgba(0,0,0,.35);
  --warning-soft:#4a3a12;
  --primary:#86efac;
  --primary-dark:#4ade80;

  --page-gradient:
    radial-gradient(circle at 12% 8%, rgba(255,122,61,.10), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(34,197,94,.10), transparent 32%),
    linear-gradient(180deg,#12181a 0%,#0e1512 100%);
  --grid-overlay-color:rgba(255,255,255,.035);

  --glass-bg:rgba(32,43,35,.70);
  --glass-bg-strong:rgba(32,43,35,.86);
  --glass-border:rgba(255,255,255,.10);

  --dark-card-bg:linear-gradient(135deg,#0c1210,#1b2620);
  --dark-card-solid:rgba(10,15,12,.94);

  --surface-alt:#202b23;
  --surface-muted:#26332b;
  --input-bg:#202b23;
}
html.dark-mode body,
body.dark-mode{
  background:var(--page-gradient);
  color:var(--text);
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  min-height:100%;
  font-family:"Inter","PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  color:var(--text);
  background:var(--page-gradient);
  overflow-x:hidden;
  transition:background-color .25s ease, color .25s ease;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(var(--grid-overlay-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-overlay-color) 1px, transparent 1px);
  background-size:48px 48px;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,.75), transparent 70%);
}
a{color:inherit;text-decoration:none}
button,input{font:inherit}
button{border:0;cursor:pointer}

.site-header{
  position:relative;
  padding:22px clamp(18px,4vw,56px) 34px;
}
.topbar {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 16px;
  z-index: 20;
}
.topbar .brand { grid-column: 1; justify-self: start; }
.topbar .nav-links { grid-column: 2; justify-self: center; }
.topbar .account-area { grid-column: 3; justify-self: end; }
.brand{display:flex;align-items:center;gap:10px;font-weight:900;font-size:1.18rem;letter-spacing:.02em}
.brand-mark{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,#ffe4bd,#ffffff);box-shadow:inset 0 -8px 18px rgba(255,122,61,.16)}
.nav-links{display:flex;align-items:center;gap:8px;color:var(--muted);font-weight:700}
.nav-links a,.account-pill{
  padding:10px 14px;
  border-radius:999px;
  transition:.25s ease;
}
.nav-links a:hover,.account-pill:hover{background:var(--surface-alt);color:var(--text);box-shadow:0 10px 24px rgba(40,54,42,.08)}
.account-area{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;justify-content:flex-end}
.dark-mode-toggle {
    margin-right: 4px;
}
.account-pill{background:rgba(34,197,94,.16);color:var(--primary-dark);padding:10px 14px;border-radius:999px}
.logout-link{color:var(--muted);font-weight:700;padding:10px 14px;border-radius:999px}
.logout-link:hover{background:var(--surface-alt);color:var(--accent)}

.hero{
  width:min(1180px,100%);
  margin:26px auto 0;
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:24px;
  align-items:stretch;
}
.hero-copy,.deal-card{
  border:1px solid var(--glass-border);
  background:var(--glass-bg);
  backdrop-filter:blur(20px);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.hero-copy{padding:clamp(28px,5vw,58px);position:relative;overflow:hidden}
.hero-copy::after{
  content:"🍋";
  position:absolute;
  right:8%;
  top:8%;
  font-size:4rem;
  filter:drop-shadow(0 18px 24px rgba(255,122,61,.20));
  transform:rotate(12deg);
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:var(--accent-soft);
  color:#c24f1f;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:.78rem;
}
.hero h1{font-size:clamp(2.5rem,7vw,5.8rem);line-height:.95;margin:20px 0 16px;letter-spacing:-.08em}
.hero p{max-width:580px;color:var(--muted);font-size:1.12rem;line-height:1.8}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}
.primary-action,.secondary-action,.cart button,.cart-summary button,.login-container button,.search-btn,.fruit-item button.add-cart-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:12px 18px;
  border-radius:999px;
  font-weight:900;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.primary-action,.cart button,.cart-summary button,.login-container button,.search-btn,.fruit-item button.add-cart-btn{
  color:#fff;
  background:linear-gradient(135deg,var(--primary),#16a34a);
  box-shadow:0 14px 28px rgba(34,197,94,.26);
}
.secondary-action{background:var(--surface-alt);color:var(--text);box-shadow:0 12px 28px rgba(40,54,42,.08)}
.primary-action:hover,.secondary-action:hover,.cart button:hover,.cart-summary button:hover,.login-container button:hover,.search-btn:hover,.fruit-item button.add-cart-btn:hover{transform:translateY(-2px)}
.stats{display:flex;gap:18px;flex-wrap:wrap;margin-top:34px}
.stat{min-width:110px;padding:14px 16px;border-radius:20px;background:var(--glass-bg);border:1px solid var(--line)}
.stat strong{display:block;font-size:1.35rem}
.stat span{color:var(--muted);font-size:.9rem}
.deal-card{padding:26px;display:flex;flex-direction:column;justify-content:space-between;min-height:360px;overflow:hidden;position:relative;background:var(--glass-bg)}
.deal-card::after{content:"🥭";position:absolute;right:-18px;bottom:-24px;font-size:10rem;opacity:.24;transform:rotate(-18deg)}
.deal-card h2{font-size:1.7rem;margin:16px 0 10px}
.deal-card p{color:var(--muted);line-height:1.7}
.deal-tag{align-self:flex-start;padding:8px 12px;border-radius:999px;background:var(--text);color:var(--bg);font-weight:900;font-size:.82rem}
.deal-price{font-size:2.2rem;font-weight:950;color:var(--accent);margin-top:22px}

.carousel{position:relative;height:54px;margin-top:22px;overflow:hidden;border-radius:18px;background:rgba(255,255,255,.58);border:1px solid var(--line)}
.slide{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-weight:900;color:var(--primary-dark);opacity:0;transform:translateY(18px);animation:slideAnim 12s ease infinite}
.slide:nth-child(1){animation-delay:0s}.slide:nth-child(2){animation-delay:4s}.slide:nth-child(3){animation-delay:8s}
@keyframes slideAnim{0%,25%{opacity:0;transform:translateY(18px)}8%,28%{opacity:1;transform:translateY(0)}36%,100%{opacity:0;transform:translateY(-18px)}}

.page-main{width:min(1180px,100%);margin:0 auto;padding:0 clamp(18px,4vw,56px) 56px}
.controls-panel{
  margin:10px 0 22px;
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-radius:26px;
  background:var(--glass-bg);
  border:1px solid var(--glass-border);
  box-shadow:var(--shadow-soft);
  backdrop-filter:blur(18px);
}
.categories{display:flex;gap:10px;flex-wrap:wrap}
.cat-btn{padding:10px 15px;border-radius:999px;background:var(--surface-alt);color:var(--muted);font-weight:900;border:1px solid var(--line);transition:.2s ease}
.cat-btn:hover,.cat-btn.active{background:var(--text);color:var(--bg);transform:translateY(-1px)}
.search-bar{display:flex;gap:10px;align-items:center;min-width:min(420px,100%)}
.search-bar input{width:100%;min-height:46px;border:1px solid var(--line);border-radius:999px;padding:0 16px;background:var(--input-bg);color:var(--text);outline:none;transition:.2s ease}
.search-bar input:focus{border-color:rgba(34,197,94,.65);box-shadow:0 0 0 5px rgba(34,197,94,.10)}
.search-btn{min-width:92px}

.content-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:22px;align-items:start}
.fruit-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:18px}
.fruit-item{
  position:relative;
  min-height:285px;
  padding:18px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  border-radius:28px;
  background:var(--glass-bg-strong);
  border:none;
  box-shadow:0 16px 35px rgba(48,71,45,.10);
  overflow:hidden;
  opacity:0;
  transform:translateY(18px);
  animation:fadeInUp .55s ease forwards;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}
.fruit-item::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 82% 10%,rgba(34,197,94,.12),transparent 34%);pointer-events:none}
.fruit-item:hover{transform:translateY(-6px);box-shadow:0 24px 55px rgba(48,71,45,.16);border-color:rgba(34,197,94,.22)}
.fruit-item:nth-child(1){animation-delay:.04s}.fruit-item:nth-child(2){animation-delay:.08s}.fruit-item:nth-child(3){animation-delay:.12s}.fruit-item:nth-child(4){animation-delay:.16s}.fruit-item:nth-child(5){animation-delay:.20s}.fruit-item:nth-child(6){animation-delay:.24s}.fruit-item:nth-child(7){animation-delay:.28s}.fruit-item:nth-child(8){animation-delay:.32s}.fruit-item:nth-child(9){animation-delay:.36s}.fruit-item:nth-child(10){animation-delay:.40s}.fruit-item:nth-child(11){animation-delay:.44s}.fruit-item:nth-child(12){animation-delay:.48s}
@keyframes fadeInUp{to{opacity:1;transform:translateY(0)}}
.category-badge{position:relative;z-index:1;padding:7px 10px;border-radius:999px;background:var(--surface-soft);color:#a85316;font-size:.78rem;font-weight:900}
.fruit-emoji{align-self:center;font-size:5rem;line-height:1;margin:18px 0 14px;filter:drop-shadow(0 18px 24px rgba(255,122,61,.18));transition:transform .25s ease}
.fruit-item:hover .fruit-emoji{transform:scale(1.08) rotate(-5deg)}
.fruit-item h3{position:relative;z-index:1;font-size:1.25rem;margin-bottom:8px;cursor:pointer;letter-spacing:-.03em}
.fruit-item p{position:relative;z-index:1;color:var(--muted);margin-bottom:18px}
.fruit-actions{position:relative;z-index:1;margin-top:auto;width:100%;display:flex;align-items:center;gap:10px}
.fruit-item button.add-cart-btn{flex:1;padding:10px 13px;min-height:42px;font-size:.92rem}
.favorite-btn{width:42px;height:42px;border-radius:50%;background:var(--surface-alt)!important;color:#ff9f1c!important;border:1px solid var(--line)!important;box-shadow:0 10px 20px rgba(40,54,42,.08);font-size:1rem;transition:.2s ease}
.favorite-btn.is-active{background:var(--warning-soft)!important;color:var(--warning)!important;transform:scale(1.05)}
.empty-state{grid-column:1/-1;text-align:center;padding:40px;border-radius:28px;background:var(--glass-bg);color:var(--muted);display:none}

.cart{
  position:sticky;
  top:94px;
  padding:22px;
  border-radius:28px;
  background:var(--dark-card-solid);
  color:#fff;
  box-shadow:var(--shadow);
}
.cart h2{font-size:1.45rem;margin-bottom:14px}
.cart ul{list-style:none;display:grid;gap:10px;margin-bottom:18px;color:rgba(255,255,255,.80)}
.cart li{display:flex;justify-content:space-between;gap:10px;padding:11px 0;border-bottom:1px solid rgba(255,255,255,.10)}
#total{font-size:1.25rem;font-weight:950;margin:10px 0 18px;transition:transform .25s ease;color:#bbf7d0}
.cart button{width:100%;background:linear-gradient(135deg,#ff9f1c,#ff6b35);box-shadow:0 14px 30px rgba(255,122,61,.28)}

.modal{display:none;position:fixed;z-index:100;inset:0;background:rgba(15,23,18,.54);backdrop-filter:blur(10px);padding:20px}
.modal-content{width:min(440px,100%);margin:10vh auto 0;padding:28px;border-radius:28px;background:var(--surface-alt);box-shadow:var(--shadow);border:1px solid var(--glass-border);animation:pop .22s ease}
@keyframes pop{from{opacity:0;transform:translateY(16px) scale(.97)}to{opacity:1;transform:none}}
.close{float:right;width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:var(--surface-muted);color:var(--muted);font-size:1.6rem;line-height:1;cursor:pointer;transition:.2s ease}
.close:hover{background:var(--text);color:var(--bg)}
#modalTitle{font-size:2rem;margin:18px 0 10px}
#modalPrice{color:var(--muted);font-size:1.1rem}

.quick-toggle{position:fixed;right:20px;bottom:80px;z-index:80;width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#17201a,#314337);color:#fff;box-shadow:0 18px 35px rgba(23,32,26,.28);font-size:1.35rem}
.quick-menu{position:fixed;right:20px;bottom:150px;width:260px;z-index:79;padding:16px;border-radius:24px;background:var(--glass-bg-strong);box-shadow:var(--shadow);border:1px solid var(--glass-border);backdrop-filter:blur(18px);transform:translateY(12px) scale(.96);opacity:0;pointer-events:none;transition:.22s ease}
.quick-menu.open{opacity:1;transform:none;pointer-events:auto}
.quick-menu a{display:flex;align-items:center;gap:10px;padding:12px;border-radius:16px;color:var(--text);font-weight:850}
.quick-menu a:hover{background:var(--surface-soft)}
.quick-menu-title{margin:10px 12px 6px;color:var(--muted);font-weight:900;font-size:.86rem}
#fav-list{display:grid;gap:6px;padding:0 12px 6px;color:var(--muted)}

.login-page{display:grid;place-items:center;padding:24px;min-height:100vh}
.login-shell{width:min(1040px,100%);display:grid;grid-template-columns:1.05fr .95fr;gap:22px;align-items:stretch}
.login-hero,.login-container{border:1px solid var(--glass-border);background:var(--glass-bg);backdrop-filter:blur(20px);border-radius:32px;box-shadow:var(--shadow)}
.login-hero{padding:clamp(30px,5vw,58px);overflow:hidden;position:relative;min-height:520px;display:flex;flex-direction:column;justify-content:center}
.login-hero::after{content:"🍓";position:absolute;right:-18px;bottom:-24px;font-size:13rem;opacity:.18;transform:rotate(-16deg)}
.login-hero h1{font-size:clamp(3rem,8vw,6.2rem);letter-spacing:-.09em;line-height:.95;margin:20px 0 16px}
.login-hero p{color:var(--muted);font-size:1.18rem;line-height:1.8;max-width:420px}
.login-highlights{display:flex;gap:10px;flex-wrap:wrap;margin-top:34px}
.login-highlights span{padding:10px 12px;border-radius:999px;background:var(--surface-alt);border:1px solid var(--line);font-weight:850;color:var(--muted)}
.login-container{padding:clamp(26px,4vw,42px);align-self:center}
.form-heading{display:flex;gap:14px;align-items:center;margin-bottom:26px}.logo-dot{width:54px;height:54px;display:grid;place-items:center;border-radius:18px;background:var(--surface-soft);font-size:1.7rem}.form-heading h2{font-size:1.8rem}.form-heading p{color:var(--muted);margin-top:4px}
.login-container form{display:grid;gap:12px}.login-container label{font-weight:900}.login-container input{min-height:50px;border:1px solid var(--line);border-radius:18px;background:var(--input-bg);color:var(--text);padding:0 15px;outline:none;transition:.2s ease}.login-container input:focus{border-color:rgba(34,197,94,.65);box-shadow:0 0 0 5px rgba(34,197,94,.10)}.login-container button{width:100%;margin-top:8px;min-height:52px}

.cart-summary{width:min(680px,calc(100% - 36px));margin:40px auto;padding:28px;border-radius:30px;background:var(--glass-bg);border:1px solid var(--glass-border);box-shadow:var(--shadow);backdrop-filter:blur(18px)}
.cart-summary h2{font-size:1.8rem;margin-bottom:18px}.cart-summary ul{list-style:none;display:grid;gap:12px;margin-bottom:18px}.cart-summary li{padding:14px 0;border-bottom:1px solid var(--line);color:var(--muted)}.cart-summary p{font-size:1.25rem;font-weight:950;margin-bottom:18px}.cart-summary button{background:linear-gradient(135deg,var(--primary),#16a34a)}
.navbar {
  width: 100%;
  min-height: 64px;
  background-color: var(--surface, rgba(253, 246, 235, 0.9));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line, rgba(0, 0, 0, 0.05));
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 40px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.simple-header-inner {
  width: min(960px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.header-top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-left {
  display: flex;
  align-items: center;
}
.header-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.user-pill {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0;
  white-space: nowrap;
}
.logout-link {
  color: var(--muted);
  font-weight: 850;
  font-size: 0.9rem;
}
.logout-link:hover { color: var(--accent); }
.history-shell {
  margin-top: 32px;
}

@media (max-width: 768px) {
  .navbar {
    padding: 10px 16px;
    border-radius: 20px;
    margin: 10px auto;
    width: 95%;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
  }
  .simple-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .header-top {
    justify-content: space-between;
    width: 100%;
  }
  .header-bottom {
    justify-content: space-between;
    width: 100%;
  }
  .header-title {
    font-size: 1.1rem;
  }
  .user-pill {
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 420px) {
  .header-title {
    font-size: 1rem;
  }
  .user-pill {
    max-width: 60vw;
  }
}
.back-link{order:-1;padding:9px 16px;border-radius:999px;background:var(--surface-soft);color:var(--text)!important;font-weight:900!important}
.back-link:hover{background:var(--accent-soft)}

@media(max-width:920px){
  .hero,.content-grid,.login-shell{grid-template-columns:1fr}
  .deal-card{min-height:260px}
  .cart{position:relative;top:auto}
  .controls-panel{align-items:stretch;flex-direction:column}
  .search-bar{min-width:0}
  .nav-links{display:none}
}
@media(max-width:560px){
  .topbar{border-radius:24px;align-items:flex-start;flex-direction:column}.account-area{justify-content:flex-start;width:100%}.dark-mode-toggle{margin-left:auto}.hero-copy::after{display:none}.hero h1{font-size:3rem}.fruit-list{grid-template-columns:1fr}.search-bar{flex-direction:column}.search-btn{width:100%}.login-page{padding:14px}.login-hero{min-height:360px}.quick-menu{right:14px;left:14px;width:auto}.quick-toggle{right:14px;bottom:14px}
}

/* 趣味结算页 */
.checkout-page{
  min-height:100vh;
  background:var(--page-gradient);
}
.checkout-stage{
  width:min(1120px,calc(100% - 36px));
  margin:22px auto 60px;
  display:grid;
  grid-template-columns:.95fr 1.05fr;
  gap:22px;
  align-items:stretch;
}
.basket-showcase,.checkout-panel{
  border:1px solid var(--glass-border);
  background:var(--glass-bg);
  backdrop-filter:blur(20px);
  border-radius:32px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.basket-showcase{padding:30px;position:relative;min-height:650px}
.basket-showcase h2,.checkout-panel h2{font-size:clamp(2rem,4vw,3.4rem);letter-spacing:-.07em;margin:14px 0 10px}
.basket-showcase p{color:var(--muted);line-height:1.75;max-width:420px}
.basket-scene{
  position:relative;
  height:360px;
  margin:34px 0 24px;
  border-radius:30px;
  background:
    radial-gradient(circle at 50% 70%, rgba(34,197,94,.12), transparent 38%),
    linear-gradient(180deg,var(--surface-soft),var(--surface));
  border:1px solid var(--line);
  overflow:hidden;
}
.falling-fruits{position:absolute;inset:0;z-index:4;pointer-events:none}
.falling-fruit{
  position:absolute;
  top:-58px;
  font-size:2.55rem;
  opacity:0;
  filter:drop-shadow(0 14px 16px rgba(23,32,26,.14));
  animation:fruitDrop 2.2s cubic-bezier(.2,.85,.32,1) forwards;
}
@keyframes fruitDrop{
  0%{opacity:0;transform:translateY(-50px) scale(.85) rotate(0deg)}
  16%{opacity:1}
  78%{opacity:1;transform:translateY(245px) scale(1.06) rotate(var(--spin))}
  100%{opacity:0;transform:translateY(280px) scale(.72) rotate(var(--spin))}
}
.basket-shadow{position:absolute;left:50%;bottom:42px;width:260px;height:34px;transform:translateX(-50%);border-radius:50%;background:rgba(23,32,26,.12);filter:blur(8px)}
@property --shake-x {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}
.basket{position:absolute;left:50%;bottom:54px;width:270px;height:164px;transform:translateX(calc(-50% + var(--shake-x, 0px)));z-index:5}
.basket.is-shaking{animation:basketShake .4s ease}
@keyframes basketShake{
  0%,100%{--shake-x:0px}
  20%{--shake-x:-6px}
  40%{--shake-x:5px}
  60%{--shake-x:-4px}
  80%{--shake-x:3px}
}
.basket-handle{position:absolute;left:37px;top:-62px;width:196px;height:130px;border:16px solid #bb7b35;border-bottom:0;border-radius:120px 120px 0 0;opacity:.95}
.basket::before{
  content:"";
  position:absolute;
  inset:42px 0 0;
  border-radius:32px 32px 46px 46px;
  background:
    linear-gradient(90deg,rgba(255,255,255,.18) 12%,transparent 12% 24%,rgba(255,255,255,.14) 24% 36%,transparent 36% 48%,rgba(255,255,255,.12) 48% 60%,transparent 60% 72%,rgba(255,255,255,.14) 72% 84%,transparent 84%),
    linear-gradient(135deg,#d18a3f,#9d5e24);
  box-shadow:inset 0 -18px 28px rgba(85,45,18,.22),0 18px 36px rgba(85,45,18,.18);
}
.basket::after{content:"";position:absolute;left:18px;right:18px;top:70px;height:18px;border-radius:999px;background:rgba(255,255,255,.24)}
.basket-inner{position:absolute;inset:0;z-index:6;overflow:hidden;border-radius:38px 38px 48px 48px}
.stored-fruit{position:absolute;font-size:2.1rem;opacity:0;transform:translateY(-10px) scale(.72);animation:fruitStore .5s ease forwards;filter:drop-shadow(0 10px 14px rgba(23,32,26,.15))}
@keyframes fruitStore{to{opacity:1;transform:translateY(0) scale(1)}}
.stored-fruit.is-leaving{animation:fruitLeave .45s cubic-bezier(.4,0,1,.6) forwards !important;pointer-events:none}
@keyframes fruitLeave{
  0%{opacity:1;transform:translateY(0) scale(1) rotate(0deg)}
  100%{opacity:0;transform:translateY(-46px) scale(.6) rotate(-24deg)}
}
.delivery-note{display:flex;gap:10px;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:16px 18px;border-radius:22px;background:var(--dark-card-solid);color:#fff}.delivery-note span{color:rgba(255,255,255,.7)}

.checkout-panel{padding:28px;display:flex;flex-direction:column;gap:18px}

/* ==================== 订单明细单行样式（桌面端） ==================== */
.checkout-list .checkout-item {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}

.checkout-item-emoji {
  font-size: 1.7rem;
  text-align: center;
}

.checkout-item > div:first-of-type {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.checkout-item > div:first-of-type strong {
  font-size: .98rem;
}

.checkout-item > div:first-of-type small {
  color: var(--muted);
}

.checkout-item > b {
  font-size: 1.1rem;
  white-space: nowrap;
}

.checkout-item .qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.checkout-item .qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background-color: var(--surface-muted);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background-color .2s ease;
}

.checkout-item .qty-btn:hover,
.checkout-item .qty-btn:active {
  background-color: var(--line);
}

.checkout-item .qty-value {
  min-width: 22px;
  font-weight: 700;
  text-align: center;
}

.checkout-item-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: .8rem;
  transition: .2s ease;
}
.checkout-item-remove:hover { background: var(--danger); color: #fff; }

/* ==================== 订单明细单行样式（手机端） ==================== */
@media (max-width: 560px) {
  .checkout-list .checkout-item {
    grid-template-columns: 40px 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 8px;
    column-gap: 12px;
    padding: 12px 14px;
  }

  .checkout-item-emoji {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    font-size: 1.5rem;
  }

  .checkout-item > div:first-of-type {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .checkout-item > b {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .checkout-item-remove {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
}
.coupon-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px;border-radius:28px;background:var(--dark-card-bg);color:#fff;position:relative;overflow:hidden}.coupon-card::after{content:"";position:absolute;right:-40px;top:-60px;width:170px;height:170px;border-radius:50%;background:rgba(255,255,255,.10)}.coupon-label{display:inline-flex;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.14);font-size:.78rem;font-weight:900}.coupon-card h3{margin:10px 0 6px;font-size:1.35rem}.coupon-card p{color:rgba(255,255,255,.72);line-height:1.6}.coupon-card button{position:relative;z-index:1;min-width:108px;padding:12px 16px;border-radius:999px;background:#fff;color:#17201a;font-weight:950;box-shadow:0 12px 24px rgba(0,0,0,.15);transition:.2s ease}.coupon-card button:hover:not(:disabled){transform:translateY(-2px)}.coupon-card button:disabled{opacity:.72;cursor:not-allowed}.coupon-card.is-rolling{animation:couponShake .16s ease infinite alternate}.coupon-card.is-won{background:linear-gradient(135deg,#ff7a3d,#f59e0b)}@keyframes couponShake{from{transform:translateX(-2px) rotate(-.4deg)}to{transform:translateX(2px) rotate(.4deg)}}
.payment-summary{display:grid;gap:12px;padding:18px;border-radius:24px;background:var(--glass-bg);border:1px solid var(--line)}.payment-summary div{display:flex;align-items:center;justify-content:space-between;color:var(--muted)}.payment-summary strong{color:var(--text)}.discount-row strong{color:var(--accent)}.payable-row{padding-top:12px;border-top:1px solid var(--line);font-size:1.18rem}.payable-row strong{font-size:1.7rem;color:var(--primary-dark)}.checkout-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:auto}.checkout-actions button{width:100%}
.success-overlay{position:fixed;inset:0;z-index:300;display:grid;place-items:center;background:rgba(15,23,18,.54);backdrop-filter:blur(12px);opacity:0;pointer-events:none;transition:.28s ease}.success-overlay.show{opacity:1;pointer-events:auto}.success-card{position:relative;z-index:2;width:min(420px,calc(100% - 36px));padding:34px;text-align:center;border-radius:32px;background:var(--surface-alt);box-shadow:var(--shadow);transform:translateY(22px) scale(.96);transition:.3s ease}.success-overlay.show .success-card{transform:none}.success-icon{font-size:4rem;margin-bottom:10px}.success-card h2{font-size:2.4rem;letter-spacing:-.06em;color:var(--text)}.success-card p{color:var(--muted);margin:10px 0 22px}.success-card button{padding:13px 20px;border-radius:999px;background:linear-gradient(135deg,var(--primary),#16a34a);color:#fff;font-weight:950;box-shadow:0 14px 28px rgba(34,197,94,.26)}.confetti-layer{position:absolute;inset:0;overflow:hidden}.confetti-piece{position:absolute;top:-18px;width:10px;height:18px;border-radius:3px;animation:confettiFall linear forwards}.confetti-piece:nth-child(3n){width:8px;height:8px;border-radius:50%}.confetti-piece:nth-child(4n){width:14px;height:7px}@keyframes confettiFall{to{transform:translate(var(--drift),110vh) rotate(var(--rotate));opacity:.1}}
@media(max-width:900px){.checkout-stage{grid-template-columns:1fr}.basket-showcase{min-height:auto}.checkout-actions{grid-template-columns:1fr}}
@media(max-width:560px){.basket-scene{height:300px}.basket{transform:translateX(calc(-50% + var(--shake-x, 0px))) scale(.86);bottom:38px}.coupon-card{align-items:flex-start;flex-direction:column}.coupon-card button{width:100%}.checkout-panel,.basket-showcase{padding:22px}}

/* 订单历史、实用收藏夹和主页呼吸感优化 */
.hero{gap:32px;align-items:center}.hero-copy{padding:clamp(34px,5vw,64px)}.hero h1{max-width:720px;font-size:clamp(2.45rem,5.8vw,4.85rem);line-height:1.06;letter-spacing:-.055em;margin:24px 0 20px}.hero p{max-width:620px;line-height:1.9;font-size:1.06rem}.hero-actions{margin-top:32px}.stats{gap:14px;margin-top:38px}.deal-card{padding:30px;min-height:390px}.deal-card h2{line-height:1.25;letter-spacing:-.04em}.page-main{padding-bottom:72px}.controls-panel{margin:18px 0 28px;padding:20px}.content-grid{gap:30px}.fruit-list{gap:24px}.fruit-item{min-height:300px;padding:21px}.cart{padding:24px}.site-header{padding-bottom:44px}
.favorite-filter-btn{background:var(--accent-soft)!important;color:#c05621!important;border-color:rgba(255,122,61,.22)!important}.favorite-filter-btn.active{background:var(--accent)!important;color:#fff!important}.favorite-btn{font-size:1.25rem}.favorite-btn.is-active{background:var(--warning-soft)!important;color:var(--danger)!important;border-color:rgba(239,68,68,.20)!important}.favorite-pulse{animation:favoritePulse .26s ease}@keyframes favoritePulse{50%{transform:scale(1.18)}}.favorite-summary{display:flex;align-items:baseline;gap:7px;padding:10px 12px;margin:4px 0 8px;border-radius:16px;background:var(--surface-soft);color:var(--muted)}.favorite-summary strong{font-size:1.45rem;color:var(--accent)}.favorite-empty{padding:8px 12px;color:var(--muted);line-height:1.6}.favorite-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;margin:8px 0}.favorite-jump{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:9px;text-align:left;padding:10px;border-radius:16px;background:var(--surface-alt);color:var(--text);border:1px solid var(--line)}.favorite-jump span{grid-row:1/3;font-size:1.45rem}.favorite-jump b{font-size:.95rem}.favorite-jump small{color:var(--muted)}.favorite-jump:hover{background:var(--surface-soft)}.favorite-add{padding:10px 11px;border-radius:14px;background:linear-gradient(135deg,var(--primary),#16a34a);color:#fff;font-weight:900}.favorite-tools{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:12px}.favorite-tools button{padding:10px;border-radius:14px;font-weight:900}.favorite-tools button:first-child{background:var(--text);color:var(--bg)}.favorite-tools button:last-child{background:var(--surface-muted);color:var(--muted)}
.history-page{min-height:100vh;background:var(--page-gradient)}.history-shell{width:min(980px,calc(100% - 36px));margin:20px auto 70px}.history-hero{padding:30px;border-radius:32px;background:var(--glass-bg);border:1px solid var(--glass-border);box-shadow:var(--shadow-soft);backdrop-filter:blur(18px);margin-bottom:22px}.history-hero h2{font-size:clamp(2rem,5vw,3.8rem);letter-spacing:-.07em;margin:14px 0 8px}.history-hero p{color:var(--muted);line-height:1.8}.history-list{display:grid;gap:16px}.history-order-card{padding:20px;border-radius:28px;background:var(--surface-alt);border:1px solid var(--line);box-shadow:0 16px 35px rgba(48,71,45,.09)}.history-order-top,.history-order-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.history-order-top h2{font-size:1.55rem;margin:8px 0 4px}.history-order-top p{color:var(--muted)}.order-status{padding:9px 12px;border-radius:999px;background:rgba(34,197,94,.18);color:var(--primary-dark);font-weight:950}
.order-status-shipped{padding:9px 12px;border-radius:999px;background:rgba(56,189,248,.18);color:#0369a1;font-weight:950}
.order-status-cancelled{padding:9px 12px;border-radius:999px;background:rgba(239,68,68,.16);color:var(--danger-dark);font-weight:950}
.history-items{margin:18px 0;padding:15px;border-radius:20px;background:var(--surface-soft);color:var(--muted);line-height:1.9}.history-order-bottom strong{font-size:1.35rem;color:var(--primary-dark)}.history-discount{color:var(--accent);font-weight:900}.history-empty{text-align:center;padding:44px;border-radius:32px;background:var(--glass-bg);border:1px solid var(--glass-border);box-shadow:var(--shadow-soft)}.history-empty div{font-size:4rem}.history-empty h2{font-size:2rem;margin:12px 0}.history-empty p{color:var(--muted);line-height:1.8;margin-bottom:20px}.history-empty button{padding:13px 20px;border-radius:999px;background:linear-gradient(135deg,var(--primary),#16a34a);color:#fff;font-weight:950;box-shadow:0 14px 28px rgba(34,197,94,.26)}
@media(max-width:920px){.hero{gap:24px}.deal-card{min-height:300px}.hero h1{font-size:clamp(2.35rem,9vw,4.1rem)}}
@media(max-width:640px){.history-hero{padding:20px;border-radius:22px}.history-hero h2{font-size:1.8rem;letter-spacing:-.03em;margin:10px 0 6px}.history-hero p{font-size:.92rem}}
@media(max-width:560px){.hero-copy{padding:28px}.hero h1{letter-spacing:-.045em}.controls-panel{margin-top:6px}.fruit-list{gap:16px}.favorite-row{grid-template-columns:1fr}.favorite-add{width:100%}}

/* 注册/登录切换链接 */
.auth-switch{margin-top:16px;text-align:center;color:var(--muted);font-size:.92rem}
.auth-switch a{color:var(--primary-dark);font-weight:900}
.auth-switch a:hover{text-decoration:underline}

.admin-login-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  opacity: 0.7;
  transition: all 0.3s ease;
  background: var(--glass-bg);
  backdrop-filter: blur(4px);
}
.admin-login-btn:hover {
  opacity: 1;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}
.fixed-theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.fixed-theme-toggle:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.login-corner-actions{
  position:absolute;
  top:1.5rem;
  right:1.5rem;
  display:flex;
  align-items:center;
  gap:8px;
}
.login-corner-actions .admin-login-btn{position:static;top:auto;right:auto}
.login-theme-toggle{padding:8px 12px}
@media(max-width:560px){
  .login-corner-actions{position:static;justify-content:flex-end;margin-bottom:12px}
}

/* 购物车：清空入口（固定尺寸图标，不挤压标题）与数量步进器 */
.cart-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}
.cart-head h2{margin-bottom:0;white-space:nowrap}
.cart-head .cart-clear-icon{
  flex:none;padding:4px 12px;margin:0;height:32px;
  min-width:60px!important; width:auto!important;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  color:rgba(255,255,255,.8);
  font-size:.85rem;font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;
  transition:.2s ease;cursor:pointer;
}
.cart-head .cart-clear-icon::after {
    content: "清空";
}
.cart-head .cart-clear-icon:hover{background:rgba(255,255,255,.20);color:#fff}
.cart-head .cart-clear-icon:hover{background:rgba(255,255,255,.20);color:rgba(255,255,255,.9)}
.cart-line{display:flex;align-items:center;justify-content:space-between;gap:10px}
.cart-line-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cart-line-price{min-width:64px;text-align:right}

.qty-stepper{display:inline-flex;align-items:center;gap:8px}
.qty-stepper-sm{gap:6px}
.qty-btn{padding:0;width:22px;height:22px;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:.85rem;line-height:1;display:grid;place-items:center;transition:.2s ease}
.qty-btn:hover{background:rgba(255,255,255,.26)}
.qty-value{min-width:16px;text-align:center;font-weight:800;font-size:.9rem}

/* 结算页：商品行删除与数量步进器 */
.checkout-panel-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.checkout-clear-link{
  padding:6px 14px;
  background:rgba(34,197,94,.1);
  color:var(--primary-dark);
  font-weight:700;
  font-size:.8rem;
  border-radius:999px;
  transition:.2s ease;
}
.checkout-clear-link:hover{
  background:var(--primary);
  color:#fff;
}
/* 结算页 .qty-btn / .qty-stepper / .qty-value 的完整定义见上方"订单明细单行样式"区块，均已限定在 .checkout-item 作用域内，与此处购物车侧边栏样式互不干扰 */
.checkout-item-remove{padding:0;width:28px;height:28px;border-radius:50%;background:var(--surface-muted);color:var(--muted);display:grid;place-items:center;font-size:.8rem;transition:.2s ease}
.checkout-item-remove:hover{background:var(--danger);color:#fff}

/* 收货地址：折叠摘要卡片（风格与优惠券卡对齐）+ 展开后的地址簿面板 */
.address-card{border-radius:28px;background:var(--dark-card-bg);color:#fff;overflow:hidden}
.address-summary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px}
.address-summary h3{margin:10px 0 6px;font-size:1.2rem}
.address-summary p{color:rgba(255,255,255,.72);line-height:1.5;font-size:.9rem}
.address-summary button{min-width:76px;padding:10px 14px;border-radius:999px;background:#fff;color:#17201a;font-weight:950;transition:.2s ease}
.address-summary button:hover{transform:translateY(-2px)}

.address-panel{padding:0 20px 20px;border-top:1px solid rgba(255,255,255,.12)}
.address-list{list-style:none;display:grid;gap:8px;margin:16px 0}
.address-list-empty{color:rgba(255,255,255,.6);font-size:.88rem;padding:6px 2px}
.address-list-item{display:flex;align-items:stretch;gap:8px}
.address-list-pick{flex:1;text-align:left;padding:11px 14px;border-radius:16px;background:rgba(255,255,255,.08);color:#fff;transition:.2s ease}
.address-list-pick:hover{background:rgba(255,255,255,.16)}
.address-list-pick strong{display:block;font-size:.92rem}
.address-list-pick span{display:block;color:rgba(255,255,255,.65);font-size:.8rem;margin:2px 0}
.address-list-pick small{display:block;color:rgba(255,255,255,.55);font-size:.78rem;line-height:1.4}
.address-list-item.is-selected .address-list-pick{background:rgba(34,197,94,.24);border:1px solid rgba(34,197,94,.5)}
.address-list-delete{padding:0 14px;border-radius:16px;background:rgba(255,255,255,.06);color:rgba(255,255,255,.55);font-size:.8rem;font-weight:700;transition:.2s ease}
.address-list-delete:hover{background:rgba(239,68,68,.7);color:#fff}
.address-list-edit{padding:0 14px;border-radius:16px;background:rgba(255,255,255,.06);color:rgba(255,255,255,.72);font-size:.8rem;font-weight:700;transition:.2s ease}
.address-list-edit:hover{background:rgba(255,255,255,.18);color:#fff}

.new-address-form{display:grid;gap:8px;padding-top:14px;border-top:1px solid rgba(255,255,255,.10)}
.new-address-form input,.new-address-form textarea{
  width:100%;border:1px solid rgba(255,255,255,.16);border-radius:14px;padding:9px 13px;
  background:rgba(255,255,255,.08);color:#fff;outline:none;font:inherit;font-size:.88rem;resize:vertical;transition:.2s ease;
}
.new-address-form input::placeholder,.new-address-form textarea::placeholder{color:rgba(255,255,255,.42)}
.new-address-form input:focus,.new-address-form textarea:focus{border-color:rgba(34,197,94,.65);background:rgba(255,255,255,.12)}
.address-form-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:2px}
.address-form-actions button{margin-top:0;padding:11px;border-radius:999px;font-weight:950}
.address-form-actions button[type="submit"]{background:linear-gradient(135deg,var(--primary),#16a34a);color:#fff}
.address-form-actions button#cancelEditAddrBtn{background:rgba(255,255,255,.08);color:rgba(255,255,255,.72)}
.address-form-actions button#cancelEditAddrBtn:hover{background:rgba(255,255,255,.16);color:#fff}

/* 我的资料弹窗表单：跟随主题的浅/深两套配色，独立于结算页地址卡（后者固定深色） */
.profile-form input,.profile-form textarea{
  width:100%;border:1px solid var(--line);border-radius:14px;padding:9px 13px;background:var(--input-bg);color:var(--text);
  outline:none;font:inherit;font-size:.92rem;resize:vertical;transition:.2s ease;
}
.profile-form input:focus,.profile-form textarea:focus{border-color:rgba(34,197,94,.65);box-shadow:0 0 0 4px rgba(34,197,94,.10)}
.profile-form{display:grid;gap:8px;margin-top:14px}
.profile-form label{font-weight:900;font-size:.82rem;color:var(--muted)}
.profile-form button{margin-top:4px;padding:12px;border-radius:999px;background:linear-gradient(135deg,var(--primary),#16a34a);color:#fff;font-weight:950}
.profile-msg{min-height:1.2em;color:var(--primary-dark);font-weight:800;font-size:.84rem}
.profile-msg.is-error{color:var(--danger)}

.profile-address-list{list-style:none;display:grid;gap:8px;margin:14px 0}
.profile-address-empty{color:var(--muted);font-size:.88rem;padding:6px 2px}
.profile-address-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-radius:16px;background:var(--surface-soft);border:1px solid var(--line)}
.profile-address-item.is-default{border-color:rgba(34,197,94,.4);background:rgba(34,197,94,.08)}
.profile-address-info strong{display:flex;align-items:center;gap:6px;font-size:.94rem}
.profile-address-info span{display:block;color:var(--muted);font-size:.82rem;margin:2px 0}
.profile-address-info small{display:block;color:var(--muted);font-size:.78rem;line-height:1.4}
.default-tag{padding:2px 8px;border-radius:999px;background:var(--primary);color:#fff;font-size:.68rem;font-weight:900}
html.dark-mode .default-tag{background:var(--primary-dark);color:#fff}
.profile-address-actions{display:flex;flex-direction:column;gap:6px;flex:none}
.profile-address-actions button{padding:6px 10px;border-radius:12px;background:var(--surface-alt);border:1px solid var(--line);color:var(--muted);font-size:.76rem;font-weight:800;white-space:nowrap;transition:.2s ease}
.profile-address-actions .set-default-btn:hover{background:var(--primary);border-color:var(--primary);color:#fff}
.profile-address-actions .edit-addr-btn:hover{background:var(--text);border-color:var(--text);color:var(--bg)}
.profile-address-actions .delete-addr-btn:hover{background:var(--danger);border-color:var(--danger);color:#fff}
.profile-form-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:4px}
.profile-form-actions button{margin-top:0;padding:12px;border-radius:999px;font-weight:950}
.profile-form-actions button[type="submit"]{background:linear-gradient(135deg,var(--primary),#16a34a);color:#fff}
.profile-form-actions button#profileCancelEditBtn{background:var(--surface-muted);color:var(--muted)}
.profile-form-actions button#profileCancelEditBtn:hover{background:var(--line);color:var(--text)}

/* 里世界 Matrix 遮罩层 */
.matrix-overlay{position:fixed;inset:0;z-index:9999;background:#000;display:none;flex-direction:column;align-items:center;justify-content:center;opacity:0;transition:opacity .25s ease}
.matrix-overlay.active{display:flex;opacity:1}
#matrixCanvas{position:absolute;inset:0;width:100%;height:100%}
body.shadow-mode{overflow:hidden}

/* 黑客终端 */
.hacker-terminal{position:relative;z-index:2;width:min(680px,92vw);max-height:70vh;display:flex;flex-direction:column;border-radius:14px;background:rgba(6,14,8,.92);border:1px solid #1f5f36;box-shadow:0 0 60px rgba(34,224,122,.25),0 30px 70px rgba(0,0,0,.6);overflow:hidden;font-family:"Courier New",monospace}
.terminal-titlebar{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#0d1a10;border-bottom:1px solid #1f5f36}
.dot{width:11px;height:11px;border-radius:50%;display:inline-block}
.dot-r{background:#ff5f56}.dot-y{background:#ffbd2e}.dot-g{background:#27c93f}
.terminal-title{margin-left:8px;color:#3ddc84;font-size:.82rem;letter-spacing:.02em}
.terminal-output{flex:1;overflow-y:auto;padding:14px 16px;color:#22e07a;font-size:.88rem;line-height:1.7;white-space:pre-wrap;min-height:180px;max-height:42vh}
.terminal-line{opacity:0;animation:terminalLineIn .18s ease forwards}
@keyframes terminalLineIn{to{opacity:1}}
.terminal-echo{color:#7ef7b0}
.terminal-boot{color:#ffbd2e}
.terminal-success{color:#22e07a;font-weight:700}
.terminal-warning{color:#ffbd2e}
.terminal-error{color:#ff6b6b}
.terminal-inputline{display:flex;align-items:center;gap:8px;padding:12px 16px;border-top:1px solid #1f5f36;background:#0d1a10}
.terminal-prompt{color:#22e07a;font-weight:900}
#terminalInput{flex:1;background:transparent;border:0;outline:none;color:#eafff2;font-family:"Courier New",monospace;font-size:.92rem}
#terminalInput::placeholder{color:#3a6b4d}

/* 里世界暗网商品 */
.shadow-goods-grid{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;margin-top:10px}
.shadow-goods-grid.shadow-pulse .shadow-item{animation:shadowPulse .5s ease}
@keyframes shadowPulse{0%{box-shadow:0 0 0 rgba(34,224,122,0)}30%{box-shadow:0 0 32px rgba(34,224,122,.55)}100%{box-shadow:0 14px 30px rgba(0,0,0,.35)}}
.shadow-item{position:relative;padding:20px;border-radius:20px;background:#0d1a10;border:1px solid #1f5f36;color:#eafff2;box-shadow:0 14px 30px rgba(0,0,0,.35)}
.shadow-badge{display:inline-block;padding:5px 10px;border-radius:999px;background:rgba(34,224,122,.16);color:#22e07a;font-size:.74rem;font-weight:900;margin-bottom:10px}
.shadow-item h3{font-size:1.08rem;margin-bottom:6px;color:#eafff2}
.shadow-desc{color:#8fbfa0;font-size:.86rem;line-height:1.6;margin-bottom:12px}
.shadow-price{font-size:1.3rem;font-weight:900;color:#22e07a;margin-bottom:12px}
.shadow-buy-btn{width:100%;padding:10px;border-radius:12px;background:linear-gradient(135deg,#1f5f36,#22e07a);color:#04170c;font-weight:950}
.shadow-buy-btn:hover{filter:brightness(1.08)}

@media(max-width:640px){.hacker-terminal{width:94vw}.terminal-output{min-height:140px}}


/* 优化字体间距和布局
   注意：这是 .fruit-item 的第二份定义，CSS 层叠规则下会覆盖前面 content-grid 区块里
   已经变量化的版本，因此这里同样要用变量，否则深色模式会被这份写死的浅色覆盖回去。 */
.fruit-item {
  position:relative;
  min-height:300px;
  padding:24px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  border-radius:28px;
  background:var(--glass-bg-strong);
  border:none;
  box-shadow:0 16px 35px rgba(48,71,45,.10);
  overflow:hidden;
  opacity:0;
  transform:translateY(18px);
  animation:fadeInUp .55s ease forwards;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}
.fruit-item h3 {
  position:relative;
  z-index:1;
  font-size:1.35rem;
  margin-bottom:12px;
  cursor:pointer;
  letter-spacing:-.03em;
}
.fruit-item p {
  position:relative;
  z-index:1;
  color:var(--muted);
  margin-bottom:24px;
  font-size: 1.05rem;
}
.fruit-actions {
  position:relative;
  z-index:1;
  margin-top:auto;
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
}

/* Dark Mode Toggle (Updated) */
.dark-mode-toggle {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    border: 1px solid var(--line);
    transition: .2s ease;
}
.dark-mode-toggle:hover { background: var(--surface-alt); color: var(--text); }

/* 评论区滚动优化 */
.comments-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}
.comment-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-header { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.95rem; color: var(--muted); }
.comment-body { font-size: 1.05rem; color: var(--text); line-height: 1.7; margin-bottom: 10px; }
.btn-delete-comment {
    background: #f87171;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.btn-delete-comment:hover { background: var(--danger); }

/* 评论列表与表单（原本由 script.js 动态注入且写死浅色，现迁移到此处并改用变量） */
.comment-list { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 15px; }
.comment-meta-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.comment-time { font-size: 0.8rem; color: var(--muted); }
.comment-empty { color: var(--muted); text-align: center; padding: 12px 0; }
.comment-form { margin-top: 15px; padding: 15px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.comment-form .input-group { display: flex; gap: 5px; }
.comment-form select { padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--input-bg); color: var(--text); font: inherit; }
.comment-form textarea { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 4px; resize: vertical; background: var(--input-bg); color: var(--text); font: inherit; }
.comment-form button { align-self: flex-start; padding: 8px 15px; background: var(--text); color: var(--bg); border: none; border-radius: 4px; cursor: pointer; }

/* 商品详情弹窗内容区：有意覆盖前面 .modal-content 的尺寸相关属性（评论功能加入后需要更大的弹窗），
   background/box-shadow/border 沿用前面已变量化的定义，这里不重复声明，避免写死颜色 */
.modal-content {
    padding: 50px;
    border-radius: 24px;
    max-width: 550px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
#modalTitle { margin-bottom: 20px; }
#modalPrice { margin-bottom: 15px; font-size: 1.15rem; }

/* 水果名呼吸动画（原本内联注入，迁移到此处） */
@keyframes breathe {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.fruit-item h3 { transition: color 0.2s; animation: breathe 2s infinite; }
.fruit-item h3:hover { color: var(--primary-dark); }

/* 快捷菜单滚动条 */
#quickMenu::-webkit-scrollbar,
.comments-container::-webkit-scrollbar,
.terminal-output::-webkit-scrollbar { width: 6px; }
#quickMenu::-webkit-scrollbar-track,
.comments-container::-webkit-scrollbar-track,
.terminal-output::-webkit-scrollbar-track { background: rgba(128,128,128,0.10); }
#quickMenu::-webkit-scrollbar-thumb,
.comments-container::-webkit-scrollbar-thumb,
.terminal-output::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
#quickMenu::-webkit-scrollbar-thumb:hover,
.comments-container::-webkit-scrollbar-thumb:hover,
.terminal-output::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* 统一的轻提示 Toast：原先 script.js 与 history 页各自内联 style.cssText 写死深色块，
   现在统一走这个 class，跟随主题变量，也消除了两份重复代码。 */
.toast{
  position:fixed;
  bottom:20px;
  right:20px;
  padding:12px 22px;
  background:var(--dark-card-solid);
  color:#fff;
  border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,.25);
  z-index:9999;
  font-size:.92rem;
  font-weight:700;
  opacity:0;
  transform:translateY(10px);
  transition:opacity .2s ease, transform .2s ease;
  pointer-events:none;
  max-width:min(320px,calc(100vw - 40px));
}
/* 统一的轻提示 Toast：原先 script.js 与 history 页各自内联 style.cssText 写死深色块，
   现在统一走这个 class，跟随主题变量，也消除了两份重复代码。 */
.toast{
  position:fixed;
  bottom:20px;
  right:20px;
  padding:12px 22px;
  background:var(--dark-card-solid);
  color:#fff;
  border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,.25);
  z-index:9999;
  font-size:.92rem;
  font-weight:700;
  opacity:0;
  transform:translateY(10px);
  transition:opacity .2s ease, transform .2s ease;
  pointer-events:none;
  max-width:min(320px,calc(100vw - 40px));
}
.toast.is-visible{opacity:1;transform:translateY(0)}
@media(max-width:560px){.toast{left:20px;right:20px;max-width:none;text-align:center}}

.checkout-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  list-style: none; /* 去掉圆点 */
  text-align: center;
  color: var(--muted);
}
.checkout-empty span {
  font-size: 4rem;
  margin-bottom: 10px;
}
.checkout-empty strong {
  display: block;
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 5px;
}
.checkout-empty small {
  display: block;
  font-size: 1rem;
}

@media screen and (max-width: 768px) {
  /* 1. 打破原本的横向 Grid 和固定高度，改成上下两行 */
  .topbar {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    height: auto !important; /* 必须加，释放高度 */
    padding: 16px 20px;
    gap: 16px; /* 上下两行的间距 */
  }

  /* 2. 隐藏中间的电脑端菜单 */
  .nav-links {
    display: none !important;
  }

  /* 3. 把右侧操作区变成第二行，占满整行并靠右对齐 */
  .account-area {
    width: 100%;
    display: flex;
    justify-content: flex-end; /* 全部靠右 */
    align-items: center;
    gap: 12px;
  }

  /* 4. 终极防线：绝对不许换行！ */
  .brand,
  .account-pill,
  .logout-link {
    white-space: nowrap !important;
  }
}  

/* 优化订单备注框 */
.remark-card {
  margin-top: -10px;
  padding: 16px;
  border-radius: 24px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
}
.remark-card .coupon-label {
  font-size: 1.2rem;
}
.remark-card textarea {
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
  margin-top: 6px;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 100px;
}
.remark-card textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(34,197,94,.10);
}
