* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #f5f5f5;
    padding-bottom: 60px;
}

/* 顶部搜索栏 */
.header {
    background-color: #fff;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-bar {
    display: flex;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.search-bar button {
    padding: 10px 20px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

/* 轮播图 */
.carousel {
    margin: 10px;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    position: relative;
    overflow: hidden;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.indicator.active {
    background-color: white;
}

/* 分类导航 */
.category-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 10px;
    background-color: white;
    margin: 10px;
    border-radius: 10px;
}

.category-item {
    text-align: center;
    cursor: pointer;
}

.category-icon {
    width: 50px;
    height: 50px;
    background-color: #f0f0f0;
    border-radius: 50%;
    margin: 0 auto 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.category-name {
    font-size: 12px;
    color: #666;
}

/* 商品列表 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
}

.product-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 150px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.product-info {
    padding: 10px;
}

.product-name {
    font-size: 14px;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    color: #ff6b6b;
    font-size: 18px;
    font-weight: bold;
}

.add-to-cart {
    float: right;
    padding: 5px 15px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: flex;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-item.active {
    color: #ff6b6b;
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.nav-text {
    font-size: 12px;
}

/* 页面内容 */
.page {
    display: none;
    padding: 10px;
}

.page.active {
    display: block;
}

/* 购物车页面 */
.cart-page {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin: 10px;
    text-align: center;
    color: #999;
}

/* 个人中心页面 */
.user-info {
    background-color: white;
    padding: 20px;
    margin: 10px;
    border-radius: 10px;
    text-align: center;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background-color: #f0f0f0;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #999;
}

.menu-list {
    margin: 10px;
}

.menu-item {
    background-color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.menu-right {
    color: #999;
}

/* 用户登录覆盖层样式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    padding: 40px 10px 10px 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.5s ease;
}

.overlay.active .overlay-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    transition: color 0.3s ease;
}

.login-form {
    padding: 10px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.form-group label {
    flex: 0 0 20px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
}

.form-group i {
    margin-right: 10px;
    color: #4a6bff;
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.login-btn {
    width: 100%;
    padding: 10px;
    background: #4a6bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.signup-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.signup-link a {
    color: #4a6bff;
    text-decoration: none;
    font-weight: 500;
}