:root {
    --cl01: rgb(255, 179, 186); /* Pastellrot */
    --cl01-dark: rgb(153, 71, 77); /* Deutlich dunkleres Pastellrot */

    --cl02: rgb(191, 252, 198); /* Pastellgrün */
    --cl02-dark: rgb(77, 153, 83); /* Deutlich dunkleres Pastellgrün */

    --cl03: rgb(179, 205, 224); /* Pastellblau */
    --cl03-dark: rgb(71, 102, 130); /* Deutlich dunkleres Pastellblau */

    --cl04: rgb(255, 255, 186); /* Pastellgelb */
    --cl04-dark: rgb(153, 153, 71); /* Deutlich dunkleres Pastellgelb */

    --cl05: rgb(211, 179, 255); /* Pastelllila */
    --cl05-dark: rgb(102, 71, 153); /* Deutlich dunkleres Pastelllila */

    --cl06: rgb(175, 248, 219); /* Pastelltürkis */
    --cl06-dark: rgb(35, 128, 98); /* Deutlich dunkleres Pastelltürkis */

    --cl07: rgb(255, 217, 179); /* Pastellorange */
    --cl07-dark: rgb(153, 108, 71); /* Deutlich dunkleres Pastellorange */

    --cl08: rgb(217, 217, 217); /* Pastellgrau */
    --cl08-dark: rgb(100, 100, 100); /* Deutlich dunkleres Pastellgrau */

    --color-one: rgb(27, 32, 37);
    --color-one-darken: rgb(18, 18, 18);
    --color-two: var(--cl05);
    --color-two-darken: var(--cl05-dark);
    --color-three: #1abc9c;
    --color-three-darken: #16a085;
    --font-size: 16px;
    --height: 40px;
    --line-height: 40px;
    --padding: 0 10px 0 15px;
    --first-width: 40px;
    --last-width: 20px;
    --gap: 3px;


    /* Table-Head */
    --edge: 20px;
}

@font-face {
    font-family: 'draw';
    src: url('../asset/draw.woff') format('woff');
}
@font-face {
    font-family: 'cinema';
    src: url('../asset/cinema.woff') format('woff');
}
@font-face {
    font-family: 'basic';
    src: url('../asset/basic.woff') format('woff');
}
  

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /*font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;*/
    font-family: 'basic';
    font-size: var(--font-size);
    user-select: none;
    overscroll-behavior: none;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: rgb(18, 18, 18);
    color: rgb(224, 224, 224);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    width: 100%;
}

body::-webkit-scrollbar {
    width: 48px; 
    height: 16px; 
}

body::-webkit-scrollbar-track {
    background: rgb(18, 18, 18);
}

body::-webkit-scrollbar-thumb {
    background-color: rgb(102, 102, 102);
    /*border-radius: 10px;*/ 
    border: 0 solid rgb(0, 0, 0); 
}

body::-webkit-scrollbar-thumb:hover {
    background-color: rgb(128, 128, 128);
}

h1 {
    font-weight: 100;
    font-size: 32px;
    padding: 40px;
    color: rgb(255, 255, 255);
}





table[name="main-table"] {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    display: none;
}

table[name="main-table"] thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

table[name="main-table"] tr:nth-child(2) th {
    font-size: 20px;
    font-weight: 300;
}

table[name="main-table"] tr:nth-child(3) th {
    font-size: 32px;
    font-weight: 300;
}

table[name="main-table"] td:not(:first-child),
table[name="main-table"] tr:nth-child(2) th,
table[name="main-table"] tr:nth-child(3) th {
    border-left: 1px solid rgba(100,100,100,0.6);
    background: rgb(18, 18, 18);
}

table[name="main-table"] tr:nth-child(3) th {
    height: 88px;
}

table[name="main-table"] tr:nth-child(odd) td {
    background: rgba(100,100,100,0.2);
}

table[name="main-table"] td:first-child {
    text-align: center;
}

table[name="main-table"] th {
    height: 40px;
    margin: 0;
    padding: 0;
}

table[name="main-table"] th:last-child {
    width: 50px;
}

table[name="main-table"] tr:first-child th:first-child {
    width: 60px; 
    vertical-align: top;
    padding-top: 5px;
    font-size: 42px;
    cursor: pointer;
}

table[name="main-table"] tr:first-child th:last-child {
    position: relative;
    padding: 0; 
}

table[name="main-table"] tr:first-child th:last-child div {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box; 
}

table[name="main-table"] tr:first-child th:last-child div:first-child {
    clip-path: polygon(0 0, 100% 100%, 100% 0);
    /*background: rgb(151, 48, 22);*/
}

table[name="main-table"] tr:first-child th:last-child div:last-child {
    clip-path: polygon(0 0, 100% 100%, 0 100%);
    /*background: rgb(22, 151, 48);*/
}

