/* ==========================================================================
   NextEra Energy Brand Style Homepage Design
   ========================================================================== */

:root {
    --primary-bg: linear-gradient(180deg, #D5EEF7 0%, #E8F4F8 25%, #F3E5F5 60%, #FFE5F0 100%);
    --card-bg: #FFFFFF;
    --primary-copper: #BF0000;
    --secondary-copper: #E60000;
    --accent-gold: #FFD700;
    --warm-blue: #87CEEB;
    --warm-pink: #FFB6D9;
    --warm-purple: #E1BEE7;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-tertiary: #9E9E9E;
    --shadow-dark: 0 2px 8px rgba(135, 206, 235, 0.15);
    --shadow-warm: 0 4px 16px rgba(255, 182, 217, 0.25);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --bg-gradient: linear-gradient(180deg, #D5EEF7 0%, #E8F4F8 25%, #F3E5F5 60%, #FFE5F0 100%);
}

/* ==========================================================================
   Page Container
   ========================================================================== */

.page-container {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(180deg, 
        #D5EEF7 0%,      
        #E8F4F8 25%,    
        #F3E5F5 60%,    
        #FFE5F0 100%    
    );
    position: relative;
    padding-bottom: 70px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Header Override - 
   ========================================================================== */

.common-header {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.95) 0%, rgba(175, 180, 230, 0.95) 100%) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 20px rgba(135, 206, 235, 0.3) !important;
    padding: 20px 0 !important;
    min-height: 60px;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.common-header::after {
    display: none;
}

.common-header-content {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    max-width: 480px;
    margin: 0 auto;
}

.common-header-title {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-align: center;
    font-family: 'Inter', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Balance Cards Section - 
   ========================================================================== */

.balance-cards-section {
    margin: 16px;
}

.balance-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.balance-card {
    background: linear-gradient(135deg, #B8E6F6 0%, #D4E4F7 100%);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(135, 206, 235, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.balance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(135, 206, 235, 0.4);
}

.balance-card-label {
    font-size: 13px;
    color: #4A5568;
    margin-bottom: 8px;
    font-weight: 600;
}

.balance-card-amount {
    font-size: 22px;
    font-weight: 700;
    color: #2D3748;
}

.balance-refund-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 10px;
    background: rgba(158, 158, 158, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

.refund-icon {
    width: 16px;
    height: 16px;
    color: #757575;
    flex-shrink: 0;
}

.refund-text {
    font-size: 11px;
    color: #616161;
    font-weight: 600;
    line-height: 1.2;
}

/* ==========================================================================
   Function Buttons Section -
   ========================================================================== */

.function-buttons {
    margin: 16px;
}

.four-button-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.function-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 16px 8px;
    background: linear-gradient(135deg, #87CEEB 0%, #B0D4F1 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.6);
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.function-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.function-btn:hover::before {
    left: 100%;
}

.function-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(135, 206, 235, 0.5), 
                0 0 15px rgba(135, 206, 235, 0.3);
    background: linear-gradient(135deg, #A0D4F7 0%, #C0E0F8 100%);
}

.function-btn:nth-child(1) {
    background: linear-gradient(135deg, #87CEEB 0%, #6DB8E8 100%);
}

.function-btn:nth-child(1):hover {
    background: linear-gradient(135deg, #6DB8E8 0%, #87CEEB 100%);
    box-shadow: 0 8px 20px rgba(135, 206, 235, 0.6), 
                0 0 15px rgba(109, 184, 232, 0.4);
}

.function-btn:nth-child(2) {
    background: linear-gradient(135deg, #87CEEB 0%, #6DB8E8 100%);
}

.function-btn:nth-child(2):hover {
    background: linear-gradient(135deg, #6DB8E8 0%, #87CEEB 100%);
    box-shadow: 0 8px 20px rgba(135, 206, 235, 0.6), 
                0 0 15px rgba(109, 184, 232, 0.4);
}

.function-btn:nth-child(3) {
    background: linear-gradient(135deg, #87CEEB 0%, #6DB8E8 100%);
}

.function-btn:nth-child(3):hover {
    background: linear-gradient(135deg, #6DB8E8 0%, #87CEEB 100%);
    box-shadow: 0 8px 20px rgba(135, 206, 235, 0.6), 
                0 0 15px rgba(109, 184, 232, 0.4);
}

.function-btn:nth-child(4) {
    background: linear-gradient(135deg, #87CEEB 0%, #6DB8E8 100%);
}

.function-btn:nth-child(4):hover {
    background: linear-gradient(135deg, #6DB8E8 0%, #87CEEB 100%);
    box-shadow: 0 8px 20px rgba(135, 206, 235, 0.6), 
                0 0 15px rgba(109, 184, 232, 0.4);
}

.function-btn:active {
    transform: translateY(-1px) scale(1.02);
    transition: all 0.1s ease;
}

.function-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
}

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

.function-btn:nth-child(1) .function-icon svg path {
    fill: #1565C0;
}

.function-btn:nth-child(2) .function-icon svg path {
    fill: #1565C0;
}

.function-btn:nth-child(3) .function-icon svg path {
    fill: #1565C0;
}

.function-btn:nth-child(4) .function-icon svg path {
    fill: #1565C0;
}

.function-label {
    font-size: 13px;
    font-weight: 700;
    color: #2D3748;
    text-align: center;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.function-btn:nth-child(1) .function-label {
    color: #0D47A1;
}

.function-btn:nth-child(2) .function-label {
    color: #0D47A1;
}

.function-btn:nth-child(3) .function-label {
    color: #0D47A1;
}

.function-btn:nth-child(4) .function-label {
    color: #0D47A1;
}

/* ==========================================================================
   Banner Carousel Area - 
   ========================================================================== */

.banner-section {
    margin: 16px;
    position: relative;
    z-index: 15;
}

.banner-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 220px;
    box-shadow: 0 6px 20px rgba(135, 206, 235, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 220px;
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.banner-item.active {
    opacity: 1;
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.banner-title {
    display: none;
}

.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.banner-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.3s ease;
}

.banner-dots .dot.active {
    background: var(--primary-copper);
}

.default-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    background: linear-gradient(135deg, #BF0000 0%, #E60000 100%);
    color: #FFFFFF;
    text-align: center;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.default-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('./uploads/banner/caterpillar-bg.jpg') center/cover;
    opacity: 0.8;
}

.default-banner .banner-content {
    position: relative;
    z-index: 2;
}

.default-banner .banner-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.default-banner .banner-content p {
    font-size: 14px;
    margin: 0;
    opacity: 0.8;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}



/* ==========================================================================
   Product Display Area - 
   ========================================================================== */

.products-section {
    margin: 16px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.green-underline {
    width: 60px;
    height: 3px;
    background: var(--primary-copper);
    margin-bottom: 20px;
    border-radius: 2px;
}

.products-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.product-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.security-deposit-notice-inside {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    pointer-events: none;
}

.security-deposit-text {
    background: linear-gradient(135deg, #FFE4B5 0%, #FFD700 100%);
    color: #8B4513;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 0 0 18px 0;
    border: 1px solid #DAA520;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    text-align: left;
    position: relative;
    overflow: visible;
    display: inline-block;
    max-width: none;
    width: auto;
    word-break: keep-all;
    line-height: 1.4;
    pointer-events: auto;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    white-space: nowrap;
    border-top-left-radius: 20px;
}

.security-deposit-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.product-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 250, 252, 0.95) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(135, 206, 235, 0.2), 
                0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background-clip: padding-box;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    min-height: 200px;
    cursor: pointer;
    will-change: transform;
}


.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(135, 206, 235, 0.6) 0%,
        rgba(255, 182, 217, 0.8) 25%,
        rgba(255, 215, 0, 0.6) 50%,
        rgba(255, 182, 217, 0.8) 75%,
        rgba(135, 206, 235, 0.6) 100%
    );
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: borderRotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.product-card.slide-up {
    opacity: 1;
    transform: translateY(0);
}

@media (pointer: fine) {
    .product-card:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 16px 48px rgba(135, 206, 235, 0.35), 
                    0 8px 24px rgba(255, 182, 217, 0.25),
                    0 0 0 1px rgba(255, 255, 255, 1) inset;
        border-color: rgba(255, 255, 255, 1);
        background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(252, 252, 254, 1) 100%);
    }
    
    .product-card:hover::before {
        opacity: 1;
    }
}

.product-card:active {
    transform: translateY(-2px) scale(1.01);
    transition: all 0.15s ease;
}

.product-card.locked-card {
    background: linear-gradient(135deg, rgba(160, 160, 165, 0.88) 0%, rgba(145, 145, 150, 0.88) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(180, 180, 185, 0.5);
    cursor: not-allowed;
}

.product-card.locked-card::before {
    display: none;
}

.product-card.locked-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(190, 190, 195, 0.6);
    background: linear-gradient(135deg, rgba(165, 165, 170, 0.88) 0%, rgba(150, 150, 155, 0.88) 100%);
}

.product-card.locked-card .product-name {
    color: #D0D0D8;
}

.product-card.locked-card .cashback-label,
.product-card.locked-card .cashback-percent {
    color: #C0C0C8;
}

.product-card.locked-card .product-image {
    filter: grayscale(100%) brightness(0.8);
    opacity: 0.7;
}

/* 锁定卡片的图片区域 */
.product-card.locked-card .product-image-section-left {
    background: linear-gradient(135deg, rgba(130, 130, 135, 0.85) 0%, rgba(120, 120, 125, 0.85) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) inset;
}

/* 锁定卡片的返现徽章 */
.product-card.locked-card .product-cashback-badge-inline {
    background: linear-gradient(135deg, rgba(150, 150, 155, 0.88) 0%, rgba(140, 140, 145, 0.88) 100%);
    border: 1px solid rgba(170, 170, 175, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


.product-image-section-left {
    flex: 1;
    min-height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(245, 245, 247, 0.95) 0%, rgba(240, 240, 244, 0.95) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) inset;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}


.product-info-section-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
}


.product-cashback-badge-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 248, 245, 0.98) 0%, rgba(255, 252, 250, 0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 18px 24px;
    border-radius: 20px;
    margin: auto 0;
    box-shadow: 0 4px 16px rgba(255, 182, 217, 0.2), 
                0 2px 8px rgba(135, 206, 235, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.cashback-icon {
    font-size: 32px;
    line-height: 1;
    color: #FFD700;
}

.cashback-icon svg {
    width: 32px;
    height: 32px;
    fill: #FFD700;
}

.cashback-percent {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-copper);
    line-height: 1;
}

.cashback-label {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-action-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFC837 100%);
    color: #2D3748;
    border: none;
    border-radius: 28px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
    text-shadow: none;
    width: 100%;
    max-width: 100%;
    display: block;
    box-sizing: border-box;
    text-align: center;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.product-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.product-action-btn:hover::before {
    left: 100%;
}

.product-action-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.7), 
                0 0 20px rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, #FFC837 0%, #FFB700 100%);
}

.product-action-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    transition: all 0.1s ease;
}

.product-action-btn.locked {
    background: linear-gradient(135deg, #A8A8B0 0%, #98989E 100%);
    color: #D5D5DD;
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-action-btn.locked:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #A8A8B0 0%, #98989E 100%);
}

.product-action-btn.locked::before {
    display: none;
}

/* ==========================================================================
   Investment Button Styles
   ========================================================================== */

.invest-btn {
    width: calc(100% - 32px);
    padding: 12px 0;
    background: linear-gradient(135deg, var(--primary-copper) 0%, var(--secondary-copper) 100%);
    color: #F5F5DC;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin: 16px;
    display: block;
    box-shadow: var(--shadow-copper);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.invest-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 0, 0, 0.4);
    background: linear-gradient(135deg, #A52A2A 0%, #FF4500 100%);
}

.invest-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-copper);
}



/* ==========================================================================
   Loading States and Empty Data
   ========================================================================== */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #E0E0E0;
    border-top: 2px solid #BF0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}




.empty-data {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 16px;
    text-align: center;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .page-container {
        background: linear-gradient(180deg, #D5EEF7 0%, #E8F4F8 25%, #F3E5F5 60%, #FFE5F0 100%);
    }
    
    .common-header {
        padding: 16px 0 !important;
        min-height: 55px;
    }
    
    .common-header-content {
        padding: 0 18px;
    }
    
    .common-header-title {
        font-size: 20px;
    }
    
    .balance-cards-section {
        margin: 12px;
    }
    
    .balance-cards-container {
        gap: 10px;
    }
    
    .balance-card {
        padding: 16px;
    }
    
    .balance-card-label {
        font-size: 12px;
    }
    
    .balance-card-amount {
        font-size: 18px;
    }
    
    .balance-refund-info {
        margin-top: 8px;
        padding: 5px 8px;
    }
    
    .refund-icon {
        width: 14px;
        height: 14px;
    }
    
    .refund-text {
        font-size: 10px;
    }
    
    .function-buttons {
        margin: 12px;
    }
    
    .four-button-container {
        gap: 10px;
    }
    
    .function-btn {
        padding: 12px 6px;
    }
    
    .function-icon {
        width: 28px;
        height: 28px;
    }
    
    .function-label {
        font-size: 12px;
    }
    
    .banner-section {
        margin: 12px;
    }
    
    .banner-container {
        min-height: 180px;
        border-radius: 12px;
    }
    
    .banner-slider {
        height: 180px;
    }
    
    .default-banner {
        height: 180px;
        border-radius: 12px;
    }
    
    .banner-item img {
        border-radius: 12px;
    }
    
    .products-section {
        margin: 12px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .products-container {
        gap: 12px;
    }
    
    .product-wrapper {
        gap: 10px;
    }
    
    .product-card {
        border-radius: 14px;
        padding: 16px;
        gap: 16px;
        min-height: 160px;
    }
    
    .product-image-section-left {
        flex: 1;
        min-height: 140px;
    }
    
    .product-info-section-right {
        flex: 1;
        gap: 10px;
    }
    
    .product-name {
        font-size: 16px;
    }
    
    .product-cashback-badge-inline {
        padding: 12px 16px;
        gap: 6px;
    }
    
    .cashback-icon {
        font-size: 28px;
    }
    
    .cashback-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .cashback-percent {
        font-size: 30px;
    }
    
    .cashback-label {
        font-size: 11px;
    }
    
    .product-action-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .security-deposit-notice-inside {
        top: 0;
        left: 0;
    }
    
    .security-deposit-text {
        font-size: 11px;
        padding: 7px 14px;
        max-width: none;
        width: auto;
        border-radius: 0 0 16px 0;
        border-top-left-radius: 14px;
    }
}

@media (max-width: 480px) {
    .page-container {
        background: linear-gradient(180deg, #D5EEF7 0%, #E8F4F8 25%, #F3E5F5 60%, #FFE5F0 100%);
    }
    
    .common-header {
        padding: 14px 0 !important;
        min-height: 50px;
    }
    
    .common-header-content {
        padding: 0 16px;
    }
    
    .common-header-title {
        font-size: 18px;
    }
    
    .balance-cards-section {
        margin: 10px;
    }
    
    .balance-cards-container {
        gap: 8px;
    }
    
    .balance-card {
        padding: 14px;
    }
    
    .balance-card-label {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .balance-card-amount {
        font-size: 16px;
    }
    
    .balance-refund-info {
        margin-top: 6px;
        padding: 4px 7px;
    }
    
    .refund-icon {
        width: 12px;
        height: 12px;
    }
    
    .refund-text {
        font-size: 9px;
    }
    
    .function-buttons {
        margin: 10px;
    }
    
    .four-button-container {
        gap: 8px;
    }
    
    .function-btn {
        padding: 10px 4px;
    }
    
    .function-icon {
        width: 24px;
        height: 24px;
    }
    
    .function-label {
        font-size: 11px;
    }
    
    .banner-section {
        margin: 10px;
    }
    
    .banner-container {
        min-height: 160px;
        border-radius: 10px;
    }
    
    .banner-slider {
        height: 160px;
    }
    
    .default-banner {
        height: 160px;
        border-radius: 10px;
    }
    
    .banner-item img {
        border-radius: 10px;
    }
    
    .products-section {
        margin: 10px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .products-container {
        gap: 10px;
    }
    
    .product-wrapper {
        gap: 8px;
    }
    
    .product-card {
        border-radius: 12px;
        padding: 14px;
        gap: 14px;
        min-height: 140px;
    }
    
    .product-image-section-left {
        flex: 1;
        min-height: 120px;
    }
    
    .product-info-section-right {
        flex: 1;
        gap: 8px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .product-cashback-badge-inline {
        padding: 10px 14px;
        gap: 5px;
    }
    
    .cashback-icon {
        font-size: 24px;
    }
    
    .cashback-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .cashback-percent {
        font-size: 26px;
    }
    
    .cashback-label {
        font-size: 10px;
    }
    
    .product-action-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .security-deposit-notice-inside {
        top: 0;
        left: 0;
    }
    
    .security-deposit-text {
        font-size: 10px;
        padding: 6px 12px;
        max-width: none;
        width: auto;
        line-height: 1.3;
        border-radius: 0 0 14px 0;
        border-top-left-radius: 12px;
    }
}

/* ==========================================================================
   Investment Status and Progress Styles
   ========================================================================== */

/* Investment status styles */
.investment-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.investment-status.active {
    background: rgba(212, 165, 116, 0.2);
    color: var(--primary-copper);
}

.investment-status.completed {
    background: rgba(212, 165, 116, 0.15);
    color: var(--accent-gold);
}

/* Product header layout - removed duplicate definition */

/* Large screen image height optimization */
@media (min-width: 1024px) {
    .product-top-section {
        height: 320px;
    }
}

/* Ultra large screen adaptation */
@media (min-width: 1440px) {
    .product-top-section {
        height: 360px;
    }
}

/* Investment progress bar styles */
.investment-progress {
    margin: 16px 0 8px 0;
    padding: 0 16px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #E0E0E0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #BF0000 0%, #E60000 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Profit styles */
.profit {
    color: var(--primary-copper);
    font-weight: 600;
}

/* View more button */
.view-more-container {
    text-align: center;
    padding: 16px;
}

.view-more-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-copper) 0%, var(--secondary-copper) 100%);
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-copper);
}

.view-more-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(212, 165, 116, 0.4);
}

.view-more-btn:active {
    transform: translateY(0);
}

/* Empty data styles adjustment */
.empty-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-data p {
    margin-bottom: 16px;
    font-size: 16px;
}

.view-products-btn {
    background: linear-gradient(135deg, var(--primary-copper) 0%, var(--secondary-copper) 100%);
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-copper);
    margin-top: 16px;
}

.view-products-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(212, 165, 116, 0.4);
}

.view-products-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   Purchase Popup Styles - 
   ========================================================================== */

.purchase-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.purchase-popup-overlay.active {
    opacity: 1;
}

.purchase-popup {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 0;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.purchase-popup-overlay.active .purchase-popup {
    transform: translateY(0);
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    color: #333333;
    transition: all 0.2s ease;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
}

.popup-close:hover {
    color: #BF0000;
    background: rgba(255, 255, 255, 1);
}

.popup-order-header {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
}

.popup-order-label {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1.2;
}

.popup-order-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: lowercase;
    line-height: 1.2;
}

.popup-product-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.popup-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px;
    background: #FAFAFA;
}

.popup-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #E0E0E0;
    font-size: 15px;
}

.popup-detail-row:last-child {
    border-bottom: none;
}

.popup-detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.popup-detail-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 16px;
}

.popup-detail-value.highlight {
    color: var(--primary-copper);
    font-size: 18px;
}

.popup-cashback-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-cashback-badge {
    background: rgba(191, 0, 0, 0.1);
    color: var(--primary-copper);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.popup-cashback-amount {
    color: #FF9800;
    font-size: 18px;
    font-weight: 700;
}

.popup-buttons {
    padding: 20px;
    background: #FFFFFF;
    width: 100%;
    box-sizing: border-box;
}

.popup-btn {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #BF0000 0%, #E60000 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(191, 0, 0, 0.3);
    display: block;
    box-sizing: border-box;
    text-align: center;
}

.popup-btn-continue {
    background: linear-gradient(135deg, #BF0000 0%, #E60000 100%);
    color: #FFFFFF;
}

.popup-btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(191, 0, 0, 0.4);
    background: linear-gradient(135deg, #A00000 0%, #C50000 100%);
}

.popup-btn-finish {
    background: linear-gradient(135deg, #BF0000 0%, #E60000 100%);
    color: #FFFFFF;
}

.popup-btn-finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(191, 0, 0, 0.4);
    background: linear-gradient(135deg, #A00000 0%, #C50000 100%);
}

.popup-btn:active {
    transform: translateY(0);
}

.product-action-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #666;
}

.product-action-btn.disabled:hover {
    transform: none;
    box-shadow: var(--shadow-copper);
    background: #666;
}

/* Success Popup Styles */
.purchase-success-popup {
    text-align: center;
    padding: 0;
}

.success-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px 20px 20px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-title {
    padding: 0 24px;
}

.popup-title h3 {
    color: var(--text-primary);
    margin: 16px 0;
    font-size: 24px;
    text-align: center;
    font-weight: 700;
}

.cashback-info {
    background: linear-gradient(135deg, #FFE5E5 0%, #FFF0F0 100%);
    border-radius: 0;
    padding: 30px 20px;
    margin: 0;
    border-top: 2px solid #BF0000;
    border-bottom: 2px solid #BF0000;
}

.cashback-info-label {
    color: #BF0000;
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.cashback-info-amount {
    color: #BF0000;
    font-size: 40px;
    font-weight: 700;
    margin: 10px 0;
}

/* ==========================================================================
   Product Detail Popup Styles - 
   ========================================================================== */

.product-detail-popup {
    max-width: 380px;
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    padding: 24px;
}

.product-detail-brand {
    font-size: 28px;
    font-weight: 700;
    color: #0066CC;
    text-align: center;
    margin-bottom: 20px;
}

.product-detail-image {
    width: 100%;
    background: #F5F5F5;
    border-radius: 12px;
    overflow: hidden;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.product-detail-image img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.product-detail-info {
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid #F0F0F0;
}

.detail-label {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.detail-value {
    font-size: 28px;
    font-weight: 700;
}

.detail-value.green {
    color: #00CC00;
}

.detail-value.red {
    color: #BF0000;
}

.detail-value.black {
    color: var(--text-primary);
    font-size: 20px;
}

.product-detail-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #FFD700 0%, #F5C000 100%);
    color: #000000;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.product-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #F5C000 0%, #E5B000 100%);
}

.product-detail-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .product-detail-popup {
        max-width: 90%;
        padding: 20px;
    }
    
    .product-detail-brand {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .product-detail-image {
        padding: 16px;
        margin-bottom: 20px;
        min-height: 180px;
    }
    
    .product-detail-image img {
        max-height: 180px;
    }
    
    .product-detail-info {
        margin-bottom: 20px;
    }
    
    .detail-row {
        padding: 12px 0;
    }
    
    .detail-label {
        font-size: 14px;
    }
    
    .detail-value {
        font-size: 24px;
    }
    
    .detail-value.black {
        font-size: 16px;
    }
    
    .product-detail-btn {
        padding: 12px 18px;
        font-size: 15px;
    }
    
    .purchase-popup {
        max-width: 90%;
    }
    
    .popup-order-header {
        top: 10px;
        left: 10px;
        padding: 6px 10px;
    }
    
    .popup-order-label {
        font-size: 9px;
        margin-bottom: 2px;
    }
    
    .popup-order-number {
        font-size: 12px;
    }
    
    .popup-product-image {
        height: 240px;
    }
    
    .popup-details {
        padding: 16px;
    }
    
    .popup-detail-row {
        padding: 12px 0;
        font-size: 14px;
    }
    
    .popup-detail-value {
        font-size: 15px;
    }
    
    .popup-detail-value.highlight {
        font-size: 16px;
    }
    
    .popup-cashback-badge {
        font-size: 13px;
        padding: 3px 8px;
    }
    
    .popup-cashback-amount {
        font-size: 16px;
    }
    
    .popup-buttons {
        padding: 16px;
    }
    
    .popup-btn {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .purchase-success-popup .success-icon {
        padding: 30px 20px 15px 20px;
    }
    
    .success-icon svg {
        width: 60px !important;
        height: 60px !important;
    }
    
    .popup-title h3 {
        font-size: 20px;
    }
    
    .cashback-info {
        padding: 24px 16px;
    }
    
    .cashback-info-label {
        font-size: 14px;
    }
    
    .cashback-info-amount {
        font-size: 32px;
    }
}

/* ==========================================================================
   Lucky Order Popup Styles - 
   ========================================================================== */

.lucky-order-popup {
    max-width: 360px;
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE8CC 100%);
    border: 2px solid #FFD700;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.4);
    animation: luckyPulse 2s ease-in-out infinite;
}

@keyframes luckyPulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 12px 48px rgba(255, 215, 0, 0.6);
    }
}

.lucky-order-header {
    text-align: center;
    padding: 16px 20px 12px;
    background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
    border-radius: 12px 12px 0 0;
}

.lucky-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: #FF6B00;
    padding: 6px 16px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lucky-badge svg {
    color: #FFD700;
    animation: starRotate 2s linear infinite;
}

@keyframes starRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.lucky-order-title {
    font-size: 24px;
    font-weight: 700;
    color: #FF6B00;
    text-align: center;
    margin: 16px 0 4px;
    text-shadow: 0 2px 4px rgba(255, 107, 0, 0.3);
}

.lucky-order-subtitle {
    font-size: 14px;
    color: #D35400;
    text-align: center;
    font-weight: 500;
    margin-bottom: 16px;
}

.lucky-order-content {
    padding: 16px 20px;
}

.lucky-order-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.lucky-order-item.warning {
    padding: 12px;
    background: rgba(255, 152, 0, 0.1);
    border-left: 3px solid #FF9800;
    border-radius: 4px;
}

.lucky-order-item.success {
    padding: 12px;
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4CAF50;
    border-radius: 4px;
}

.lucky-order-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    line-height: 1.4;
}

.lucky-order-item.warning .lucky-order-label {
    color: #E65100;
}

.lucky-order-item.success .lucky-order-label {
    color: #2E7D32;
}

.lucky-order-value {
    font-size: 24px;
    font-weight: 700;
}

.lucky-order-value.reward {
    color: #FF6B00;
}

.lucky-order-value.shortage {
    color: #D84315;
    font-size: 18px;
}

.lucky-order-value.accumulated {
    color: #4CAF50;
    font-size: 20px;
}

.lucky-order-value.complete {
    color: #4CAF50;
    font-size: 18px;
}

.lucky-order-value.required {
    color: #FF6B00;
    font-size: 20px;
}

.accumulated-hint {
    display: block;
    font-size: 14px;
    color: #4CAF50;
    font-weight: 500;
    margin-top: 6px;
    line-height: 1.4;
}

.lucky-order-note {
    font-size: 11px;
    color: #999;
    text-align: center;
    line-height: 1.4;
    margin-top: 12px;
}

.lucky-continue-btn {
    margin: 0 20px 20px;
    width: calc(100% - 40px);
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.4);
    font-size: 16px;
    font-weight: 700;
    padding: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.lucky-continue-btn:hover {
    background: linear-gradient(135deg, #FF8C00 0%, #FFA500 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5);
    transform: translateY(-2px);
}

.lucky-continue-btn:active {
    transform: translateY(0);
}


.lucky-completed-popup .lucky-order-header.success-header {
    background: linear-gradient(135deg, #4CAF50 0%, #45A049 100%);
}

.lucky-badge.success-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #4CAF50;
}

.lucky-order-title.success-title {
    color: #4CAF50;
}

.lucky-order-item.success-info {
    padding: 12px;
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4CAF50;
    border-radius: 4px;
}

.lucky-order-item.success-info .lucky-order-label {
    color: #2E7D32;
}

.lucky-order-value.deposit-info {
    color: #4CAF50;
    font-size: 18px;
}

.lucky-continue-btn.success-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45A049 100%);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
}

.lucky-continue-btn.success-btn:hover {
    background: linear-gradient(135deg, #45A049 0%, #3D8B40 100%);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

/* 已完成弹窗样式 */
.completed-popup {
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}

.lucky-badge.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    }
}

.lucky-order-title.completed {
    color: #059669;
    text-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.lucky-order-subtitle.completed {
    color: #047857;
}

.lucky-order-content.completed {
    padding: 20px;
}

.completed-reward-box {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #6ee7b7;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.reward-label {
    font-size: 13px;
    color: #047857;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reward-amount {
    font-size: 36px;
    font-weight: 800;
    color: #059669;
    margin: 8px 0;
    text-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
    animation: rewardBounce 1s ease-out;
}

@keyframes rewardBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.reward-note {
    font-size: 12px;
    color: #065f46;
    font-weight: 500;
    margin-top: 8px;
}

.completed-info {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #047857;
    font-weight: 500;
}

.lucky-completed-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
}

.lucky-completed-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.lucky-completed-btn:active {
    transform: translateY(0);
}


@media (max-width: 480px) {
    .lucky-order-popup {
        max-width: 90%;
        max-height: 80vh;
    }
    
    .lucky-order-header {
        padding: 14px 16px 10px;
    }
    
    .lucky-badge {
        font-size: 13px;
        padding: 5px 14px;
    }
    
    .lucky-order-title {
        font-size: 20px;
        margin: 12px 0 4px;
    }
    
    .lucky-order-subtitle {
        font-size: 13px;
        margin-bottom: 14px;
    }
    
    .lucky-order-content {
        padding: 14px 16px;
    }
    
    .lucky-order-item {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .lucky-order-item.warning {
        padding: 10px;
    }
    
    .lucky-order-label {
        font-size: 12px;
    }
    
    .lucky-order-value {
        font-size: 20px;
    }
    
    .lucky-order-value.shortage {
        font-size: 16px;
    }
    
    .accumulated-hint {
        font-size: 12px;
        margin-top: 4px;
    }
    
    .lucky-order-note {
        font-size: 10px;
        margin-top: 10px;
    }
    
    .lucky-continue-btn {
        margin: 0 16px 16px;
        width: calc(100% - 32px);
        font-size: 15px;
        padding: 12px;
    }
}

/* ==========================================================================
   Floating Lottery Button Styles
   ========================================================================== */

.floating-lottery-btn {
    position: fixed;
    right: 20px;
    top: 63%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5), 
                0 0 20px rgba(255, 165, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: floatPulse 3s ease-in-out infinite;
}

@keyframes floatPulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5), 
                    0 0 20px rgba(255, 165, 0, 0.3);
    }
    50% {
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 8px 28px rgba(255, 215, 0, 0.7), 
                    0 0 30px rgba(255, 165, 0, 0.5);
    }
}

.floating-lottery-btn svg {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: spinSlow 8s linear infinite;
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.floating-lottery-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 35px rgba(255, 215, 0, 0.8), 
                0 0 40px rgba(255, 165, 0, 0.6);
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
}

.floating-lottery-btn:active {
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

@media (max-width: 768px) {
    .floating-lottery-btn {
        width: 56px;
        height: 56px;
        right: 16px;
    }
    
    .floating-lottery-btn svg {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .floating-lottery-btn {
        width: 50px;
        height: 50px;
        right: 12px;
    }
    
    .floating-lottery-btn svg {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================================================
   Welcome Popup Styles
   ========================================================================== */

.welcome-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.welcome-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.welcome-popup {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FBFF 100%);
    border-radius: 20px;
    padding: 32px 24px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(135, 206, 235, 0.4);
    border: 2px solid rgba(135, 206, 235, 0.3);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
}

.welcome-popup-overlay.active .welcome-popup {
    transform: scale(1) translateY(0);
}

.popup-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #FF4757 0%, #FF3742 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #FFFFFF;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
    z-index: 10001;
}

.popup-close:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 71, 87, 0.6);
}

.welcome-content {
    text-align: center;
}

.welcome-text {
    margin-bottom: 32px;
    line-height: 1.6;
}

.welcome-text p {
    font-size: 16px;
    color: var(--text-primary);
    margin: 0;
    font-weight: 500;
}

.welcome-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.welcome-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.welcome-btn svg {
    width: 20px;
    height: 20px;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #FFFFFF;
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.channel-btn {
    background: linear-gradient(135deg, #0088CC 0%, #005577 100%);
    color: #FFFFFF;
}

.channel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 136, 204, 0.4);
}

/* Mobile responsive adjustments for welcome popup */
@media (max-width: 480px) {
    .welcome-popup {
        margin: 20px;
        padding: 24px 20px;
    }
    
    .welcome-text p {
        font-size: 15px;
    }
    
    .welcome-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .welcome-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* ==========================================================================
   Mobile Scroll Performance Optimization
   ========================================================================== */

@media (max-width: 768px) {
    .product-card,
    .balance-card,
    .function-btn {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    .product-card {
        background: rgba(255, 255, 255, 0.98);
    }
    
    .balance-card {
        background: linear-gradient(135deg, #B8E6F6 0%, #D4E4F7 100%);
    }
    
    .function-btn {
        background: linear-gradient(135deg, #87CEEB 0%, #B0D4F1 100%);
    }
    
    .product-card.locked-card {
        background: rgba(160, 160, 165, 0.95);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    .product-card::before {
        animation: none;
    }
    
    body.is-scrolling .product-card::before,
    body.is-scrolling .floating-lottery-btn,
    body.is-scrolling .function-btn::before {
        animation-play-state: paused;
    }
}

@media (pointer: coarse) {
    .product-card:hover {
        transform: none;
        box-shadow: 0 8px 32px rgba(135, 206, 235, 0.2), 
                    0 4px 16px rgba(0, 0, 0, 0.08);
    }
    
    .product-card:hover::before {
        opacity: 0;
    }
    
    .function-btn:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(135, 206, 235, 0.35);
    }
}
