body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.controls-container {
    margin-bottom: 20px;
    text-align: right; /* Align toggle button to the right */
}

#toggle-mode-button {
    padding: 10px 15px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

#toggle-mode-button:hover {
    background-color: #5a6268;
}

.container {
    display: flex;
    gap: 20px;
}

#primary-tags-container,
#secondary-tags-container,
#instructions-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column; /* Allow children to stack vertically */
}

#primary-tags-container {
    flex-basis: 25%;
}

#secondary-tags-container {
    flex-basis: 25%;
}

#instructions-container {
    flex-basis: 50%;
}

h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    color: #555;
    font-size: 1.2em;
}

input[type="text"] {
    width: calc(100% - 22px); /* Account for padding and border */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#primary-tags-list,
#secondary-tags-list {
    overflow-y: auto; /* Add scroll if tags exceed container height */
    flex-grow: 1; /* Allow these lists to take available space */
}

#primary-tags-list button,
#secondary-tags-list button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
}

#primary-tags-list button:hover,
#secondary-tags-list button:hover {
    background-color: #0056b3;
}

#show-all-instructions {
    background-color: #28a745;
    margin-bottom: 10px; /* Add some space below it */
}

#show-all-instructions:hover {
    background-color: #1e7e34;
}

button.show-more {
    background-color: #17a2b8;
    margin-top: 5px; /* Space from the list of tags */
}

button.show-more:hover {
    background-color: #117a8b;
}

ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 0;
}

li {
    padding: 8px 0; /* Adjusted padding */
    border-bottom: 1px solid #f0f0f0;
}

li:last-child {
    border-bottom: none;
}

p {
    color: #666;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    #primary-tags-container,
    #secondary-tags-container,
    #instructions-container {
        flex-basis: auto; /* Reset flex-basis for stacked layout */
        margin-bottom: 20px;
    }

    #instructions-container {
        margin-bottom: 0;
    }
}

