/* 浮动海报样式 */

/* 浮动海报容器 */
.floating-banner {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    height: auto;
    z-index: 998;
    cursor: pointer;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 
        0 0 40px rgba(107, 142, 255, 0.7),
        0 25px 50px rgba(0, 0, 0, 0.4),
        inset 0 0 0 4px rgba(255, 255, 255, 0.9);
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
    animation: 
        bannerGlow 2s ease-in-out infinite alternate,
        bannerBounce 4s ease-in-out infinite;
    background: linear-gradient(135deg, #ff6b6b, #ffa500, #ff6b6b);
    background-size: 200% 200%;
    border: 5px solid #fff;
    opacity: 0;
    transform-origin: center center;
    will-change: transform, left, top;
}

.floating-banner:hover {
    transform: translateY(-50%) scale(1.2) !important;
    box-shadow: 
        0 0 60px rgba(83, 133, 240, 0.9),
        0 35px 70px rgba(0, 0, 0, 0.5),
        inset 0 0 0 5px rgba(255, 255, 255, 1);
    animation-play-state: paused;
}

/* 海报图片 */
.banner-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease-out;
}

.floating-banner:hover .banner-image {
    transform: scale(1.05);
}



/* 关闭按钮 */
.banner-close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: all var(--duration-200, 0.2s) var(--ease-out, ease-out);
    z-index: 2;
}

.floating-banner:hover .banner-close {
    opacity: 1;
}

.banner-close:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
}

/* 脉冲动画效果 */
.banner-pulse {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px solid #ff6b6b;
    border-radius: 15px;
    animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}

