body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    color: rgb(255, 255, 255);
    font-family: Arial, sans-serif;
}
header, main, footer {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(1rem, 1vw, 1.5rem);
    /*font-size: 1.5rem;*/
    /*font-style: italic;*/
}

/*HEADER*/
header {
    height: 10%;
    background-color: rgba(30, 30, 30);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logoPanel {
    display: flex;
    flex-direction: row;
}
.logoPanel div a {
    text-decoration: none;
}

#logo {
    font-size: 4rem;
    font-family: 'Iceland', sans-serif;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 3px 3px 5px #000000;
    text-decoration: none;
    margin: 1rem 0 1rem 0.5rem;
}
#logo:hover {
    color: #aaaaaa;
}

#logoImg {
    height: 2rem;
    margin: 1rem 1rem 1rem 0;
}

.left-content, .right-content {
    display: flex;
    align-items: center;
}

.right-content {
    margin-left: auto;
}

.left-content div, .right-content div {
    margin: 0.5rem;
}
.navigation-buttons, .navigation-buttons-footer {
    display: flex;
    flex-direction: row;
}

/*Login Header*/
#notLogged, #logged, #notLogged form div{
    display: flex;
    justify-content: center;
    align-items: center;
}
#notLogged form, #logged form {
    display: flex;
    flex-direction: row;
}

/*MAIN*/
main {
    height: 80%;
    display: flex;
}

.main-content,
.side-content {
    height: 100%;
}

.side-content {
    width: 10%;
    background-color: rgba(40, 40, 40);
}

.main-content {
    width: 80%;
    background-color: rgba(50, 50, 50);
    display: flex;
    justify-content: center;
    align-items: center;
}

#window {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 98%;
    background-color: rgba(60, 60, 60);
    height: 96%;
    border-radius: 1rem; /* zaokrąglone rogi */
    overflow: hidden; /* Zapobiega wyglądowi zawartości poza zaokrąglonymi rogami */
    border: 1px solid black;
}

#headline {
    width: 100%;
    min-height: 10%; /* Ustawienie wysokości na 10% */
    background-color: rgba(70, 70, 70);
    border-bottom: 1px solid black;
    display: flex; /* Ustawienie kontenera na flexbox */
    align-items: center; /* Wysrodkowanie elementów w pionie */
    justify-content: center; /* Wysrodkowanie elementów w poziomie */

}
/*home page*/
#page1, #page2 {
    /*border: 1px solid white;*/
    width: 100%;
    overflow: hidden; /* wycinaj zawartość, która wystaje poza div */

}
#page1 {
    height: 110%;
    display: flex; /* Ustawienie kontenera na flexbox */
    align-items: center; /* Wysrodkowanie elementów w pionie */
    justify-content: center; /* Wysrodkowanie elementów w poziomie */
}
#page2,#page-polityka {
    height: auto;
    margin-top: 2%;
    padding-top: 1%;
}

#lobbyPanel {
    width: 60%;
    height: 100%;
}
#page1-top {
    width: 100%;
    height: 16%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
#page1-mid {
    width: 96%;
    height: 68%;
    padding: 2%;
}
#page1-down {
    width: 100%;
    height: 12%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}
#page1-down img {
    margin-top: 2%;
    width: 5%;
}
#page1-down p, #page1-top p {
    margin: 0;
}
#nickForms {
    height: 60%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#nickForms button {
    margin-top: 1%;
}
.nickForm {
    width: 100%;
}
.joinForms {
    height: 35%;
    width: 100%;
    display: flex;
    flex-direction: row;
    margin-top: 2%;
}
.joinForm, #nickForms {
    border: 2px solid rgba(65, 65, 65); /* Kolor granicy */
    border-radius: 10px; /* Zaokrąglenie rogów */
    padding-top: 10px; /* Odstęp wewnętrzny */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* Cień, aby stworzyć wrażenie wypukłości */
    background-color: rgba(70, 70, 70);
}
.joinForm {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.joinForm:first-child {
    margin-right: 1%;
}
.joinForm:nth-child(2) {
    margin-left: 1%;
}
.joinForm p, #nickForms p {
    font-size: 1rem;
}
#Panel {
    display: flex;
    overflow-y: scroll;
    width: 96%;
    justify-content: center; /* Wysrodkowanie elementów w poziomie */
}
#homePanel {
    text-align: center;
    padding: 1rem;
    /*width: 60%;*/
    width: 100%;
}
#homePanel,#chatPanel,#regulaminPanel {
    height: 86%;
}
/*Regulamin*/
#regulaminPanel {
    text-align: center;
    padding: 1rem;
    width: 96%;
}
#regulaminPanel {
    overflow-y: scroll;
}
#nickInput {
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}
#regulaminPanel {
    text-align: start;
}
#authPanel{
    height: 90%;
}
#chatPanel {
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
}
#chatWindow, #chatWindowOff, #chatButtons {
    /*border: 1px solid black;*/
    width: 100%;
}
#chatWindow, #chatWindowOff {
    height: 90%;
    overflow-y: scroll;
}
#chatWindowOff {
    display: none;
}
#chatButtons {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 10%;
    margin-top: 0.5rem;
    border-radius: 1rem; /* zaokrąglone rogi */
    overflow: hidden; /* Zapobiega wyglądowi zawartości poza zaokrąglonymi rogami */
    border: 2px solid black;
}
#chatButtons > div {
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 2px solid black;
}
#chatButtons > div:last-child {
    border-right: none;
}
.chatBtnConnect,.chatNick { width: 15%; white-space: nowrap; }
.chatBtnSend {
    width: 10%;
    padding: 0;
    display: flex;
    justify-content: center; /* wyśrodkowanie w poziomie */
    align-items: center; /* wyśrodkowanie w pionie */}

