@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(270deg, #e0eafc, #cfdef3);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}



.main-screen , .start-screen {
    text-align: center;
    border: 1px solid #ccc;
    padding: 50px 40px;
    border-radius: 25px;
    background-color: #ffffff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-screen:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.question {
    font-size: 64px;
    margin-bottom: 40px;
    color: transparent;
    background: linear-gradient(135deg, #333, #555);
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
}

sup, sub {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

.fraction {
    display: inline-block;
    vertical-align: middle;
    margin: 0 0.2em;
}

.fraction > span {
    display: block;
    text-align: center;
}

.fraction > span:nth-child(1) {
    border-bottom: 1px solid #000;
    padding-bottom: 0.1em;
}

.fraction > span:nth-child(2) {
    padding-top: 0.1em;
}

.math-container {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.answers {
    display: flex;
    justify-content: center;
    gap: 35px;
}

.answer-btn {
    position: relative;
    padding: 20px 40px;
    border: none;
    border-radius: 15px;
    font-size: 26px;
    cursor: pointer;
    color: white;
    transition: all 0.4s ease;
    overflow: hidden;
    background: linear-gradient(135deg, #7b5cff, #329bff);
}

.answer-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 0.6s, transform 0.6s;
}

.answer-btn:active::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s;
}

.answer-btn:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.answer-btn:active {
    transform: translateY(2px);
}

#start-btn {
    padding: 15px 30px;
    font-size: 24px;
    color: white;
    background: linear-gradient(135deg, #7b5cff, #329bff);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hidden {
    display: none;
}

#start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

#start-btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

@keyframes green {
    0% {
        background: linear-gradient(135deg, #43a047, #43a047);
    }
    50% {
        background: linear-gradient(135deg, #66bb6a, #66bb6a);
    }
    100% {
        background: linear-gradient(135deg, #ffffff, #ffffff);
    }
}

@keyframes red {
    0% {
        background: linear-gradient(135deg, #e53935, #e53935);
    }
    50% {
        background: linear-gradient(135deg, #ef5350, #ef5350);
    }
    100% {
        background: linear-gradient(135deg, #ffffff, #ffffff);
    }
}

.correct {
    background: linear-gradient(135deg, #66bb6a, #ffffff);
    animation: green 1s infinite;
}

.incorrect {
    background: linear-gradient(135deg, #ef5350, #ffffff);
    animation: red 1s infinite;
}

.leaderboard {
    margin-top: 20px;
}

.leaderboard h3 {
    margin-bottom: 10px;
}

.leaderboard ul {
    list-style-type: none;
    padding: 0;
}

.leaderboard li {
    background: #f0f0f0;
    padding: 5px;
    margin-bottom: 5px;
}

@media (max-width: 600px) {
    .main-screen {
        padding: 30px;
    }
    .question {
        font-size: 40px;
    }
    .answer-btn {
        font-size: 22px;
        padding: 15px 25px;
    }
}

#skip-btn {
    padding: 15px 30px;
    font-size: 24px;
    color: white;
    background: linear-gradient(135deg, #ff6f61, #ff8a65);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

#skip-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 0.6s, transform 0.6s;
}

#skip-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

#skip-btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

#skip-btn:active::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s;
}
