/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 背景装饰 */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.snow-flake {
    position: absolute;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    animation: snowfall 40s linear infinite;
    z-index: 100;
}

@keyframes snowfall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 50;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0;
    color: white;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 3rem;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.title-group {
    display: flex;
    flex-direction: column;
}

.main-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #fff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5)); }
    100% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)); }
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.page-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.page-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.page-info {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 主要内容区域 */
.main-content {
    padding: 1rem 0;
    position: relative;
    z-index: 20;
    min-height: calc(100vh - 120px);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* 加载状态 */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 滚动容器 */
.scroll-container {
    height: calc(100vh - 150px); /* 使用视窗高度减去头部高度 */
    overflow: hidden;
    position: relative;
    mask: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
}

/* 商品列表 - 无限滚动 */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    transition: none; /* 移除过渡效果，使用transform实现平滑滚动 */
}

/* 商品卡片 - 横向布局 */
.product-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 10;
    min-height: 100px;
    flex-shrink: 0; /* 防止卡片被压缩 */
}

@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.35);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.6);
    z-index: 15;
    transition: all 0.3s ease;
}

.product-card:hover .card-glow {
    opacity: 0.8;
}

/* 产品图片 - 横向布局 */
.product-image {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
}

/* 产品信息 - 横向布局 */
.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.product-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.product-feature {
    display: inline-block;
    background: linear-gradient(45deg, #e74c3c, #f39c12);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.product-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 3px 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffd700;
    margin-top: 5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.currency {
    font-size: 0.9rem;
}

/* 卡片发光效果 */
.card-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
    border-radius: 15px;
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: white;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* 进度条 */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 200;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* 删除不需要的样式 */

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        padding: 1rem 0;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 0.5rem 0;
    }
    
    .scroll-container {
        height: calc(100vh - 100px);
    }
    
    .product-card {
        padding: 12px;
        gap: 12px;
    }
    
    .product-image {
        width: 80px;
        height: 65px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-feature {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
    
    .product-description {
        font-size: 0.75rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
}

@media (min-width: 769px) {
    .scroll-container {
        height: calc(100vh - 150px);
    }
    
    .product-image {
        width: 120px;
        height: 95px;
    }
    
    .product-title {
        font-size: 1.3rem;
    }
    
    .product-feature {
        font-size: 0.85rem;
        padding: 4px 12px;
    }
    
    .product-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
    }
    
    .product-price {
        font-size: 1.4rem;
    }
    
    .product-card {
        padding: 20px;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem;
    }
    
    .scroll-container {
        height: calc(100vh - 80px);
    }
    
    .product-card {
        border-radius: 12px;
        padding: 10px;
    }
    
    .product-image {
        width: 70px;
        height: 55px;
    }
}