body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f0f8ff;
}

.container {
    margin: 20px auto;
    padding: 15px;
    max-width: 1000px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

input {
    padding: 8px;
    margin: 10px;
    font-size: 16px;
    width: 200px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

button:hover {
    background-color: #218838;
}

.stacked-visual {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    position: relative;
    width: 1000px;
    margin-left: auto;
    margin-right: auto;
    height: 300px;
}

.stationary-line {
    width: 2px;
    height: 180px;
    background-color: black;
    position: absolute;
    left: 0;
    top: 70px;
    z-index: 2;
}

.line {
    width: 1px;
    height: 80px;
    background-color: #007bff;
    position: absolute;
    bottom: 150px;
    z-index: 1;
}

.line2 {
    width: 1px;
    height: 80px;
    background-color: #dc3545;
    position: absolute;
    bottom: 50px;
    z-index: 1;
}

.matching-point {
    background-color: #32cd32 !important;
}

.results {
    margin-top: 20px;
    font-size: 18px;
}

.highlight {
    color: #dc3545;
    font-weight: bold;
}

.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

.dark-mode .container {
    background-color: #1e1e1e;
    color: #ffffff;
}

.dark-mode button {
    background-color: #444;
    color: #fff;
}

.dark-mode button:hover {
    background-color: #555;
}

.dark-mode .stationary-line {
    background-color: #ccc;
}

.dark-mode .line {
    background-color: #00bfff;
}

.dark-mode .line2 {
    background-color: #ff6347;
}

.explanation {
    max-width: 800px;
    margin: 20px auto;
    padding: 15px;
    text-align: left;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.dark-mode .explanation {
    background-color: #2c2c2c;
}

.highlight {
    animation: highlight-animation 1s infinite alternate;
}

@keyframes highlight-animation {
    0% {
        background-color: yellow;
    }
    100% {
        background-color: orange;
    }
}

#explanation-text {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}
