/* BibTeX Modal Styles */
.bibtex-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.bibtex-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bibtex-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bibtex-modal-header {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bibtex-modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.bibtex-modal-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.bibtex-modal-close:hover,
.bibtex-modal-close:focus {
    color: #000;
}

.bibtex-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.bibtex-pub-info {
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.bibtex-pub-info p {
    margin: 5px 0;
}

.bibtex-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
}

.bibtex-container pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    overflow-x: auto;
}

.bibtex-modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.bibtex-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: all 0.2s;
}

.bibtex-btn-primary {
    background: #495057;
    color: white;
}

.bibtex-btn-primary:hover {
    background: #343a40;
    text-decoration: none;
    color: white;
}

.bibtex-btn-primary.copied {
    background: #28a745;
}

.bibtex-btn-secondary {
    background: #6c757d;
    color: white;
}

.bibtex-btn-secondary:hover {
    background: #5a6268;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .bibtex-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .bibtex-modal-header,
    .bibtex-modal-body {
        padding: 15px 20px;
    }
    
    .bibtex-container pre {
        font-size: 12px;
    }
}
