/* ============================================
   APPLE INSPIRED MINIMAL THEME (FINAL VERSION)
   ============================================ */

/* Light Mode Variables */
:root {
    --bg: #ffffff;
    --text: #111111;
    --card: #f2f2f7;
    --border: #d1d1d6;
    --search-bg: #e5e5ea;
    --link: #007aff;
}

/* Dark Mode Variables (BUT only for main content) */
body.dark {
    --bg: #0e0e0e;
    --text: #f5f5f7;
    --card: #1c1c1e;
    --border: #2c2c2e;
    --search-bg: #2c2c2e;
    --link: #0a84ff;
}

/* Main Body (Theme applies here only) */
body {
    margin: 0;
    padding-top: 110px;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Poppins', sans-serif;
    transition: background 0.25s, color 0.25s;
}


/* ============================================
   FIXED — NAV BAR ALWAYS BRIGHT MODE
   ============================================ */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f7 !important;     /* always light */
    border-bottom: 1px solid #d1d1d6 !important;
    padding: 0 26px;
    z-index: 100;
    border-radius: 0 0 2rem 2rem;

}

.top-bar input,
.top-bar .theme-btn {
    background: #f2f2f7 !important;      /* fixed light */
    border: 1px solid #d1d1d6 !important;
    color: #000 !important;
}

/* Logo */
.logo-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 37px;
    width: auto;
    object-fit: contain;
    opacity: 0.88;
    transition: 0.2s ease;
}

.logo-img:hover {
    opacity: 1;
}

.logo-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #000;
}


/* Right Section (Search + Theme) */
.top-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

#searchInput {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--search-bg);
    color: var(--text);
    outline: none;
}

#searchInput::placeholder {
    color: #464646;
}

.theme-btn {
    border: none;
    background: #f2f2f7;
    border: 1px solid #d1d1d6;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.2s;
}

.theme-btn:hover {
    background: #e5e5ea;
}


/* ============================================
   MAIN CONTENT — DEPARTMENT CARDS & PAPERS
   ============================================ */
.title {
    text-align: center;
    font-size: 1.7rem;
    margin-bottom: 2rem;
}




/* Papers Section */
#papers {
    margin-top: 40px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 1.35rem;
    margin-bottom: 2rem;
    font-weight: 550;
}

.paper-item {
    background: var(--card);
    padding: 18px 22px;
    border-radius: 14px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Left text block (title + dept) */
.paper-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.paper-title {
    font-size: 1rem;
    font-weight: 500;
}

.paper-meta {
    font-size: 0.85rem;
    color: rgb(93, 93, 93);
    padding-top: 0.5rem;
}

/* Button on right */
.paper-item a {
    padding: 0.7rem 1.8rem;
    background: #000;
    color: white;
    border: 2px solid black;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s ease;
    white-space: nowrap;
    font-size: 0.85rem;
}

.paper-item a:hover {
    background: #fff;
    color: black;
}
/* Dark mode button behavior */
body.dark .paper-item a {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}

body.dark .paper-item a:hover {
    background: #000 !important;
    color: #f5f5f7 !important;
    border-color: #000 !important;
}


@media(max-width: 1000px){

.top-bar {
    height: 12rem;
    flex-direction: column;
    padding: 17px 26px;
    padding-bottom: 3rem;
    padding-top: 3rem;
}

.logo-img {
    height: 5.4rem;
}

.logo-text {
    font-size: 2.3rem;
}

/* Right Section (Search + Theme) */
.top-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

#searchInput {
    border: 20px solid var(--border);
    width: 20rem;
    font-size: 2.3rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}


.theme-btn {
    border: none;
    background: #f2f2f7;
    border: 1px solid #d1d1d6;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 2.3rem;
    transition: 0.2s;
}

.theme-btn:hover {
    background: #e5e5ea;
}

.title {
    font-size: 2.7rem;
    margin-bottom: 2rem;
    margin-top: 10rem;
}




/* Papers Section */
#papers {
    margin-top: 4rem;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 3rem;
    font-weight: 550;
}

.paper-item {
    background: var(--card);
    padding: 20px 22px;
    border-radius: 14px;
    border: 1px solid var(--border);
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    height: 7rem;
}

.paper-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.paper-title {
    font-size: 1.8rem;
    font-weight: 500;
    margin: 1rem 0;
    margin-right: 2rem;
}

.paper-meta {
    font-size: 1.5rem;
    color: rgb(109, 109, 109);
    margin-bottom: 1rem;
}

/* Button on right */
.paper-item a {
    padding: 0.7rem 1.8rem;
    background: #000;
    color: white;
    border: 2px solid black;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s ease;
    white-space: nowrap;
    font-size: 1.7rem;
}
}



/* Loader centered */
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 10px;
    z-index: 9999;
}


.loader.hidden {
    display: none;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    opacity: 0.4;
    animation: blink 1s infinite;
}