.chatMessage {
    width: 60%;
}
#chatButtons button, #chatButtons input[type="text"] {
    width: 100%;
    height: 100%;
    padding: 0.5rem; /* Dodajemy wypełnienie, aby tekst był odrobinę oddzielony od krawędzi */
    box-sizing: border-box; /* Ustawiamy, aby padding był uwzględniony w szerokości i wysokości */
    font-size: inherit; /* Dziedziczymy rozmiar czcionki od rodzica */
    border: none; /* Usuwamy domyślny border */
    outline: none; /* Usuwamy domyślny outline */
    background-color: rgba(60, 60, 60);
    color: #ffffff;
}

#chatButtons button:hover {
    background-color: rgba(50, 50, 50);
}
#sendImg {
    height: 1.3rem;
}

/*Footer*/
footer {
    height: 10%;
    background-color: rgba(30, 30, 30);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-content-footer, .right-content-footer {
    display: flex;
    align-items: center;
}

.right-content-footer {
    margin-left: auto;
}

.left-content-footer div, .right-content-footer div {
    margin: 0 10px;
}

/*Login Register*/
#authPanel{
    display: flex;
    flex-direction: row;
    width: 100%;
}
#registerPanel, #loginPanel {
    width: 50%;
    height: 100%;
}
#loginPanel {
    border-right: 1px solid black;
}

#registerPanel, #loginPanel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
}
#registerPanel div, #loginPanel div  {
    padding: 1rem;
}

#registerPanel form, #loginPanel form {
    width: 100%;
}

.authForm {
    height: 70%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
}

/* Przyciski i Style dla inputów */
.input, .inputAuth {
    border: 1px solid black; /* czarna granica 1px */
    border-radius: 2rem; /* zaokrąglone rogi */
    background-color: #ffffff; /* białe tło */
    padding: 0.5rem; /* margines wewnętrzny */
    /*margin: 5px; !* margines zewnętrzny *!*/
    box-sizing: border-box; /* uwzględnienie granic w wymiarach */
    font-size: 0.75rem;
    width: 100%;
}
.input {
    text-align: center;
    font-size: 1rem;
}
.chatMessage #inputMessage[disabled], #sendMessage[disabled] {
    cursor: not-allowed; /* zmień kursor na nieaktywny */
}

.normal {
    border: 1px solid black; /* czarna granica 1px */
    border-radius: 2rem; /* zaokrąglone rogi */
    background-color: rgba(30, 30, 30);
    padding: 0.5rem; /* margines wewnętrzny */
    margin: 0 1rem 0 1rem;
    box-sizing: border-box; /* uwzględnienie granic w wymiarach */
    font-size: 0.75rem;
    color: #ffffff;
    cursor: pointer;
}

.buttonBlue, .buttonGreen, .buttonRed, td .buttonBlue:disabled
{
    position: static;
    display: inline-block;
    padding: 0.3rem;
    padding-left: 0.5rem;
    margin: 0.5rem;
    color: #03e9f4;
    /*font-size: 1rem;*/
    text-decoration: none;
    text-transform: uppercase;
    overflow: hidden;
    transition: 0.5s;
    letter-spacing: 4px;
    /* Dodanie efektu odbicia pod elementem */
    /*-webkit-box-reflect: below 1px linear-gradient(transparent, #0005);*/
    cursor: pointer;

    background-color: transparent;

    outline: none;
    white-space: nowrap;
}
.joinForm .buttonBlue, .nickForm .buttonBlue {
    border: 1px solid #03e9f4;
    border-radius: 0.2rem;
    margin: 0;
}

