:root {
    --background-color: #121212;
    --shadow-color: #292929; /* Ciemne tło */
    --text-color: #E0E0E0; /* Jasny tekst */
    --accent1: #899fc9; /* Bardziej nasycony pastelowy niebieski - akcent 1 */
    --accent2: #1e2635;/* Trochę ciemniejszy niebieski - akcent 2 */
    --wrong-answer: #f8aaaa; /* Jasny czerwony dla złej odpowiedzi */
    --wrong-selected: #FF0000; /* Bardzo intensywny czerwony dla wybranej złej odpowiedzi */
    --correct-answer: #aaffaa; /* Jasny zielony dla poprawnej odpowiedzi */
    --correct-selected: #00FF00; /* Bardzo intensywny zielony dla wybranej poprawnej odpowiedzi */
}
* {
    margin: 0;
}
html::-webkit-scrollbar-track {
    background: var(--shadow-color);
}

html::-webkit-scrollbar-thumb {
    background-color: var(--accent2);
    border-radius: 10px;
    border: 3px solid var(--shadow-color);
}
html {
    scrollbar-width: auto;
    scrollbar-color: #454e5f #000;
}
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Poppins', Arial;
    display: grid;
    place-items: center;
    padding-bottom: 60px;
    min-height: 110svh;
}



/*------------------------------ ------------------------*/
/*------------------------------------------------------*/
header {
    width: 98vw;
    text-align: center;
    padding-top: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid;
    border-image: linear-gradient(90deg,rgba(0,0,0,0) 0%, var(--accent1) 50%, rgba(0,0,0,0) 100%) 1;
    margin-bottom: 20px;
    align-self: baseline;
}
h1 {
    font-weight: 300;
    font-size: 40px;
}
header p a {
    background-image: url(../img/1.webp);
    color: rgba(0,0,0,0);
    background-clip: text;
    font-weight: 800;
    font-size: 20px;
    background-size: 200%;
    background-position: 20% 80%;
    animation-name: txtBgAnim;
    animation-duration: 30s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-fill-mode:both;
    filter: brightness(1.2) saturate(1.4);
}
@keyframes txtBgAnim {
    0% {
        background-position: 0% 80%;
    }
    50% {
        background-position: 100% 80%;
    }
    100% {
        background-position: 0% 80%;
    }
}
/*------------------------------------------------------*/
/*------------------------------------------------------*/
form {
    width: 50%;
    min-width: 800px
}
fieldset {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 0 10px var(--shadow-color) inset, 0 0 10px #000;
    border: 0;
    margin: 65px 0;
    padding: 40px;
}

fieldset h2 {
    margin-bottom: 40px;
    font-weight: 400;
}
fieldset div {
    padding: 0 10px;
    margin: 10px 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
}
fieldset div label {
    width: 100%;
    display: block;
    cursor: pointer;
    user-select: none;
    padding: 3px 0;
}
fieldset div b {
    user-select: none;
}
fieldset div:hover {
    background-color: var(--accent2);
}
fieldset div input {
    visibility:hidden;
}
fieldset div:has(input[type="radio"]:checked){
    background-color: var(--accent1);
    color: var(--background-color);
}


/*------------------------------------------------------*/
/*------------------------------------------------------*/


.zlaOdp {
    color: var(--wrong-answer) !important;
}
.zleWybrane {
    color: var(--wrong-selected) !important;
}
.poprawnaOdp {
    color: var(--correct-answer) !important;
}
.poprawnieWybrane {
    color: var(--correct-selected) !important;
    
}
.zlaOdp label, .zleWybrane label, .poprawnaOdp label, .poprawnieWybrane label {
    background-color: initial !important;
    cursor:default;
}
.zlaOdp, .poprawnaOdp {
    background-color: initial !important;
    font-weight: 300;
}
.zleWybrane, .poprawnieWybrane {
    background-color: var(--accent2) !important;
    border-left: 0;
    border-right: 0;
    font-weight: 500 !important;
}

#wynik {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    font-size: 25px;
    background-color: var(--shadow-color);
}
#wynik #procent {
    margin-left: 80px;
}
#wynik b {
    font-weight: 600;
}


/*------------------------------------------------------*/
/*------------------------------------------------------*/



#actionDiv {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 100px 0;
}
#actionDiv h2 {
    cursor: pointer;
    background-color: var(--shadow-color);
    color: var(--text-color);
    font-size: 20px;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 300;
    background-size: 600% 600%;
}

#actionDiv h2.losuj:hover {
    background-image: linear-gradient(230deg, #4868a0 35%, #84b5ff, #4868a0 65%);
    animation: AnimationName 1s linear 1;
    animation-direction: reverse;
}
#actionDiv h2.sprawdz:hover {
    background-image: linear-gradient(230deg, #3a663e 35%, #65e070, #3a663e 65%);
    animation: AnimationName 1s linear 1;
    animation-direction: reverse;
}

@keyframes AnimationName {
    0%{background-position:0% 50%}
    100%{background-position:100% 50%}

}
#actionDiv select {
    background-color: var(--shadow-color);
    color: var(--text-color);
    font-size: 16px;
    outline: 0;
    border: 0;
    margin-left: 15px;
}

footer {
    font-size: 13px;
    padding: 20px 0;
}
footer a {
    color: var(--accent1);
    text-decoration: none;
}
/* uwaga uwaga kod stylu elementu "select"
został zainspirowany z codepen'a poniżej:
https://codepen.io/vkjgr/pen/VYMeXp
*/
select {
    border-radius: 4px;
    display: inline-block;
    font: inherit;
    line-height: 1.5em;
    padding: 0.5em 3.5em 0.5em 1em;
    margin: 0;
    box-sizing: border-box;
    appearance: none;
}
#actionDiv select {
    background-image:
      linear-gradient(45deg, transparent 50%, var(--text-color) 50%),
      linear-gradient(135deg, var(--text-color) 50%, transparent 50%),
      linear-gradient(to right, var(--text-color), var(--text-color));
    background-position:
      calc(100% - 20px) calc(1em + 2px),
      calc(100% - 15px) calc(1em + 2px),
      calc(100% - 2.5em) 0.5em;
    background-size:
      5px 5px,
      5px 5px,
      1px 1.5em;
    background-repeat: no-repeat;
}
#actionDiv select:hover {
    background-image:
      linear-gradient(45deg, transparent 50%, var(--accent1) 50%),
      linear-gradient(135deg, var(--accent1) 50%, transparent 50%),
      linear-gradient(to right, var(--text-color), var(--text-color));
    background-position:
      calc(100% - 20px) calc(1em + 2px),
      calc(100% - 15px) calc(1em + 2px),
      calc(100% - 2.5em) 0.5em;
    background-size:
      5px 5px,
      5px 5px,
      1px 1.5em;
    background-repeat: no-repeat;
    border-color: var(--accent1);
    outline: 0;
}

@media screen and (max-width:820px) {
    body {
        padding-bottom: 50px;
    }
    h1 {
        font-size: 35px;
    }
    header p a {
        font-size: 18px;
    }
    form {
        min-width: 325px;
        width: 90%;
    }
    fieldset {
        padding: 15px;
    }
    fieldset h2 {
        font-size: 18px;
    }
    fieldset div {
        font-size: 14px;
    }
    #wynik {
        font-size: 18px;
        height: 50px;
    }
}