/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    width: 100%;
}

.spinner-container {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    color: #4a90e2;
    font-weight: 500;
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 0.9rem;
    color: #666;
    opacity: 0.7;
}

/* Pulse animation for loading text */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-text {
    animation: pulse 2s ease-in-out infinite;
}

/* Ad Containers */
.ad-container {
    margin: 20px 0;
    text-align: center;
}

.ad-top-banner {
    margin-bottom: 30px;
}

.ad-bottom-banner {
    margin-top: 30px;
}

.ad-side-banner {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 600px;
    z-index: 1000;
}

/* Search Prompt - Clean Idle State */
.search-prompt {
    text-align: center;
    padding: 0px 20px 60px 20px;
    background: none;
    color: #333;
    margin: 30px 0;
    box-shadow: none;
}

.search-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #4a90e2;
}

.search-prompt h2 {
    display: block;
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.search-prompt p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.7;
    color: #666;
}

.search-examples {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.example-tag {
    background: rgba(74, 144, 226, 0.1);
    color: #4a90e2;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.example-tag:hover {
    background: rgba(74, 144, 226, 0.2);
    transform: translateY(-2px);
}

/* Horizontal Scroll Container */
.papers-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.papers-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.papers-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.papers-scroll-container::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 10px;
}

.papers-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #357ABD;
}

/* Horizontal Paper Tiles */
.papers-scroll-container .tile {
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    padding: 20px;
}

.papers-scroll-container .tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Papers Container - Section Based Layout */
.papers-container {
    display: none;
}

.papers-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3rem;
    color: #4a90e2;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4a90e2;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title:hover {
    color: #357ABD;
    background-color: rgba(74, 144, 226, 0.05);
    padding-left: 5px;
    padding-right: 5px;
}

.section-title::after {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.section-title.collapsed::after {
    transform: rotate(-90deg);
}

.papers-section.collapsed .papers-scroll-container {
    display: none;
}

.papers-section.collapsed {
    margin-bottom: 10px;
}

.papers-section .papers-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.papers-section .papers-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.papers-section .papers-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.papers-section .papers-scroll-container::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 10px;
}

.papers-section .papers-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #357ABD;
}

.papers-section .tile {
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    padding: 20px;
}

.papers-section .tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.papers-section .tile h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #4a90e2;
}

.papers-section .tile p {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #555;
}

.papers-section .tile p strong {
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ad-side-banner {
        display: none;
    }
    
    .search-prompt {
        padding: 40px 15px;
        margin: 20px 0;
    }
    
    .search-prompt h2 {
        font-size: 1.5rem;
    }
    
    .papers-scroll-container .tile {
        min-width: 280px;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .papers-scroll-container .tile {
        min-width: 250px;
        max-width: 250px;
    }
    
    .search-examples {
        gap: 8px;
    }
    
    .example-tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}
h1 {
    font-size: 2.5rem;
    color: #4a90e2;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 30px;
    max-width: 800px;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
}

#searchBar {
    width: 100%;
    padding: 10px 50px 10px 15px;
    font-size: 16px;
    border: 2px solid #4a90e2;
    border-radius: 30px;
    outline: none;
    background-color: #fff;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #4a90e2;
}

.search-button:hover {
    background-color: rgba(74, 144, 226, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.search-button:active {
    transform: translateY(-50%) scale(0.95);
}

#searchBar:focus {
    border-color: #357ABD;
    box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.1);
}

#papersContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0 auto;
    max-width: 100%;
}

.tile {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    width: 250px;
    margin-bottom: 0.5rem;
}

.tile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.tile:hover {
    transform: translateY(-12px);
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.2);
}

.tile h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #4a90e2;
}

.tile p {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #555;
}

.tile p strong {
    color: #333;
}

.loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #4a90e2;
}


.header {
    /* position: sticky; */
    top: 0;
    z-index: 1000;
    background-color: #2b2b2b;
    border: 10px solid #2b2b2b73;
    border-radius: 50px;
    margin-bottom: 20px;
    color: white;
    padding: 17px
}