.buttonBlue:disabled {
    color: #969696;
    border: 1px solid #969696;
    cursor: not-allowed; /* kursor niedostepnosci */
}


.buttonGreen { color: #00ff39; }
.buttonRed { color: #ff0000; }
.buttonBlue:hover
{
    background: #03e9f4;
    color: #ffffff;
    box-shadow: 0 0 5px #03e9f4,
    0 0 25px #03e9f4,
    0 0 50px #03e9f4,
    0 0 200px #03e9f4;
}
.buttonBlue:disabled:hover
{
    background: #969696;
    color: #000000;
    box-shadow: 0 0 5px #969696,
    0 0 25px #969696,
    0 0 50px #969696,
    0 0 200px #969696;
}
.buttonGreen:hover
{
    background: #00ff39;
    color: #ffffff;
    box-shadow: 0 0 5px #00ff39,
    0 0 25px #00ff39,
    0 0 50px #00ff39,
    0 0 200px #00ff39;
}
.buttonRed:hover
{
    background: #ff0000;
    color: #ffffff;
    box-shadow: 0 0 5px #ff0000,
    0 0 25px #ff0000,
    0 0 50px #ff0000,
    0 0 200px #ff0000;
}
.textLink {
    text-decoration: none;
    color: #7eb7ff;
}
.error-message, .alert-danger, .alert-info, .alert-success {
    font-size: 1rem;
    padding: 0;
    margin: 0;
}

.error-message, .alert-danger {
    color: #ff0000;
}
.alert-info {
    color: #03e9f4;
}
.alert-success {
    color: #00ff39;
}

/*cookie-accept*/
#popup-overlay, #warn-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
}
#regulaminPanel #popup-overlay  {
    position: static;
    width: 96%;
    height: auto;
    padding: 2%;
    background: none;
}

#regulaminPanel #popup-overlay #popup  {
    max-width: 90%;
}

#popup, #warn {
    background-color: rgba(30, 30, 30);
    padding: 1rem;
    border-radius: 1rem;
    max-width: 42%;
    text-align: center;
}

#popup div, #warn div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#warn div {
    justify-content: center;
}

#ButtonRegisterMobile {
    display: none;
}
#LogoutMobile {
    display: none;
}

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

    body, html {
        font-size: 2rem;
    }
    header {
        height: 13%;
        flex-direction: column;
        justify-content: flex-start;
    }
    #logo, #logoImg {
        margin: 0;
    }

    .left-content, .right-content {
        flex-direction: column;
    }

    .left-content div, .right-content div {
        margin: 0.25rem;
    }
    .right-content {
        display: none;
    }
    #ButtonRegisterMobile {
        display: block;
    }
    #LogoutMobile {
        display: block;
        font-size: 1rem;
    }
    .navigation-buttons {
        margin: 0;
    }
    main {
        height: 82%;
        flex-direction: column;
        font-size: 1.5rem;
        overflow: hidden;
    }
    .side-content {
        width: 100%;
        height: 10%;
    }
    .main-content {
        width: 100%;
        height: 80%;
        overflow: hidden;
    }
    #window {
        width: 96%;
    }
    #headline {
        height: 10%;
    }
    #joinForms {
        flex-direction: column;
    }
    #nickForms p {
        margin: 0;
    }
    #lobbyPanel {
        height: 100%;
    }


    #homePanel, #authPanel, #regulaminPanel {
        height: 90%;
    }
    #homePanel, #nickForms, .joinForm {
        width: 100%;
    }
    /*#homePanel {*/
    /*    padding: 0;*/
    /*}*/
    #authPanel {
        width: 100%;
        font-size: 2rem;
    }
    #authPanel input {
        font-size: 1.25rem;
    }
    #lobbyPanel {
        width: 100%;
        font-size: 1.1rem;
    }
    #chatPanel { width: 95%; font-size: 1rem; }
    #chatWindow, #chatWindowOff { width: 95%; }
    .chatBtnConnect { width: 17%; font-size: 0.75rem;}
    .chatBtnSend { width: 13%; }
    #chatButtons .chatNick { display: none; }
    .chatMessage { width: 70%; }

    footer {
        height: 5%;
        font-size: 0.5rem;
    }
    .navigation-buttons-footer .buttonBlue  {
        margin:0.3rem;
        padding:0;
    }

    main .buttonBlue, .buttonGreen, .buttonRed, main .buttonBlue:disabled {
        font-size: 1rem;
    }
    #popup, #warn,
    #regulaminPanel #popup-overlay #popup  {
        max-width: 95%;
    }
    #regulaminPanel #popup-overlay #popup .buttonGreen,
    #regulaminPanel #popup-overlay #popup .buttonRed {
        font-size: 0.9rem;
    }
}
