#animation {
    font-size: 14px;
    display: grid;
    grid-template-rows: repeat(13, 1fr);
    grid-template-columns: [num] 35px [tab1 code] 135px [end-tab1] 5px [tab2] 135px [end-tab2] 155px [end-code exe-1] 115px [exe-2] 115px [exe-3];
    position: relative;
    padding: 15px 0;
}

#tab1 {
    grid-row: 1/2;
    grid-column: tab1/end-tab1;
    place-self: center;
    text-align: center;
    width: 100%;
    margin-bottom: -1px;
    z-index: 2;
    border: 1px solid black;
    font-size: 12px;
    color: darkslategray;
    padding-top: 2px;
}

#tab2 {
    grid-row: 1/2;
    grid-column: tab2/end-tab2;
    place-self: center;
    text-align: center;
    width: 100%;
    margin-bottom: -1px;
    z-index: 2;
    border: 1px solid black;
    font-size: 12px;
    color: darkslategray;
    padding-top: 2px;
}

.selected {
    border-bottom: 4px solid white !important;
}

.tab-failed-hide {
    font-weight: bold;
    color: white;
}

.tab-failed-show {
    font-weight: bold;
    color: #cf3322;
}

#tab-log {
    grid-row: 10/11;
    grid-column: tab1/end-tab1;
    place-self: center;
    text-align: center;
    width: 100%;
    margin-bottom: -1px;
    z-index: 2;
    border: 1px solid black;
    font-size: 12px;
    color: darkslategray;
    border-bottom: 4px solid white;
}

.first-row {
    grid-column: num/exe-3;
    grid-row: 1/2;
    border-bottom: 1px solid black;
}

.first-log-row {
    grid-column: num/exe-3;
    grid-row: 10/11;
    border-bottom: 1px solid black;
}

.num {
    grid-column: num/tab1;
    place-self: center;
    padding: 2px 0;
    font-size: 12px;
    margin: 1px;
    color: darkslateblue;
}

