body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
    text-align: center;
}

.container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 50%;
    min-width: 300px;
    margin-bottom: 20px;
    overflow-x: auto;
}

h1 {
    font-size: 50px;
    color: #898585;
    margin-bottom: 20px;
    font-style: normal;
    font-weight: lighter;
    opacity: 0.7;
}

.input-field, .piece-field, .hint-input {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 20px;
    box-sizing: border-box;
    border-radius: 15px;
    border: 1px solid #ccc;
    text-align: left;
    resize: vertical;
    min-height: 80px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.pattern-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.hint-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.pattern-item, .hint-item {
    background-color: #f0f0f0;
    padding: 8px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pattern-item span, .hint-item span {
    margin-right: 10px;
}

.remove-btn {
    background-color: transparent;
    color: black;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
}

.retrieve-btn {
    padding: 12px 24px;
    background-color: #101115;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 20px;
}

.retrieve-btn:hover {
    background-color: #87899e;
}

.results {
    width: 100%;
    margin-bottom: 20px;
}

.scroll-btn {
    padding: 10px 20px;
    margin-top: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.scroll-btn:hover {
    background-color: #0056b3;
}

/* Grid Layout for Parameters */
.parameter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 20px;
    margin-bottom: 30px;
}

.parameter-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
}

.description {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.parameter-input {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-hint-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hint-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hint-option input {
    cursor: pointer;
}

.fetch-hints {
    position: absolute;
    bottom: 0;
    right: 0;
    transform: translateY(100%);
    font-size: 14px;
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    background-color: #f1f1f1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.fetch-hints:hover {
    background-color: #007bff;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Spinner styling */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    display: none;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Updated styles for the table */
table {
width: 100%;
max-width: 100%; /* Ensures the table does not exceed the container width */
border-collapse: collapse;
margin: 0 auto; /* Centers the table within the container */
padding: 20px;
}

th, td {
padding: 10px;
border: 1px solid #ccc;
text-align: left;
word-wrap: break-word; /* Ensures that the text inside the table cells wraps if it gets too long */
}

th {
background-color: #f0f0f0;
}

td {
background-color: #fff;
}

.sidebar {
height: 100%;
width: 0;
position: fixed;
top: 0;
left: 0;
background-color: white;
overflow-x: hidden;
transition: 0.5s;
padding-top: 60px;
z-index: 1000;
}

.sidebar a {
padding: 8px 8px 8px 16px;
text-decoration: none;
font-size: 16px; /* Smaller font size */
color: rgb(47, 44, 44); /* Always visible white text */
display: block;
transition: 0.3s;
}

.sidebar a:hover {
background-color: #575757; /* Optional hover effect */
color: rgb(242, 238, 238); /* Keep text white on hover */
}
.sidebar-icon {
font-size: 30px;
cursor: pointer;
position: fixed;
top: 20px;
left: 20px;
z-index: 1001;
}

#sidebar ul {
list-style-type: none;
padding: 0;
margin: 0;
}
#interactionLink {
padding: 10px;
font-size: 14px;
width: 70%;
margin-right: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}

.btn {
padding: 10px 15px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}

.btn-secondary {
background-color: #6c757d;
}

.btn:hover {
background-color: #0056b3;
}

/* Styles for the Back button */
.btn-back {
padding: 10px 15px;
background-color: #6c757d;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}

.btn-back:hover {
background-color: #5a6268;
}
/* Drag-and-drop area styling */
#dropArea {
border: 2px dashed #ccc;
padding: 20px;
text-align: center;
cursor: pointer;
position: relative;
}

#dropArea.drag-over {
background-color: #e0e0e0;
}

#dropText {
margin: 0;
color: #666;
}

#previewContainer canvas,
#previewContainer img {
max-width: 100%;     /* Ensure the canvas or image fits within the drop area width */
max-height: 200px;   /* Set a max height for the preview */
border-radius: 5px;
}