/* 闪光环效果 */
.banner-flash-ring {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 3px solid transparent;
    border-radius: 20px;
    background: linear-gradient(45deg, #ff6b6b, #ffa500, #ff6b6b, #ffa500);
    background-size: 400% 400%;
    animation: bannerRingFlash 3s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes bannerRingFlash {
    0%, 100% {
        background-position: 0% 50%;
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        background-position: 100% 50%;
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* 海报弹窗样式 */
.banner-modal .modal-content {
    max-width: 600px;
    width: 95%;
}

.banner-modal-content {
    background: linear-gradient(135deg, #fff, #f8f9fa);
}

.banner-modal .modal-header {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    text-align: center;
}

.banner-modal .modal-header h3 {
    font-size: var(--font-size-2xl, 1.5rem);
    font-weight: 700;
    margin: 0;
}

/* 海报完整显示容器 */
.banner-full-container {
    text-align: center;
    padding: var(--space-md, 16px);
}

.banner-full-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
    margin-bottom: var(--space-xl, 24px);
}

/* 海报操作按钮 */
.banner-actions {
    display: flex;
    gap: var(--space-md, 16px);
    justify-content: center;
    flex-wrap: wrap;
}

.banner-actions .btn {
    min-width: 140px;
    font-weight: 600;
}

.banner-actions .btn-primary {
    background: linear-gradient(135deg, #07c160, #00a854);
    border: none;
    color: white;
}

.banner-actions .btn-primary:hover {
    background: linear-gradient(135deg, #00a854, #07c160);
    transform: translateY(-2px);
}

.banner-actions .btn-secondary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border: none;
}

.banner-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
}

/* 动画关键帧 - 右侧垂直浮动 */
@keyframes bannerVerticalFloat {
    0%, 100% {
        transform: translateY(-50%) rotate(0deg);
    }
    25% {
        transform: translateY(-60%) rotate(1deg);
    }
    50% {
        transform: translateY(-40%) rotate(0deg);
    }
    75% {
        transform: translateY(-55%) rotate(-1deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 发光效果动画 */
@keyframes bannerGlow {
    0% {
        filter: brightness(1) saturate(1);
        background-position: 0% 50%;
    }
    100% {
        filter: brightness(1.2) saturate(1.3);
        background-position: 100% 50%;
    }
}

/* 轻微弹跳效果 */
@keyframes bannerBounce {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}



/* 响应式设计 */
@media (max-width: 768px) {
    .floating-banner {
        width: 220px;
        /* 移除固定的右边距，让JavaScript控制位置 */
    }
    
    .banner-modal .modal-content {
        width: 98%;
        margin: 8px;
    }
    
    .banner-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .banner-actions .btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .floating-banner {
        width: 180px;
        /* 移除固定的右边距，让JavaScript控制位置 */
    }
    
    .banner-close {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .banner-modal .modal-header h3 {
        font-size: 1.125rem;
    }
}

/* 隐藏状态 */
.floating-banner.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    visibility: hidden;
}

/* 打印时隐藏 */
@media print {
    .floating-banner,
    .banner-modal {
        display: none !important;
    }
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    .floating-banner,
    .banner-pulse,
    .banner-image {
        animation: none;
        transition: none;
    }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
    .floating-banner {
        border: 4px solid #000;
    }
    
    .banner-close {
        background: #000;
        color: #fff;
    }
}

/* 促销横幅样式 */
.promo-banner {
    position: relative;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #8b9cec 25%, 
        #7386e9 50%, 
        #8b9cec 75%, 
        #667eea 100%);
    background-size: 400% 400%;
    animation: promoGradientShift 4s ease-in-out infinite;
    padding: 0;
    margin: 0;
    margin-top: 80px; /* 为固定header留出空间 */
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(129, 147, 228, 0.4),
        inset 0 0 0 2px rgba(120, 162, 224, 0.2);
}

.promo-banner-inner {
    position: relative;
    z-index: 2;
    padding: 40px 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
}

/* 闪光标签 */
.promo-flash {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
    animation: promoFlash 1.5s ease-in-out infinite;
    z-index: 10;
}

/* 标题样式 */
.promo-title {
    text-align: center;
    margin: 30px 0 10px;
    font-size: 2.6rem;
    font-weight: 900;
    text-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(255, 255, 255, 1),
        0 0 100px rgba(255, 255, 255, 0.8);
    letter-spacing: 4px;
    animation: titlePulse 3s ease-in-out infinite;
}

.promo-highlight {
    display: block;
    color: #fff;
    font-size: 1.4em;
    margin-bottom: 10px;
    animation: promoTextGlow 1.5s ease-in-out infinite alternate;
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(255, 255, 255, 1),
        0 0 60px rgba(255, 255, 255, 0.8);
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.3);
    transform: scale(1);
}

.promo-main {
    display: block;
    color: #fff;
    font-size: 1.8em;
    font-weight: 1000;
    text-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(255, 255, 255, 1),
        0 0 120px rgba(255, 255, 255, 0.9);
    -webkit-text-stroke: 2px rgba(0, 0, 0, 0.4);
    letter-spacing: 5px;
    animation: mainTextBounce 2s ease-in-out infinite;
}

.promo-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 30px;
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    animation: subtitleShake 4s ease-in-out infinite;
}

/* 优惠项目网格 */
.promo-offers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 40px 0;
    padding: 0 20px;
}

.offer-item {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 25px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(255, 255, 255, 0.9),
        inset 0 0 0 2px rgba(102, 126, 234, 0.4),
        0 0 30px rgba(102, 126, 234, 0.2);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: offerFloat 6s ease-in-out infinite;
    border: 3px solid rgba(102, 126, 234, 0.3);
}

.offer-item:nth-child(2) {
    animation-delay: -2s;
}

.offer-item:nth-child(3) {
    animation-delay: -4s;
}

.offer-item:hover {
    transform: translateY(-15px) scale(1.08);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.4),
        0 0 0 5px rgba(255, 255, 255, 1),
        inset 0 0 0 3px rgba(102, 126, 234, 0.6),
        0 0 50px rgba(102, 126, 234, 0.5);
    border: 3px solid rgba(102, 126, 234, 0.6);
}

/* 优惠徽章 */
.offer-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    padding: 6px 18px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.5);
    animation: badgePulse 2s ease-in-out infinite;
}

.offer-service {
    font-size: 1.8rem;
    font-weight: 900;
    color: #333;
    margin: 15px 0;
    letter-spacing: 2px;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.2),
        0 0 10px rgba(0, 0, 0, 0.1);
    animation: serviceShine 3s ease-in-out infinite;
}

.offer-price {
    margin: 20px 0;
}

.offer-value {
    font-size: 4rem;
    font-weight: 900;
    color: #667eea;

    line-height: 1;
}

.offer-unit {
    font-size: 1.8rem;
    color: #764ba2;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.offer-bonus {
    margin: 15px 0;
}

.bonus-item {
    background: linear-gradient(45deg, #07c160, #00a854);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 600;
    margin: 5px;
    display: inline-block;
    box-shadow: 0 3px 8px rgba(7, 193, 96, 0.3);
}

/* 行动按钮 */
.promo-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}