.red { background: #ff3b30; animation-delay: 0s; }
.yellow { background: #ffcc00; animation-delay: 0.2s; }
.green { background: #34c759; animation-delay: 0.4s; }

@keyframes blink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}


/* ============================================
   CONTACT SECTION (ALWAYS BRIGHT MODE)
   ============================================ */
.contact-section,
.contact-section *,
.copyright {
    background: #f5f5f7!important;
    color: #000 !important;
}

/* Contact Layout */
.contact-section {
  padding: 3rem 2rem;
  padding-bottom: 1rem;
  border-top: 1px solid #d1d1d6;
  margin-top: 2rem;
  border-radius: 2rem 2rem 0 0;
}

.contact-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  font-family: "Cinzel", serif;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  padding-left: 12rem;
}

.contact-heading {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-family: "Cinzel", serif;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  font-family: "Cormorant Garamond", serif;
  margin-bottom: 0.7rem;
  font-size: 1.05rem;
  font-weight: 400;
}
.contact-list li a{
    text-decoration: none;
}
.contact-list li:hover{
    text-decoration: underline;
}

.support-title {
  font-size: 1.2rem;
  margin-top: 1.6rem;
  font-family: "Cormorant Garamond", serif;
  margin-bottom: 1rem;
}
.support-mention{
  text-decoration: none;
  font-size: 1.05rem;
  font-family: "Cormorant Garamond", serif;
}
.support-mention:hover{
    text-decoration: underline;
}




.contact-button {
  padding: 1rem 2.5rem;
  background: #000;
  color: white;
  border: 2px solid black;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  width: 15rem;
  text-align: center;
  transition: 0.3s;
  margin-top: 2rem;
  margin-bottom: 0;
}

.copyright {
    text-align: center;
    padding: 2rem;
    padding-top: 4rem;
    font-family: "Cormorant Garamond", serif;
    line-height: 1.8rem;
    padding-bottom: 1rem;
}


@media(max-width: 1000px) {

    /* Contact Section */
    .contact-section {
        margin-top: 10rem;
        padding: 2rem 1rem;
    }

    .contact-title {
        font-size: 3.7rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .contact-info {
        padding-left: 0;
        align-items: center;
        text-align: center;
    }

    .contact-heading {
        font-size: 2.5rem;
        margin-top: 4rem;
    }

    .contact-list li {
        font-size: 2.25rem;
        line-height: 4rem;
    }

    .contact-button {
        width: 50%;
        font-size: 2.3rem;
        margin-top: 4rem;
    }
    .support-title {
    font-size: 2.5rem;
    margin-top: 4rem;
    font-family: "Cormorant Garamond", serif;
    margin-bottom: 1rem;
    }
    .support-mention{
    text-decoration: none;
    font-size: 2.25rem;
    }
    /* Copyright */
    .copyright {
        font-size: 1.3rem;
        padding: 1.5rem 1rem;
        line-height: 3rem;
        padding-top: 5rem;
    }
}

/* Default Message Block */
.default-message {
    text-align: center;
    margin-top: 3rem;
    opacity: 1;
    transition: opacity 0.3s ease;

}

.default-message.hidden {
    opacity: 0;
    pointer-events: none;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}


.default-title {
    font-size: 1.5rem;
    font-weight: 650;
    margin-top: 3rem;
}

.default-subtitle {
    font-size: 1rem;
    margin-top: 1.3rem;
    color: #555;
    margin-bottom: 2.5rem;
}

/* Default Message Index Block */
.default-message-index {
    text-align: center;
    margin-top: 1rem;
    opacity: 1;
    transition: opacity 0.3s ease;

}

.default-message-index.hidden {
    opacity: 0;
    pointer-events: none;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.default-title-index {
    font-size: 1.5rem;
    font-weight: 650;
    margin-top: 3rem;
}

.default-subtitle-index {
    font-size: 1rem;
    margin-top: 1.3rem;
    color: #555;
    margin-bottom: 2.5rem;
    line-height: 2rem;
}
.image-content-index {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 0rem;
}

/* Center the Lottie animation perfectly */
.image-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 4rem;
}

.no-papers-box {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
}

.no-papers-lottie {
    display: flex;
    justify-content: center;
    align-items: center;
}

.no-papers-text {
    font-size: 1rem;
    margin-top: 1.5rem;
    color: #666;
    line-height: 2rem;
}

body.dark .no-papers-text {
    color: #ccc;
}

/* ============================================
   MOBILE FIX — DEFAULT + ERROR MESSAGE
   ============================================ */
@media (max-width: 1000px) {
    body{
        margin-top: 10rem;
    }
    /* Default Message */
    .default-message-index {
        text-align: center;
        margin-top: 2rem;
        padding: 0 1.5rem;
    }

    .default-title-index {
        font-size: 3rem;
        margin-top: 5rem;
        font-weight: 700;
        padding: 0 1.5rem;
    }

    .default-subtitle-index {
        font-size: 1.8rem;
        margin-top: 0.8rem;
        color: #666;
        line-height: 3rem;
        padding: 0 1.5rem;
        padding: 0 2rem;
        text-align:center;
    }

    .image-content-index {
        margin-top: 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* No Papers Box */
    .no-papers-box {
        text-align: center;
        padding: 1rem 1.5rem;
        margin-top: 2rem;
    }

    .no-papers-lottie {
        display: flex;
        justify-content: center;
    }

    .no-papers-text {
        font-size: 2.2rem;
        margin-top: 2rem;
        color: #666;
        line-height: 4rem;
    }
}

.dept-dropdown-box {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    border-radius: 10rem;
    margin-bottom: 2rem;
}

#deptDropdown {
    padding: 12px 18px;
    font-size: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    outline: none;
    width: 300px;
    transition: 0.2s ease;
}

#deptDropdown:hover {
    background: var(--search-bg);
}

@media(max-width:1000px){

    .dept-dropdown-box {
        display: flex;
        justify-content: center;
        margin: 3rem 0 2rem 0;
        padding: 0 1rem;
        margin-bottom: 0;
    }

    #deptDropdown {
        width: 80%;
        padding: 16px 20px;
        font-size: 1.5rem;
        border-radius: 14px;
        border: 2px solid var(--border);
        background: var(--card);
        color: var(--text);
        outline: none;
        cursor: pointer;
        transition: 0.2s ease;
        margin-bottom: 6rem;
        font-size: 2rem;
    }

    #deptDropdown:hover {
        background: var(--search-bg);
    }
    body {
        padding-top: 14rem;
    }
}