.code {
    grid-column: code/end-code;
    justify-self: left;
    align-self: center;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hide {
    display: none !important;
}

.exe1 {
    position: relative;
    grid-column: exe-1/exe-2;
    place-self: center;
    font-size: 12px;
    border: 1px solid gray;
    color: gray;
    padding: 0 1px;
    width: 105px;
    text-align: center;
}

.exe1-log-line {
    position: relative;
    margin-top: 20px;
    height: 180%;
    grid-column: exe-1/exe-2;
    place-self: center;
    border-left: 1px solid gray;
}

.exe1-column-higlight {
    position: absolute;
    grid-column: exe-1/exe-2;
    grid-row: 2/12;
    height: 100%;
    width: 100%;
    background-color: cornsilk;
    z-index: -10;
}

.exe2-column-higlight {
    position: absolute;
    grid-column: exe-2/exe-3;
    grid-row: 2/12;
    height: 100%;
    width: 100%;
    background-color: cornsilk;
    z-index: -10;
}

.exe3-column-higlight {
    position: absolute;
    grid-column: exe-3/9;
    grid-row: 2/12;
    height: 100%;
    width: 100%;
    background-color: cornsilk;
    z-index: -10;
}

.exe2 {
    position: relative;
    grid-column: exe-2/exe-3;
    place-self: center;
    font-size: 12px;
    border: 1px solid gray;
    color: gray;
    padding: 0 1px;
    width: 105px;
    text-align: center;
}

.exe2-log-line {
    position: relative;
    margin-top: 20px;
    height: 180%;
    grid-column: exe-2/exe-3;
    place-self: center;
    border-left: 1px solid gray;
}

.exe3 {
    position: relative;
    grid-column: exe-3/9;
    place-self: center;
    font-size: 12px;
    border: 1px solid gray;
    color: gray;
    padding: 0 1px;
    width: 105px;
    text-align: center;
}

.variable {
    color: darkgoldenrod;
}

.string {
    color: green;
}

.function {
    color: darkgoldenrod;
    font-weight: bold;
    ;
}

.highlight-row {
    height: 23px;
    position: absolute;
    top: -2px;
    left: -5px;
    right: 0;
    padding: 3px;
    place-self: center;
    background-color: cornsilk;
    grid-column: 1/9;
    z-index: -1;
}

.highlight-row-63 {
    grid-row-start: 2;
}

.highlight-row-64 {
    grid-row-start: 3;
}

.highlight-row-65 {
    grid-row-start: 4;
}

.highlight-row-66 {
    grid-row-start: 5;
}

.highlight-row-67 {
    grid-row-start: 6;
}

.highlight-row-68 {
    grid-row-start: 7;
}

.highlight-row-69 {
    grid-row-start: 8;
}

.highlight-row-70 {
    grid-row-start: 9;
}

.error {
    position: absolute;
    grid-column: 1/exe-3;
    grid-row: 6/9;
    place-self: center;
    z-index: 20;
    background-color: #cf3322;
    width: 100%;
    height: 100%;
    padding: 15px;
    box-shadow: 8px 8px black;
    color: white;
    font-weight: bold;
    text-align: center;
}

.success {
    position: absolute;
    grid-column: 1/exe-3;
    grid-row: 6/9;
    place-self: center;
    z-index: 20;
    background-color: #24a615;
    width: 100%;
    height: 100%;
    padding: 15px;
    box-shadow: 8px 8px black;
    color: white;
    font-weight: bold;
    text-align: center;
}

.log {
    grid-column: 1/9;
    grid-row: 12/13;
    margin-top: -20px;
    margin-left: -100px;
    white-space: nowrap;
}

.log-entry {
    display: inline-block;
    position: relative;
    place-self: center;
    font-size: 12px;
    border: 1px solid gray;
    width: 105px;
    margin-left: -3px;
    padding: 0 1px;
    text-align: center;
}

.log-entry::before {
    border-top: 1px solid gray;
    position: absolute;
    left: -6px;
    bottom: 50%;
    width: 6px;
    content: '';
}

div>.log-entry:first-child {
    border-left: none;
}

div>.log-entry:first-child::before {
    display: none;
}

.highlight-log {
    background-color: cornsilk;
    border: 2px solid black;
    margin-left: -4px;
}

.play-button {
    border: 1px solid black;
    grid-column: num/code;
    grid-row: 13/14;
    text-align: center;
}

.play-button:hover {
    cursor: pointer;
}

.play-button.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        background-color: white;
    }

    40% {
        background-color: cornsilk;
    }

    60% {
        background-color: cornsilk;
    }

    100% {
        background-color: white;
    }
}

.timeline {
    grid-column: code/9;
    grid-row: 13/14;
    align-self: center;
    white-space: nowrap;
}

/* Mobile adjustments for animation */
@media only screen and (max-width: 720px) {
    #animation {
        margin-left: -15px;
        font-size: 11px;
        grid-template-columns: [num] 20px [tab1 code] 135px [end-tab1] 5px [tab2] 135px [end-tab2] 70px [end-code exe-1] 80px [exe-2] 80px [exe-3];
        max-width: 120%;
        overflow-x: scroll;
    }

    #tab1,
    #tab2,
    #tab-log,
    .exe1,
    .exe2,
    .exe3,
    .num,
    .log-entry {
        font-size: 9px;
    }

    .timeline {
        font-size: 11px;
    }

    .log {
        margin-top: -15px;
        margin-left: -75px;
    }

    .exe1,
    .exe2,
    .exe3,
    .log-entry {
        width: 80px;
    }

    .exe1-log-line,
    .exe2-log-line {
        margin-top: 15px;
        height: 150%;
    }

    .highlight-row {
        height: 16px;
        top: -2px;
        left: -8px;
        right: 0;
        padding: 3px;
    }
}