.btn-promo-primary {
    background: linear-gradient(135deg, #ff6b6b, #ffa500) !important;
    color: white !important;
    border: none !important;
    padding: 22px 50px !important;
    font-size: 1.4rem !important;
    font-weight: 900 !important;
    letter-spacing: 2px !important;
    border-radius: 60px !important;
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.8) !important;
    box-shadow: 
        0 15px 40px rgba(255, 107, 107, 0.6),
        0 0 0 4px rgba(255, 255, 255, 1),
        0 0 30px rgba(255, 107, 107, 0.4) !important;
    transition: all 0.3s ease !important;
    animation: buttonMegaGlow 1.8s ease-in-out infinite alternate;
    position: relative;
    overflow: hidden;
}

.btn-promo-primary:hover {
    transform: translateY(-6px) scale(1.12) !important;
    box-shadow: 
        0 25px 60px rgba(255, 107, 107, 0.8),
        0 0 0 5px rgba(255, 255, 255, 1),
        0 0 50px rgba(255, 107, 107, 0.6) !important;
}

.btn-promo-secondary {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #667eea !important;
    border: 4px solid #667eea !important;
    padding: 18px 45px !important;
    font-size: 1.4rem !important;
    font-weight: 900 !important;
    letter-spacing: 2px !important;
    border-radius: 60px !important;
    text-decoration: none !important;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.2),
        0 0 10px rgba(102, 126, 234, 0.3) !important;
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.3),
        0 0 20px rgba(102, 126, 234, 0.2) !important;
    transition: all 0.3s ease !important;
    animation: secondaryButtonPulse 2.5s ease-in-out infinite;
}

.btn-promo-secondary:hover {
    background: #667eea !important;
    color: white !important;
    transform: translateY(-6px) scale(1.12) !important;
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.8) !important;
    box-shadow: 
        0 20px 50px rgba(102, 126, 234, 0.5),
        0 0 40px rgba(102, 126, 234, 0.4) !important;
}

/* 紧迫感文字 */
.promo-urgency {
    text-align: center;
    margin-top: 20px;
}

.urgency-text {
    background: rgba(255, 255, 255, 0.95);
    color: #ff6b6b;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    animation: urgencyBlink 2.5s ease-in-out infinite;
}

/* 装饰元素 */
.promo-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.decoration-element {
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    animation: decorationFloat 8s ease-in-out infinite;
}

.decoration-1 { top: 10%; left: 5%; animation-delay: 0s; }
.decoration-2 { top: 20%; right: 8%; animation-delay: -1s; }
.decoration-3 { top: 60%; left: 3%; animation-delay: -2s; }
.decoration-4 { bottom: 20%; right: 10%; animation-delay: -3s; }
.decoration-5 { bottom: 10%; left: 8%; animation-delay: -4s; }
.decoration-6 { top: 40%; right: 5%; animation-delay: -5s; }

/* 动画关键帧 */
@keyframes promoGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes promoFlash {
    0%, 100% { 
        transform: translateX(-50%) scale(1);
        box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
    }
    50% { 
        transform: translateX(-50%) scale(1.1);
        box-shadow: 0 6px 25px rgba(255, 23, 68, 0.6);
    }
}

@keyframes promoTextGlow {
    0% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); }
    100% { text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.8); }
}

@keyframes offerFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes buttonMegaGlow {
    0% { 
        box-shadow: 
            0 15px 40px rgba(255, 107, 107, 0.6),
            0 0 0 4px rgba(255, 255, 255, 1),
            0 0 30px rgba(255, 107, 107, 0.4);
        transform: scale(1);
    }
    100% { 
        box-shadow: 
            0 15px 40px rgba(255, 107, 107, 0.8),
            0 0 0 4px rgba(255, 255, 255, 1),
            0 0 50px rgba(255, 107, 107, 0.6);
        transform: scale(1.02);
    }
}

