* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --border-color-grey: #E3DFD6;
    --dark-yellow-one: #FAB818;
    --purple-color-one: #5635D7;
    --shadow-color-one: #E3DFD6;
    --light-text-color: #FFFFFF;

}

h1, h2, button, h5, h3, .user-form label {
    font-family: 'BAGOTA LOS', sans-serif;
}

input::placeholder, input[type=text] {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.8rem, 0.747rem + 0.281vw, 1rem);
    color: var(--purple-color-one);
    font-weight: 600;
}

p {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.8rem, 0.747rem + 0.281vw, 1rem);
    font-weight: 700;
}

li {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
}

.user-form label{
    font-size: clamp(0.8rem, 0.758rem + 0.269vw, 1rem);
    color: var(--purple-color-one);
    text-shadow: none;
}

h3 {
    font-size: clamp(1.2rem, 1.042rem + 0.842vw, 1.8rem);
}

h5, button {
    font-size: clamp(1rem, 0.947rem + 0.281vw, 1.2rem);
}

h1 {
    font-size: clamp(1.5rem, 1.171rem + 1.754vw, 2.75rem);
}

.flex-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.flex-stretch {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0.5rem;
}

.flex-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.moviequiz-section, .question-container, .start-site, .options-container, .choose-category-site{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.moviequiz-section {
    justify-content: center;
    width: 100vw;
    gap: 1rem;
    padding: 1rem;
}

.question-container, .options-container {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border-color-grey);
    height: 100%;
}

.question-container {
    background-color: var(--dark-yellow-one);
    justify-content: flex-start;
    position: relative;
}

.start-site {
    visibility: visible;
    z-index: 10;
}

.start-site, .play-site, .choose-category-site {
    width: 100%;
    padding: 1rem;
    text-align: center;
    color: white;
    text-shadow: var(--purple-color-one) 2px 2px 2px;
}

.play-site {
    gap: 1rem;
}


/*logo*/
.logo-box {
    width: 40%;
    margin-bottom: 5rem;
}

.logo-box img {
    width: 100%;
}

.quiz-title {
    margin-bottom: 2rem;
}

.start-button button, .final-start-button {
    border: 1px solid var(--purple-color-one);
    background-color: var(--purple-color-one)  ;
    box-shadow: var(--shadow-color-one) 0 8px 16px;
    padding: 0.8rem 2rem;
    border-radius: 1rem;
    color: var(--light-text-color);
    text-shadow: var(--dark-yellow-one) 1px 1px;
}

.options-container {
    background-color: var(--purple-color-one);
    justify-content: center;
    padding: 0 1rem;
}

.options-box {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 1rem;
    justify-items: center;
    padding: 10px;
}

.options-box.option16 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, auto);
}

.options-box.option25 {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, auto);
}

.options-box.option30 {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(5, auto);
}

.options-box.option36 {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, auto);
}

.options {
    border: 8px solid var(--dark-yellow-one);
    width: 100%;
}

.start-card {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    width: 100%;
    position: relative;
}

.start-card img {
    width: 100%;
}

.start-card h1 {
    z-index: 10;
    position: absolute;
    padding: 1rem;
    color: var(--purple-color-one);
}

.playsite-header{
    display: flex;
    justify-content: center;
}
/*disabled*/
.options.disabled{
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.play-site, .choose-category-site{
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: column;
    position: absolute;
    visibility: hidden;
    z-index: -1;
    height: 100%;
}

.playsite-header {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.logo-box2, .logo-box3 {
    width: 18%;
}

.logo-box2 img, .logo-box3 img {
    width: 100%;
}


/*choose-category site*/

.chosen-div {
    flex-direction: row;
    gap: 0.5rem;
}

.chosen-div p span {
    color: var(--purple-color-one);
    text-shadow: none;
}

.user-form {
    gap: 1rem;
}
.username-holder, .question-count-holder {
    width: 70%;
}


.question-counts-btn, .level-btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 0.947rem + 0.281vw, 1.2rem);
    text-shadow: none;
    background: var(--purple-color-one);
    border: none;
    padding: 0 1rem ;
    border-radius: 5px;
    color: var(--dark-yellow-one);
}

.question-counts-btn:hover, .level-btn:hover {
    background: var(--border-color-grey);
    color: var(--purple-color-one);
}

