.main-los {
    display: flex;
    flex-direction: column;
    /* max-width: 800px; */
    box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background-color: #fff;
}
.main-los .top {
    display: flex;
    justify-content: space-between;
    padding: 15px;
}
.main-los .top-section {
    font-size: 18px;
    color: #5E5E5E;
}
.main-los .top-section #toggleFlexDirection {
    cursor: pointer;
}
.main-los .top-section i {
    font-size: 14px;
    color: #000;
}
.mid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 25px;
    text-align: center;
    gap: 20px;
}
.mid-col {
    display: flex;
    flex-direction: column;
}
.mid h4 {
    font-size: 26px;
    font-weight: 400;
    line-height: 45px;
}
.mid p {
    font-size: 16px;
    font-weight: 300;
    line-height: 35px;
}
.button {
    display: flex;
    justify-content: center;
    width: 100%;
    background-color: #49505E;
    text-align: center;
    color: #ffff;
    padding: 16px 0px;
    font-size: 16px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}
.button:hover {
    background-color: #49505eac;
    cursor: pointer;
}


.examples-box {
    /* margin: 32px 0px; */
}
.examples-box .headText {
    font-size: 16px;
    /* margin: 32px 0px; */
}

.example-line {
    /* padding: 28px 32px; */
    font-size: 16px;
    border-radius: 8px;
    background-color: #fff;
}
.example-line p {
    color: #5E5E5E;
    font-weight: 300;
}


/* Kontener listy słówek */
.word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    padding: 20px;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Kafelki (pojedyncze słówka) */
.word {
    width: 364px;
    height: 200px;
    perspective: 1000px;
}

/* Wewnętrzny kontener (ten, który się obraca) */
.word-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

/* Cały kafelek się obraca */
.word.flipped .word-inner {
    transform: rotateY(180deg);
}

/* Przód i tył */
.word-front,
.word-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Przód */
.word-front {
    transform: rotateY(0deg);
}

/* Tył */
.word-back {
    transform: rotateY(180deg);
}

/* Kontener na ikony/przyciski */
.word-icons {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Styl dla przycisków ikonowych */
.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: #000000;
    transition: color 0.3s;
}

.icon-button:hover {
    color: #e74c3c;
}

/* Ikona dźwięku */
.audio-icon {
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-top: 4px;
}

.audio-icon.playing {
    transform: scale(1.1);
    color: #000000;
}


.icon {
    cursor: pointer;
    vertical-align: middle;
}

#pagination {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

#pagination select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

#pageNumbers {
    display: flex;
    align-items: center;
    justify-content: center;
}

#pageNumbers button {
    margin-right: 5px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
}

#pageNumbers button:active {
    background-color: #49505E;
    color: #fff;
    border-color: #49505E;
}

#currentPageInfo {
    margin-top: 10px;
}

/* .word-title {
    font-size: 18px;
    font-weight: bold;
} */

.search-box #searchInput {
    width: 100%;
    padding: 16px;
    margin-right: 25px;

    border: 1px solid #D9D9D9;
    border-radius: 8px;

    font-size: 18px;
    color: #5E5E5E;
}

.search-box #searchInput:focus {
    outline: 2px solid #D9D9D9;
}

.pag {
    margin-bottom: 16px;
    color: #5E5E5E;
    font-size: 14px;
}

.pag svg {
    margin-left: 16px;
    transition: margin-bottom ease 0.3s;
    cursor: pointer;
    width: 8px;
    height: 14px;
}

.pag svg:hover {
    margin-bottom: 2px;
}




@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5);
    }

    100% {
        transform: scale(1);
    }
}

.playing {
    animation: pulse 1s infinite alternate;
}


.status-active {
    color: green;  /* Zielony kolor dla aktywnych użytkowników */
}

.status-inactive {
    color: red;  /* Czerwony kolor dla nieaktywnych użytkowników */
}


#randomWordButton i.fa-spinner {
    margin-left: 5px;  
}

/* 
.icon-button {
    border: none;
    background: none;
    cursor: pointer;
    padding: 5px;
    margin: 2px;
    color: #333; 
    font-size: 16px; 
} */

