* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #f5f5f7;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}

#app {
    width: 100%;
    max-width: 414px;
    background-color: #faf7f2; 
    min-height: 100vh; 
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.04); 
    padding: 24px 0px 0px 0px; 
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* ================= 首页样式 ================= */
#home-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh; 
    position: relative;
    padding: 20px 20px 0px 20px; 
}

.home-header {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 24px;
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.brand-logo-box {
    width: 124px;
    height: 124px;
    aspect-ratio: 1 / 1; 
    border-radius: 50%;
    background-color: #f6ebd9;
    margin: 0 auto 12px auto;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 24px rgba(165, 155, 140, 0.12);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-logo-img { width: 100%; height: 100%; object-fit: cover; }

.heart-title { color: #ff9ab2; font-size: 13px; font-weight: 700; margin-bottom: 4px; letter-spacing: 0.5px; }
.main-title { font-size: 23px; color: #4a3e3d; font-weight: 800; letter-spacing: 0.5px; }
.subtitle { font-size: 13px; color: #9c8e8d; margin-top: 6px; font-weight: 600; }

.main-content { 
    width: 100%; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 84px; 
}

.card {
    border-radius: 24px; padding: 22px 20px; margin-bottom: 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; position: relative; box-shadow: 0 10px 25px rgba(165, 155, 140, 0.05);
    /* 引入带有稍微回弹感（弹性阻尼）的过渡曲线 */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}
.card:active { transform: scale(0.95) translateY(2px); }

.card-info { flex: 1; padding-right: 12px; }
.card-info h3 { font-size: 18px; font-weight: 800; margin-bottom: 5px; }
.card-desc { font-size: 11.5px; line-height: 1.4; font-weight: 600; opacity: 0.85; }
.card-sub-decor { font-size: 10px; opacity: 0.4; margin-top: 8px; letter-spacing: -1px; }

.card-avatar { width: 72px; height: 72px; aspect-ratio: 1 / 1; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.7); overflow: hidden; background-color: rgba(255, 255, 255, 0.4); flex-shrink: 0; }
.card-avatar img { width: 100%; height: 100%; object-fit: cover; }

.diner-card { background: linear-gradient(135deg, #ff9eb5 0%, #ffb6c1 100%); }
.diner-card h3, .diner-card .card-desc, .diner-card .card-sub-decor { color: #ffffff; }

.chef-card { background: linear-gradient(135deg, #f9cb65 0%, #fcdb8a 100%); }
.chef-card h3, .chef-card .card-desc, .chef-card .card-sub-decor { color: #524337; }

.home-footer-decor { position: absolute; bottom: 0; left: 0; width: 100%; height: 84px; z-index: 1; pointer-events: none; }
.home-footer-decor img { width: 100%; height: 100%; object-fit: cover; vertical-align: bottom; }


/* ================= 菜单页样式 ================= */
#diner-page { width: 100%; padding: 24px 16px 120px 16px; height: 100vh; display: flex; flex-direction: column; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-shrink: 0; }
.page-header h2 { font-size: 22px; color: #1a1a1a; font-weight: 800; }
.back-btn { border: none; background: none; font-size: 14px; color: #8a7e72; cursor: pointer; font-weight: 600; }
.blind-box-btn {
    border: none; background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: #fff; border-radius: 30px; font-size: 12px; font-weight: 600; padding: 8px 16px; cursor: pointer; box-shadow: 0 6px 20px rgba(245, 87, 108, 0.2);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.blind-box-btn:active { transform: scale(0.92); }

.category-bar { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-bottom: 20px; flex-shrink: 0; }

/* 🛠️ 交互微调 1：升级分类方块的点击弹性反馈 */
.category-item {
    padding: 7px 4px; background-color: #fff; border: 1px solid #f0edf6; border-radius: 14px; font-size: 11.5px; font-weight: 700; color: #5c554e; cursor: pointer; text-align: center; white-space: nowrap; box-shadow: 0 2px 6px rgba(165, 155, 140, 0.03); 
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1.2);
}
.category-item:active { transform: scale(0.92); }
.category-item.active { background: linear-gradient(135deg, #2b241e 0%, #1a1512 100%); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(43, 36, 30, 0.15); }

.scroll-view-container { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.scroll-view-container::-webkit-scrollbar { display: none; }

.waterfall-wrapper { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 100px; }

/* 🛠️ 交互微调 2：菜品列表渲染进入动效（流畅淡入淡出） */
.waterfall-col { 
    flex: 1; display: flex; flex-direction: column; gap: 14px; 
    animation: listFadeUp 0.45s cubic-bezier(0.25, 1, 0.5, 1) both;
}
@keyframes listFadeUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 菜品卡片衬底与流光 */
.dish-card {
    border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; position: relative; cursor: pointer; padding: 3.5px; box-shadow: 0 4px 12px rgba(165, 155, 140, 0.06); 
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}
.dish-card.meat-bg { background: linear-gradient(180deg, #ffffff 55%, #fff5f5 100%) !important; }
.dish-card.veg-bg { background: linear-gradient(180deg, #ffffff 55%, #f4fbf4 100%) !important; }
.dish-card.soup-bg { background: linear-gradient(180deg, #ffffff 55%, #f3f9fe 100%) !important; }

.dish-card::before { 
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 20px; padding: 3.5px; background: linear-gradient(135deg, #ff007f, #7f00ff, #00f0ff, #ff007f); background-size: 300% 300%; -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; z-index: 2; animation: gradientFlow 3s linear infinite; transition: opacity 0.25s ease-in-out; 
}
.dish-card:hover::before, .dish-card:active::before { opacity: 1; }
/* 按压下沉压感 */
.dish-card:active { transform: scale(0.95) translateY(2px); box-shadow: 0 10px 20px rgba(127, 0, 255, 0.12); }

@keyframes gradientFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.dish-img-box { width: 100%; position: relative; background-color: #f5f5f7; border-radius: 17px; overflow: hidden; z-index: 1; }
.dish-img-box.h-low { height: 110px; }
.dish-img-box.h-mid { height: 140px; }
.dish-img-box.h-high { height: 170px; }
.dish-img-box img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s ease-in-out; }

.dish-detail { padding: 10px 6px 6px 6px; position: relative; z-index: 1; }
.dish-title { font-size: 14px; font-weight: 800; color: #1a1a1a; margin-bottom: 4px; }
.dish-desc { font-size: 10.5px; color: #9a8f86; line-height: 1.4; margin-bottom: 10px; }
.dish-footer { display: flex; justify-content: space-between; align-items: center; }
.dish-price { color: #ff3b30; font-weight: 800; font-size: 15px; }

/* 🛠️ 交互微调 3：加菜小加号按钮按压气泡光晕爆炸 */
.add-btn { 
    border: none; background: linear-gradient(135deg, #ff9f0a 0%, #ff3b30 100%); color: white; width: 24px; height: 24px; border-radius: 50%; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.add-btn:active { 
    transform: scale(0.75); 
    box-shadow: 0 0 14px rgba(255, 59, 48, 0.8);
}

/* 固定底部购物车 */
.cart-bar { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 382px; height: 54px; background-color: rgba(26, 21, 18, 0.88); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-radius: 30px; display: flex; justify-content: space-between; align-items: center; padding: 0 8px 0 20px; color: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15); border: 1px solid rgba(255, 255, 255, 0.08); z-index: 99; transition: transform 0.3s ease; }
/* 购物车点击反馈动效：果冻晃动 */
.cart-bar:active { animation: jellyShake 0.4s ease; }
@keyframes jellyShake {
    0% { transform: translateX(-50%) scale(1); }
    30% { transform: translateX(-50%) scaleX(1.05) scaleY(0.95); }
    60% { transform: translateX(-50%) scaleX(0.95) scaleY(1.05); }
    100% { transform: translateX(-50%) scale(1); }
}
.submit-order-btn { background: linear-gradient(135deg, #ff9f0a 0%, #ff3b30 100%); border: none; color: #fff; padding: 8px 20px; border-radius: 24px; font-size: 13px; font-weight: 700; cursor: pointer; }
.submit-order-btn:active { transform: scale(0.95); }


/* ================= 大厨端后厨看板样式 ================= */
#chef-page { width: 100%; padding: 24px 16px; height: 100vh; display: flex; flex-direction: column; }

/* 🛠️ 交互微调 4：大厨账本展开的卷轴仪式感（Unroll） */
.chef-bill-board {
    background-color: #fff; border: 2px dashed #d9cfc1; border-radius: 20px; padding: 20px; margin-top: 10px; box-shadow: 0 8px 24px rgba(165, 155, 140, 0.04); flex: 1; display: flex; flex-direction: column;
    transform-origin: top center;
    animation: billUnroll 0.5s cubic-bezier(0.25, 1, 0.5, 1) both;
}
@keyframes billUnroll {
    0% { transform: scaleY(0); opacity: 0; }
    100% { transform: scaleY(1); opacity: 1; }
}

.bill-title { font-size: 16px; font-weight: 800; color: #4a3e3d; padding-bottom: 12px; border-bottom: 1px dashed #eee; margin-bottom: 14px; }
.bill-list-content { flex: 1; overflow-y: auto; }
.bill-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed #f5f5f7; font-size: 14px; font-weight: 600; color: #5c554e; }
.bill-item-price { color: #ff3b30; font-weight: 700; }
.bill-empty-tips { text-align: center; color: #bfaea8; font-size: 13px; margin-top: 40px; line-height: 1.6; }
.bill-summary { margin-top: 14px; padding-top: 14px; border-top: 2px dashed #eee; font-size: 14px; font-weight: 800; color: #4a3e3d; line-height: 1.8; }
.bill-summary span { color: #ff3b30; }

/* 详情面板 */
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.25); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: flex-end; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.overlay.active { opacity: 1; pointer-events: auto; }
.overlay-content { width: 100%; max-width: 414px; background-color: #fff; border-radius: 32px 32px 0 0; overflow: hidden; transform: translateY(100%); transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.overlay.active .overlay-content { transform: translateY(0); }
.overlay-img-box { width: 100%; height: 260px; background-color: #eee; }
.overlay-img-box img { width: 100%; height: 100%; object-fit: cover; }
.overlay-detail { padding: 24px; }
.overlay-detail h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; color: #1a1a1a; }
.overlay-detail p { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 24px; }
.overlay-footer { display: flex; justify-content: space-between; align-items: center; }
.modal-price { font-size: 24px; font-weight: 800; color: #ff3b30; }
.modal-add-btn { border: none; background: linear-gradient(135deg, #ff9f0a 0%, #ff3b30 100%); color: #fff; padding: 12px 28px; border-radius: 30px; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(255, 59, 48, 0.3); }