/* styling.css */

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    min-height: 100%;
}

body{
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 20%, rgba(62, 166, 255, 0.18), transparent 22%),
        radial-gradient(circle at 85% 15%, rgba(91, 143, 249, 0.16), transparent 20%),
        radial-gradient(circle at 50% 85%, rgba(130, 96, 255, 0.12), transparent 24%),
        linear-gradient(135deg, #030816 0%, #071224 45%, #0c1d35 100%);
    position: relative;
}


#gameTitle{
    font-family: 'Sora', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #f4f8ff;
    margin-bottom: 6px;
    position: relative;
    z-index: 2;
}

#gameSubtitle{
    color: #9bb0c9;
    font-size: 0.95rem;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

/* background glow art */
body::before,
body::after{
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

body::before{
    width: 260px;
    height: 260px;
    background: rgba(62, 166, 255, 0.18);
    top: 40px;
    left: 40px;
}

body::after{
    width: 300px;
    height: 300px;
    background: rgba(123, 92, 255, 0.14);
    bottom: 30px;
    right: 40px;
}

#container{
    height: auto;
    min-height: 460px;
    width: 550px;
    margin: 40px auto;
    padding: 24px 20px 76px 20px;
    border-radius: 26px;
    position: relative;
    z-index: 1;
    background: rgba(10, 20, 38, 0.82);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255,255,255,0.04);
    overflow: hidden;
}

/* subtle grid art inside card */
#container::before{
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.16;
    pointer-events: none;
}

#container::after{
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    top: -90px;
    right: -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(62,166,255,0.22), transparent 70%);
    pointer-events: none;
}

/* score box */
#score{
    padding: 12px 16px;
    position: absolute;
    top: 22px;
    right: 20px;
    left: auto;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #dff3ff;
    background: linear-gradient(135deg, rgba(62,166,255,0.18), rgba(103,193,255,0.08));
    border: 1px solid rgba(103,193,255,0.20);
    box-shadow: 0 12px 30px rgba(0, 114, 255, 0.14);
    z-index: 3;
}

/* correct / wrong alerts */
#correct, #wrong{
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 18px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    display: none;
    z-index: 4;
    box-shadow: 0 10px 25px rgba(0,0,0,0.22);
}

#correct{
    background: linear-gradient(135deg, #1ec98f, #1ab97e);
}

#wrong{
    background: linear-gradient(135deg, #ff5e7a, #ff475f);
}

/* question area */
#question{
    width: 450px;
    height: 170px;
    margin: 46px auto 14px auto;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(20, 35, 66, 0.96), rgba(10, 22, 42, 0.98));
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.03),
        0 18px 36px rgba(0,0,0,0.24);
    font-size: 82px;
    text-align: center;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    color: #f3f8ff;
    line-height: 170px;
    letter-spacing: -2px;
    text-shadow: 0 0 22px rgba(62,166,255,0.15);
    position: relative;
    z-index: 1;
}

/* instruction strip */
#instruction{
    width: 450px;
    height: 54px;
    margin: 12px auto 18px auto;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(122, 92, 255, 0.24), rgba(62,166,255,0.18));
    border: 1px solid rgba(255,255,255,0.08);
    color: #eef6ff;
    text-align: center;
    line-height: 54px;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}

/* choices row */
#choices{
    width: 450px;
    height: 110px;
    margin: 0 auto 18px auto;
}

/* answer boxes */
.box{
    width: 96px;
    height: 90px;
    float: left;
    margin-right: 22px;
    border-radius: 18px;
    cursor: pointer;
    position: relative;
    text-align: center;
    line-height: 90px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #f4f8ff;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.04);
    transition: all 0.25s ease;
    -webkit-transition: all 0.25s ease;
    -moz-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    -ms-transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.box:hover{
    transform: translateY(-6px) scale(1.03);
    background: linear-gradient(180deg, rgba(62,166,255,0.18), rgba(255,255,255,0.06));
    border-color: rgba(103,193,255,0.26);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.28),
        0 0 18px rgba(62,166,255,0.14);
}

