body {
    background-color: #28262c;
    color: #fefaff;
    padding: 0;
    margin: 0;
    font-family: regular;
}

div {    
    padding: 0;
    margin: 0;
}

.burger {
    all: unset;
    position: fixed;
    top: 48px;
    left: 16px;
    display: none;
    z-index: 1;
}

.sidebar-btn {
    all: unset;
    background-color: transparent;
    color: #fefaff;
    padding: 8px 16px;
    cursor: pointer;
}

.sidebar-btn:hover {
    background-color: #fefaff10;
}

.close-btn {
    display: none;
}

#overlord {
    display: flex;
}

.overlord {
    display: flex;
}

.side-left {
    width: 25%;
    position: fixed;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100vh;
    z-index: 1;
}

.side-middle {
    width: 50%;
    margin-left: 25%;
    margin-bottom: 85px;
    text-align: justify;
}

.side-right {
    width: 25%;
    position: fixed;
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100vh;
    z-index: 1;
}

#user-login {
    display: flex;
    flex-direction: column;
    height: 90vh;
    justify-content: center;
    width: 330px;
    margin: auto;
}

.user {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#username, #password {
    width: 250px;
}

#loginBtn {
    background-color: #fefaff10;
    border-radius: 4px;
    margin: 12px auto 0;
    font-size: medium;
    height: auto;
    padding: 8px 16px;
}

.power-btn {
    all: unset;
    height: 48px;
    width: 48px;
}

.pwr-btn-on, .pwr-btn-off, .home-btn, .rules-btn, .char-btn, .group-btn {
    height: 36px;
    width: 36px;
    background-size: cover;
    border-radius: 50%;
}

.group-btn {
    background-image: url(./pics/groups-off.png);
}

.group-btn:hover {
    background-image: url(./pics/groups-on.png);
    box-shadow: 0 0 2px black, 0 0 5px #f9c22e;
}

.char-btn {
    background-image: url(./pics/Char-off.png);
}

.char-btn:hover {    
    background-image: url(./pics/Char-on.png);
    box-shadow: 0 0 2px black, 0 0 5px #f9c22e;
}

.rules-btn {
    border-radius: 25%;
    background-image: url(./pics/Dice_Rule-off.png);
}

.rules-btn:hover {
    background-image: url(./pics/Dice_Rule-on.png);
    box-shadow: 0 0 2px black, 0 0 5px #f9c22e;
}

.home-btn {
    background-image: url(./pics/home-off.png);
}

.pwr-btn-on {
    background-image: url(./pics/power-on-off.png);
}

.pwr-btn-off {
    background-image: url(./pics/power-off-off.png);
}

.home-btn:hover {    
    background-image: url(./pics/home-on.png);
    box-shadow: 0 0 2px black, 0 0 5px #f9c22e;
}

.pwr-btn-off:hover {
    background-image: url(./pics/power-off-on.png);
    box-shadow: 0 0 2px black, 0 0 5px #f9c22e;
}

.pwr-btn-on:hover {
    background-image: url(./pics/power-on-on.png);
    box-shadow: 0 0 2px black, 0 0 5px #f9c22e;
}

#save-btn {
    margin-top: 16px;
    text-align: center;
}

.save-btn {    
    all: unset;
    background-color: #fefaff10;
    color: #fefaff;
    font-family: emphasise;
    cursor: pointer;
    padding: 8px 16px;
    font-size: large;
    border-radius: 4px;
}

.save-btn:hover {
    text-shadow: 0 0 2px black, 0 0 5px #fefaff;
    box-shadow: 0 0 2px black, 0 0 5px #fefaff;
    color: #f9c22e;
}

.imagex {
    margin: 16px;
}

img {
    width: 100%;
}

table {
    font-size: medium;
    text-align: left;
    border-collapse: collapse;
    width: 100%;
}

table th, table td {    
    border: 1px solid #878472;
    padding: 8px 16px;
}

#CharGenTable td {
    border: none;
    padding: 7px 16px;
}

th:first-child, .combat-common th:nth-child(2) {
    width: 80%;
}

.dice-values th, .combat-tool th, .combat-common th, .combat-manouver th, .combat-example th {
    color: #000000;
    background-color: #878472;
    font-size: large;
}

.dice-values tr:nth-child(even), .combat-common tr:nth-child(even), .combat-tool tr:nth-child(odd), .combat-manouver tr:nth-child(odd), .combat-example tr:nth-child(odd) {
    background-color: #fefaff10;
}

