.wrapper {
    margin: 20px;
}

/* 输入框大小 */
.input-min-size {
    width: 400px;
}

/* flex布局 */
.inner-block {
    display: flex;
}

#navbar{
    height: 230px;
}

/*绘制线的样式*/
.line-style {
    /*z-index: 0;*/
    height: 4px;
    border: 4px dashed #003399;
}

/*绘制普通线*/
.line-style1 {
    /*z-index: 0;*/
    height: 2px;
    border: 2px solid black;
}


/* div块内居中 */
.mid {
    display: flex;
    justify-content: center;
    align-items: center;
    align-content: center;
}

/*绘制正方体*/
.s-box {
    font-size: 25px;
    width: 60px;
    height: 60px;
    background-color: #99CC99;
    border: 1px solid black;
}

/*滑块容器*/
.slider-wrapper {
    display: flex;
    justify-content: right;
    padding-right: 40px;
    margin-to: 40px;
    align-content: center;
    align-items: center
}

/* 绘制长方体 */
.l-box {
    font-size: 25px;
    width: 80px;
    height: 60px;
    background-color: #CCFFCC;
    border: 1px solid black;
}

/* 绘制长方体 */
.l-box-right {
    font-size: 25px;
    width: 80px;
    height: 60px;
    background-color: #99CC99;
    border: 1px solid black;
}

.l-box-changed {
    font-size: 25px;
    width: 80px;
    height: 60px;
    background-color: rgb(255, 153, 102);
    border: 1px solid black;
}

/*.l-box-changed {*/
/*    font-size: 25px;*/
/*    width: 80px;*/
/*    height: 60px;*/
/*    background-color: #99CC99;*/
/*    border: 1px solid black;*/
/*}*/

.l-box-changedd {
    font-size: 25px;
    width: 80px;
    height: 60px;
    background-color: #CCFFCC;
    border: 1px solid black;
}
/*清除div之间的空隙*/
.clear {
    padding: 0px;
    margin: 0px;
}

/* 绘制横线 */
.line {
    width: 60px; /* 线的宽度 */
    height: 4px; /* 线的高度 */
    background-color: black; /* 线的颜色 */
}

/*绘制下箭头*/
.arrow-up {
    width: 0;
    height: 8px;
    border-left: 8px solid transparent; /* 左边框透明 */
    border-right: 8px solid transparent; /* 右边框透明 */
    border-bottom: 8px solid black; /* 上边框是箭头的主体，颜色根据需要设置 */
    /* 为了让箭头居中显示，可以添加一些额外的样式 */
    /*display: inline-block; !* 让元素可以像文本一样设置对齐方式 *!*/
    vertical-align: top; /* 垂直居中对齐 */
    /*margin-right: 5px; !* 根据需要调整与其他内容的间距 *!*/
    margin-top: 0;
}

/*绘制下箭头*/
.arrow-down {
    width: 0;
    height: 8px;
    border-left: 8px solid transparent; /* 左边框透明 */
    border-right: 8px solid transparent; /* 右边框透明 */
    border-top: 8px solid black; /* 上边框是箭头的主体，颜色根据需要设置 */
    /* 为了让箭头居中显示，可以添加一些额外的样式 */
    /*display: inline-block; !* 让元素可以像文本一样设置对齐方式 *!*/
    vertical-align: top; /* 垂直居中对齐 */
    /*margin-right: 5px; !* 根据需要调整与其他内容的间距 *!*/
    margin-top: 0;
}

/*绘制竖线*/
.vertical-line {
    width: 4px; /* 竖线的宽度 */
    height: 60px; /* 竖线的高度，可以根据需要调整 */
    background-color: black; /* 竖线的颜色，可以根据需要设置为其他颜色 */
    /* 可选：设置居中显示或其他布局属性 */
    /*margin: 0 auto; !* 如果需要，可以将竖线在其父元素中居中显示 *!*/
    /* 注意：margin: 0 auto; 在块级元素且其父元素有指定宽度时有效，对于简单的竖线，通常不需要 */
}


/*绘制右箭头*/
.arrow-right {
    position: relative;
    position: relative;
    height: 0;
    width: 0;
}

.arrow-right::after {
    content: '';
    position: absolute;
    left: 0;
    border: solid transparent;
    top: 50%;
    transform: translateY(-50%);
}

/* 对于不同大小的箭头，调整这些属性值 */
.arrow-right--small::after {
    border-width: 8px; /* 箭头的大小 */
    border-left-color: #333131; /* 箭头的颜色 */
}

