* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('background.webp') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}
.overlay {
    background: rgba(0, 0, 0, 0.7);
    min-height: 100vh;
    padding: 20px;
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}
h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.search-box {
    text-align: center;
    margin-bottom: 30px;
}
.search-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.search-input {
    padding: 12px 20px;
    width: 300px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    background: rgba(255, 255, 255, 0.95);
}
.search-input:focus {
    border-color: #1e88e5;
}
.sort-select {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    outline: none;
}
.sort-select:focus {
    border-color: #1e88e5;
}
.section {
    margin-bottom: 40px;
}
.section-title {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.file-item {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}
.file-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}
.file-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.file-icon {
    font-size: 2rem;
    margin-right: 15px;
    min-width: 40px;
}
.file-name {
    font-weight: 600;
    color: #333;
    font-size: 1.3rem;
    word-break: break-word;
}
.file-path {
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
}
.file-image {
    text-align: center;
    margin: 15px 0;
}
.file-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.file-description {
    color: #333;
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.5;
    background: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    border-left: 3px solid #1e88e5;
    white-space: pre-wrap;
    overflow: visible;
    max-height: none;
    position: relative;
}
.file-description a {
    color: #1e88e5;
    text-decoration: underline;
}
.file-description a:hover {
    color: #0d47a1;
}
/* Images in descriptions - FULL WIDTH with proper aspect ratio */
.file-description img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
    display: block;
}
/* MathJax specific styling */
.file-description .MathJax_Display {
    margin: 1em 0 !important;
    text-align: center !important;
}
.file-description .MathJax {
    outline: 0 !important;
}
.file-tags {
    margin-bottom: 15px;
}
.tag {
    display: inline-block;
    background: #e0e0e0;
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin: 2px;
}
.file-info {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 15px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}
.file-actions {
    text-align: center;
}
.file-link {
    display: inline-block;
    background: #64b5f6;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.file-link:hover {
    background: #1e88e5;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.papers-link {
    background: #64b5f6;
}
.articles-link {
    background: #64b5f6;
}
.highlight {
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
}
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    h1 {
        font-size: 2rem;
    }
    .file-name {
        font-size: 1.1rem;
    }
    .search-controls {
        flex-direction: column;
        gap: 10px;
    }
    .search-input {
        width: 100%;
        max-width: 300px;
    }
}