.box:active{
    transform: translateY(0);
    top: 3px;
    background: linear-gradient(180deg, rgba(62,166,255,0.22), rgba(123,92,255,0.14));
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

#box4{
    margin-right: 0;
}

/* start reset button */
#startreset{
    width: 150px;
    padding: 14px 16px;
    margin: 0 auto;
    border-radius: 16px;
    cursor: pointer;
    text-align: center;
    position: relative;
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #198cff, #58c7ff);
    box-shadow:
        0 14px 30px rgba(25, 140, 255, 0.28),
        inset 0 1px 0 rgba(255,255,255,0.14);
    transition: all 0.25s ease;
    -webkit-transition: all 0.25s ease;
    -moz-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    -ms-transition: all 0.25s ease;
}

#startreset:hover{
    transform: translateY(-4px);
    box-shadow:
        0 20px 34px rgba(25, 140, 255, 0.32),
        0 0 20px rgba(88,199,255,0.18);
}

#startreset:active{
    transform: translateY(1px);
    box-shadow:
        0 8px 18px rgba(25, 140, 255, 0.24),
        inset 0 1px 0 rgba(255,255,255,0.10);
}

/* timer box */
#timeremaining{
    width: 185px;
    padding: 11px 14px;
    position: absolute;
    top: auto;
    bottom: 20px;
    right: 20px;
    left: auto;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(18, 33, 59, 0.95), rgba(12, 25, 45, 0.95));
    border: 1px solid rgba(255,255,255,0.08);
    color: #d9e8ff;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    display: none;
    z-index: 3;
}

/* game over popup */
#gameOver{
    height: 220px;
    width: 480px;
    padding: 30px 25px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(8, 24, 49, 0.96), rgba(17, 33, 67, 0.96));
    border: 1px solid rgba(103,193,255,0.18);
    color: #ffffff;
    font-size: 2rem;
    font-family: 'Sora', sans-serif;
    text-align: center;
    text-transform: none;
    position: absolute;
    top: 95px;
    left: 35px;
    z-index: 5;
    display: none;
    box-shadow:
        0 24px 60px rgba(0,0,0,0.42),
        0 0 26px rgba(62,166,255,0.12);
}

#gameOver p:first-child{
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: #67c1ff;
}

#gameOver p:last-child{
    font-size: 1.2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #e6f1ff;
    line-height: 1.6;
}

/* mobile */
@media (max-width: 640px){
    body{
        padding: 20px 12px;
    }

    #container{
        width: 100%;
        max-width: 380px;
        min-height: auto;
        padding: 20px 16px 90px 16px;
        margin: 20px auto;
    }

    #score{
        position: static;
        display: inline-block;
        margin-bottom: 14px;
    }

    #correct, #wrong{
        top: 68px;
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    #question{
        width: 100%;
        height: 140px;
        margin: 18px auto 12px auto;
        font-size: 52px;
        line-height: 140px;
    }

    #instruction{
        width: 100%;
        height: auto;
        line-height: 1.4;
        padding: 14px 12px;
        font-size: 0.92rem;
    }

    #choices{
        width: 100%;
        height: auto;
        margin: 0 auto 18px auto;
        overflow: hidden;
    }

    .box{
        width: calc(50% - 8px);
        margin-right: 16px;
        margin-bottom: 16px;
        height: 76px;
        line-height: 76px;
        font-size: 1.1rem;
    }

    #box2,
    #box4{
        margin-right: 0;
    }

    #startreset{
        width: 100%;
    }

    #timeremaining{
        width: calc(100% - 32px);
        right: 16px;
        bottom: 16px;
        text-align: center;
    }

    #gameOver{
        width: calc(100% - 32px);
        height: auto;
        left: 16px;
        top: 110px;
        padding: 24px 18px;
    }

    #gameOver p:first-child{
        font-size: 1.6rem;
    }

    #gameOver p:last-child{
        font-size: 1rem;
    }
}