.header-inner {
    margin-top: -1px;
    margin-left: 58px;
    margin-right: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.sbtn {
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}


.btn-redirect {
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    color: rgb(48, 48, 48);
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 50%, #FFD700 100%);
    border: none;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    box-shadow: 0 2px 5px rgba(212, 175, 55, 0.4);
}

.btn-redirect:hover {
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 50%, #D4AF37 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.6);
}

@media (max-width: 768px) {
    #papersContainer {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .tile {
        width: 300px;
        height: 360px;
    }

    #searchBar {
        width: 100%;
    }
}

@media (min-width: 769px) {
    #papersContainer {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }

    .tile {
        width: 350px;
    }

    #searchBar {
        width: 100%;
        max-width: 800px;
    }
}

@media (min-width: 992px) {
    h1 {
        font-size: 2rem;
    }

    
    h2 {
        font-size: 1.3rem;
    }

    #searchBar {
        font-size: 15px;
        padding: 8px 14px;
    }

    .tile h3 {
        font-size: 1.4rem;
    }

    .tile p {
        font-size: 1.1rem;
    }
}


.button-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-view {
    background-color: #4a90e2;
    border: none;
    color: white;
}

.btn-view:hover {
    background-color: #357ABD;
    color: #fff;
}

.btn-download {
    background-color: #e94e77;
    border: none;
    color: white;
}

.btn-download:hover {
    background-color: #c0395e;
    color: #fff;
}
.btn-download2 {
    width: 85%; 
    background-color: #696969 ;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-download2:hover {
    background-color: #000000 ;
    color: white;
}

.btn-download2 img {
    height: 16px;
    vertical-align: middle;
}

.filters {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters label {
    font-size: 16px;
    margin: 0 15px;
    color: #555;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.filters input {
    margin-right: 5px;
    transform: scale(1.2);
}

.filters label:hover {
    color: #007bff;
}

.results-counter-container {
    text-align: center;
    width: 100%;
    margin: 0 auto 20px;
}

.results-counter {
    display: inline-block;
    font-size: 1.2rem;
    color: #4a90e2;
    font-weight: bold;
    padding: 8px 16px;
    background-color: rgb(255, 255, 255);
    border-radius: 30px;
}

.results-counter.no-results {
    color: #e94e77;
    background-color: #fff0f3;
}

.results-counter.loading {
    color: #0facb1;
    background-color: #f0f0f0;
    border: 0.5px solid #c2f7fa;
}

@media (max-width: 768px) {
    .results-counter {
        font-size: 1rem;
    }
}


@font-face {
    font-family: 'CustomFont';
    src: url('/[Fonts]/Airbolt.ttf') format('truetype');
}

.logo-container {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.logo-text {
    font-family: 'CustomFont', sans-serif;
    font-size: 28px;
    font-weight: bold;
}

.neon-text {
    margin-left: 15px;
    background: linear-gradient(90deg, #ff87f3, #74f0ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.btn-view img, .btn-download img {
    vertical-align: middle;
    margin-right: 5px;
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.toast-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #111;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: Arial, sans-serif;
    font-size: 15px;
    z-index: 99999;
    opacity: 0.95;
    animation: fadeInOut 3s forwards;
}


/* Special Actions Dropdown Styles */
.special-actions-container {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.special-actions-btn {
    background-color: none;
    color: #5649c0;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border: 3px solid #5649c0 ;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.special-actions-btn:hover {
    color: white;
    background-color: #5649c0;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.special-actions-btn.active {
    color: white;
    margin-bottom: -2px;
    background-color: #5649c0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.special-actions-dropdown {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    position: relative;
    background-color: white;
    min-width: 200px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 0 0 10px 10px;
    z-index: 1;
    border: 3px solid #5649c0;
}

/* When active, animate dropdown open */
.special-actions-dropdown.open {
    max-height: 500px; /* Adjust based on actual content height */
    opacity: 1;
}


.dropdown-item {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #6c5ce7;
    padding-left: 20px;
}

.dropdown-item:last-child {
    border-bottom: none;
}