.arrow-right--medium::after {
    border-width: 15px;
    border-left-color: black;
}

.arrow-right--large::after {
    border-width: 20px;
    border-left-color: black;
}

/* 线的容器 */
.line-wrapper {
    display: flex;
    justify-content: left;
    align-items: center;
    height: 60px;
    width: 68px;
}

.stack-line-wrapper {
    display: flex;
    justify-content: left;
    align-items: center;
    height: 60px;
    width: 90px;
}

/* 绘制线加上箭头 */
.line-style::after {
    content: '';
    position: absolute;
    top: -10px; /* 控制箭头位置 */
    right: -10px; /* 控制箭头位置 */
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 15px; /* 控制箭头大小 */
    border-color: transparent transparent transparent #003399; /* 控制箭头颜色 */
}


/* 出现的从下至上动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease-in-out forwards;
}

/* 从上面出现的动画效果 */
@keyframes upIn {
    from {
        opacity: 0;
        transform: translateY(-20px)
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.up-in {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeIn 0.5s ease-in-out forwards;
}

/* 逐步显示的动画效果 */
@keyframes comeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.come-in {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.kong{
    font-size: 25px;
    width: 80px;
    height: 60px;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}
#splitContainer {
    height: 100%;
    display: flex;
}
.panel {
    padding: 10px;
    overflow: auto;
}
.panel-left {
    background-color: #f0f0f0;
}
.panel-right {
    /*background-color: #e0e0e0;*/
}


.page-main {
    text-align: center;
}
#input_text {
    padding: 8px;
    width: 400px;
    height: 100px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 13px;
    line-height: 1.5;
}
button {
    margin-top: 10px;
    width: 100px;
    height: 36px;
    background-color: #187cff;
    border: none;
    border-radius: 3px;
    outline: none;
    color: #fff;
    font-size: 14px;
}
/* 圆形 */
.s-round {
    font-size: 25px;
    width: 60px;
    height: 60px;
    background-color: #99CC99;
    border: 1px solid black;
    border-radius: 50%; /* 修改为圆形 */
}
.StackWrapper{
    justify-content: center;
    align-items: center;
    align-content: center;
}

.stack-line {
    width: 60px; /* 线的宽度 */
    height: 4px; /* 线的高度 */
    background-color: black; /* 线的颜色 */
}
.stack-line {
    width: 60px; /* 线的宽度 */
    height: 4px; /* 线的高度 */
    background-color: black; /* 线的颜色 */
}
/* 更改颜色 */
.change-color {
    background-color: rgb(255, 153, 102);
}


/* 定义一个名为 colorFade 的动画 */
@keyframes colorFade {
    0% {
        background-color: #99CC99;
    }
    100% {
        background-color: rgb(255, 153, 102);
    }
}

/* 应用动画到具体的元素上 */
.animated-background {
    animation: colorFade 1s; /* 动画名称，持续时间，和重复次数 */
}

/* 汉诺塔 */
.towers {
    display: flex;
    justify-content: center; /* 居中对齐整个容器 */
    align-items: flex-end; /* 使得所有的倒T型底部对齐 */
    margin-top: 100px;
}
.tower {
    position: relative;
    width: 100px; /* 水平部分的宽度 */
    height: 10px;  /* 水平部分的高度 */
    background-color: black;
    margin: 0 20px; /* 左右添加20px的间距 */
}

.tower::before {
    content: '';
    position: absolute;
    top: -150px; /* 垂直部分的高度的负值 */
    left: 45px; /* 使垂直部分水平居中 */
    width: 10px; /* 垂直部分的宽度 */
    height: 150px; /* 垂直部分的高度 */
    background-color: black;
}

/* 盘片 */
.disc {
    position: absolute;
    left: 50%; /* 水平居中 */
    transform: translateX(-50%); /* 确保水平居中 */
    background-color: rgb(216, 134, 10); /* 盘片颜色 */
    border-radius: 5px; /* 圆角 */
    margin-bottom: 5px; /* 盘片间隔 */
    border: 2px solid black; /* 黑色边框，宽度为2px */
}

/* 定义每个盘片的大小和位置 */
.disc1 { width: 90px; height: 25px; bottom: 5px;}
.disc2 { width: 70px; height: 25px; bottom: 30px;}
.disc3 { width: 50px; height: 25px; bottom: 55px;}

.l-box-hanoi {
    font-size: 25px;
    width: 110px;
    height: 50px;
    background-color: #99CC99;
    border: 1px solid black;
    margin-left: 360px; /* 向右移动整个div */
}


/*绘制线的样式*/
.line-postinsertlist {

    z-index: 0;
    height: 4px;
    border: 2px solid #000000;
}

.line-postinsertlist::after {
    content: '';
    position: absolute;
    top: -10px; /* 控制箭头位置 */
    right: 50px; /* 控制箭头位置 */
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 15px solid #000000; /* 改变颜色可以改变箭头颜色 */
}

/*绘制箭头线*/
.line-style2 {

    z-index: 0;
    height: 2px;
    border: 2px solid black;
}

/* 绘制线加上箭头 */
.line-style2::before {
    content: '';
    position: absolute;
    top: -10px; /* 控制箭头位置 */
    right: -10px; /* 控制箭头位置 */
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 15px; /* 控制箭头大小 */
    border-color: transparent transparent transparent black; /* 控制箭头颜色 */
}


/*前序遍历建立二叉树*/
.char-container {
    display: flex; /* 使用 flexbox 布局 */
    align-items: center; /* 垂直居中 */
}

.char-box {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border: 2px solid red;
    border-radius: 50%;
    margin: 5px;
    background-color: orange;
    font-size: 1.2rem;
    font-weight: bold;
    color: black;
}

.highlight {
    transform: scale(1.5); /* 放大1.5倍 */
    transition: transform 0.3s; /* 设置过渡效果 */
}


/*绘制左箭头*/
.arrow-left{
    position: relative;
    position: relative;
    height: 0;
    width: 0;
}

.arrow-left::before {
    content: '';
    position: absolute;
    right: 0;
    border: transparent solid;
    top: 50%;
    transform: translateY(-50%);
}
.arrow-left--small::before {
    border-width: 8px; /* 箭头的大小 */
    border-right-color: #333131; /* 箭头的颜色 */
}

.line-wrapper2 {
    display: flex;
    justify-content: left;
    align-items: center;
    height: 30px;
    width: 68px;
}


/*3_6链栈的入栈*/
.stack-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 75px;
}