.dice-values td, .operand {
    text-align: center;
}

.combat-common th:first-child, .ini-table th:first-child {
    width: auto;
}

.ini-table td:first-child {
    width: 5%;
}

.defender {
    background-color: #5c80bc50;
}

.calculate {
    background-color: #f9c22e50;
}

.solution {
    background-color: #ad343e50;
}

.kampfbeginn {
    background-color: #1c7c5450;
}

.aggressor {
    background-color: #fefaff10;
}

.image1 {
    border-radius: 15px;
    margin: 16px;
    height: 200px;
    width: auto;
    background-image: url(./pics/0Hadestempel.jpg);
    background-size: cover;
}

.image2 {
    border-radius: 15px;
    margin: 16px;
    height: 200px;
    width: auto;
    background-image: url(./pics/3Pyraustian\ Lion.jpg);
    background-size: cover;
}

.image3 {
    border-radius: 15px;
    margin: 16px;
    height: 200px;
    width: auto;
    background-image: url(./pics/7Minotaur.jpg);
    background-size: cover;
}

.image4 {
    border-radius: 15px;
    margin: 16px;
    height: 200px;
    width: auto;
    background-image: url(./pics/Banshee.jpg);
    background-size: cover;
}

.image5 {
    border-radius: 15px;
    margin: 16px;
    height: 200px;
    width: auto;
    background-image: url(./pics/ElvenCity.jpg);
    background-size: cover;
}

.image6 {
    border-radius: 15px;
    margin: 16px;
    height: 200px;
    width: auto;
    background-image: url(./pics/BlackDragon12.jpg);
    background-size: cover;
}

.intext-img {
    width: 200px;
    height: 200px;
    float: right;
    margin-left: 16px;
    margin-bottom: 8px;
    border-radius: 15px;
}

#navbar {
    position: fixed;
    width: 50%;
    display: flex;
    align-content: space-between;
    margin: auto;
    justify-content: space-evenly;
    height: 85px;
    background-image: linear-gradient(#28262c 50%, transparent);
    z-index: 1;
}

#footer {
    position: fixed;
    bottom: 0;
    height: 85px;
    width: 100%;
    background-image: linear-gradient(transparent, #28262c 50%);
    text-align: center;
    z-index: 1;
}

.powered {
    display: flex;
    width: 140px;
    height: 40px;
    justify-content: space-evenly;
    padding: 8px;
    border-radius: 15px;
    cursor: pointer;
    color: #fefaff;
    text-decoration: none;
    margin: auto;
    margin-top: 24px;
}

.powered:hover {
    background-color: #fefaff10;
    
}

.proverb {
    text-align: center;
    align-content: space-around;
}

.proverb h4, .proverb p, .impressum h4, .impressum p {
    margin: 0;
    padding: 0;
    font-family: thin;
    font-size: x-small;
}

.proverb h4, .impressum h4 {
    font-family: bold;
    font-size: small;
}

.impressum h4 {    
    margin-top: 6px;
}

.logo_TCM {
    background-image: url(./pics/Thernamyte_Stamp_Curse.png);
    background-size: cover;
    width: 40px;
    height: 40px;
}


#left-side {
    width: 150px;
    background-color: #87847210;
    border-radius: 15px;    
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 90vh;
    margin-top: 50px;
    z-index: 1;
}

.right-side {
    margin-left: 150px;
}

.left-rule {
    width: 250px;
    flex-shrink: 0;
}

.right-rule {  
    width: 250px;
    flex-shrink: 0;
}

.navbar-btn {
    border: none;
    width: 25%;
    background-color: transparent;
    color: #fefaff;
    font-size: large;
    text-align: center;
    font-family: bold;
    height: 48px;
}

.intext-btn {
    all: unset;
    color: #5c80bc;
    text-decoration: underline;
}

.intext-btn:hover {
    color: #f9c22e;
    text-shadow: 0 0 2px #000000, 0 0 15px #fefaff;
    cursor: pointer;
}

.add-btn {
    margin-right: 8px;
}

.subtract-btn, .add-btn {
    background-image: url(./pics/DiceBlank.png);
    background-color: #fefaff10;
    height: 30px;
    width: 30px;
    background-size: cover;
    border-radius: 4px;
}

.subtract-btn:hover, .add-btn:hover, #loginBtn:hover {
    box-shadow: 0 0 2px #000000, 0 0 5px #fefaff;
}

