/* Marketing Tool - Frontend Styles */

/* 添加滚动折扣信息开始 */
.discount-marquee-bar {
    background: #1C1C1C;
    color: white;
    padding: 12px 0;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 9999;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marqueeScroll 25s linear infinite;
    padding-left: 100%;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.discount-tag {
    background: #ffd700;
    color: #333;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin: 0 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.discount-marquee-bar strong {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0 5px;
}
/* 添加滚动折扣信息结束 */


.discount-marquee-bar strong {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0 5px;
}

/* Close button */
.mt-marquee-close {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 18px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mt-marquee-close:hover {
    background: rgba(255, 107, 53, 0.8);
    border-color: #ff6b35;
    transform: translateY(-50%) scale(1.1);
}

.mt-marquee-close:active {
    transform: translateY(-50%) scale(0.95);
}

/* 浮动社交媒体图标 */
.floating-social-icons {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0 10px 10px 0;
    padding: 10px 5px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

/* 单个图标样式 */
.social-icon {
    cursor: pointer;
    margin: 8px 0;
    background: transparent;
    transition: all 0.3s ease;
    border-radius: 5px;
    padding: 5px;
}

.social-icon:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.2);
}

.social-icon img {
    width: 30px;
    height: 30px;
    display: block;
    transition: transform 0.3s ease;
}

.social-icon:hover img {
    transform: scale(1.1);
}

/* 弹窗样式 */
.custom-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    min-width: 350px;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 弹窗头部 */
.popup-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.popup-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.6em;
    font-weight: bold;
}

.popup-icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

/* 弹窗内容 */
.popup-body {
    color: #666;
    line-height: 1.6;
}

.popup-body p {
    margin-bottom: 20px;
    text-align: center;
}

.social-link {
    text-align: center;
    margin-top: 20px;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.button:hover {
    background: #005a87;
    color: white;
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    border-radius: 50%;
    z-index: 10;
}

.close-btn:hover {
    color: #333;
    background: #f5f5f5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .discount-marquee-bar {
        font-size: 12px;
        padding: 10px 0;
    }

    .marquee-content {
        animation-duration: 20s;
    }

    .discount-tag {
        font-size: 10px;
        padding: 2px 6px;
        margin: 0 5px;
    }

    .floating-social-icons {
        padding: 8px 3px;
    }

    .social-icon img {
        width: 25px;
        height: 25px;
    }

    .discount-text {
        font-size: 12px;
        padding: 8px 3px;
    }

    .popup-content {
        min-width: 300px;
        max-width: 90%;
        margin: 20px;
        padding: 20px;
    }

    .popup-header {
        flex-direction: column;
        text-align: center;
    }

    .popup-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .popup-header h3 {
        font-size: 1.4em;
    }
}

@media (max-width: 480px) {
    .popup-content {
        width: 95%;
        max-width: 350px;
    }

    .popup-header h3 {
        font-size: 1.3em;
    }

    .popup-body p {
        font-size: 14px;
    }
}

/* 折扣按钮样式 */
.discount-button {
    cursor: pointer;
    margin: 8px 0;
    background: transparent;
    transition: all 0.3s ease;
    border-radius: 5px;
    padding: 12px 5px;
    border: 0px solid rgb(255, 255, 255);
    margin-top: 15px;
    position: relative;
    margin-left: 8px;
    padding-left: 5px;
    margin-top: 5px;
}

.discount-button:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.2);
}

.discount-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #000000;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    display: block;
    line-height: 1.2;
}

/* 折扣弹窗专用样式 - 修正居中问题 */
.discount-popup-content {
    display: flex;
    background-color: #fff;
    width: 80%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: popupSlideUp 0.4s ease;
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 折扣弹窗左侧图片区域 */
.discount-popup-content .popup-image {
    width: 45%;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.discount-popup-content .popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 折扣弹窗右侧内容区域 */
.discount-popup-content .popup-right {
    width: 55%;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 折扣表单样式 */
.discount-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.discount-input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

.discount-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 5px rgba(0, 124, 186, 0.3);
}

.discount-submit {
    background-color: #ff6600;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.discount-submit:hover {
    background-color: #e65c00;
}

.discount-terms {
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    text-align: center;
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .popup-content {
        width: 95%;
        max-width: 350px;
    }

    .popup-header h3 {
        font-size: 1.3em;
    }

    .popup-body p {
        font-size: 14px;
    }

    .discount-popup-content {
        width: 98%;
        max-width: 350px;
    }

    .discount-popup-content .popup-right {
        padding: 20px;
    }

    .discount-input {
        padding: 10px 12px;
        font-size: 14px;
    }
}