﻿/* 轻奢极简 App 风格样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* 轻奢配色方案 */
    --primary-color: #1a1a1a;
    --secondary-color: #f5f5f5;
    --accent-color: #d4af37;
    --text-primary: #1a1a1a;
    --text-secondary: #8e8e93;
    --border-color: #e5e5ea;
    --background: #ffffff;
    --card-background: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html {
    width: 100%;
    height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    /* 移除position: fixed，允许正常滚动 */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    position: relative;
    touch-action: pan-y; /* 只允许垂直滚动 */
}

.container {
    max-width: 430px;
    width: 100%;
    margin: 0 auto;
    background: var(--background);
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px; /* 为底部导航栏留出空间 */
    box-shadow: 0 0 0 1px var(--border-color);
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* 顶部导航栏 - 已移除，用户信息移至欢迎横幅 */

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #c9a52d 100%);
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    padding: 4px;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #e8e8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 600;
    border: 1.5px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    overflow: hidden;
    padding: 6px;
}

.user-avatar svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* 内容区域 */
.content-area {
    padding: 20px 20px 24px;
}

/* 欢迎横幅 - 高端专业设计 */
.welcome-banner {
    background: linear-gradient(135deg, 
        #2c3e50 0%, 
        #34495e 25%,
        #2c3e50 50%,
        #1a252f 100%);
    border-radius: 20px;
    padding: 28px 24px 24px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 背景光效层 */
.welcome-banner::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, 
        rgba(212, 175, 55, 0.2) 0%, 
        rgba(212, 175, 55, 0.08) 40%,
        transparent 70%);
    border-radius: 50%;
    animation: pulseGlow 4s ease-in-out infinite;
}

/* 底部金色装饰线 */
.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(212, 175, 55, 0.4) 20%,
        rgba(212, 175, 55, 0.6) 50%,
        rgba(212, 175, 55, 0.4) 80%,
        transparent 100%);
    border-radius: 0 0 20px 20px;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.welcome-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.welcome-content {
    position: relative;
    z-index: 1;
    flex: 1;
}

.welcome-user-info {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    justify-content: center;
    flex-shrink: 0;
}

.welcome-user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(212, 175, 55, 0.15) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(212, 175, 55, 0.3);
    overflow: hidden;
    padding: 8px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.welcome-user-avatar::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 0.4) 0%, 
        transparent 50%,
        rgba(212, 175, 55, 0.2) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, 
                  linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
}

.welcome-user-avatar svg {
    width: 100%;
    height: 100%;
    stroke: #ffffff;
}

.welcome-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.welcome-user-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.98);
    font-weight: 600;
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    width: 100%;
    letter-spacing: 0.2px;
}

.welcome-title {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        rgba(255, 255, 255, 0.95) 50%,
        rgba(212, 175, 55, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.welcome-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(212, 175, 55, 0.8) 0%, 
        transparent 100%);
    border-radius: 2px;
}

.welcome-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.welcome-subtitle::before {
    content: '✦';
    color: rgba(212, 175, 55, 0.8);
    font-size: 12px;
}

.welcome-subtitle::after {
    content: '✦';
    color: rgba(212, 175, 55, 0.8);
    font-size: 12px;
}

.welcome-decoration {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, 
        rgba(212, 175, 55, 0.15) 0%, 
        rgba(212, 175, 55, 0.05) 50%,
        transparent 100%);
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(20px);
}

/* 数据统计卡片已移除 */

/* 交易步骤（整合到欢迎横幅内） */
.welcome-banner .steps-section {
    position: relative;
    z-index: 1;
    margin: 0;
    width: 100%;
}

.welcome-banner .steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    align-items: start; /* 🔥 确保所有卡片从顶部对齐 */
}

.step-item:nth-child(1) {
    animation-delay: 0.1s;
}

.step-item:nth-child(2) {
    animation-delay: 0.15s;
}

.step-item:nth-child(3) {
    animation-delay: 0.2s;
}

.step-item:nth-child(4) {
    animation-delay: 0.25s;
}

.step-item {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 6px 6px 6px; /* 🔥 调整padding，顶部12px，底部6px，确保图标位置一致 */
    text-align: center;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 欢迎横幅内的步骤卡片特殊样式 */
.welcome-banner .step-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.step-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-item:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.25);
}

.welcome-banner .step-item:active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.25),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.step-item:active::before,
.step-item:active::after {
    opacity: 1;
}

.step-number {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 9px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.welcome-banner .step-number {
    color: rgba(255, 255, 255, 0.6);
    opacity: 0.9;
}

.step-icon {
    width: 32px;
    height: 32px;
    min-height: 32px; /* 🔥 确保所有图标容器有相同的最小高度 */
    max-height: 32px; /* 🔥 确保所有图标容器有相同的最大高度 */
    margin-bottom: 8px;
    margin-top: 0; /* 🔥 移除上边距，使用padding统一控制 */
    display: flex; /* 🔥 使用flex而不是inline-flex，确保更好的对齐 */
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.95);
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    flex-shrink: 0; /* 🔥 防止图标被压缩 */
    position: relative; /* 🔥 使用相对定位，便于精确控制 */
    box-sizing: border-box; /* 🔥 确保padding和border包含在尺寸内 */
}