.stack-element {
    display: flex;
    border: 2px solid #99CC99;
    margin-bottom: 30px; /* 间隔 */
}

.value-box {
    width: 100px;
    height: 50px;
    background-color: #99CC99;
    border-right: 2px solid  #CCFFCC;
}

.pointer-box {
    width: 50px;
    height: 50px;
    position: relative;
    font-size: large;
}

.arrow {
    position: absolute;
    left: 50%;
    bottom: -30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 20px solid  #99CC99;
    transform: translateX(-50%);
}
.arrow::before {
    content: '';
    position: absolute;
    top: -60px; /* 直线的高度 */
    left: 50%;
    width: 2px; /* 直线的宽度 */
    height: 60px; /* 直线的高度 */
    background-color:  #99CC99; /* 直线的颜色 */
    transform: translateX(-50%);
}
.StackWrapperLinked{
    justify-content: center;
    align-items: center;
    align-content: center;
    position: relative;
}
#Wrapper-behind {
    position: absolute;
    left: 800px;
    top: 0;
    width: 100%;
}/*闪烁效果*/
@keyframes blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.blink {
    animation: blink 1s infinite;
}
/*闪烁效果*/
@keyframes blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.blink {
    animation: blink 1s infinite;
}


/*2_2顺序表的取值*/
/* 定义CSS变量及其默认值 */
:root {
    --x-start: 0;
    --y-start: 0;
    --x-move: 200px;
    --y-move: -90px;
    --y-end: 0;
}

/* 使用CSS变量定义动画 */
@keyframes numbermove {
    0% {
        transform: translateX(var(--x-start)) translateY(var(--y-start));
    }
    50% {
        transform: translateX(var(--x-start)) translateY(var(--y-move));
    }
    100% {
        transform: translateX(var(--x-move)) translateY(var(--y-move));
    }
}

/* 定义动画应用时的样式 */
.animated-number {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000; /* 设置一个高的z-index值 */
    animation: numbermove 1s forwards;
}

/*并查集*/
/*.text-center {*/
/*    display: flex;*/
/*    justify-content: flex-start; !* 左对齐 *!*/
/*}*/
.centeredinit {
    display: flex;
    align-items: flex-end; /* 底部对齐 */
    justify-content: center; /* 水平居中对齐 */
    text-align: center;
}

.centeredinit input {
    width: 300px;
    margin-right: 10px; /* 调整按钮和输入框之间的间距 */
}
.centered {
    display: flex;
    align-items: flex-end; /* 底部对齐 */
    justify-content: center; /* 水平居中对齐 */
    text-align: center;
}

