/* 智能社交电商平台背景样式 - AI智能推荐版本 */


.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 70%, rgba(255, 71, 87, 0.1) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* 智能购物元素动画 */
.intelligent-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.element {
    position: absolute;
    animation: floatElement 20s ease-in-out infinite;
}

.element:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(255, 71, 87, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.element:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: -5s;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.element:nth-child(3) {
    top: 40%;
    left: 30%;
    animation-delay: -10s;
    width: 25px;
    height: 25px;
    background: radial-gradient(circle, rgba(46, 213, 115, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.element:nth-child(4) {
    top: 70%;
    left: 50%;
    animation-delay: -15s;
    width: 35px;
    height: 35px;
    background: radial-gradient(circle, rgba(255, 165, 2, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

@keyframes floatElement {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 1;
    }
    50% {
        transform: translateY(0px) rotate(180deg);
        opacity: 0.7;
    }
    75% {
        transform: translateY(20px) rotate(270deg);
        opacity: 0.5;
    }
}

/* 数据流效果 */
.data-stream {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.data-point {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: dataFlow 8s linear infinite;
}

.data-point:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.data-point:nth-child(2) { top: 30%; left: 40%; animation-delay: 1s; }
.data-point:nth-child(3) { top: 50%; left: 60%; animation-delay: 2s; }
.data-point:nth-child(4) { top: 70%; left: 80%; animation-delay: 3s; }
.data-point:nth-child(5) { top: 20%; left: 90%; animation-delay: 4s; }
.data-point:nth-child(6) { top: 40%; left: 10%; animation-delay: 5s; }
.data-point:nth-child(7) { top: 60%; left: 30%; animation-delay: 6s; }
.data-point:nth-child(8) { top: 80%; left: 50%; animation-delay: 7s; }

@keyframes dataFlow {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(80vh) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(20vh) scale(1);
    }
    100% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
}

/* 场景化消费匹配效果 */
.scenario-matching {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.scenario-match {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, transparent 70%);
    animation: scenarioPulse 4s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.scenario-match::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: scenarioRipple 4s ease-in-out infinite;
}

.scenario-match:nth-child(1) {
    top: 25%;
    left: 25%;
    animation-delay: 0s;
}

.scenario-match:nth-child(2) {
    top: 65%;
    left: 75%;
    animation-delay: 1s;
}

.scenario-match:nth-child(3) {
    top: 45%;
    left: 45%;
    animation-delay: 2s;
}

.scenario-match:nth-child(4) {
    top: 75%;
    left: 25%;
    animation-delay: 3s;
}

@keyframes scenarioPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

@keyframes scenarioRipple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* 智能推荐连线效果 */
.recommendation-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.6), transparent);
    transform-origin: left center;
    animation: recommendationFlow 6s ease-in-out infinite;
}

.recommendation-line:nth-child(1) {
    top: 25%;
    left: 25%;
    width: 150px;
    transform: rotate(45deg);
    animation-delay: 0s;
}

.recommendation-line:nth-child(2) {
    top: 65%;
    left: 75%;
    width: 120px;
    transform: rotate(-30deg);
    animation-delay: 2s;
}

.recommendation-line:nth-child(3) {
    top: 45%;
    left: 45%;
    width: 100px;
    transform: rotate(15deg);
    animation-delay: 4s;
}

@keyframes recommendationFlow {
    0%, 100% {
        opacity: 0.3;
        transform: scaleX(0.8) rotate(var(--rotation, 0deg));
    }
    50% {
        opacity: 0.8;
        transform: scaleX(1.2) rotate(var(--rotation, 0deg));
    }
}

/* 背景切换控制按钮 */
.background-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.background-toggle-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.background-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.background-toggle-btn:active {
    transform: scale(0.95);
}

/* 主题特定的背景样式 */
.hero[data-theme="tech"] {
    background-blend-mode: screen;
}

.hero[data-theme="nature"] {
    background-blend-mode: soft-light;
}

.hero[data-theme="urban"] {
    background-blend-mode: overlay;
}

.hero[data-theme="minimal"] {
    background-blend-mode: luminosity;
}

.hero[data-theme="creative"] {
    background-blend-mode: color-dodge;
}