.block-btn {
    width: 90%;
    text-align: left;
    margin-left: 5%;
    padding: 8px 0 8px 1vw;
    height: auto;
}

.rule-btn {
    font-size: small;
    margin-left: 10%;
    width: 85%;
}

.navbar-btn:hover {
    cursor: pointer;
    color: #f9c22e;
    text-shadow: 0 0 2px #000000, 0 0 15px #fefaff;
    background-color: #fefaff10;
    border-radius: 5px;
}

.addxp-btn {
    background-color: #fefaff10;
    border: none;
    border-radius: 5px;
    padding: 8px 16px;
    color: #fefaff;
    margin-left: 8px;
}

.addxp-btn:hover {
    cursor: pointer;
    color: #f9c22e;
    text-shadow: 0 0 2px #000000, 0 0 15px #fefaff;
}

.grid3 {
    display: grid;
    width: 100%;
    grid-template-columns: auto auto auto;
    gap: 8px;
    row-gap: 8px;
}

#skills-container {
    display: grid;
    width: 100%;
    grid-template-columns: 32% 32% 32%;
    gap: 2%;
    row-gap: 16px;
}

.skill-group {
    background-color: #87847210;
    text-align: center;
    border-radius: 15px;
    padding-bottom: 4px;
}

.skill-group h3 {
    background-color: #87847210;
    border-radius: 15px 15px 0 0;
}

.skill {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

.skill-name {
    display: flex;
    align-items: center;
    padding: 8px 16px;
}

.heritage {
    background-color: #87847210;
    border-radius: 15px;
}

.heritage-title {
    background-color: #87847210;
    border-radius: 15px 15px 0 0;
}

.proficiency {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
}

.pcvsnpc {
    display: flex;
}

.pcvsnpc-div {
    padding: 8px;
    align-content: center;
}

.pcvsnpc-lang {
    height: 48px;
    width: 180px;
    margin-right: 8px;
}

.npc {
     margin: 20px auto 0;
}

.langFlag {
    height: 30px;
    width: auto;
    border-radius: 4px;
}

#Charaktere {
    text-align: left;
}

.proficiency-chkbx {
    all: unset;
    border: 1px solid #878472;
    background-color: #fefaff10;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-sizing: border-box;
}

.proficiency-chkbx:hover {
    box-shadow: 0 0 4px #fefaff;
}

input:hover {
    box-shadow: 0 0 4px #fefaff;
}

.proficiency-chkbx:checked {
    background-color: #f9c22eee;
}

.addxp {
    text-align: center;
    margin-top: 27px;
}

.charpic {
    opacity: 0.75;
    width: 100%;
    height: 168px;
    overflow: hidden; /* Ensures no overflow */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 15px;
    border: 1px solid #878472;
    margin-top: 8px;
    margin-left: auto;
}

#previewImage {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Zooms to fill the box while maintaining aspect ratio */
}

.file-uploader {
    opacity: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    position: absolute;
    top: 0%;
    left: 0%;
    z-index: auto;
}

.upload-icon {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #ccc;
    -webkit-text-stroke-width: 2px;
    -webkit-text-stroke-color: #bbb;
}

.profile-picture:hover .upload-icon {
    opacity: 1;
}

.rule {
    padding: 0 16px;
}

strong {
    color: #ad343e;
    text-shadow: 0 0 2px #28262c;
}

h2 {
    margin-top: 12px;
}

.h2 {
    text-align: center;
    color: #878472;
    font-size: large;
    padding: 0;
    margin: 0;
}

.top {
    margin-top: 72px;
    margin-bottom: 8px;
}

h3 {
    margin: 0;
    padding: 12px 0 6px;
    color: #f9c22e;
}

.h3 {
    text-align: center;
}

h4 {
    margin: 0;
    padding: 6px 0;
}

p {
    margin: 0;
    padding: 6px 0 12px;
    font-size: 17px;
    line-height: 1.3;
}

.skill-xp {
    margin: 0 4px;
    width: 18px;
    text-align: center;
}

.skill-btn {
    display: flex;
    align-items: center;
}

.formel {
    color: #ad343e;
    font-family: bold;
    text-align: center;
    font-size: large;
}

.die {
    width: 20px;
    margin-bottom: 0;
}

input[type=text], input[type=email], input[type=password] {
    width: 100%;
    padding: 8px 16px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #878472;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fefaff10;
    color: #fefaff;
    outline: none;
}