.centered input {
    width: 400px;
    margin-right: 10px; /* 调整按钮和输入框之间的间距 */
}
.Compression {
    display: flex;
    align-items: flex-end; /* 底部对齐 */
    justify-content: center; /* 水平居中对齐 */
    text-align: center;
}

.Compression input {
    width: 400px;
    margin-right: 10px; /* 调整按钮和输入框之间的间距 */
}
.centeredinit button {
    /*margin-right: 10px; !* 调整按钮和输入框之间的间距 *!*/
    border-radius: 0;
    border-right: none;
}
#initBtn{
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
#stopBtn {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    border-right: 1px solid #187cff; /* 左边框为1px实线 */
}
#findBtn{
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    border: 1px solid #187cff;
}

.centeredUnion {
    display: flex;
    align-items: flex-end; /* 底部对齐 */
    justify-content: center; /* 水平居中对齐 */
    text-align: center;
}

.centeredUnion input {
    width: 195px;
    margin-right: 10px; /* 调整按钮和输入框之间的间距 */
}
#partitle {
    position: absolute; /* 设置元素的定位方式为绝对定位 */
    top: 40%; /* 从顶部算起，垂直居中 */
    left: 50%; /* 从左侧算起，水平居中 */
    transform: translate(-50%, -50%); /* 通过平移来使元素的中心点与页面的中心点对齐 */
}

#sepLine {
    position: absolute; /* 设置元素的定位方式为绝对定位 */
    top: 88%; /* 从顶部算起，垂直居中 */
    left: 50%; /* 从左侧算起，水平居中 */
    transform: translate(-50%, -50%); /* 通过平移来使元素的中心点与页面的中心点对齐 */
}

/*初始化的结点样式*/
#forestContainer{
    position: absolute; /* 设置元素的定位方式为绝对定位 */
    display: flex; /* 使用 flex 布局 */
    flex-wrap: nowrap; /* 不换行排列 */
    justify-content: center; /* 水平居中 */
    left: 50%; /* 从左侧算起，水平居中 */
    top: 50%;
    transform: translate(-50%, -50%); /* 通过平移来使元素的中心点与页面的中心点对齐 */
}
#treetitle {
    position: absolute; /* 设置元素的定位方式为绝对定位 */
    top: 57%; /* 从顶部算起，垂直居中 */
    left: 50%; /* 从左侧算起，水平居中 */
    transform: translate(-50%, -50%); /* 通过平移来使元素的中心点与页面的中心点对齐 */
}

.node {
    font-size: 25px;
    width: 60px;
    height: 60px;
    background-color: #99CC99;
    border: 1px solid black;
    border-radius: 50%; /* 让边框变成一个圆形 */
    display: flex; /* 使用 flex 布局 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    text-align: center;
    margin: 12px;
    transition: background-color 0.5s; /* 定义背景颜色过渡动画，持续时间为0.3秒 */
}
.arrow-line-container {
    position: absolute;
    top: 0;
    left: 0;
}

.arrow-line {
    position: relative;
    height: 2px;
    background-color: black;
}

.arrow-line::after {
    content: "";
    position: absolute;
    top: -5px;
    right: 0;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid black;
}

.arrow {
    position: absolute;
    top: -5px;
    right: 0;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid black;
}



/*红黑树的插入*/
/* 方形 */
.s-rectangle {
    font-size: 20px;
    width: 60px;
    height: 40px;
    background-color: #99CC99;
    border: 1px solid black;
    border-radius: 0%; /* 修改为圆形 */
}
ul {
    list-style-type: none;
}
.hidden {
    display: none;
}
.clickable {
    cursor: pointer;
}
.clickable-open {
    cursor: pointer;
    text-decoration: underline;
}

/*3_18链队的出队*/
/*绘制队头*/
.h-box {
    font-size: 25px;
    width: 60px;
    height: 60px;
    background-color: #99CC99;
    border: 1px solid black;
}
/* 绘制数值域*/
.l-box {
    font-size: 25px;
    width: 80px;
    height: 60px;
    background-color: #CCFFCC;
    border: 1px solid black;
}

@keyframes fadeIn2 {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in2 {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeIn 0.5s ease-in-out forwards;
}

/* 应用动画到具体的元素上 */
.animated-background {
    animation: colorFade 1s; /* 动画名称，持续时间，和重复次数 */
}

.fade-out {
    animation: fadeOut 1s forwards;
}

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

