/* General reset and body styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f7f7f7;
    color: #333;
    line-height: 1.6;
}

/* Container for the form and content */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Headings */
h1 {
    color: #4b3619;
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    color: #4b3619;
    margin-bottom: 10px;
}

/* File upload section */
.file-upload {
    margin-bottom: 20px;
}

.file-upload label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.file-upload input[type="file"] {
    padding: 10px;
    width: 100%;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Chart selector dropdown */
.chart-selector {
    margin-bottom: 20px;
}

.chart-selector label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.chart-selector select {
    padding: 10px;
    width: 100%;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Color display sections */
.color-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.color-section {
    width: 48%;
}

.color-list {
    margin-top: 10px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
}

.color-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.color-item span {
    font-size: 16px;
}

.colour-box {
    width: 25px;
    height: 25px;
    border: 1px solid #ccc;
    display: inline-block;
    vertical-align: middle;
}

.color-list li {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Default to start alignment */
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.color-list li:last-child {
    border-bottom: none;
}

.color-list li .original-colour-box {
    margin-left: auto;
    /* Push the colour box to the right */
}

.color-list li .converted-colour-box+span {
    margin-left: auto;
    /* Push the thread number to the right */
}

.color-section h4 {
    margin-bottom: 10px;
}

/* Download button section */
.download-section {
    text-align: center;
}

#downloadBtn {
    background-color: #4b3619;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#downloadBtn:hover {
    background-color: #6a4e2f;
}

/* Status message */
.upload-status {
    margin-top: 10px;
    font-size: 14px;
    color: #ff7f50;
    font-style: italic;
}

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

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

    100% {
        transform: rotate(360deg);
    }
}

/* Adding a responsive touch for mobile devices */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    #downloadBtn {
        padding: 10px 20px;
    }
}