/* import google fonts */
@import url('https://fonts.googleapis.com/css2?family=Lugrasimo&display=swap');
@import url('https://fonts.googleapis.com/css2?family=PT+Serif:wght@700&display=swap');

:root {
    --color-main: #454e6a;
    --color-secondary: #d0cabe;
    --color-wheel-1: #979ebd;
    --color-wheel-2: #9baca8;
    --color-wheel-3: #606795;
    --color-wheel-4: #a48490;
    --color-wheel-5: #8a8b91;
    --color-purple: #c5b7ec;
    --color-shadow-light: rgba(186, 172, 191, 0.35);
    --color-shadow-light-2: rgba(33, 32, 33, 0.35);
    --color-shadow-dark: transparent;
    --color-white: #ffffff;
    --color-petrol: #14161b;
    --color-other: #75727d;
    --color-button-danger: #dc3545;
    --color-button-success: #28a745;
    --font-fam-primary: 'Segoe UI', sans-serif;
    --font-fam-secondary: 'Segoe UI', sans-serif;
    --shadow-before: 10px 10px 0px 0px;
    --shadow-after: 5px 5px 0px 0px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-fam-primary);
    background-image: url(../image/user_gif1_2025.gif);
    background-position: center;
    background-repeat: no-repeat;
    background-size:cover;
    overflow: hidden;
    height: 100vh;
    margin: 0;
}

