/* Traditional Institutional Reset */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Helvetica Neue', Arial, sans-serif; }
body { background-color: #f0f2f5; color: #222222; line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }

/* Classic Library Header */
.campus-header { background-color: #8B0000; border-bottom: 5px solid #4a0000; padding: 25px 40px; display: flex; align-items: center; justify-content: space-between; }
.header-titles h1 { color: #ffffff; font-size: 24px; font-weight: bold; margin-bottom: 5px; letter-spacing: 0.5px; }
.header-titles h2 { color: #ffcccc; font-size: 15px; font-weight: normal; }
.header-right { color: #ffffff; font-size: 14px; text-align: right; }

/* Solid Navigation Tabs */
.system-nav { background-color: #e0e0e0; border-bottom: 1px solid #cccccc; padding: 0 40px; }
.nav-list { 
    list-style: none; 
    display: flex; 
    overflow-x: auto; 
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list li a { display: block; color: #444444; text-decoration: none; padding: 14px 24px; font-size: 15px; font-weight: bold; white-space: nowrap; cursor: pointer; border-right: 1px solid #cccccc; border-left: 1px solid #ffffff; }
.nav-list li a:hover { background-color: #d5d5d5; }
.nav-list li a.active { background-color: #ffffff; color: #8B0000; border-top: 3px solid #8B0000; border-bottom: 1px solid #ffffff; margin-bottom: -1px; }

/* Simplified Search Area */
.discovery-search { background-color: #ffffff; padding: 25px 40px; border-bottom: 1px solid #cccccc; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.search-info { font-size: 15px; color: #555555; margin-bottom: 15px; }
.search-box { display: flex; max-width: 800px; border: 2px solid #8B0000; }
.search-box select { padding: 12px; border: none; border-right: 2px solid #8B0000; background-color: #f8f9fa; font-size: 15px; font-weight: bold; cursor: pointer; color: #333; }
.search-box input { flex: 1; padding: 12px 15px; border: none; font-size: 16px; font-family: 'Courier New', Courier, monospace; color: #000; }
.search-box button { padding: 12px 30px; background-color: #8B0000; color: #ffffff; border: none; font-weight: bold; font-size: 16px; cursor: pointer; transition: background 0.2s; }
.search-box button:hover { background-color: #660000; }

/* Grid Layout */
.catalog-container { flex: 1; gap: 40px; max-width: 1200px; margin: 40px auto; padding: 0 20px; width: 100%; display: grid; grid-template-columns: 260px 1fr; }

/* Sidebar Elements */
.sidebar-panel { background-color: #ffffff; border: 1px solid #cccccc; border-top: 4px solid #333333; padding: 25px; margin-bottom: 25px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.sidebar-panel.highlight { border-top-color: #8B0000; }
.sidebar-panel h3 { font-size: 16px; color: #222222; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid #eeeeee; }

.contact-info { font-size: 14px; line-height: 1.8; color: #444444; }
.contact-info strong { color: #222222; }
.contact-info a { color: #0056b3; text-decoration: none; font-weight: bold; }

.tech-list { list-style: none; padding: 0; margin: 0 0 20px 0; }
.tech-list li { font-size: 14px; color: #444444; margin-bottom: 8px; padding-left: 15px; position: relative; }
.tech-list li::before { content: "▪"; color: #8B0000; position: absolute; left: 0; top: 0; font-size: 18px; line-height: 1; }

.sidebar-label { font-size: 12px; font-weight: bold; color: #777777; text-transform: uppercase; margin-bottom: 5px; display: block; letter-spacing: 0.5px; }

/* Content Areas */
.abstract-box { background-color: #ffffff; border: 1px solid #cccccc; border-left: 5px solid #0056b3; padding: 25px 30px; margin-bottom: 30px; font-size: 16px; line-height: 1.6; color: #333333; box-shadow: 0 2px 4px rgba(0,0,0,0.04); }
.abstract-box h2 { font-size: 20px; color: #0056b3; margin-bottom: 10px; }

.record-card { background-color: #ffffff; border: 1px solid #cccccc; padding: 30px; margin-bottom: 30px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.record-header { margin-bottom: 20px; border-bottom: 1px solid #eeeeee; padding-bottom: 15px; }
.record-num { font-family: 'Courier New', Courier, monospace; font-size: 13px; font-weight: bold; color: #8B0000; margin-bottom: 8px; }
.record-title { font-size: 24px; color: #222222; margin-bottom: 5px; font-weight: bold; }

.metadata-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.metadata-table th { width: 20%; padding: 12px 20px 12px 0; text-align: right; color: #666666; font-weight: bold; vertical-align: top; border-bottom: 1px solid #f0f0f0; }
.metadata-table td { padding: 12px 0 12px 20px; color: #222222; border-bottom: 1px solid #f0f0f0; }

.tech-tag { display: inline-block; background-color: #e9ecef; color: #333333; padding: 4px 10px; font-size: 13px; border-radius: 3px; border: 1px solid #cccccc; margin: 2px 4px 2px 0; font-family: 'Courier New', Courier, monospace; font-weight: bold; }

.btn-action { display: inline-block; margin-top: 20px; padding: 10px 20px; background-color: #f8f9fa; border: 1px solid #cccccc; color: #222222; text-decoration: none; font-size: 14px; font-weight: bold; cursor: pointer; }

/* Alerts */
.messages { list-style: none; padding: 0; margin-bottom: 20px; }
.alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; }
.alert-success { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; }
.alert-error { color: #a94442; background-color: #f2dede; border-color: #ebccd1; }

/* Footer */
.campus-footer { background-color: #333333; color: #dddddd; text-align: center; padding: 30px; font-size: 13px; border-top: 5px solid #8B0000; margin-top: auto; }

@media screen and (max-width: 900px) {
    .campus-header { flex-direction: column; align-items: flex-start; padding: 20px; gap: 15px; }
    .header-right { text-align: left; }
    
    .system-nav { padding: 0; }
    .nav-list li a { padding: 12px 15px; font-size: 14px; }

    .discovery-search { padding: 20px; }
    .search-box { flex-direction: column; border: none; }
    .search-box select, .search-box input, .search-box button { 
        width: 100%; 
        border: 2px solid #8B0000; 
        margin-bottom: 5px; 
        border-right: 2px solid #8B0000; /* Reset for mobile stacking */
    }

    .catalog-container { grid-template-columns: 1fr; padding: 0 15px; margin: 20px auto; }
    
    .record-card { padding: 20px; }
    .metadata-table th, .metadata-table td { display: block; width: 100%; text-align: left; padding: 10px 0; }
    .metadata-table th { padding-bottom: 2px; color: #8B0000; border-bottom: none; }
    .metadata-table td { padding-top: 0; border-bottom: 1px solid #eeeeee; }
    
    .abstract-box { padding: 20px; }
}

/* Smooth Transitions & Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.catalog-container {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Lightbox Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border: 5px solid #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 18px;
}

/* NProgress Customization */
#nprogress .bar {
    background: #ffffff !important;
    height: 3px !important;
}

#nprogress .peg {
    box-shadow: 0 0 10px #ffffff, 0 0 5px #ffffff !important;
}

#nprogress .spinner-icon {
    border-top-color: #ffffff !important;
    border-left-color: #ffffff !important;
}
