* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
}

.container {
    display: flex;
    min-height: 100vh;
    padding: 20px;
    gap: 20px;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar h2 {
    margin-bottom: 20px;
    color: #333;
}

.menu-item {
    margin-bottom: 15px;
}

.menu-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.menu-item ul {
    list-style: none;
    padding-left: 15px;
}

.menu-item li {
    padding: 8px 0;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.menu-item li:hover {
    color: #ff6b6b;
    background-color: #fff5f5;
    padding-left: 10px;
    border-radius: 5px;
    transform: translateX(3px);
}

.menu-item li.active {
    color: #ff6b6b;
    font-weight: bold;
    background-color: #fff5f5;
    padding-left: 10px;
    border-radius: 5px;
}

.reset-btn {
    width: 100%;
    padding: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

.reset-btn:hover {
    background: #ff5252;
    transform: translateY(-1px);
}

/* 手机壳样式 */
.phone-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-frame {
    width: 375px;
    height: 812px;
    background: #000;
    border-radius: 40px;
    padding: 10px;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background: #000;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 2;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.phone-home-button {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #333;
    border-radius: 2px;
}

/* 页面内容样式 */
.page-content {
    height: 100%;
    overflow-y: auto;
    padding-bottom: 80px;
    position: relative;
    
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* 隐藏Webkit浏览器的滚动条 */
.page-content::-webkit-scrollbar {
    display: none;
}

/* 同时隐藏其他可能出现滚动条的区域 */
.order-list, .cart-items, .product-grid {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.order-list::-webkit-scrollbar,
.cart-items::-webkit-scrollbar,
.product-grid::-webkit-scrollbar {
    display: none;
}

.page {
    padding: 0 0 20px 0;
    animation: fadeIn 0.3s ease-in-out;
}

/* 页面内容区域需要padding，除了有header的页面 */
.page:not(.home-page) {
    padding: 0 20px 20px 20px;
}

.home-page {
    padding: 0 20px 20px 20px;
}

/* 确保tab内容有适当的间距 */
.tab-container + .order-list {
    padding: 20px;
}

/* 修复订单页面的padding */
.order-list-page .order-list {
    background: transparent;
    padding: 20px;
    border-radius: 0;
}

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

.header {
    display: block;
}

.banner img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.category-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.3s;
}

.category-item:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.category-item img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 5px;
}

.category-item span {
    font-size: 12px;
    color: #666;
}

.product-list h2 {
    margin-bottom: 15px;
    font-size: 18px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.product-item {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.product-item img {
    width: 100%;
    border-radius: 5px;
    margin-bottom: 10px;
}

.product-item h3 {
    font-size: 14px;
    margin-bottom: 5px;
}

.price {
    color: #ff6b6b;
    font-weight: bold;
}

/* 商品详情页样式 */
.product-detail-page .product-images img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}

.product-info {
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.product-info h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.product-specs, .product-description {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.product-specs h4, .product-description h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.product-specs p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.product-description p {
    color: #666;
    line-height: 1.5;
}

.add-to-cart, .buy-now {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 16px;
}

.add-to-cart {
    background: #ff6b6b;
    color: white;
}

.buy-now {
    background: #ff4757;
    color: white;
}

/* 购物车页面样式 */
.cart-items {
    background: white;
    border-radius: 10px;
    padding: 15px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 80px;
    height: 80px;
    border-radius: 5px;
}

.item-info {
    flex: 1;
}

.quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.quantity button {
    width: 25px;
    height: 25px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.quantity button:hover {
    background-color: #ff6b6b;
    color: white;
    transform: scale(1.1);
}

.cart-footer {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.checkout {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* 订单确认页样式 */
.address-section, .payment-section {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.address-section {
    cursor: pointer;
    transition: background-color 0.3s;
}

.address-section:hover {
    background-color: #f8f9fa;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.payment-methods label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.payment-methods label:hover {
    background-color: #f8f9fa;
}

.order-footer {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.submit-order {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* 支付页面样式 */
.payment-info {
    text-align: center;
    padding: 20px;
}

.amount {
    font-size: 24px;
    color: #ff6b6b;
    margin: 20px 0;
}

.qr-code {
    margin: 20px 0;
    cursor: pointer;
    transition: transform 0.3s;
}

.qr-code:hover {
    transform: scale(1.05);
}

.payment-tip {
    color: #666;
    margin-bottom: 20px;
}

.payment-success {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

/* 订单列表页样式 */
.order-list {
    background: white;
    border-radius: 10px;
    padding: 15px;
}

.order-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.order-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 0 -10px;
    padding: 15px 10px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.order-status {
    color: #ff6b6b;
}

.order-content {
    display: flex;
    gap: 15px;
}

.order-content img {
    width: 80px;
    height: 80px;
    border-radius: 5px;
}

.order-time {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

/* 搜索栏样式 */
.search-bar {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: white;
}

.search-bar input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}

.search-btn {
    padding: 8px 15px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

/* 底部导航栏样式 */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 15px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 5px 0;
    color: #666;
    transition: color 0.3s;
}

.nav-item.active {
    color: #ff6b6b;
}

.nav-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    transform: scale(1.05);
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item span {
    font-size: 12px;
}

/* Banner样式 */
.banner {
    margin-bottom: 20px;
}

.banner-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

/* 顶部标题栏样式 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 15px 20px;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    min-height: 44px;
}

.back-btn {
    position: absolute;
    left: 20px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    font-weight: bold;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Tab切换样式 */
.tab-container {
    background: white;
    border-bottom: 1px solid #f0f0f0;
}

.tab-list {
    display: flex;
    padding: 0 20px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab-item.active {
    color: #ff6b6b;
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #ff6b6b;
    border-radius: 2px;
}

.tab-item:hover {
    background-color: #f8f9fa;
    border-radius: 5px;
}

/* 支付成功页面样式 */
.payment-success-page {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #52c41a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: white;
}

.success-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.success-amount {
    font-size: 32px;
    color: #52c41a;
    margin-bottom: 20px;
    font-weight: bold;
}

.success-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.success-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #666;
}

.success-info-item:last-child {
    margin-bottom: 0;
}

.success-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.btn-secondary {
    flex: 1;
    padding: 12px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.btn-primary {
    flex: 1;
    padding: 12px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

/* 按钮通用hover效果 */
.add-to-cart:hover, .buy-now:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.checkout:hover, .submit-order:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.payment-success:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary:hover, .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 搜索按钮hover效果 */
.search-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* 返回按钮hover效果 */
.back-btn:hover {
    background-color: #f0f0f0;
    border-radius: 50%;
    transform: scale(1.1);
}

/* 购物车数量按钮hover效果 */
.quantity button:hover {
    background-color: #ff6b6b;
    color: white;
    transform: scale(1.1);
}

/* 商品详情页特殊元素 */
.product-detail-page .product-images {
    cursor: pointer;
    transition: transform 0.3s;
}

.product-detail-page .product-images:hover {
    transform: scale(1.02);
}

/* 支付页面二维码 */
.qr-code {
    margin: 20px 0;
    cursor: pointer;
    transition: transform 0.3s;
}

.qr-code:hover {
    transform: scale(1.05);
} 