/* IPv6双栈部署与数据传输动画样式 */

/* 网络动画容器 */
.network-animation {
    width: 100%;
    height: 500px;
    position: relative;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

/* 控制按钮区域 */
.controls {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 15px;
}

.controls button {
    padding: 10px 20px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.controls button:hover {
    background-color: #1557b0;
}

.controls button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 图例样式 */
.legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 3px;
}

/* 步骤信息区域 */
.step-info {
    padding: 15px;
    background-color: #f0f8ff;
    border-left: 4px solid #1a73e8;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

/* 说明部分样式 */
.explanation {
    margin-top: 30px;
}

.explanation h3 {
    color: #1a73e8;
    margin-bottom: 10px;
}

.explanation p {
    margin-bottom: 15px;
    text-align: justify;
}

.explanation ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.explanation li {
    margin-bottom: 8px;
}

/* SVG元素样式 */
.router {
    fill: #e6e6e6;
    stroke: #666;
    stroke-width: 2;
}

.router-ipv4 {
    fill: #ffcccc;
}

.router-ipv6 {
    fill: #ccf2ff;
}

.router-dual {
    fill: #e6f7ff;
}

.router-text {
    font-size: 12px;
    text-anchor: middle;
    fill: #333;
    font-weight: bold;
}

.router-ip {
    font-size: 10px;
    text-anchor: middle;
    fill: #666;
}

.link {
    stroke: #999;
    stroke-width: 2;
}

.packet {
    fill: #4CAF50;
    stroke: #388E3C;
    stroke-width: 1;
}

.packet-ipv4 {
    fill: #FF5722;
    stroke: #E64A19;
}

.packet-ipv6 {
    fill: #2196F3;
    stroke: #1976D2;
}

.packet-text {
    font-size: 10px;
    text-anchor: middle;
    fill: white;
    font-weight: bold;
}

.cloud {
    fill: #f0f0f0;
    stroke: #ccc;
    stroke-width: 1;
}

.cloud-text {
    font-size: 14px;
    text-anchor: middle;
    fill: #666;
}

.host {
    fill: #d9ead3;
    stroke: #93c47d;
    stroke-width: 2;
}

.host-text {
    font-size: 12px;
    text-anchor: middle;
    fill: #333;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .network-animation {
        height: 400px;
    }
    
    .legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .controls button {
        width: 100%;
        max-width: 200px;
    }
}