input[type=number] {
    width: 50px;
    margin-left: 8px;
    display: inline-block;
    border: 1px solid #878472;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fefaff10;
    color: #fefaff;
    outline: none;
    text-align: center;
}

input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

input:focus {
    background-color: #f9c22e50;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}
  
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background-color: #ad343e;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #fefaff;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input[type=checkbox]:checked + .slider {
    background-color: #f9c22e;
}
  
input[type=checkbox]:focus + .slider {
    box-shadow: 0 0 1px #f9c22e;
}
  
input[type=checkbox]:checked + .slider:before {
    -webkit-transform: translateX(19px);
    -ms-transform: translateX(19px);
    transform: translateX(19px);
}

#heritage-container {
    padding: 8px 16px;
    display: grid;
    grid-template-columns: 24.25% 24.25% 24.25% 24.25%;
    gap: 1%;
    row-gap: 0;
    justify-items: center;
}

.heritage-option {
    display: flex;
    width: 100px;
    justify-content: space-between;
    padding: 6px 12px;
}

#xp, #level-xp {
    display: inline-block;
    text-align: center;
    width: 18px;
    padding: 8px 0;
}

.attribute-bar {    
    display: flex;
    justify-content: space-between;
    background-image: linear-gradient(#28262c 50%, transparent);
    font-size: large;
    text-shadow: 0 0 2px black, 0 0 5px #fefaff;
    position: sticky;
    left: 0;
    top: 42px;
    z-index: 3;
    height: 75px;
}

#attribute-container {
    display: flex;
}

.attribute {
    padding: 8px;
}

#weapon-proficiency-container, #job-proficiency-container, #familiarity-proficiency-container {    
    display: grid;
    grid-template-columns: 24.25% 24.25% 24.25% 24.25%;
    gap: 1%;
    row-gap: 0;
}

#magic-proficiency-container {
    display: grid;
    grid-template-columns: 19.2% 19.2% 19.2% 19.2% 19.2%;
    gap: 1%;
    row-gap: 16px;
}

.credits a {
    color: #5c80bc;
}

.credits a:visited {
    color: #878472;
}

.credits a:hover {
    color: #f9c22e;
}

@font-face {
    font-family: regular;
    src: url(./fonts/Typey.otf);
}

@font-face {
    font-family: bold;
    src: url(./fonts/Urbanist-ExtraBold.otf);
}

@font-face {
    font-family: thin;
    src: url(./fonts/Urbanist-Thin.otf);
}

@font-face {
    font-family: fantasy;
    src: url(./fonts/Hultog.ttf);
}

@font-face {
    font-family: emphasise;
    src: url(./fonts/HultogItalic.ttf);
}

@media only screen and (max-width: 1600px) {
    #magic-proficiency-container {
        grid-template-columns: 32% 32% 32%;
        gap: 2%;
        row-gap: 16px;
    }

    #skills-container {
        grid-template-columns: 48% 48%;
        gap: 4%;
        row-gap: 16px;
    }
}

@media only screen and (max-width: 1337px) {
    #footer {
        margin-left: 30%;
        width: 70%;
    }

    #navbar {
        width: 70%;
    }

    .side-left {
        width: 30%;
    }

    .side-middle {
        margin-left: 30%;
        width: 70%;
    }

    .side-right {
        display: none;
    }

    #skills-container {
        grid-template-columns: 32% 32% 32%;
        gap: 2%;
        row-gap: 16px;
    }
}

@media only screen and (max-width: 1160px) {
    #skills-container {
        grid-template-columns: 48% 48%;
        gap: 4%;
        row-gap: 16px;
    }
    #weapon-proficiency-container, #job-proficiency-container, #familiarity-proficiency-container {    
        display: grid;
        grid-template-columns: 32% 32% 32%;
        gap: 2%;
        row-gap: 0;
    }
}

@media only screen and (max-width: 955px) {
    #footer {
        margin-left: auto;
        width: 100%;
    }

    #navbar {
        width: 100%;
    }

    .side-left {
        display: none;
    }

    .side-middle {
        margin-left: 0;
        width: 100%;
    }

    .side-right {
        display: none;
    }

    #skills-container {
        grid-template-columns: 32% 32% 32%;
        gap: 2%;
        row-gap: 16px;
    }
}