.icon-button:hover {
    color: #49505E; 
}


@media only screen and (max-width: 1008px) {
    .word-list {
        flex-direction: column;
        align-items: center;
        padding: 10px;
        gap: 16px;
    }

    .word {
        width: 300px;
        height: 200px;
        perspective: 1000px;
      }
      
      .word-inner {
        position: relative;
        width: 100%;
        height: 100%;
        transition: transform 0.6s;
        transform-style: preserve-3d;
      }
      
      .word.flipped .word-inner {
        transform: rotateY(180deg);
      }
      
      .word-front,
      .word-back {
        position: absolute;
        width: 100%;
        height: 100%;
        backface-visibility: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #ccc;
        border-radius: 8px;
        background: #fff;
        padding: 20px;
        box-sizing: border-box;
      }
      
      .word-front {
        transform: rotateY(0deg);
      }
      
      .word-back {
        transform: rotateY(180deg); /* <-- to MUSI być */
      }

    .word-icons {
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 10px;
    }

    .icon-button,
    .audio-icon {
        font-size: 18px;
    }


    .pag {
        margin-bottom: 16px;
        color: #5E5E5E;
        font-size: 10px;
    }

    #wordsPerPageSelect {
        font-size: 10px;
    }

    .pag svg {
        margin-left: 16px;
        transition: margin-bottom ease 0.3s;
        cursor: pointer;
        width: 4px;
        height: 7px;
    }

    #pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    #pagination .pag {
        width: 100%;
    }
    

    .examples-box {
        margin: 16px 0px;
    }
    .examples-box .headText {
        font-size: 12px;
        margin: 16px 0px;
    }
    
    .example-line {
        /* padding: 14px 16px; */
        font-size: 10px;
        border-radius: 8px;
        background-color: #fff;
    }




    .search-box #searchInput {
        width: 100%;
        padding: 8px;
        margin-right: 25px;
    
        border: 1px solid #D9D9D9;
        border-radius: 8px;
    
        font-size: 10px;
        color: #5E5E5E;
    }
    
    .main-los .top {
        display: flex;
        justify-content: space-between;
        padding: 15px;
    }
    .main-los .top-section {
        font-size: 14px;
    }

    .mid {
        padding: 25px 25px;
        gap: 5px;
    }
    .mid h4 {
        font-size: 18px;
    }
    .mid p {
        font-size: 12px;
    }
    .button {
        padding: 12px 0px;
        font-size: 12px;
    }

    .main-los .top i {
        font-size: 10px;
    }

}


/* Ukrywanie radio buttonów */
#categorySelect input[type="radio"] {
    display: none;
}

/* Stylizowanie ikonek */
#categorySelect label i {
    margin-right: 10px;
    color: #666; /* Domyślny kolor ikony */
}

/* Stylizowanie dodatkowego tekstu */
#categorySelect .category-description {
    margin-left: 5px;
    font-size: 0.85em;
    color: #666;
}

#categorySelect .category-description {
    margin-left: 5px;
    font-size: 0.85em;
    color: #666;
}
/* Stylizowanie etykiet jako przyciski */
#categorySelect label {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    margin: 5px;
    border: 2px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    font-weight: normal;
}

/* Stylizacja dla wybranej kategorii */
#categorySelect input[type="radio"]:checked + label {
    background-color: #5CE1E6; /* Kolor tła dla zaznaczonego */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    color: #5CE1E6;
}

#categorySelect input[type="radio"]:checked + label i {
    color: #fff; 
}

#categorySelect input[type="radio"]:checked + label .category-description {
    color: #fff;
    font-weight: 500;
}



#categorySelect label:hover {
    background-color: #e0e0e0;
    border-color: #b0b0b0;
}

#categorySelect label:checked span {
    color: #fff;
}

.button-group {
    display: flex;
    justify-content: center;
    /* align-items: center; */
    margin: 20px 0;
    flex-wrap: wrap;             
}

.disabled {
    color: #888;
    cursor: not-allowed;
}

input[type="radio"]:disabled {
    opacity: 0.5;
    pointer-events: none;
}

input[type="radio"]:disabled + label {
    color: #aaa;
    cursor: not-allowed;
}
