
:root {
  --bg: #121018; --surface: #1c1a24; --surface-hover: #242230;
  --text: #eee6d4; --text-secondary: #b0a088; --border: #333046;
  --gold: #d4a853; --gold-light: #e8cc7a; --gold-dark: #b8922e;
  --amber: #f59e0b; --red: #e74c3c; --green: #27ae60; --blue: #5b9bd5; --purple: #9b7cf6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3); --shadow: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5); --radius: 16px; --radius-sm: 10px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input { font-family: inherit; outline: none; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #383448; border-radius: 3px; }

.header { position: sticky; top: 0; z-index: 100; background: rgba(18,16,24,0.88); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 0 24px; }
.header-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 700; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav-btn { padding: 8px 18px; border-radius: 24px; font-size: 0.9rem; font-weight: 500; transition: var(--transition); background: transparent; color: var(--text-secondary); }
.nav-btn:hover { background: var(--surface); color: var(--text); }
.nav-btn.primary { background: var(--gold); color: #1a1810; }
.nav-btn.primary:hover { background: var(--gold-light); }
.cart-badge { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.cart-count { background: var(--red); color: #fff; font-size: 0.7rem; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700; }

.hero { text-align: center; padding: 56px 24px 40px; }
.hero h1 { font-size: 2.6rem; font-weight: 800; background: linear-gradient(135deg, #e8cc7a, #d4a853, #b8922e); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 8px; }
.hero p { color: var(--text-secondary); font-size: 1.05rem; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px 80px; }

.categories { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; justify-content: center; }
.cat-chip { padding: 8px 20px; border-radius: 24px; font-size: 0.9rem; font-weight: 600; transition: var(--transition); background: var(--surface); border: 1px solid var(--border); color: #c0b090; cursor: pointer; }
.cat-chip:hover { border-color: var(--gold); color: var(--gold-light); }
.cat-chip.active { background: var(--gold); border-color: var(--gold); color: #1a1810; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.product-card { background: var(--surface); border-radius: var(--radius); padding: 0; box-shadow: var(--shadow-sm); transition: var(--transition); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.product-img { width: 100%; height: 180px; object-fit: cover; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 4rem; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-name { font-size: 1.05rem; font-weight: 700; color: #f0e8d4; }
.product-attrs { font-size: 0.82rem; color: #b8a890; background: var(--bg); padding: 6px 12px; border-radius: 8px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.product-price { font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.add-cart-btn { padding: 10px 20px; border-radius: 24px; font-size: 0.88rem; font-weight: 600; background: var(--gold); color: #1a1810; transition: var(--transition); }
.add-cart-btn:hover { background: var(--gold-light); transform: scale(1.04); }

.cart-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: var(--transition); }
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 201; width: 420px; max-width: 100vw; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); }
.cart-panel.open { transform: translateX(0); }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.cart-header h2 { font-size: 1.2rem; font-weight: 700; }
.cart-close { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; color: var(--text); }
.cart-close:hover { background: var(--red); color: #fff; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.cart-item { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--bg); border-radius: var(--radius-sm); }
.cart-item-emoji { font-size: 2rem; width: 48px; text-align: center; }
.cart-item-emoji img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 0.95rem; }
.cart-item-price { color: var(--text-secondary); font-size: 0.85rem; }
.cart-item-qty { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); font-size: 1rem; color: var(--text); display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { border-color: var(--gold); }
.cart-item-remove { color: var(--red); font-size: 0.8rem; cursor: pointer; padding: 4px 8px; border-radius: 12px; }
.cart-item-remove:hover { background: rgba(231,76,60,0.15); }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.cart-footer { padding: 16px 24px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 1.1rem; font-weight: 700; }
.cart-total-amount { color: var(--gold); font-size: 1.4rem; }
.checkout-btn { width: 100%; padding: 14px; border-radius: var(--radius-sm); background: var(--gold); color: #1a1810; font-size: 1rem; font-weight: 700; transition: var(--transition); }
.checkout-btn:hover { background: var(--gold-light); }
.checkout-btn:disabled { background: #333; color: #666; cursor: not-allowed; }
.pay-method-btn { flex: 1; padding: 12px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; transition: var(--transition); background: var(--bg); border: 2px solid var(--border); color: var(--text-secondary); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pay-method-btn.active { border-color: var(--gold); background: rgba(212,168,83,0.1); color: var(--gold); }

.modal-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: var(--transition); }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 32px; width: 420px; max-width: 90vw; box-shadow: var(--shadow-lg); max-height: 85vh; overflow-y: auto; border: 1px solid var(--border); }
.modal h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 24px; text-align: center; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input { width: 100%; padding: 11px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); font-size: 0.95rem; transition: var(--transition); background: var(--bg); color: var(--text); }
.form-group input:focus { border-color: var(--gold); }
.form-submit { width: 100%; padding: 12px; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 700; color: #1a1810; background: var(--gold); transition: var(--transition); margin-top: 8px; display: flex; align-items: center; justify-content: center; }
.form-submit:hover { background: var(--gold-light); }
.form-submit:disabled { background: #333; color: #666; }
.form-link { text-align: center; margin-top: 14px; font-size: 0.88rem; color: var(--text-secondary); }
.form-link a { color: var(--gold); font-weight: 600; cursor: pointer; }
.form-link a:hover { text-decoration: underline; }
.form-error { background: rgba(231,76,60,0.12); color: var(--red); padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 12px; display: none; }

.product-card { cursor: pointer; }
.product-card .add-cart-btn { position: relative; z-index: 2; }
.detail-img-wrap { width: 100%; height: 240px; background: var(--bg); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 5rem; margin-bottom: 16px; overflow: hidden; }
.detail-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.detail-price-big { font-size: 2rem; font-weight: 800; color: var(--gold); text-align: center; margin: 12px 0; }

.toast-container { position: fixed; top: 80px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 20px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; color: #fff; animation: toastIn 0.3s ease; box-shadow: var(--shadow); max-width: 360px; }
.toast.success { background: var(--green); } .toast.error { background: var(--red); } .toast.info { background: var(--blue); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

.user-bar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 24px; font-size: 0.85rem; color: var(--text-secondary); display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.user-bar strong { color: var(--text); }

@media (max-width: 768px) { .hero h1 { font-size: 1.8rem; } .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; } .cart-panel { width: 100%; } }


/* Evelyn Client 视觉层：保留商城 DOM、商品/订单数据与结算逻辑，仅替换呈现层。 */
:root{--bg:#070913;--surface:#0d162c;--surface-hover:#142342;--text:#edf4ff;--text-secondary:#8795b4;--border:rgba(126,157,219,.2);--gold:#55e5ff;--gold-light:#b5f5ff;--gold-dark:#2baac8;--amber:#a574ff;--purple:#a574ff;--green:#58e6ad;--shadow:0 18px 60px rgba(0,0,0,.28);--shadow-lg:0 24px 90px rgba(0,0,0,.48)}
body{background:radial-gradient(900px 600px at 80% -12%,rgba(96,83,255,.25),transparent 64%),radial-gradient(800px 560px at 0 28%,rgba(41,210,255,.12),transparent 64%),var(--bg);color:var(--text)}
.header{background:rgba(7,9,19,.78);border-bottom:1px solid var(--border);box-shadow:0 12px 40px rgba(0,0,0,.18)}
.header-inner{max-width:1240px;height:76px}.logo{letter-spacing:.14em;color:#fff}.logo:first-letter{color:var(--gold)}
.nav-btn{border:1px solid transparent;color:#aebddb;border-radius:10px}.nav-btn:hover{background:rgba(85,229,255,.08);color:#fff;border-color:rgba(85,229,255,.25)}.nav-btn.primary{background:linear-gradient(110deg,var(--gold),#b5f5ff);color:#05111b;box-shadow:0 0 25px rgba(85,229,255,.2)}
.hero{padding:68px 24px 44px}.hero h1{background:linear-gradient(110deg,#fff 18%,#c8d8ff 44%,var(--gold) 68%,var(--purple));-webkit-background-clip:text}.hero p{color:var(--text-secondary)}
.container{max-width:1240px}.categories{justify-content:flex-start}.cat-chip{background:rgba(14,25,50,.72);border-color:var(--border);color:#aebddb}.cat-chip:hover{border-color:rgba(85,229,255,.55);color:var(--gold-light)}.cat-chip.active{background:rgba(85,229,255,.16);border-color:var(--gold);color:var(--gold-light)}
.product-grid{gap:15px}.product-card{background:linear-gradient(140deg,rgba(17,28,55,.82),rgba(8,13,27,.72));border-color:var(--border);border-radius:17px;box-shadow:0 18px 60px rgba(0,0,0,.2)}.product-card:hover{border-color:rgba(85,229,255,.55);box-shadow:0 20px 65px rgba(0,0,0,.36)}.product-img{background:rgba(2,7,18,.7)}.product-name{color:#e8f1ff}.product-attrs{background:rgba(2,7,18,.55);color:#8fa2c6}.product-price,.detail-price-big,.cart-total-amount{color:var(--gold)}.add-cart-btn,.checkout-btn,.form-submit{background:linear-gradient(110deg,var(--gold),#b5f5ff);color:#05111b}.add-cart-btn:hover,.checkout-btn:hover,.form-submit:hover{background:var(--gold-light)}
.cart-panel,.modal{background:linear-gradient(145deg,rgba(17,28,55,.98),rgba(7,12,26,.98));border:1px solid var(--border);box-shadow:var(--shadow-lg)}.cart-item,.form-group input,.pay-method-btn{background:rgba(2,7,18,.58);border-color:var(--border)}.pay-method-btn.active{border-color:var(--gold);background:rgba(85,229,255,.1);color:var(--gold)}.form-group label{color:#9eb0d0}.form-link a{color:var(--gold)}.user-bar{background:rgba(13,22,44,.72);border-bottom-color:var(--border)}
.toast.success{background:var(--green);color:#061a13}.toast.info{background:#3d82d4}.toast.error{background:#e85d84}

