/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #EAD7D7;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

/* Background animated circles */
.circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.7;
    animation: float 15s infinite alternate;
}

/* Unique colors, positions, sizes, and animations */
.circle:nth-child(1) {
    background: #412234;
    width: 350px;
    height: 300px;
    top: -50px;
    left: -50px;
    animation: float1 6s infinite alternate;
}

.circle:nth-child(2) {
    background: plum;
    width: 350px;
    height: 300px;
    top: 10%;
    right: -100px;
    animation: float2 7s infinite alternate;
}

.circle:nth-child(3) {
    background: palevioletred;
    width: 350px;
    height: 300px;
    bottom: 10%;
    left: 20px;
    animation: float3 5s infinite alternate; /* Faster animation */
}

.circle:nth-child(4) {
    background: orchid;
    width: 350px;
    height: 350px;
    bottom: -100px;
    right: -80px;
    animation: float4 7s infinite alternate; /* Faster animation */
}

/* Animations */
@keyframes float1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 100px); } /* Top-left to bottom-right */
}

@keyframes float2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-80px, 120px); } /* Top-right to bottom-left */
}

@keyframes float3 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-60px, 60px); } /* Bottom-left to top-right (faster) */
}

@keyframes float4 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, -90px); } /* Bottom-right to top-left (faster) */
}

/* Grading card */
.card {
    position: relative;
    background:#412234;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    text-align: center;
    z-index: 10;
    animation: fadeIn 1s ease-in-out;
}

h2 {
    margin-bottom: 1.5rem;
    color: #EAD7D7;
}

input {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 1rem;
    font-size: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    transition: all 0.3s;
    font-size: 20px;
    text-align: center;
}

input:focus {
    outline: none;
    border-color: #9932CC;
    box-shadow: 3px 3px 5px black;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #6D466B;
    color: #EAD7D7;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 1rem;
}

button:hover {
    background-color: #9966CC;
}

#showGrade {
    font-size: 25px;
    font-weight: bolder;
    color: #EAD7D7;
    padding: 10px;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    min-height: 40px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



@media screen and (max-width: 768px) {
    .circle {
        width: 250px;
        height: 250px;
    }

    .circle:nth-child(1) {
        width: 250px;
        height: 250px;
        top: -30px;
        left: -30px;
    }

    .circle:nth-child(2) {
        width: 250px;
        height: 250px;
        top: 15%;
        right: -50px;
    }

    .circle:nth-child(3) {
        width: 250px;
        height: 250px;
        bottom: 10%;
        left: 10px;
    }

    .circle:nth-child(4) {
        width: 250px;
        height: 250px;
        bottom: -80px;
        right: -60px;
    }

    .card {
        width: 85%;
        padding: 1.5rem;
    }

    input {
        font-size: 18px;
    }

    button {
        font-size: 14px;
    }

    #showGrade {
        font-size: 20px;
    }
}

/* For mobile devices (portrait) */
@media screen and (max-width: 480px) {
    .circle {
        width: 150px;
        height: 150px;
    }

    .circle:nth-child(1) {
        width: 150px;
        height: 150px;
        top: -20px;
        left: -20px;
    }

    .circle:nth-child(2) {
        width: 150px;
        height: 150px;
        top: 20%;
        right: -40px;
    }

    .circle:nth-child(3) {
        width: 150px;
        height: 150px;
        bottom: 15%;
        left: 5px;
    }

    .circle:nth-child(4) {
        width: 150px;
        height: 150px;
        bottom: -60px;
        right: -50px;
    }

    .card {
        width: 90%;
        padding: 1.2rem;
    }

    input {
        font-size: 16px;
    }

    button {
        font-size: 14px;
    }

    #showGrade {
        font-size: 18px;
    }
}
