/* 主题颜色 */
:root {
    --primary-color: #00c853;
    --primary-color-dark: #009940;
    --primary-color-light: rgba(0, 200, 83, 0.1);
    --background-color: #f5f5f5;
    --text-color: #333;
    --text-color-light: #86868b;
    --border-radius: 12px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background-color);
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

main {
    padding: 0 15px 20px;
}

/* 主标题区域样式 */
.main-title-section {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.main-title-section h1 {
    font-size: 24px;
    color: #333;
    margin: 0 0 10px 0;
}

.main-title-section p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* 主内容返利查询区域样式 */
.main-rebate-section {
    background-color: white;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.main-rebate-content {
    background-color: #f5f5f7;
    padding: 24px;
    border-radius: 16px;
    border: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.app-header {
    background-color: var(--primary-color);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
    background: none;
    border: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.search-bar {
    background: white;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    padding: 6px 18px;
    flex: 1;
    margin: 0 15px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 200, 83, 0.1);
}

.search-bar:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 200, 83, 0.2);
    transform: translateY(-1px);
}

.search-bar:focus-within {
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.2);
    border-color: rgba(0, 200, 83, 0.3);
    width: calc(100% - 10px); /* 轻微扩展效果 */
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 200, 83, 0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 200, 83, 0.3);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 200, 83, 0.2);
    }
}

.search-bar input {
    border: none;
    flex: 1;
    padding: 10px 8px;
    font-size: 16px;
    background: transparent;
    outline: none;
    color: #333;
    border-radius: 30px;
}

.search-bar input::placeholder {
    color: #aaa;
    opacity: 0.8;
    font-size: 15px;
    transition: opacity 0.3s ease;
}

.search-bar input:focus::placeholder {
    opacity: 0.5;
}

