/* 信用额度推广弹窗样式 */

/* 弹窗容器 */
.credit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.credit-popup.active {
    display: flex;
}

/* 遮罩层 */
.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/* 弹窗内容 */
.popup-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease-out;
}

/* 大屏幕右侧弹窗样式 - 使用全局断点 */
@media (min-width: 1200px) {
    .credit-popup {
        align-items: flex-start;
        justify-content: flex-end;
    }
    
    .popup-content {
        max-width: 450px;
        width: 450px;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0px 0 0 0px;
        animation: popupSlideInRight 0.3s ease-out;
    }
    
    @keyframes popupSlideInRight {
        from {
            opacity: 0;
            transform: translateX(100%);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 关闭按钮 */
.popup-close-btn {
    position: absolute;
    top: 7px;
    right: 20px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.popup-close-btn:hover {
    transform: scale(1.1);
}

.close-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* 通知栏 */
.notification-bar {
    background: #FFF6DC;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(255, 246, 220, 0.5);
    overflow: hidden;
    position: relative;
    min-height: 50px;
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    z-index: 2;
    margin-top: 2px;
}

.rocket-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.notification-text {
    color: #1A1A33;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

/* 通知文本容器 */
.notification-text-container {
    min-height: 40px;
    overflow: hidden;
    position: relative;
    flex: 1;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.notification-text-item {
    color: #1A1A33;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    position: absolute;
    width: 100%;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    word-wrap: break-word;
    word-break: break-word;
}

.notification-text-item.active {
    transform: translateY(0);
    opacity: 1;
}

.notification-text-item.prev {
    transform: translateY(-100%);
    opacity: 0;
}

/* 向上滚动动画效果通过CSS transition实现 */

/* 渐变遮罩效果 */
.notification-bar::before,
.notification-bar::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    z-index: 1;
    pointer-events: none;
}

.notification-bar::before {
    left: 0;
    background: linear-gradient(to right, #FFF6DC 0%, transparent 100%);
}

.notification-bar::after {
    right: 0;
    background: linear-gradient(to left, #FFF6DC 0%, transparent 100%);
}

/* 上方主图片 */
.main-promotion-image {
    width: 100%;
    margin-bottom: 25px;
    text-align: center;
}

.promotion-main-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

/* 下载按钮区域 */
.download-section {
    display: flex;
    gap: 12px;
    flex-direction: row;
    justify-content: space-between;
}

.download-btn {
    flex: 1;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.store-download-img,
.play-download-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* 响应式设计 - 使用全局断点 */
@media (max-width: 1199px) {
    .credit-popup {
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    
    .popup-content {
        margin: 20px;
        max-width: none;
        width: calc(100% - 40px);
        height: calc(100vh - 40px);
        max-height: calc(100vh - 40px);
        border-radius: 20px;
        animation: popupSlideIn 0.3s ease-out;
    }
}

@media (max-width: 768px) {
    .popup-content {
        padding: 25px;
        margin: 0;
        max-width: none;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .notification-bar {
        padding: 12px;
        min-height: 45px;
    }

    .notification-text-item {
        font-size: 13px;
    }

    .promotion-main-img {
        max-width: 350px;
    }

    .download-section {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        padding: 20px;
        margin: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .notification-bar {
        padding: 10px;
        min-height: 40px;
    }

    .notification-text-item {
        font-size: 12px;
    }

    .promotion-main-img {
    }

    .download-section {
        gap: 6px;
    }
}

/* 滚动条样式 */
.popup-content::-webkit-scrollbar {
    width: 6px;
}

.popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