table[name="main-table"] thead tr:first-child {
    background: rgb(20, 20, 20);
}

table[name="main-table"] tr:first-child th:not(:last-child) div {
    position: relative;
    height: 100%;
    clip-path: polygon(
        0 0, 
        calc(100% - var(--edge)) 0, 
        100% var(--edge), 
        100% 100%, 
        var(--edge) 100%, 
        var(--edge) var(--edge)
    );
    display: flex;
    align-items: center;
    text-align: left;
    justify-content: left;
    transform: translateX(calc(-1 * var(--edge)));
    width: calc(100% + var(--edge));
    color: rgb(255, 255, 255);
    font-size: 20px;
    padding-left: calc(var(--edge) + 10px);

    display: flex; 
    justify-content: space-between; 
    align-items: center; 

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

table[name="main-table"] tr:first-child th svg {
    height: 32.8px;
    padding-top: 7px; 
}

table[name="main-table"] tr:first-child svg:first-child {
    fill: rgba(255, 255, 255, 0);
}

table[name="main-table"] tr:first-child th.active svg:first-child {
    fill: rgba(255, 255, 255, 1);
}

table[name="main-table"] tr:first-child svg:first-child {
    padding-right: 4px; 
}

table[name="main-table"] tr:first-child svg:last-child {
    padding-right: 10px; 
    stroke: rgb(255, 255, 255);
    stroke-width: 2;
}

table[name="main-table"] tr:first-child svg:first-child {
    padding-right: 4px; 
}


table[name="main-table"] tr:nth-child(3) th.task input.predict,
table[name="main-table"] tr:nth-child(3) th.task div[name="rres"] {
    border: 4px solid rgb(53, 106, 167);
    height: 88px;
}

table[name="main-table"] tbody td:last-child {
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
}

table[name="main-table"] tbody td:last-child svg[name="editpen"] {
    width: auto;
    max-width: 30px;
    max-height: 30px; 
    padding: 0; 
    overflow: hidden;
    box-sizing: border-box;
}



table[name="main-table"] tbody td:last-child svg[name="editpen"] path {
    stroke-width: 1.5;
    stroke: rgb(120, 120, 120);
}

table[name="main-table"] input.predict {
    display: block;
    background: transparent;
    font-size: 32px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: none;
    margin: 0;
    padding: 0;
    text-align: center;
    color: rgb(255,255,255);
    padding: 17px;
}

table[name="main-table"] input.predict:focus,
table[name="main-table"] input.predict:hover,
table[name="main-table"] input.predict:active,
table[name="main-table"] input.reached:focus,
table[name="main-table"] input.reached:hover,
table[name="main-table"] input.reached:active {
    border: 0 solid rgb(19, 152, 214); 
    outline: none;
}

table[name="main-table"] input.predict[type="number"]::-webkit-outer-spin-button,
table[name="main-table"] input.predict[type="number"]::-webkit-inner-spin-button,
table[name="main-table"] input.reached[type="number"]::-webkit-outer-spin-button,
table[name="main-table"] input.reached[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

table[name="main-table"] thead tr:nth-child(3) div[name="rres"] input {
    border: 0;
    background: transparent;
    color: rgb(255, 255, 255);
    text-align: center;
    font-size: 24px;
    width: 28.8px;
}

table[name="main-table"] thead tr:nth-child(3) div[name="rres"] div {
    font-size: 24px;
    white-space: nowrap;
}










div[name="numbers"] div[name="posneg"] {
    position: fixed;
    display: none;
    width: 30%;
    height: 40px;
    cursor: pointer;
}

div[name="numbers"].phase-1 div[name="posneg"] {
    display: none;
}

div[name="numbers"].phase-2 div[name="posneg"] {
    display: inline-block;
}

div[name="numbers"].phase-3 div[name="posneg"] {
    display: none;
}


div[name="numbers"] div[name="posneg"] .pos, .neg {
    flex: 1;
    display: flex;

    width: 40%;
    height: 100%;
    line-height: 40px;
    font-size: 24px; 
    padding: 0 15px; 
    display: inline-block;
}

div[name="numbers"] div[name="posneg"] .pos {
    clip-path: polygon(0 0, 65% 0, 100% 100%, 0 100%);
    border-top-left-radius: 7px;
    border-bottom-left-radius: 7px;
    background-color: var(--cl02-dark);
    transform: rotate(0deg);
}

div[name="numbers"] div[name="posneg"] .neg {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 35% 100%);
    border-top-right-radius: 7px;
    border-bottom-right-radius: 7px;
    background-color: var(--cl01-dark);
    text-align: right;
    margin-left: -25px;
}








div[name="navigator"] {
    display: none;
    position: fixed;
    bottom: 40px; 
    width: 100%;
    height: 50px;
    align-items: center;
    padding: 0 20%;
    cursor: pointer;
}
div[name="navigator"] div {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}
div[name="navigator"] .button1, 
div[name="navigator"] .button2, 
div[name="navigator"] .button3 {
    flex: 1;
    height: 100%;
}
div[name="navigator"] .button1 {
    background-color: var(--cl05-dark);
    clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%);
    border-radius: 7px 0 0 7px;
}
div[name="navigator"] .button2 {
    background-color: var(--cl04-dark);
    clip-path: polygon(0 0, 85% 0, 100% 100%, 15% 100%);
    margin-left: -20px; 
}
div[name="navigator"] .button3 {
    background-color: var(--cl06-dark);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 15% 100%);
    border-radius: 0 7px 7px 0;
    margin-left: -20px; 
}