.step-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
    display: block; /* 🔥 确保SVG作为块级元素，避免基线对齐问题 */
    vertical-align: middle; /* 🔥 垂直居中对齐 */
}

.welcome-banner .step-icon {
    color: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.step-item:active .step-icon {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.welcome-banner .step-item:active .step-icon {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.step-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3px;
    margin-top: 0; /* 🔥 确保标题紧贴图标 */
    letter-spacing: -0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.2; /* 🔥 固定行高，确保一致性 */
}

.welcome-banner .step-title {
    color: rgba(255, 255, 255, 0.98);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.step-desc {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
    opacity: 1;
}

.welcome-banner .step-desc {
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 品牌故事已移除 */

/* 商品区域优化 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.section-link {
    font-size: 13px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-link .icon-wrapper {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.section-link .icon-wrapper svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.section-link:active {
    opacity: 0.7;
    transform: translateX(-2px);
}

/* 轮播图已移除 */

/* 交易播报 - 极简风格 */
.trade-ticker {
    background: var(--card-background);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.ticker-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ticker-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.ticker-text {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
    line-height: 1.4;
}

/* 商品区域 */
/* 商品区域 - 独立化设计 */
.products-section {
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 16px 12px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
    line-height: 1.2;
    margin: 0;
}

.section-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    flex-shrink: 0;
}

.section-icon svg {
    width: 100%;
    height: 100%;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
}

/* 确保商品卡片宽度一致 */
.products-grid > * {
    min-width: 0; /* 防止内容溢出 */
}

.product-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color) 0%, rgba(212, 175, 55, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.product-card:active::before,
.product-card:active::after {
    opacity: 1;
}

.product-card:active {
    transform: scale(0.97);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: rgba(212, 175, 55, 0.3);
}

.product-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #e8e8e8 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent-color);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}

.product-info {
    padding: 16px;
    background: var(--card-background);
}

.product-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.3;
}

.product-sales {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #dc3545; /* 🔥 适中的红色 */
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.product-description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 4px;
}

/* 用户评价区域 */
.reviews-section {
    margin-bottom: 24px;
}

.reviews-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.reviews-container::-webkit-scrollbar {
    display: none;
}

.review-card {
    min-width: 280px;
    background: var(--card-background);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    scroll-snap-align: start;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.review-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.review-stars {
    font-size: 12px;
    color: var(--accent-color);
}

.review-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 常见问题区域 - 独立化设计 */
.qa-section {
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.qa-section .section-title {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.qa-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qa-item {
    background: var(--card-background);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.qa-item:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(212, 175, 55, 0.2);
}

.qa-question {
    padding: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.qa-arrow {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.qa-arrow.expanded {
    transform: rotate(180deg);
}

.qa-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.qa-answer.active {
    max-height: 500px;
    padding: 0 16px 16px 16px;
}

/* 登录弹窗 - 极简风格 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.login-modal.show {
    opacity: 1;
    visibility: visible;
}

.login-modal-content {
    background: var(--background);
    border-radius: 24px;
    padding: 32px 24px;
    max-width: 340px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.login-modal.show .login-modal-content {
    transform: scale(1);
}

.login-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--secondary-color);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.login-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.login-info {
    text-align: center;
    margin-bottom: 24px;
}

.login-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.username {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.user-id {
    font-size: 12px;
    color: var(--text-secondary);
}

.terms-section {
    margin-bottom: 24px;
}

.terms-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--secondary-color);
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 12px;
}

.terms-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.terms-arrow {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.terms-arrow.expanded {
    transform: rotate(180deg);
}

.terms-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.terms-content.expanded {
    max-height: 400px;
}

.terms-text {
    padding: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    background: var(--secondary-color);
    border-radius: 12px;
}

.login-success {
    width: 100%;
    padding: 14px;
    background: var(--text-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-success:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.button-icon {
    margin-right: 6px;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--background);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 80px;
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: currentColor;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 14px;
}

/* 加载状态 */
.loading-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.loading {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 375px) {
    /* 保持商品网格始终为2列 */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px; /* 小屏幕时减小间距 */
    }
    
    .content-area {
        padding: 16px;
    }
    
    /* 小屏幕时调整商品卡片内容 */
    .product-image {
        aspect-ratio: 16 / 9; /* 保持16:9比例 */
    }
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-banner,
.steps-section,
.products-section,
.qa-section {
    animation: fadeInUp 0.6s ease-out;
}

.steps-section {
    animation-delay: 0.1s;
}

.products-section {
    animation-delay: 0.2s;
}

.qa-section {
    animation-delay: 0.3s;
}

/* 数字滚动动画 */
.stat-value {
    transition: all 0.5s ease;
}

/* 安全区域适配（iPhone X等） */
@supports (padding: max(0px)) {
    .container {
        padding-bottom: max(80px, calc(80px + env(safe-area-inset-bottom)));
    }
    
    .bottom-nav {
        padding-bottom: max(8px, calc(8px + env(safe-area-inset-bottom)));
    }
}