@keyframes secondaryButtonPulse {
    0%, 100% { 
        box-shadow: 
            0 10px 30px rgba(102, 126, 234, 0.3),
            0 0 20px rgba(102, 126, 234, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 
            0 10px 30px rgba(102, 126, 234, 0.5),
            0 0 30px rgba(102, 126, 234, 0.4);
        transform: scale(1.02);
    }
}

@keyframes urgencyBlink {
    0%, 90%, 100% { opacity: 1; }
    95% { opacity: 0.7; }
}

@keyframes decorationFloat {
    0%, 100% { 
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    25% { 
        transform: translateY(-10px) rotate(90deg);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(0) rotate(180deg);
        opacity: 0.6;
    }
    75% { 
        transform: translateY(-5px) rotate(270deg);
        opacity: 0.8;
    }
}

/* 新增强化动画效果 */
@keyframes titlePulse {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 
            4px 4px 8px rgba(0, 0, 0, 0.6),
            0 0 50px rgba(255, 255, 255, 1),
            0 0 100px rgba(255, 255, 255, 0.8);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 
            5px 5px 10px rgba(0, 0, 0, 0.8),
            0 0 80px rgba(255, 255, 255, 1),
            0 0 150px rgba(255, 255, 255, 1);
    }
}

@keyframes mainTextBounce {
    0%, 100% { 
        transform: translateY(0) scale(1);
    }
    25% { 
        transform: translateY(-3px) scale(1.02);
    }
    50% { 
        transform: translateY(0) scale(1.05);
    }
    75% { 
        transform: translateY(-2px) scale(1.02);
    }
}

@keyframes subtitleShake {
    0%, 100% { 
        transform: translateX(0);
    }
    10% { 
        transform: translateX(-2px);
    }
    20% { 
        transform: translateX(2px);
    }
    30% { 
        transform: translateX(-1px);
    }
    40% { 
        transform: translateX(1px);
    }
    50% { 
        transform: translateX(0);
    }
}

@keyframes priceGlow {
    0% { 
        text-shadow: 
            3px 3px 6px rgba(0, 0, 0, 0.4),
            0 0 30px rgba(102, 126, 234, 0.8),
            0 0 60px rgba(102, 126, 234, 0.6);
        transform: scale(1);
    }
    100% { 
        text-shadow: 
            4px 4px 8px rgba(0, 0, 0, 0.6),
            0 0 50px rgba(102, 126, 234, 1),
            0 0 100px rgba(102, 126, 234, 0.8);
        transform: scale(1.08);
    }
}

@keyframes serviceShine {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: scale(1.02);
        text-shadow: 
            2px 2px 4px rgba(0, 0, 0, 0.3),
            0 0 15px rgba(0, 0, 0, 0.2);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .promo-title {
        font-size: 3.2rem;
    }
    
    .promo-subtitle {
        font-size: 1.4rem;
    }
    
    .promo-offers {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
    }
    
    .offer-item {
        padding: 30px 20px;
    }
    
    .offer-service {
        font-size: 1.6rem;
    }
    

    
    .offer-unit {
        font-size: 1.5rem;
    }
    
    .promo-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn-promo-primary,
    .btn-promo-secondary {
        width: 300px;
        max-width: 95%;
        font-size: 1.3rem !important;
        padding: 20px 40px !important;
    }
    
    .decoration-element {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .promo-banner-inner {
        padding: 35px 0;
    }
    
    .promo-title {
        font-size: 2.8rem;
        margin: 25px 0 12px;
        letter-spacing: 2px;
    }
    
    .promo-subtitle {
        font-size: 1.2rem;
        margin-bottom: 25px;
    }
    
    .promo-flash {
        font-size: 15px;
        padding: 10px 22px;
        top: 18px;
    }
    
    .offer-service {
        font-size: 1.4rem;
    }
    
    .offer-value {
        font-size: 2.8rem;
    }
    
    .offer-unit {
        font-size: 1.3rem;
    }
    
    .btn-promo-primary,
    .btn-promo-secondary {
        font-size: 1.2rem !important;
        padding: 18px 35px !important;
        width: 280px;
    }
    
    .decoration-element {
        font-size: 1.5rem;
    }
}

/* 减少动画（无障碍） */
@media (prefers-reduced-motion: reduce) {
    .promo-banner,
    .promo-flash,
    .promo-title,
    .promo-highlight,
    .promo-main,
    .promo-subtitle,
    .offer-item,
    .offer-badge,
    .offer-service,
    .offer-value,
    .btn-promo-primary,
    .btn-promo-secondary,
    .urgency-text,
    .decoration-element {
        animation: none;
    }
    
    .offer-item:hover,
    .btn-promo-primary:hover,
    .btn-promo-secondary:hover {
        transform: none;
    }
} 