div[name="navigator"] svg {
    width: 50%;
    height: 50%;
    stroke-width: 2;
    stroke: rgb(255, 255, 255);
}

div[name="navigator"] .disabled {
    background-color: rgb(102, 102, 102);
}



div[name="numbers"] {
    position: fixed;
    bottom: 100px;
    width: 50%;
    display: none;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 10px;
    justify-content: center; /* Zentriert die Items horizontal */
    left: 25%;
    height: 30%;
    border-top-left-radius: 35px;
    border-top-right-radius: 35px;
    clip-path: polygon(25px 0, calc(100% - 25px) 0, 100% 25px, 100% 100%, 0 100%, 0 25px);
    background-color: rgba(9, 9, 9, 0.7);
    cursor: pointer;
    padding-top: 70px;
}

div[name="numbers"] div[name="player"] {
    position: absolute;
    width: 100%;
    padding: 10px 20px;
    clip-path: polygon(25px 0, calc(100% - 25px) 0, 100% 25px, 100% 100%, 0 100%, 0 25px);
    border-radius: 5px;
    border-bottom: 3px solid rgb(156, 156, 156);
    border-top-left-radius: 35px;
    border-top-right-radius: 35px; 
}

div[name="numbers"] div[name="player"] a {
    display: inline-block;
    font-size: 24px;
    width: 50%;
}

div[name="numbers"] .grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

div[name="numbers"] .grid-container > div {
    flex: 1 0 20%; /* 5 Elemente pro Zeile */
    max-width: 20%; /* Maximal 5 Elemente pro Zeile */
    display: flex;
    justify-content: center;
    align-items: center;
}

div[name="numbers"] svg {
    stroke: rgb(156, 156, 156);
    stroke-width: 1.8px;
    width: 100%;
    height: 100%;
}





div[name="rres"], 
div[name="rres"] .it {
    display:table;
    width:100%;
    text-align: center;
}
div[name="rres"] .c {
    display:table-cell;
    vertical-align: middle;
}
div[name="rres"] .r {
    display:table-row;
}
div[name="rres"] .rs{
  width:33%;
}
div[name="rres"] .r:first-child .c:first-child {
    border-bottom: 1px solid rgba(255,255,255,0.7);
}




body > svg[name="dostop"], body > svg[name="docheck"], body > svg[name="doplus"], body > svg[name="dominus"] {
    display: none;
}

svg[name="docheck"] path,
svg[name="doplus"] path,
svg[name="dominus"] path {
    stroke: rgb(255, 255, 255);
    stroke-width: 1.5;
}

table[name="main-table"] td > svg[name="doplus"], table[name="main-table"] td > svg[name="dominus"] {
    fill: rgb(151, 48, 22);
}

table[name="main-table"] td > svg[name="docheck"] {
    fill: rgb(22, 151, 48);
}


div[name="createGame"] div[name="addPlayer"] svg {
    position: fixed;
    left: calc(25% - 130px);
    bottom: 60px;
    height: 100px;
    cursor: pointer;
    stroke: rgb(255, 255, 255);
    stroke-width: 1.5;
}

div[name="createGame"] div[name="startGame"] svg {
    position: fixed;
    left: calc(25% + 30px);
    bottom: 60px;
    height: 100px;
    cursor: pointer;
    stroke: rgb(255, 255, 255);
    stroke-width: 1.5;
}

table[name="createGame"] {
    table-layout: fixed;
    width: 100%;
}

table[name="createGame"] .draggable {
    padding: 8px;
    margin: 10px 4px;
    cursor: move;
    position: relative; 
}

table[name="createGame"] .draggable::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 40px; 
    height: 100%;
    cursor: default; 
    pointer-events: none;
}

table[name="createGame"] .dropzone {
    min-height: 50px;
    min-width: 100px;
    padding: 20px;
    vertical-align: top;
}