/* main logo */
.image{
    position: absolute;
    top: 35vh;
    left:0;
    right:0;
    margin-left: auto;
    margin-right: auto;
    height: 50px;
    width: 200px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

img{
    height: 300px;
}

::selection{
    color: #fff;
    background: var(--color-petrol);
    font-family: var(--font-fam-secondary);
}

.start_btn {
    position: absolute;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: box-shadow .2s linear;
    box-shadow: var(--shadow-before) var(--color-shadow-light);
}

.start_btn:hover {
    box-shadow: var(--shadow-after) var(--color-shadow-light);
}

.info_box,
.name_box,
.quiz_box,
.qr-container,
.result_box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.info_box.activeInfo,
.name_box.activeName,
.quiz_box.activeQuiz,
.result_box.activeResult{
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

/* main section style */
.start_btn {
    top: 70vh;
    font-size: 22px; /* increased font size slightly */
    font-weight: 600;
    color: #000809;
    padding: 18px 28px; /* increased padding */
    outline: none;
    border: none;
    border-radius: 10px;
    background-color: var(--color-secondary);
    cursor: pointer;
    font-family: var(--font-fam-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* quiz rules section style */
.info_box{
    width: 540px;
    background-color: var(--color-secondary);
    border-radius: 10px;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: box-shadow .2s linear;
    font-family: var(--font-fam-secondary);
}

.info_box .info-title{
    height: 60px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 30px;
    border-radius: 5px 5px 0 0;
    font-size: 20px;
    font-weight: bold;
}

.info_box .info-list{
    padding: 15px 30px;
}

.info_box .info-list .info{
    margin: 5px 0;
    font-size: 16px;
}

.info_box .info-list .info span{
    font-weight: light;
}

.info_box .info-buttons{
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 30px;
}

.info_box .info-buttons button{
    margin: 0 5px;
    width: 100px;
    height: 35px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    background-color: var(--color-pink);
    border: 1px solid var(--color-petrol);
    border-radius: 15px;
    transition: box-shadow .2s linear;
    font-family: var(--font-fam-primary);
    box-shadow: var(--shadow-before) var(--color-shadow-light-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info_box .info-buttons button:hover{
    box-shadow: var(--shadow-after) var(--color-shadow-light-2); 
}

.info-buttons button.info-quit{
    color: #fff;
    background: var(--color-button-danger);
}

.info-buttons button.info-quit:hover{
    color: #fff;
    background: var(--color-button-danger);
    box-shadow: var(--shadow-after) var(--color-shadow-light-2);
}

.info-buttons button.info-next{
    color: #fff;
    background: var(--color-button-success);
}

.info-buttons button.info-next:hover{
    background: var(--color-button-success);
    box-shadow: var(--shadow-after) var(--color-shadow-light-2);
}

/* participant info section style */
.name_box{
    width: 540px;
    background-color: var(--color-secondary);
    border-radius: 10px;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: box-shadow .2s linear;
    font-family: var(--font-fam-secondary);
}

.name_box .name-title{
    height: 60px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 30px;
    border-radius: 5px 5px 0 0;
    font-size: 20px;
    font-weight: bold;
    text-decoration: underline;
}

.form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 15px;
  padding: 0 30px;
}

.form-group label {
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input.invalid {
  border: 2px solid red;
}

.error-message {
  color: red;
  font-size: 0.9em;
  margin-top: 5px;
}

.name_box input {
    height: 40px;
    width: 100%;
    max-width: 440px;
    padding: 0 15px;
    margin: 5px 0;
    text-align: left;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: var(--shadow-before) var(--color-shadow-light-2);
    transition: box-shadow .2s linear;
    border: 1px solid #ccc;
    font-family: var(--font-fam-primary);
    color: #000809;
    font-size: 14px;
    box-sizing: border-box;
}

.name_box input.invalid::placeholder {
    color: rgba(255, 0, 0, 0.6); 
}

.name_box .name-buttons{
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 30px;
}

.name_box .name-buttons button{
    margin: 0 5px;
    width: 100px;
    height: 35px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    background-color: var(--color-pink);
    border: 1px solid var(--color-petrol);
    border-radius: 15px;
    transition: box-shadow .2s linear;
    font-family: var(--font-fam-primary);
    box-shadow: var(--shadow-before) var(--color-shadow-light-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.name_box .name-buttons button:hover{
    box-shadow: var(--shadow-after) var(--color-shadow-light-2); 
}

.name-buttons button.name-quit{
    color: #fff;
    background: var(--color-button-danger);
}

.name-buttons button.name-quit:hover{
    color: #fff;
    background: var(--color-button-danger);
    box-shadow: var(--shadow-after) var(--color-shadow-light-2);
}

.name-buttons button.name-next{
    color: #fff;
    background: var(--color-button-success);
}

.name-buttons button.name-next:hover{
    background: var(--color-button-success);
    box-shadow: var(--shadow-after) var(--color-shadow-light-2);
}

/* quiz section style */
.quiz_box{
    width: 550px;
    background: #fff;
    border-radius: 5px;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    font-family: var(--font-fam-secondary);
}

.quiz_box header{
    position: relative;
    z-index: 2;
    height: 70px;
    padding: 0 30px;
    background: var(--color-secondary);
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quiz_box header .title{
    font-size: 20px;
    font-weight: 600;
}

.quiz_box header .timer{
    color: var(--color-petrol);
    background: var(--color-secondary);
    border: 1px solid var(--color-petrol);
    height: 45px;
    padding: 0 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 145px;
}

.quiz_box header .timer .time_left_txt{
    font-weight: 400;
    font-size: 15px;
    user-select: none;
}

.quiz_box header .timer .timer_sec{
    font-size: 18px;
    font-weight: 500;
    height: 30px;
    width: 45px;
    color: #fff;
    border-radius: 5px;
    line-height: 30px;
    text-align: center;
    background: #343a40;
    border: 1px solid #343a40;
    user-select: none;
}

.quiz_box header .time_line{
    position: absolute;
    bottom: 0px;
    left: 0px;
    height: 3px;
    background: var(--color-petrol);
}

section{
    padding: 25px 30px 20px 30px;
    background: #fff;
}

section .que_text{
    font-size: 25px;
    font-weight: 600;
}

section .option_list{
    padding: 20px 0px;
    display: block;   
}

section .option_list .option{
    border-radius: 10px;
    padding: 8px 15px;
    font-size: 17px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--color-pink);
    border: 1px solid var(--color-petrol);
    border-radius: 15px;
    transition: box-shadow .2s linear;
    font-family: var(--font-fam-secondary);
    box-shadow: var(--shadow-before) var(--color-shadow-light-2);
}

section .option_list .option:last-child{
    margin-bottom: 0px;
}

section .option_list .option:hover{
    box-shadow: var(--shadow-after) var(--color-shadow-light-2);
}

section .option_list .option.correct{
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

section .option_list .option.incorrect{
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

section .option_list .option.disabled{
    pointer-events: none;
}

section .option_list .option .icon{
    height: 26px;
    width: 26px;
    border: 2px solid transparent;
    border-radius: 50%;
    text-align: center;
    font-size: 13px;
    pointer-events: none;
    transition: all 0.3s ease;
    line-height: 24px;
}
.option_list .option .icon.tick{
    color: #23903c;
    border-color: #23903c;
    background: #d4edda;
}

.option_list .option .icon.cross{
    color: #a42834;
    background: #f8d7da;
    border-color: #a42834;
}

footer{
    height: 60px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

footer .total_que span{
    display: flex;
    user-select: none;
}

footer .total_que span p{
    font-weight: 500;
    padding: 0 5px;
}

footer .total_que span p:first-child{
    padding-left: 0px;
}

footer button{
    width: 100px;
    height: 35px;
    padding: 0 13px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    border: none;
    outline: none;
    color: var(--color-white);
    border-radius: 15px;
    background: var(--color-petrol);
    border: 1px solid #000809;
    line-height: 10px;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: all 0.3s ease;
    transition: box-shadow .2s linear;
    font-family: var(--font-fam-primary);
    box-shadow: var(--shadow-before) var(--color-shadow-light-2);
    display: flex;
    align-items: center;
    justify-content: center;  
}

footer button:hover{
    box-shadow: var(--shadow-after) var(--color-shadow-light-2); 
}

footer button.show{
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* result section style */
.result_box{
    background: var(--color-secondary);
    border-radius: 15px;
    display: flex;
    padding: 35px 50px;
    width: 550px;
    height: 50vh;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: solid 1px var(--color-petrol);
}

.result_box .icon{
    font-size: 100px;
    color: var(--color-petrol);
    margin-bottom: 10px;
}

.result_box .complete_text{
    font-size: 20px;
    font-weight: 500;
}

.result_box .score_text span{
    display: flex;
    margin: 10px 0;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
}

.result_box .score_text span p{
    padding: 0 4px;
    font-weight: 600;
}

.result_box .buttons{
    display: flex;
    margin: 20px 0;
}

.result_box .buttons button{
    margin: 0 10px;
    height: 45px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    border-radius: 10px;
    transition: box-shadow .2s linear;
    font-family: var(--font-fam-primary);
    box-shadow: var(--shadow-before) var(--color-shadow-light-2);
    display: none;
    align-items: center;
    justify-content: center;
}

.buttons a:link { text-decoration: none; }

.buttons a:visited{
    text-decoration: none;
}

.buttons a:visited:hover{
    text-decoration: none;
}

@media screen and (max-width: 768px) {
    .start_btn {
        font-size: 18px;
        padding: 14px 24px;
    }

    .info_box, .name_box, .quiz_box, .result_box {
        width: 90%;
        padding: 20px;
    }

    .info-title, .name-title, .quiz_box .title, .complete_text {
        font-size: 1.2em;
    }

    .info-list .info, 
    .name-form .form-group, 
    .que_text, 
    .total_que {
        font-size: 0.9em;
    }

    .name-form .form-group input {
        padding: 10px;
        font-size: 1em;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .info_box .info-buttons,
    .name_box .name-buttons {
        justify-content: space-between;
        padding: 0 20px;
    }

    .info_box .info-buttons button,
    .name_box .name-buttons button {
        width: 45%;
        font-size: 14px;
    }

    .buttons button, .next_btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    .timer_sec {
        font-size: 1em;
    }

    .option_list .option {
        padding: 8px;
    }

    .result_box .buttons .quit, 
    .result_box .buttons #proceed {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

@media screen and (max-width: 480px) {
    .start_btn {
        font-size: 16px;
        padding: 12px 20px;
    }

    .info_box, .name_box, .quiz_box, .result_box {
        width: 95%;
        padding: 15px;
    }

    .info-title, .name-title, .quiz_box .title, .complete_text {
        font-size: 1em;
    }

    .info-list .info, 
    .name-form .form-group, 
    .que_text, 
    .total_que {
        font-size: 0.8em;
    }

    .name-form .form-group input {
        padding: 8px;
        font-size: 1em;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .info_box .info-buttons,
    .name_box .name-buttons {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }

    .info_box .info-buttons button,
    .name_box .name-buttons button {
        width: 48%;
        font-size: 13px;
    }

    .buttons button, .next_btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .timer_sec {
        font-size: 0.9em;
    }

    .option_list .option {
        padding: 6px;
    }

    .result_box .buttons .quit, 
    .result_box .buttons #proceed {
        padding: 8px 10px;
        font-size: 0.8em;
    }
}