.search-icon-simple {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    opacity: 0.8;
    transition: var(--transition);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon-simple:hover {
    opacity: 1;
    background-color: var(--primary-color-light);
    transform: scale(1.05);
}

.search-icon-simple.searching {
    animation: searching-spin 1s infinite linear;
    opacity: 0.7;
    pointer-events: none;
}

@keyframes searching-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 粘贴区域增强样式 */
.paste-section {
    margin-bottom: 30px;
}

.paste-area {
    background: white;
    margin: 15px 0;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.paste-area.enhanced {
    background-color: #f0f7ff;
    padding: 25px;
    border: 1px solid #e0f0ff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.paste-instructions {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.paste-icon {
    font-size: 32px;
    margin-right: 16px;
    color: var(--primary-color);
    background: var(--primary-color-light);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.15);
    position: relative;
    overflow: hidden;
}

.paste-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.paste-instructions:hover .paste-icon {
    transform: scale(1.08);
    background: rgba(0, 200, 83, 0.2);
    box-shadow: 0 6px 16px rgba(0, 200, 83, 0.25);
}

.paste-instructions:hover .paste-icon::after {
    opacity: 0.4;
}

.paste-text h3 {
    margin: 0 0 6px 0;
    color: #1d1d1f; /* 苹果深灰色 */
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.2px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.paste-text p {
    margin: 0;
    color: #86868b; /* 苹果浅灰色 */
    font-size: 14px;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.paste-input-area {
    display: flex;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.paste-input-area:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.product-link-input {
    flex: 1;
    padding: 16px 18px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 16px;
    background-color: white;
    color: var(--text-color);
    transition: var(--transition);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.2px;
}

.product-link-input::placeholder {
    color: var(--text-color-light);
    opacity: 0.8;
    font-size: 15px;
    transition: var(--transition);
}

.product-link-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(0, 200, 83, 0.3);
}

.product-link-input:focus::placeholder {
    opacity: 0.5;
    transform: translateX(3px);
}

.platform-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.platform-icons img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.platform-icons img:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.paste-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.paste-input input {
    flex: 1;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.paste-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 28px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.2px;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    box-shadow: 0 2px 8px rgba(0, 200, 83, 0.3);
    position: relative;
    overflow: hidden;
}

.paste-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.paste-btn:hover {
    background: var(--primary-color-dark);
    box-shadow: 0 4px 12px rgba(0, 200, 83, 0.4);
    transform: translateY(-2px);
}

.paste-btn:hover::before {
    left: 100%;
}

.paste-btn:active {
    background: var(--primary-color-dark);
    transform: scale(0.98) translateY(0);
    box-shadow: 0 2px 6px rgba(0, 200, 83, 0.3);
}

.paste-btn svg {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.paste-btn:hover svg {
    transform: scale(1.1);
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 15px 0;
}

.platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.platform-item img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    margin-bottom: 8px;
    object-fit: contain;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rebate-rate {
    color: #ff5722;
    font-size: 12px;
}

.rebate-tip {
    text-align: center;
    margin-top: 16px;
    color: var(--text-color-light);
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--primary-color-light);
    padding: 10px 16px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.rebate-tip::before {
    content: "💰";
    margin-right: 8px;
    font-size: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin: 10px 0;
    border-bottom: 1px solid #eee;
}

.section-header h2 {
    font-size: 18px;
    margin: 0;
    color: #333;
    position: relative;
    padding-left: 12px;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.view-all {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.bonus-section {
    margin: 20px 0;
}

.bonus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    padding: 15px 0;
    overflow-x: auto;
}

.bonus-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bonus-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 8px;
}

.services-section {
    margin: 20px 0;
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 15px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 15px;
    padding: 10px 0;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.coming-soon-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0;
    width: 100%;
}

.coming-soon-message p {
    font-size: 16px;
    color: #666;
    margin: 0;
    width: 100%;
    display: block;
}

/* 按钮样式 */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    background: #f0f0f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    transition: var(--transition);
    letter-spacing: -0.2px;
}

.btn:hover {
    background: #e5e5e5;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-color-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 平台标签 */
.platform-tabs {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    margin: 20px 0 0;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    white-space: nowrap;
}

.platform-tab {
    padding: 0.5rem 1.2rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    margin-right: 5px;
    z-index: 1;
}

.platform-tab:hover {
    color: var(--primary-color);
    background-color: rgba(0, 200, 83, 0.05);
}

.platform-tab.active {
    color: var(--primary-color);
    background-color: rgba(0, 200, 83, 0.1);
    font-weight: 600;
}

/* 商品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
    padding: 1rem 0;
    margin: 0 auto;
    grid-auto-rows: minmax(min-content, max-content);
}

/* 商品卡片 */
.product-card {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: rgba(0, 200, 83, 0.2);
}

.product-platform {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #f9f9f9;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

.platform-badge {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 4px 8px;
    border-radius: 12px;
    max-width: 60%;
}

.platform-badge .platform-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    border-radius: 4px;
}

.platform-badge .platform-name {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.platform-icon {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 确保所有图片都能正确显示 */
img {
    max-width: 100%;
}

img[src="images/default-platform.png"] {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 14px;
    margin: 0 0 10px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-line-clamp: 2;
    -moz-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
}

.product-price {
    color: #ff4400;
    font-size: 20px;
    font-weight: bold;
}

.product-original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 12px;
}

.product-sales {
    color: #666;
    font-size: 12px;
    margin: 5px 0;
}

.rebate-amount {
    color: #ff4400;
    font-size: 14px;
    font-weight: bold;
    padding: 4px 8px;
    background-color: #fff2e8;
    border-radius: 12px;
    display: inline-block;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-outline {
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    background: none;
}

.btn-outline:hover {
    background-color: #ff6b6b;
    color: white;
}

.user-welcome {
    color: #333;
    margin-right: 1rem;
}

/* 加载状态样式 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00c853;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
}

/* 商品区域样式 */
.product-section {
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 0 15px 15px;
}

/* 确保商品网格容器有最小高度 */
.product-grid {
    min-height: 400px;
}

/* 返利模态框样式 */
.rebate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.rebate-modal .current-price {
    color: #ff4400;
    font-size: 18px;
    font-weight: bold;
    margin-right: 10px;
}

.rebate-modal .original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 14px;
}

.rebate-modal .rebate-info {
    color: #ff4400;
    font-size: 16px;
    margin-bottom: 15px;
}

.rebate-modal .action-buttons {
    display: flex;
    gap: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .app-header {
        flex-wrap: wrap;
    }

    .logo {
        margin-bottom: 10px;
    }

    .search-bar {
        order: 3;
        width: 100%;
        margin: 10px 0 0;
    }

    .user-actions {
        margin-left: auto;
    }

    .platform-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .bonus-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        margin: 10% auto;
        width: 90%;
    }

    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn {
        width: 100%;
    }

    .product-grid {
        min-height: 300px;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .rebate-modal-content {
        width: 95%;
        padding: 15px;
    }

    .rebate-modal .product-info {
        flex-direction: column;
    }

    .rebate-modal .product-image {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bonus-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
}

.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.error-content {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.error-image {
    max-width: 300px;
    margin-bottom: 2rem;
}

.error-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 0 5px;
}

.btn-primary {
    background-color: #00c853;
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 200, 83, 0.2);
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #eee;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 200, 83, 0.2);
    outline: none;
}

.form-footer {
    margin-top: 15px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 使用说明模态框样式 */
.instructions-content {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.instructions-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.instructions-content ol {
    padding-left: 20px;
    margin-bottom: 20px;
}

.instructions-content li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.faq-item {
    margin-bottom: 15px;
}

.faq-item h4 {
    margin: 0 0 5px 0;
    color: #00c853;
}

.faq-item p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* 用户操作区域 */
.user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background-color: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border-top: 1px solid #eee;
    margin: 0;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    width: 33.33%;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
}

.bottom-nav-item:hover {
    color: var(--primary-color);
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.bottom-nav-icon svg {
    width: 24px;
    height: 24px;
}

.bottom-nav-text {
    font-size: 12px;
    text-align: center;
}

/* 底部标签页内容样式 */
.bottom-tab-content {
    padding-bottom: 70px; /* 为底部导航栏留出空间 */
    margin-top: 20px;
}

.tab-panel {
    display: none;
    padding: 15px;
}

.tab-panel.active {
    display: block;
}

/* 历史记录区域样式 */
.history-section {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.history-section .section-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.history-section h3 {
    font-size: 16px;
    margin: 0;
    color: #333;
    padding-left: 12px;
    position: relative;
}

.history-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.clear-history {
    color: #f44336;
    font-size: 14px;
    text-decoration: none;
}

.clear-history:hover {
    text-decoration: underline;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    padding: 12px;
    border-bottom: 1px solid #eee;
    align-items: center;
    transition: background-color 0.2s ease;
}

.history-item:hover {
    background-color: #f9f9f9;
}

.history-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
}

.history-item-info {
    flex: 1;
}

.history-item-title {
    font-size: 14px;
    margin: 0 0 5px 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-item-price {
    font-size: 14px;
    color: #f44336;
    font-weight: bold;
}

.history-item-time {
    font-size: 12px;
    color: #999;
}

.history-item-platform {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.history-item-platform img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.history-item-platform span {
    font-size: 12px;
    color: #666;
}

.empty-history {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
}

/* 返利查询样式 */
.rebate-query-section {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rebate-query-section .section-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.rebate-query-section h3 {
    font-size: 16px;
    margin: 0;
    color: #333;
    padding-left: 12px;
    position: relative;
}

.rebate-query-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.rebate-query-content {
    padding: 10px 0;
}

/* 个人中心样式 */
.profile-section {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.profile-section .section-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.profile-section h3 {
    font-size: 16px;
    margin: 0;
    color: #333;
    padding-left: 12px;
    position: relative;
}

.profile-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.profile-info {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-right: 15px;
}

.profile-details {
    flex: 1;
}

.profile-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.profile-menu {
    margin-top: 20px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

.profile-menu-icon {
    font-size: 20px;
    margin-right: 15px;
    width: 24px;
    text-align: center;
}

.profile-menu-text {
    font-size: 16px;
    color: #333;
}

/* Hot Products Grid and Load More Button Styles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Default responsive behavior */
    gap: 20px;
    padding: 20px;
    box-sizing: border-box; /* Ensure padding doesn't add to width causing overflow */
}

/* Media queries for specific column counts based on viewport width */
/* Adjust breakpoints and column counts based on your product card's actual width and desired layout */
@media (min-width: 1700px) { /* Example: Very large screens */
    .product-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}
@media (min-width: 1500px) and (max-width: 1699px) {
    .product-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}
@media (min-width: 1300px) and (max-width: 1499px) {
    .product-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
@media (min-width: 1024px) and (max-width: 1299px) { /* Adjusted for common tablet/small desktop */
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
@media (min-width: 768px) and (max-width: 1023px) { /* Tablets */
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 576px) and (max-width: 767px) { /* Large mobile */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 575px) { /* Small mobile */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px; /* Smaller gap for smaller screens */
    }
}

.load-more-container {
    text-align: center;
    padding: 20px 0;
}

.btn-load-more {
    padding: 12px 25px;
    font-size: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-load-more:hover {
    background-color: #0056b3;
}

.btn-load-more:active {
    transform: translateY(1px);
}

.btn-load-more:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

.loading-indicator, .more-loading { /* Combined for simplicity */
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
    color: #555;
    width: 100%; /* Ensure it takes full width if inside grid or flex */
}

.more-loading {
    font-size: 1rem;
    color: #777;
    padding: 10px 0; /* Less padding for "more" indicator */
}

/* Ensure product cards themselves don't cause overflow if their content is too wide */
.product-card {
    overflow: hidden; /* Prevents content spill from breaking grid */
    /* Add other product card base styles if needed, e.g., border, background */
}
