:root {
    --primary: #800020; /* 经典勃艮第红 */
    --primary-light: #a52a2a;
    --accent: #d4af37; /* 金色点缀 */
    --bg-faint: #f8f9fa;
    --bg-white: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #6c757d;
    --border-light: rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-blur: blur(10px);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-faint);
    margin: 0;
    padding-top: 60px;    
    padding-bottom: 70px; 
    color: var(--text-main);
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; transition: 0.2s ease; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- 1. App Header (毛玻璃效果) --- */
.app-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 60px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-light);
}

.header-title { 
    font-size: 18px; 
    font-weight: 800; 
    color: var(--primary); 
    letter-spacing: 0.5px;
    font-family: 'Playfair Display', serif;
}

.icon-btn { 
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px; 
    color: var(--text-main); 
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:active { background: rgba(0,0,0,0.05); }

/* --- 2. App Bottom Tabbar --- */
.app-tabbar {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 65px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 1000;
    display: flex; justify-content: space-around; align-items: center;
    border-top: 1px solid var(--border-light);
    padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #a0a0a0; font-size: 11px; flex: 1; height: 100%;
    position: relative;
    font-weight: 500;
}

.tab-item i { font-size: 20px; margin-bottom: 4px; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.tab-item.active { color: var(--primary); }
.tab-item.active i { transform: translateY(-3px) scale(1.1); }

.cart-badge {
    position: absolute; top: 10px; right: 25%;
    background: var(--primary); color: white;
    font-size: 10px; min-width: 16px; height: 16px; border-radius: 10px;
    display: flex; justify-content: center; align-items: center; padding: 0 4px;
    border: 2px solid #fff;
}

/* --- 3. Sidebar --- */
.sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); z-index: 2000;
    opacity: 0; visibility: hidden; transition: 0.3s;
    backdrop-filter: blur(4px);
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

.sidebar-panel {
    position: fixed; top: 0; left: -280px; width: 280px; height: 100%;
    background: #fff; z-index: 2001; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 20px 0 50px rgba(0,0,0,0.1);
}
.sidebar-panel.active { left: 0; }

.sidebar-head {
    height: 180px; background: var(--primary); color: white;
    display: flex; flex-direction: column; justify-content: flex-end; padding: 30px 25px;
    background-image: linear-gradient(45deg, var(--primary), var(--primary-light));
}

.sidebar-list a {
    display: flex; align-items: center; gap: 15px; padding: 16px 25px;
    border-bottom: 1px solid var(--bg-faint);
    font-size: 15px; font-weight: 500;
    transition: background 0.2s;
}
.sidebar-list a:active { background: var(--bg-faint); }
.sidebar-list i { width: 24px; font-size: 18px; color: var(--text-muted); }

/* --- Utility & Animations --- */
.container { padding: 20px; }
.section-title { 
    font-size: 18px; font-weight: 800; margin: 25px 0 15px; 
    display: flex; align-items: center; gap: 8px;
}
.section-title::before {
    content: ''; width: 4px; height: 18px; background: var(--primary); border-radius: 2px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.6s ease-out forwards; }

/* Toast Notification Styles */
#toast-container {
    position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; align-items: center;
    pointer-events: none;
}
.toast {
    background: rgba(0, 0, 0, 0.8); color: #fff; padding: 10px 20px;
    border-radius: 30px; margin-bottom: 10px; font-size: 14px;
    backdrop-filter: blur(5px); box-shadow: var(--shadow-md);
    animation: toastIn 0.3s ease-out forwards, toastOut 0.3s ease-in forwards 2.7s;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } }