/* JK Intelligent Concept Demo Styles */

.concept-demo {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-height: 500px;
}

/* 标签栏 */
.concept-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #7f8c8d;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-width: 180px;
    position: relative;
}

.tab-button:hover {
    color: #2c3e50;
    background: rgba(52, 152, 219, 0.05);
}

.tab-button.active {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #3498db;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { width: 0; }
    to { width: 100%; }
}

/* 内容区域 */
.concept-content {
    padding: 30px;
}

.concept-header {
    text-align: center;
    margin-bottom: 30px;
}

.concept-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.concept-header p {
    font-size: 1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 可视化区域 */
.visualization {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.visualization::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.03) 0%, transparent 70%);
    animation: backgroundPulse 8s ease-in-out infinite;
    pointer-events: none;
}

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

.visualization svg {
    display: block;
    margin: 0 auto;
}

/* 网络节点动画 */
.network-node {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.network-node:hover {
    r: 25;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.2));
}

.pulse {
    animation: nodePulse 1.5s ease-in-out;
}

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

.pulse-ring {
    animation: ringExpand 1.5s ease-out;
}

@keyframes ringExpand {
    0% {
        r: 20;
        opacity: 0.8;
    }
    100% {
        r: 50;
        opacity: 0;
    }
}

/* 传感器节点 */
.sensor-node {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.sensor-node:hover {
    r: 18;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.2));
}

/* LoRa 信号波动画 */
.signal-wave {
    animation-fill-mode: both;
}

.wave-1 {
    animation: waveExpand 2s ease-out;
}

.wave-2 {
    animation: waveExpand 2s ease-out 0.3s;
}

.wave-3 {
    animation: waveExpand 2s ease-out 0.6s;
}

@keyframes waveExpand {
    0% {
        r: 15;
        opacity: 0.6;
    }
    100% {
        r: 60;
        opacity: 0;
    }
}

/* 网关 */
.gateway-box {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.gateway-box:hover {
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.2));
    transform: scale(1.1);
}

/* 数据流阶段 */
.stage-node {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.stage-node:hover {
    r: 30;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.2));
}

/* 数据包动画 */
.data-packet {
    animation: packetPulse 0.8s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 8px currentColor);
}

@keyframes packetPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* 数据轨迹 */
.data-trail {
    animation: trailFade 0.5s ease-out;
}

@keyframes trailFade {
    0% {
        opacity: 0.8;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
}

/* 数据流粒子动画 */
.data-stream-particle {
    animation: streamFlow 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 6px currentColor);
}

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

/* 信号圈动画 */
.signal-ring {
    animation: ringFade 2s ease-out;
}

@keyframes ringFade {
    0% {
        opacity: 0.8;
        stroke-width: 3;
    }
    100% {
        opacity: 0;
        stroke-width: 1;
    }
}

/* 传感器读数气泡 */
.reading-bubble {
    animation: bubbleFloat 3s ease-in-out;
}

@keyframes bubbleFloat {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.8);
    }
}

/* 连接线脉冲增强 */
.connections line {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 4px rgba(52, 152, 219, 0.3));
}

/* 增强网络节点动画 */
.network-node {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.network-node.pulse {
    animation: enhancedNodePulse 1.5s ease-in-out;
    filter: drop-shadow(0 0 12px currentColor);
}

@keyframes enhancedNodePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    25% {
        opacity: 0.8;
        transform: scale(1.1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.3);
    }
    75% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* 传感器节点增强 */
.sensor-node {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sensor-node:hover {
    filter: drop-shadow(0 0 8px currentColor) brightness(1.2);
    transform: scale(1.1);
}

/* 数据流连接线 */
.flow-connection {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.flow-connection:hover {
    stroke-width: 3;
    opacity: 0.8;
}

/* 覆盖区域 */
.coverage-zone {
    cursor: pointer;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 2;
}

.coverage-zone:hover {
    opacity: 0.8 !important;
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 3;
    filter: brightness(1.1);
}

/* 图例 */
.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.legend-item:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 连接线动画 */
.connections line {
    transition: all 0.3s ease;
}

.connections line:hover {
    stroke-width: 4;
    opacity: 1;
}

.sensor-connections line {
    transition: all 0.3s ease;
}

.sensor-connections line:hover {
    stroke-width: 3;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .concept-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        min-width: auto;
        text-align: center;
    }
    
    .concept-content {
        padding: 20px 15px;
    }
    
    .concept-header h3 {
        font-size: 1.5rem;
    }
    
    .legend {
        gap: 10px;
    }
    
    .legend-item {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .visualization {
        padding: 15px 10px;
    }
    
    .visualization svg {
        width: 100%;
        height: auto;
    }
}

/* 加载动画 */
.concept-demo.loading {
    pointer-events: none;
}

.concept-demo.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.concept-demo.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1001;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 特殊效果 */
.visualization::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(52, 152, 219, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(46, 204, 113, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(231, 76, 60, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* 文字动画 */
.concept-header {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.visualization {
    animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.legend {
    animation: slideInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}