* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f7f8fa; color: #333; font-size: 14px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.page-wrap { padding-bottom: 60px; min-height: 100vh; }

/* 颜色变量 */
:root {
    --main-color: #d4af37;
    --main-gradient: linear-gradient(135deg, #d4af37, #f5d78e);
    --text-color: #333;
    --text-gray: #999;
    --border-color: #eee;
    --bg-white: #fff;
    --radius: 8px;
}

/* 底部导航 */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background: #fff; display: flex; border-top: 1px solid var(--border-color); z-index: 999; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-gray); font-size: 12px; }
.nav-item.active { color: var(--main-color); }
.nav-icon { font-size: 20px; margin-bottom: 2px; }

/* 统一搜索框 */
.ui-search { display: flex; align-items: center; gap: 8px; padding: 10px 15px; background: #fff; }
.search-clear { height: 36px; padding: 0 12px; border: 1px solid #ddd; border-radius: var(--radius); background: #f5f5f5; color: #666; font-size: 13px; cursor: pointer; }
.search-input { flex: 1; height: 36px; padding: 0 12px; border: 1px solid #ddd; border-radius: var(--radius); outline: none; font-size: 14px; }
.search-input:focus { border-color: var(--main-color); }
.search-btn { height: 36px; padding: 0 18px; border: none; border-radius: var(--radius); background: var(--main-gradient); color: #fff; font-size: 14px; cursor: pointer; }

/* 弹窗 */
.ui-popup { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; }
.popup-mask { position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.popup-box { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 85%; max-width: 400px; background: #fff; border-radius: 12px; padding: 20px; }
.popup-title { font-size: 16px; font-weight: bold; margin-bottom: 15px; text-align: center; }
.popup-close { position: absolute; top: 10px; right: 15px; font-size: 24px; color: #999; cursor: pointer; }

/* 商品卡片 */
.goods-list { display: flex; flex-wrap: wrap; padding: 10px; gap: 10px; }
.goods-card { width: calc(50% - 5px); background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.goods-img { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; }
.goods-img img { width: 100%; height: 100%; object-fit: cover; }
.play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; opacity: 0.8; }
.gift-tag { position: absolute; bottom: 8px; right: 8px; padding: 2px 6px; background: var(--main-gradient); color: #fff; font-size: 11px; border-radius: 4px; }
.goods-info { padding: 10px; }
.goods-title { font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 8px; }
.goods-bottom { display: flex; align-items: center; justify-content: space-between; }
.goods-price { color: var(--main-color); font-weight: bold; font-size: 15px; }
.goods-add-btn { width: 24px; height: 24px; border: none; border-radius: 50%; background: var(--main-gradient); color: #fff; font-size: 16px; line-height: 24px; cursor: pointer; }

/* 空状态 */
.ui-empty { padding: 60px 20px; text-align: center; color: var(--text-gray); }
.ui-empty img { width: 80px; margin: 0 auto 15px; opacity: 0.3; }

/* 首页轮播 */
.banner { width: 100%; height: 180px; overflow: hidden; }
.banner img { width: 100%; height: 100%; object-fit: cover; }

/* 公告条 */
.notice-bar { height: 36px; line-height: 36px; background: #fff9e6; color: #d4af37; padding: 0 15px; font-size: 13px; overflow: hidden; }
.notice-text { white-space: nowrap; animation: scroll 15s linear infinite; }
@keyframes scroll { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* 快捷按钮区 */
.quick-btn { display: flex; padding: 15px; background: #fff; gap: 10px; margin-bottom: 10px; }
.quick-btn a { flex: 1; height: 40px; line-height: 40px; text-align: center; border-radius: 20px; background: var(--main-gradient); color: #fff; font-size: 13px; }

/* 广告位 */
.ad-bar { display: flex; gap: 8px; padding: 0 15px 15px; overflow-x: auto; }
.ad-bar img { width: 120px; height: 80px; border-radius: var(--radius); flex-shrink: 0; }

/* 区块标题 */
.section-title { padding: 10px 15px; font-size: 15px; font-weight: bold; display: flex; align-items: center; justify-content: space-between; }
.section-title a { font-size: 12px; color: var(--text-gray); font-weight: normal; }

/* 个人中心 */
.user-header { padding: 30px 15px; background: var(--main-gradient); color: #fff; }
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 60px; height: 60px; border-radius: 50%; background: #fff; overflow: hidden; }
.user-name { font-size: 16px; font-weight: bold; margin-bottom: 4px; }
.user-card { font-size: 12px; opacity: 0.9; }
.user-stats { display: flex; margin-top: 20px; background: rgba(255,255,255,0.2); border-radius: var(--radius); padding: 12px 0; }
.stat-item { flex: 1; text-align: center; }
.stat-num { font-size: 18px; font-weight: bold; margin-bottom: 2px; }
.stat-label { font-size: 11px; opacity: 0.9; }

/* 宫格菜单 */
.menu-grid { display: flex; flex-wrap: wrap; background: #fff; margin: 10px 0; }
.menu-item { width: 25%; padding: 15px 0; text-align: center; font-size: 12px; color: #333; }
.menu-icon { font-size: 22px; margin-bottom: 5px; }

/* 列表通用 */
.list-item { padding: 12px 15px; background: #fff; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px; }
.list-item:last-child { border-bottom: none; }
.list-time { font-size: 12px; color: var(--text-gray); margin-left: auto; }

/* 按钮 */
.btn-main { display: block; width: 100%; height: 44px; line-height: 44px; text-align: center; border: none; border-radius: 22px; background: var(--main-gradient); color: #fff; font-size: 15px; cursor: pointer; }
.btn-line { display: block; width: 100%; height: 44px; line-height: 44px; text-align: center; border: 1px solid var(--main-color); border-radius: 22px; background: #fff; color: var(--main-color); font-size: 15px; cursor: pointer; }

/* 表单 */
.form-group { padding: 12px 15px; background: #fff; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; }
.form-label { width: 80px; color: #666; flex-shrink: 0; }
.form-input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; }

/* 后台样式 */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar { width: 200px; background: #2c3e50; color: #fff; flex-shrink: 0; }
.admin-logo { height: 60px; line-height: 60px; text-align: center; font-size: 16px; font-weight: bold; border-bottom: 1px solid #34495e; }
.admin-menu a { display: block; padding: 12px 20px; color: #bdc3c7; border-left: 3px solid transparent; }
.admin-menu a.active, .admin-menu a:hover { background: #34495e; color: #fff; border-left-color: var(--main-color); }
.admin-main { flex: 1; padding: 20px; background: #f5f6fa; }
.admin-header { height: 60px; background: #fff; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; margin: -20px -20px 20px; }
.admin-card { background: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 15px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 10px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 13px; }
.admin-table th { background: #f8f9fa; font-weight: normal; color: #666; }

/* 响应式适配 */
@media (max-width: 768px) {
    .admin-sidebar { width: 60px; }
    .admin-menu a { text-align: center; padding: 12px 0; font-size: 12px; }
    .admin-logo { font-size: 12px; }
}