body, html {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    height: auto;
}

a {
    color: rgb(0, 0, 0);
    text-decoration: none;
}

#search-box, #start-date, #end-date, #sort-options {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
}

#sort-options {
    min-width: 150px;
}

/* Paper styling */
.paper {
    margin-bottom: 20px;
}

.paper-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: rgb(0, 0, 0);
}

.paper-title:hover {
    color: #212223;
    text-decoration: underline;
}

.paper-authors {
    font-size: 14px;
    margin-bottom: 10px; 
}

.paper-author {
    cursor: pointer;
    transition: color 0.3s;
    display: inline;
}

.paper-author:hover {
    color: #007bff;
    text-decoration: underline;
}

.paper-abstract {
    line-height: 1.35;
    padding-left: 20px;
    margin-bottom: 10px;
}

.paper-meta {
    font-size: 14px; 
    display: flex;
    justify-content: flex-start; 
    gap: 20px; 
    color: #3c3c3c;
}

.paper-meta span {
    display: inline-block;
    margin-right: 10px;
}

.paper-tag {
    display: inline-block;
    background-color: #e0e0e0;
    padding: 3px 8px;
    border-radius: 4px; 
    margin-right: 5px;
    font-size: 14px;
    cursor: pointer; 
    transition: background-color 0.3s;
}

.paper-tag:hover {
    background-color: #d0d0d0;
    text-decoration: underline;
}

.paper-tags {
    font-size: 14px
}

/* Pagination styling */
#pagination-controls button {
    padding: 8px 12px;
    margin: 0 5px;
    background-color: #f4f4f4;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#pagination-controls button:disabled {
    background-color: #fafafa;
    color: #ccc;
    cursor: not-allowed;
    border-color: #f0f0f0;
}

#pagination-controls button:hover:not(:disabled) {
    background-color: #e6e6e6;
    color: #212529;
}

#pagination-controls span {
    font-size: 14px;
    color: #333;
    margin: 0 10px;
}

/* Media query for larger screens */
@media (min-width: 769px) {
    body, html {
        padding: 10px;
        height: 100vh;
        overflow: hidden;
    }

    #search-container {
        position: fixed;
        top: 20px;
        left: 20px;
        right: 20px;
        z-index: 100;
        background-color: #fff;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        box-sizing: border-box;
    }

    #pagination-controls {
        position: fixed;
        bottom: 20px;
        left: 0;
        right: 0;
        z-index: 100;
        background-color: transparent;
        padding: 10px 20px;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
    }

    #papers-container {
        position: absolute;
        top: 140px;
        bottom: 80px;
        left: 20px;
        right: 20px;
        overflow-y: auto;
        background-color: #fff;
        padding: 20px;
        margin: 0;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        box-sizing: border-box;
    }

    /* Hide scrollbar for Chrome, Safari, and Opera */
    #papers-container::-webkit-scrollbar {
        width: 0px;
        background: transparent;
    }

    /* Hide scrollbar for IE, Edge, and Firefox */
    #papers-container {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    #search-box {
        width: auto;
        flex: 1;
    }
    #start-date, #end-date, #sort-options {
        width: auto;
    }
}

@media (max-width: 768px) {
    .paper-abstract {
        padding-left: 10px; 
    }

    body, html {
        padding: 5px;
    }
    #search-container {
        background-color: #fff;
        flex-direction: column;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        margin-bottom: 20px;
    }

    #search-box, #start-date, #end-date, #sort-options {
        width: calc(100% - 20px);
        padding: 8px;
    }

    #papers-container {
        margin-top: 20px;
        background-color: #fff;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    #pagination-controls {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

.github-link {
    position: fixed;
    bottom: 20px;
    right: 50px;
    font-size: 30px; /* Reduce font size for subtlety */
    color: #e7e7e7; /* Adjust color for subtlety */
    z-index: 1000; /* Ensure the link stays on top of other elements */
    text-decoration: none; /* Remove underline */
    transition: color 0.3s; /* Smooth color transition on hover */
    height: 40px; /* Set the height to match the pagination buttons */
    line-height: 40px; /* Center the icon vertically */
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.github-link i {
    height: 100%; /* Ensure the icon fills the entire height of the container */
}

.github-link:hover {
    color: #333; /* Change color on hover */
}

/* Media query to hide GitHub link on mobile */
@media (max-width: 768px) {
    .github-link {
        display: none; /* Hide the GitHub link on mobile */
    }
}