table[name="createGame"] .placeholder {
    height: 40px; /* Höhe eines Platzhalters */
    margin: 10px 4px;
    border: 2px dashed rgb(0, 0, 0);
    background-color: rgb(240, 240, 240);
}

table[name="createGame"] input[type="radio"] {
    display: none;
}

table[name="createGame"] td:nth-child(2) svg {
    display: none;
}

table[name="createGame"] svg {
    cursor: pointer;
    fill: rgb(128, 128, 128);
    height: 30px;
    float: right;
    z-index: 15;
}

table[name="createGame"] input[type="radio"]:checked + label svg {
    fill: rgb(255, 255, 255);
    z-index: 15;
}




div[name="addPlayerModal"] {
    text-align: center;
    background-color: rgb(18, 18, 18);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    border: 2px solid rgb(119, 119, 119);
    box-shadow: 0 0 10px rgba(119, 119, 119, 0.5);
    z-index: 10;
}

div[name="addPlayerModal"] input,
div[name="addPlayerModal"] button {
    border: 0;
    background: rgb(89, 89, 89);
    font-size: 24px; 
    color: rgb(255, 255, 255);
    padding: 10px;
    margin: 10px;
    width: 25%;
}

div[name="addPlayerModal"] input {
    width: 90%;
}

div[name="addPlayerModal"] .color-grid {
    display: grid;
    grid-template-columns: repeat(9, 40px);
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
}


div[name="addPlayerModal"] .color-box {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border 0.3s;
    border-radius: 5px;
}

div[name="addPlayerModal"] .color-box:hover {
    border-color: rgb(204, 204, 204);
}

div[name="addPlayerModal"] .color-box.selected {
    border-color: rgb(0, 0, 0);
    outline: 4px solid rgb(36, 123, 76);
}





div[name="insertPlayer"] {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

div[name="insertPlayer"] th {
    border: 0;
    font-size: 24px; 
    color: rgb(255, 255, 255);
    padding: 10px;
}

div[name="insertPlayer"] input,
div[name="insertPlayer"] select,
div[name="insertPlayer"] option {
    border: 0;
    background: rgb(89, 89, 89);
    font-size: 24px; 
    color: rgb(255, 255, 255);
    padding: 10px;
}

div[name="insertPlayer"] tr:last-child button {
    font-size: 24px;
    margin-top: 25px;
    border: 0;
    background: rgb(51, 51, 51);
    color: rgb(255, 255, 255);
    padding: 10px;
    cursor: pointer;
}

div[name="insertPlayer"] tr:last-child button:first-child {
    float: left;
}

div[name="insertPlayer"] tr:last-child button:last-child {
    float: right;
}




div.round_edit {
    display: none; 
    position: fixed; 
    z-index: 20; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(18, 18, 18, 0.4); 
    padding-top: 60px; 
}

div.round_edit div.modal-content {
    box-sizing: border-box;
    display: block;
    background-color: rgb(18, 18, 18);
    padding: 20px;
    margin: 0 auto;
    width: 450px;
    max-height: 90%; 
    overflow-y: auto; 
    /*border-radius: 20px;*/
    clip-path: polygon(0 20px, 0 calc(100% - 20px), 20px 100%, calc(100% - 20px) 100%, 100% calc(100% - 20px), 100% 20px, calc(100% - 20px) 0, 20px 0);
    border: 4px solid rgba(80, 80, 80, 0.5);
}

div.round_edit div.modal-content h3 {
    font-size: 24px; 
}


div.round_edit input {
    border: 0;
    background: rgb(80, 80, 80);
    width: 90px; 
    font-size: 24px; 
    color: rgb(255, 255, 255);
    padding: 10px;
    text-align: center;
}

div.round_edit input[type="number"]::-webkit-outer-spin-button,
div.round_edit input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: auto; /* Standard-Erscheinungsbild */
    visibility: visible;
    display: block;
    opacity: 1;
    pointer-events: auto;
    margin: -10px;
    width: 25px; 
}


div.round_edit button {
    border: 0;
    background: rgb(36, 36, 36);
    font-size: 24px; 
    color: rgb(255, 255, 255);
    padding: 10px;
    margin: 10px; 
    float: right;
    cursor: pointer;
}

div.round_edit table {
    width: 100%;
    table-layout: fixed;
}

div.round_edit table tr td:first-child {
    padding: 0 10px;
}






/*
table[name="main-table"] td:nth-child(3)::before,
table[name="main-table"] th:nth-child(2)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2); 
    pointer-events: none; 
    z-index: 1; 
}

table[name="main-table"] td:nth-child(3),
table[name="main-table"] th:nth-child(2) {
    position: relative;
    z-index: 2; 
}
*/