@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

@font-face {
	font-family: "signature";
	src: url(../asset/signature.ttf);
}

:root {
    --bg-color: #f0f4f8;
    --temp-color: rgb(92, 190, 76);
    --button-color: #63adfc;
    --button-hover-color: #5190d4;
    --text-color: #333;
}


* {
	margin: 0;
	padding: 0;
}

body {
	font-family: "Poppins", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

#bg {
    background: url('./bg.svg') no-repeat center center fixed;
    background-size: cover;
    width: 100vw;
    height: 100vh;
    position: fixed;
}

#project-name {
    position: absolute;
    top: 2rem;
    left: 0rem;
    background-color: var(--temp-color);
    font-size: 1.15rem;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    padding-left: 3rem;
    border-radius: 0 1.5rem 1.5rem 0;
    color: #fff;
    cursor: pointer;
}


#center-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 1.5rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 17rem;
    height: 22rem;
    
    display: flex;
    flex-direction: column;
    justify-content: right;
    align-items: center;
    text-align: center;
}

#quiz-game {
    display: flex;
    flex-direction: column;
    justify-content: right;
    align-items: center;
    text-align: center;   
    width: 100%;
    position: absolute;
    height: 100%;
}

#count {
    width: 80%;
    text-align: left;
    font-size: 0.8rem;
    padding-top: 2.5rem;
    padding-bottom: 1rem;
}

#question {
    width: 80%;
    font-weight: 500;
    height: 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#options {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: absolute;
    bottom: 2rem;
}

.option {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 0.7rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 80%;
    cursor: pointer;
    border: none;
    margin: 0.5rem;
    padding-block: 0.5rem;

    background-color: var(--button-color);
    color: #fff;

}

.correct {
    background-color: #4caf50;
}

.wrong {
    background-color: #e4554a;
}

.checking {
    background-color: #e3a23b;
    animation: checking-pulse 0.8s ease-in-out infinite alternate;
}

.option:disabled {
    cursor: wait;
    opacity: 0.8;
}

@keyframes checking-pulse {
    from { opacity: 0.55; }
    to { opacity: 1; }
}

.hide {
    visibility: hidden;
}

#score {
    width: 100%;
    height: 100%;

    position: absolute;
}

#progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;

}

#msg {
    position: absolute;
    left: 50%;
    transform: translate(-50%);

    width: 75%;
    font-size: 1.25rem;
    font-weight: 500;
    padding-top: 3rem;
    line-height: 1.25;
}

#score button,
#start button {
    background-color: var(--button-color);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;

    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;

    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

#score button:hover {
    background-color: var(--button-hover-color);
}

#start img {
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    margin-top: 3rem;
    margin-bottom: 1rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.t1 {
    font-size: 1.5rem;
    font-weight: 500;
}

#score-summary { position: absolute; top: 70%; left: 50%; transform: translateX(-50%); width: 90%; font-size: 0.85rem; }
#best-score { font-size: 0.85rem; margin-top: 0.4rem; }
