/*filename: style.css*/

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #121212;
}

/* Particle background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.full-body-container {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: 100vh;
    height: auto;
    display: flex;
    justify-content: start;
    align-items: center;
    flex-direction: column;
    color: #ffffff;
    z-index: 1;
}

.research-title {
    font-size: 72px;
    font-weight: bold;
    margin-bottom: 20px;
    font-family: 'Open Sans', sans-serif;
    letter-spacing: -5px;
    z-index: 10;
    position: relative;
}


#re-text {
    color: #ff3333;
}

#search-text {
    color: #ffffff;
}

/* Updated Navigation styles */
.nav-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 10px 25px;
    z-index: 100;
    background-color: rgba(34, 34, 34, 0.65); /* Increased opacity for less transparency */
    backdrop-filter: blur(8px); /* Added backdrop blur */
    -webkit-backdrop-filter: blur(8px); /* For Safari support */
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
}

.nav-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(255, 51, 51, 0.15) 0%, rgba(255, 51, 51, 0.05) 50%, rgba(255, 51, 51, 0) 70%);
    filter: blur(10px);
    z-index: -1;
    pointer-events: none;
}

.nav-container:hover {
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.15);
}

.nav-link {
    color: #bbb;
    margin: 0 20px;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    transition: all 0.2s ease;
    position: relative;
    padding: 5px 0;
}

.nav-link:hover {
    color: #ff3333;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #ff3333;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.input-box {
    border-radius: 50px;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    width: 600px;
    background-color: rgba(34, 34, 34, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.input-box:hover,
.input-box:focus-within {
    border-color: #ff3333;
    box-shadow: 0 4px 25px rgba(255, 51, 51, 0.2);
}

.input-box img {
    height: 20px;
    width: 20px;
    filter: invert(1);
}

.top-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0;
    padding-top: 120px;
}

.input-box input {
    width: 100%;
    margin-left: 10px;
    font-size: 16px;
    border: none;
    outline: 0;
    background-color: transparent;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
}

.input-box input::placeholder {
    color: #888;
}

#answer-box {
    width: 700px;
    margin-top: 40px;
    height: calc(100vh - 400px);
    min-height: 200px;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #ff3333 #222;
    z-index: 2;
}

#answer-box::-webkit-scrollbar {
    width: 8px;
}

#answer-box::-webkit-scrollbar-track {
    background: #222;
    border-radius: 10px;
}

#answer-box::-webkit-scrollbar-thumb {
    background-color: #ff3333;
    border-radius: 10px;
}

.result-item {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 20px;
    background-color: rgba(34, 34, 34, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease-in-out;
    animation: fadeIn 0.6s;
    border: 2px solid #521111;
    backdrop-filter: blur(5px);
}

.result-item:hover {
    box-shadow: 0 6px 25px rgba(255, 51, 51, 0.15);
    transform: translateY(-3px);
    background-color: rgba(42, 42, 42, 0.9);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.paper-title {
    font-family: 'Kanit', sans-serif;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 20px;
}

.abstract {
    font-family: 'Montserrat', sans-serif;
    color: #bbb;
    margin-bottom: 15px;
    line-height: 1.6;
}

.paper-link {
    display: inline-block;
    color: #fff;
    background-color: #ff3333;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(255, 51, 51, 0.3);
}

.paper-link:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 51, 51, 0.4);
}

.no-results {
    text-align: center;
    padding: 30px;
    color: #bbb;
    font-family: 'Montserrat', sans-serif;
    animation: fadeIn 0.5s;
    background-color: rgba(34, 34, 34, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.citation-text {
    position: absolute;
    font-family: 'Montserrat', sans-serif;
    bottom: 29px;
    right: 29px;
    color: #bbb;
}

.error {
    text-align: center;
    padding: 20px;
    color: #ff6666;
    font-family: 'Montserrat', sans-serif;
    background-color: rgba(139, 0, 0, 0.2);
    border-radius: 8px;
    animation: fadeIn 0.5s;
    border: 2px solid #521111;
    backdrop-filter: blur(5px);
}

.loading {
    text-align: center;
    padding: 15px;
    color: #bbb;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.team-container {
    width: 900px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 40px;
    gap: 30px;
}

.team-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 40px;
    font-family: 'Open Sans', sans-serif;
    color: #ffffff;
    text-align: center;
    position: relative;
}

.team-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: #ff3333;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.team-member {
    width: 250px;
    background-color: #222;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    animation: fadeIn 0.8s;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(255, 51, 51, 0.2);
}

.team-member-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    filter: grayscale(30%);
}

.team-member-info {
    padding: 20px;
    text-align: center;
}

.team-member-name {
    font-family: 'Kanit', sans-serif;
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 5px;
}

.team-member-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #bbb;
    margin-bottom: 15px;
}

.team-member-social {
    margin-top: 15px;
}

.social-link {
    color: #bbb;
    font-size: 22px;
    margin: 0 8px;
    transition: color 0.2s ease;
}

.social-link:hover {
    color: #ff3333;
}

/* Paper Popup Styles */
.paper-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.paper-popup-content {
    width: 85%;
    height: 85%;
    background-color: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(255, 51, 51, 0.3);
    border: 1px solid #333;
    animation: slideUp 0.4s ease;
}

.paper-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #222;
    border-bottom: 2px solid #ff3333;
}

.paper-popup-title {
    font-family: 'Kanit', sans-serif;
    color: #ffffff;
    font-size: 20px;
    margin: 0;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.paper-popup-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0 10px;
    transition: color 0.2s ease;
}

.paper-popup-close:hover {
    color: #ff3333;
}

.paper-popup-body {
    flex: 1;
    overflow: hidden;
    background-color: #191919;
}

.paper-popup-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #fff;
}

.paper-popup-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
    background-color: #222;
    border-top: 1px solid #333;
}

.paper-popup-external-link {
    display: inline-block;
    color: #fff;
    background-color: #ff3333;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(255, 51, 51, 0.3);
}

.paper-popup-external-link:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 51, 51, 0.4);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}