html, body {
    height: 100%; /* Ensure that the body covers the full height of the viewport */
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
}

body {
    font-family: 'Arial', sans-serif;
    color: #333;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f8d3f8, #b791fd); /* Gradient from light to dark blue */
    background-size: cover; /* Ensure the gradient covers the entire background */
    background-position: center; /* Center the gradient */
    background-attachment: fixed; /* Keep the background fixed while scrolling */
    background-size: 100% auto; /* Make sure the gradient covers the entire height of the content */
    user-select: none;
}

/* Add the animated circles background */
.area {
    background: #603a8cd4;  /* Darker base color */
    background: -webkit-linear-gradient(to left, #4e5d92, #633a8c);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Ensure it's behind the content */
    filter:blur(2px);
    overflow: hidden;
}

.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    animation: animate 25s linear infinite;
    bottom: -150px;
}

.circles li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.circles li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circles li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.circles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.circles li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.circles li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.circles li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.circles li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.circles li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.circles li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}


header {
    background: linear-gradient(135deg, #9d72c3, #4a2574);
    color: white;
    text-align: center;
    padding: 1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    transition: opacity 1s;
}

header:hover {
    opacity: 0.5;
}

nav {
    background: linear-gradient(135deg, #232526, #414345);
    overflow: hidden;
}

nav a {
    float: left;
    display: block;
    color: rgb(204, 204, 204);
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

nav a:hover {
   background: linear-gradient(135deg, #bfa9d2, #4a2574);
    color: rgb(255, 255, 255);
    transform: scale(1.05);
}

main {
    padding: 20px;
    color: #fff;
    backdrop-filter: blur(10px);

}





.content-container {
    display: flex;   /* Center vertically */
    gap: 20px;             
    height: 785px;
    box-sizing: border-box;
    flex-wrap: wrap;   
    margin: 10px;
}

/* PDF Reader Section */
.pdf-reader-section {
    flex: 3;
    width: 55%;              /* Adjust width for desktop */
    height: 755px;        /* Same height as the notepad */
}
/* PDF Container */
.pdf-container {
    width: 100%; /* Rectangle width */
    height: 100%; /* Rectangle height */
    border: 1px solid #ccc;
    overflow-y: scroll; /* Enables scrolling for the PDF */
    background-color: #e6e6e6;
    position: relative;
    /* Use CSS Grid to center content */
    display: grid;
    place-items: center; /* Centers both horizontally and vertically */
}

/* Notes container with notepad style */
.notes-container {
    width: 40%;              /* Match the layout width */
    height: 754px;           /* Same height as the PDF reader */ 
    background: #fcf3fe; /* Light paper color */
    border: 2px solid #b794d1;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    font-family: "Courier New", Courier, monospace;
    position: relative;
    overflow: hidden;
    animation: fadeIn 1s ease-in-out;
    background-image: linear-gradient(
        to bottom,
        #fefaf3,
        #fefaf3 30px,
        #cfcfcf 30px,
        #fefaf3 32px
    ); /* Light gray lines for a subtle effect */
    background-size: 100% 32px;
}

/* Title for the notepad */
.notepad-title {
    font-size: 24px;
    color: #555;
    text-align: center;
    padding-top: 10px;
    margin: 0 0 0px;
    font-family: sans-serif;
    font-weight: 700;  /* Bold */
    color: #333;
}

/* Style for the textarea where users can take notes */
.notepad {
    overflow-y: auto;
    width: 100%;
    height: 700px; /* Increased for more content space */
    padding: 25px 20px; /* Adjusted padding for alignment */
    font-size: 16px;
    line-height: 1.85; /* Space between lines to align with background */
    border: none;
    outline: none;
    resize: none;
    color: #333;
    font-family: 'Lato', sans-serif;
    font-size: 20px;  /* Adjust based on preference */
    line-height: 1.8;  /* Slightly higher for a relaxed, handwritten look */
    letter-spacing: 0.5px;  /* Small letter spacing to add to realism */
    color: #555555;
    box-sizing: border-box;
    background: transparent;
    position: relative;
    z-index: 1;
}

/* Placeholder style */
.notepad::placeholder {
    color: #b0a590;
    font-style: italic;
}



/* Loading spinner */
.loading-animation {
    border: 4px solid #f3f3f3;  /* Light grey border */
    border-top: 4px solid #3498db;  /* Blue top border */
    border-radius: 50%;  /* Make it round */
    width: 40px;  /* Spinner width */
    height: 40px;  /* Spinner height */
    animation: spin 2s linear infinite;  /* Spinner animation */
    z-index: 999;  /* Ensure it's on top of other elements */
}

/* Animation for spinner rotation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


@media (max-width: 480px) {
    .pdf-reader-section {
        height: 700px; /* Further reduced height for mobile */
        width: 100%;
    }

    .notes-container {
        width: 100%; /* For smaller screens */
        height: 500px;
    }

    .notepad {
       height: 400px;
    }

    .notepad-title {
        font-size: 18px; /* Adjust title font size */
    }
}

@media (max-width: 765px) {
    .notes-container {
        height: 600px;
        width: 100%;
    }

    .notepad {
        height: 550px;
    }
}