html {
    height: 100%;
    background:  #020617;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    color: #f5f5f4;
    margin: 0;
    padding: 0;
}

h2 {
    margin: 0 auto 18px;
    max-width: 1200px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #f9fafb;
}

.container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 18px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    background: linear-gradient(145deg, #020617 0, #020617 40%, #020617 100%);
    padding: 16px 18px 18px;
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.35);
    margin-bottom: 10px;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 450px;
}

.settings-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
    background-color: rgba(15, 23, 42, 0.9);
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    max-width: 1420px;
}

.settings-main {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 10px;
    align-items: center;
}
.settings-other-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-container label,
.settings-random-section label {
    font-weight: 500;
    color: #f9fafb;
}

.settings-container input,
.settings-random-section input {
    width: 100px;
    padding: 5px;
    border-radius: 999px;
    border: 1px solid #4b5563;
    font-size: 16px;
    font-weight: bold;
    color: #f5f5f4;
    background-color: #02010a;
}

.settings-container input[type="range"],
.settings-random-section input[type="range"] {
    padding: 0;
    border-radius: 6px;
}

.slider-inline {
    display: flex;
    align-items: center;
    gap: 1px;
}

.slider-inline input[type="range"] {
    flex: 1;
    width: 100%;
}

.slider-value-right {
    font-size: 12px;
    font-weight: 500;
    color: #e5e7eb;
    min-width: 48px;
    text-align: right;
}

.settings-random-section {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    background: radial-gradient(circle at top left, #020617, #020617 70%, #020617 100%);
    border: 1px solid rgba(56, 189, 248, 0.7);
}

.settings-random-title {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7dd3fc;
}

.settings-random-fields {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 4px;
    row-gap: 6px;
    align-items: center;
}

.settings-2opt-fields,
.settings-genetique-fields {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 8px;
    row-gap: 6px;
    align-items: center;
}

.settings-main label,
.settings-random-fields label,
.settings-2opt-fields label,
.settings-genetique-fields label {
    text-align: right;
}

.settings-2opt-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    background: radial-gradient(circle at top left, #020617, #020617 70%, #020617 100%);
    border: 1px solid rgba(56, 189, 248, 0.7);
}

.settings-2opt-title {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7dd3fc;
}

.settings-genetique-section {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    background: radial-gradient(circle at top left, #020617, #020617 70%, #020617 100%);
    border: 1px solid rgba(56, 189, 248, 0.7);
}

.settings-genetique-title {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7dd3fc;
}

.progress-label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    text-align: right;
}

#progress {
    font-size: 14px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #38bdf8;
    background-color: #020617;
    color: #e0f2fe;
}

.canvas-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.5);
    background-color: #e2e8f0;
    display: inline-block;
}

#canva {
    display: block;
    background-color: #f3f4ff;

}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
    width: 100%;
}

.buttons-group {
    display: flex;
    gap: 10px;
}

.btn {
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out, background-color 0.2s ease-out;
}

.btn.primary {
    background-color: rgba(56, 189, 248, 0.35);
    color: #f9fafb;
    border: 1px solid #a0a3a7b6;
}

.btn.secondary {
    background-color: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.results-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid rgba(101, 155, 230, 0.5);
    border-radius: 8px;
    padding: 8px 12px;
    background-color: rgba(10, 10, 15, 0.9);
    margin-top: 10px;
}
.result-item {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    background-color: rgba(10, 10, 15, 0.9);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    margin: 0;
    flex: 1;
}
#resultPlusProche{
    background-color: #27299c;
}
#resultRandom{
    background-color: #611911;
}
#result2opt{
    background-color: #997d02;
}
#resultGenetique{
    background-color: #245324;
}
.result-section {
    display: flex;
    align-items: center;
    gap: 10px;
}
select{
    background-color: #020617;
    color: #f5f5f4;
    border: 1px solid #4b5563;
    font-size: 16px;
    font-weight: bold;
    padding: 5px;
    border-radius: 999px;

}
input[type="checkbox"] {
    appearance: none;
    background-color: #fff;
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 1.15em;
    height: 1.15em;
    border: 0.15em solid currentColor;
    border-radius: 0.15em;
    transform: translateY(-0.075em);
    display: grid;
    place-content: center;
  }
input[type="checkbox"]::before {
content: "";
width: 0.77em;
height: 0.77em;
transform: scale(0);
transition: 120ms transform ease-in-out;
box-shadow: inset 1em 1em #3b39d1;
}
input[type="checkbox"]:checked::before {
transform: scale(1);
}
.settings{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    background: radial-gradient(circle at top left, #020617, #020617 70%, #020617 100%);
    border: 1px solid rgba(56, 189, 248, 0.7);
}

.permutations-title {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7dd3fc;
}

.permutations-progress-container {
    width: 100%;
    background: #23272e;
    border-radius: 8px;
    margin: 14px 0 10px 0;
    height: 28px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.permutations-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg,#38bdf8 60%, #0ea5e9 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: width 0.2s ease-out;
}

.permutations-progress-text {
    width: 100%;
    color: #f9fafb;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    position: absolute;
}