.username-input {
    border: 1px solid var(--purple-color-one);
    background: var(--purple-color-one);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.username-input[type="text"] {
    color: var(--dark-yellow-one);
    text-align: center;
}

.username-input::placeholder {
    color: var(--dark-yellow-one);
    text-align: center;
}

/*Category Cards*/
.slideshow-container {
    width: 80vw;
    height: 14rem;
    overflow-x: scroll;
    display: flex;
    scroll-snap-type: x mandatory;
    gap: 15px;
    align-items: center;
    /*padding: 20px;*/
    box-sizing: border-box;
}



.slideshow-container::-webkit-scrollbar {
    width: 6px;
    /*height: 6px;*/

}
.slideshow-container::-webkit-scrollbar-thumb {
    background-color: var(--purple-color-one);
    border-radius: 10px;

}
.slideshow-container::-webkit-scrollbar-track {
    background: var(--dark-yellow-one);
}

.card {
    /*flex: 0 0 auto;*/
    justify-content: center;
    width: 8rem;
    height: 8rem;
    scroll-snap-align: center;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
    position: relative;
}

.centered {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(86, 53, 215, 0.7);
    padding: 5px;
    border-radius: 5px;
}

.image-holder {
    width: 7rem;
    height: 7rem;
}

.image-holder img {
    width: 100%;
    height: 100%;
}

.card:hover {
    transform: scale(1.05);
}
/*.card-content img {*/
/*    width: 120px;*/
/*}*/
.card-content p {
    font-size: 0.8rem;
    text-shadow: none;
    color: var(--dark-yellow-one);
}



/*play-site*/
.question-holder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid var(--purple-color-one);
    background-color: var(--light-text-color);
    border-radius: 15px;
    margin: 1rem;
    width: inherit;
    padding: 0.2rem;
}

/*dynamic Questions being showed*/
.question-header {
    color: var(--purple-color-one);
    text-shadow: none;
    margin-bottom: 10px;
}

.question-div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 1rem;
}

.choices {
    color: black;
    text-shadow: none;
    border: 2px solid var(--dark-yellow-one);
    border-radius: 10px;
    height: 100%;
    padding: 0.5rem;
}

.choices-div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    height: fit-content;
    padding: 0.2rem;
}

.not-choice {
    pointer-events: none;
    opacity: 0.3;
    cursor: not-allowed;
    border: 10px solid red;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

#startButton2 {
    display: flex;
    gap: 0.2rem;
}

/*player info*/

.player-info , .stat-container {
    display: flex;
    align-items: flex-start;
    text-align: left;
    gap: 1rem;
    width: 100%;
}

.player-info {
    flex-direction: column;
}

.stat-container {
    justify-content: space-between;
}

.stat-div {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-id {
    display: flex;
    flex-direction: row;
    background-color: #FFFFFF;
    color: var(--purple-color-one);
    text-shadow: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
}


.stat-container h5 {
    color: var(--purple-color-one);
    text-shadow: none;
}

.modal-answer, .modal-wrong-answer {
    visibility: hidden;
    opacity: 0;
}
.modal-answer, .modal-wrong-answer, .modal-alert {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 500;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 400px;
    border-radius: 10px;
    padding: 1rem;
    transition: opacity 0.5s ease; /* Smooth transition for opacity */
}

.modal-alert {
    visibility: hidden;
}

.modal-answer.visible, .modal-wrong-answer.visible {
    visibility: visible;
    opacity: 1;
}



.modal-alert-text {
    background-color: #FFFFFF;
    border: 2px solid var(--purple-color-one);
    border-radius: 15px;
    padding: 1rem;
}

.modal-content {
    width: 50vw;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.modal-content img {
    width: 100%;
}

/*modal congratulations*/

.modal-congratulations {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 30; /* Ensures it is above other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-congratulations.visible {
    display: flex; /* Shows the modal */
}

.modal-message {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease; /* Optional fade-in effect */
}

.modal-message h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: #333;
}

.modal-message p {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: #666;
}

.modal-message button {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#newGameButton {
    background-color: #28a745; /* Green */
    color: #fff;
}

#newGameButton:hover {
    background-color: #218838;
}

#exitGameButton {
    background-color: #dc3545; /* Red */
    color: #fff;
}

#exitGameButton:hover {
    background-color: #c82333;
}

#closeModal {
    background-color: #007bff; /* Blue */
    color: #fff;
}

#closeModal:hover {
    background-color: #0056b3;
}

.selection-image {
    height: 100px;
}

/*Chose Category Site*/
.choose-category-site {
    z-index: 1000;
}

/* Optional fade-in animation for the modal */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}



/*Game Instruction*/

.instructions {
    background-color: var(--light-text-color);
    border-radius: 15px;
    padding: 2rem;
    width: 80vw;
}

.instructions ol {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 0.2rem;
}

.list-choices {
    margin-left: 2rem;
}

@media screen and (min-width: 900px) {
    .moviequiz-section {
        width: 100%;
        flex-direction: row;
    }

     .options-container, .question-container {
        width: 45vw;
        height: auto;
         min-height: 130vh;
    }

    .modal-content {
        width: 35vw;
    }

    .slideshow-container {
        width: 40vw;
    }

    .instructions {
        width: 42vw;
    }

}

@media screen and (min-width: 1600px) {
    .options-container, .question-container {
        width: 45vw;
        height: auto;
        min-height: 100vh;
    }

    .slideshow-container {
        height: 20rem;
    }

    .card {
        width: 16rem;
        height: 16rem;
    }

    .image-holder {
        width: 15rem;
        height: 15rem;
    }

    .card-content p {
        font-size: 1.2rem;
    }

    .chosen-div{
        font-size: 1.4rem;
    }

    .chose-div h5 {
        display: block;
    }

    .instructions {
        width: 42vw;
    }

    li {
        font-size: 1.2rem;
    }
}