@media only screen and (max-width: 812px) {
    #skills-container {
        grid-template-columns: 48% 48%;
        gap: 4%;
        row-gap: 16px;
    }
}

@media only screen and (max-width: 669px) {
    .overlord {
        flex-direction: column;
    }

    .left-rule {
        width: 100%;
        margin-bottom: 16px;
    }

    .right-rule {
        width: 100%;
    }
    .grid3 {
        grid-template-columns: auto;
    }

    .pcvsnpc-div {
        padding: 8px;
    }

    .npc {
        margin: 0 auto;
    }

    .addxp {
        text-align: center;
        margin-top: 0;
    }

    .addxp-btn {
        margin-left: 4px;
    }

    .charpic {
        width: 100%;
        height: 85vw;
        margin-bottom: 16px;
    }
}

@media only screen and (max-width: 600px) {
    #heritage-container {
        grid-template-columns: 32% 32% 32%;
        gap: 2%;
        row-gap: 0;
    }

    #skills-container {
        grid-template-columns: auto;
        width: 300px;
        margin: auto;
    }

    .skill {
        justify-content: space-around;
        width: auto;
    }

    .skill-name {
        width: 150px;
    }

    .skill-btn {
        width: auto;
        text-align: center;
    }

    #magic-proficiency-container {
        grid-template-columns: 48% 48%;
        gap: 4%;
        row-gap: 16px;
    }

    #weapon-proficiency-container, #job-proficiency-container, #familiarity-proficiency-container {
        grid-template-columns: 48% 48%;
        gap: 4%;
        row-gap: 0;
    }
}

@media only screen and (max-width: 500px) {
    body {
        font-size: smaller;
    }

    .attribute-bar {
        font-size: medium;
    }

    h4 {
        font-size: small;
    }

    table {
        font-size: x-small;
    }

    .dice-values th, .combat-tool th, .combat-common th, .combat-manouver th, .combat-example th {
        font-size: smaller;
    }    

    .rule-btn {
        font-size: x-small;
    }

    p {
        font-size: smaller;
    }

    .h2 {
        font-size: small;
    }

    #left-side {
        width: 130px;
    }

    .right-side {
        margin-left: 130px;
    }

    .navbar-btn {
        font-size: smaller;
    }    
    
    .die {
        width: 15px;
    }

    .pcvsnpc-lang {
        padding: 0;
        width: 130px;
        margin-right: 4px;
    }

    .pcvsnpc-div {
        padding: 4px;
    }

    .langFlag {
        height: 20px;
    }

    table th, table td {
        padding: 4px 8px;
    }

    .pwr-btn-on, .pwr-btn-off, .home-btn, .rules-btn, .char-btn, .group-btn {
        height: 30px;
        width: 30px;
    }
}

@media only screen and (max-width: 400px) {


    .intext-img {
        margin-left: 0;
        float: none;
        width: 100%;
        height: auto;
    }

    #left-side {
        position: fixed;
        top: 0;
        left: 0;
        width: 130px;
        display: none;
        animation:animateleft 0.4s;
        background-color: transparent;
        background-image: linear-gradient(to right, #28262c 70%, transparent);
        height: 100vh;
        margin-top: 0;
        border-radius: 0;
    }

    .right-side {
        margin-left: 0;
    }

    .burger {
        display: block;
    }

    .close-btn {
        display: block;
    }

    .block-btn {
        width: 90%;
    }

    .rule-btn {
        width: 85%;
    }

    .heading {
        color: transparent;
    }

    .add-btn, .subtract-btn {
        width: 30px;
        padding: 0;
    }

    #heritage-container {
        grid-template-columns: 48% 48%;
        gap: 4%;
        row-gap: 0;
    }

    #magic-proficiency-container {
        grid-template-columns: auto;
        gap: 0;
        row-gap: 16px;
    }

    #weapon-proficiency-container, #job-proficiency-container, #familiarity-proficiency-container {
        grid-template-columns: auto;
        gap: 0;
    }

    .skill-group {
        width: 250px;
        margin: auto;
    }

    .proficiency {
        width: 200px;
        margin: auto;
    }

    @keyframes animateleft {
        from{left:-120px;opacity:0} to{left:0;opacity:1}
    }
}

@media only screen and (max-height: 700px) {
    .image3 {
        display: none;
    }

    .image6 {
        display: none;
    }
}

@media only screen and (max-height: 456px) {
    .image2 {
        display: none;
    }

    .image5 {
        display: none;
    }
}